Jump to content

s0600204

WFG Programming Team
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by s0600204

  1. Or you could make sure that each tech in the web has, within its JSON description, the tech codes of its immediate dependancies, and then draw the web procedurally. Anyhow, pursuing your web idea further, do you propose a single unified web for each civilisation, with military and economic techs in the same web; several webs for each civ, with one web for economic, one for military, etc; or that each building in the game capable of researching techs should have it own, specific, web?
  2. I've made an update: Tooltips now have the same descriptions used in-game; and for units and structures, attack and armour stats are shown where applicable. I'm not quite happy with how the stats are presented, and I'll probably tweak their appearance, but they are now present. @GunChleoc: Positioning isn't really the issue (although it would be something of a headache). And unless you're playing on a very high resolution screen there will always be more elements of the tech/structure tree than fit the screen. And as for i18n, I think you may have answered your own previous question . It's been added to my todo list. @feneur: Indeed .
  3. Yes, that is possible... ...but as far as I know this isn't, although I suspect someone will correct me if I'm wrong... ...precisely. I'm not sure. I don't know much about how i18n works in-game ordinarily, so I'd have to look into it.
  4. @Prodigal Son: I... had not noticed that. But a check of the code indicates you are correct. Well spotted. And fixed. Thank you.
  5. @feneur: Either. As I understand it, UI elements and layout are specified in XML files which are parsed by the (c++) engine and used to create what you see. JavaScript can manipulate these elements (change textual content, change image used, set visibility, etc.) but can't call into being a new element that hasn't been specified in the XML file of the currently loaded UI. Or at least that's the impression I got from reading through the (possible slightly out-of-date) documentation on trac and the XML files currently used ingame.
  6. Wow. Thank you all for the feedback and positive comments. Fixed. The tooltips should now better position themselves. And the height is not hardcoded. The height of the draw area is dependant on the number of rows - if a fourth phase was added to the game, the code (which starts off with no preconceptions of how many phases there are) automatically adapts and the draw area will get taller. It's a similar principle with the width of the draw area, which changes depending on the widths of the UI boxes for the chosen civ's buildings after the units & techs are added. They're already on my todo list I agree it would be nice to have this inside 0ad itself, maybe in a way similar to how the civ history screen appears or incorporated with it or something. However there is one big obstacle in the way of doing that at the moment - in order to get the visual aspect of the tree, either the game's GUI engine needs a recode to permit the creation of UI elements from JavaScript, or an SVG/HTML-Canvas-like UI element would need to be added. (And I'm not proficient enough in C++ code to do either). The civ centre currrently appears in phase 2 because that is when it can be built. I know, I don't want it there either. I figured someone would mention it. When I get a chance, I'll write in an exception that forces it into phase 1. (And then someone will doubtless complain about that ) Which techs/icons are missing? The 0ad wheel is being used as a placeholder by the system - if you see it, it means the image linked by the underlying template doesn't exist or can't be found (by first looking in the art folder of the mod linking it, then each of its dependancies).
  7. (No, I'm not trying to 're-envision' how techs work in 0ad, don't worry!) A while ago, Pureon showcased some of the icons the art team had been working on (http://www.wildfiregames.com/forum/index.php?showtopic=17025) and along with a selection of icons, he also displayed a Tech/Structure tree concept: I liked the idea (as did the commenters in that topic) and so I decided to attempt to implement it - with a little interpretation. After months of on/off development (mostly off than on) and various revisions, I have got it to a point where I'm happy to share it with the community. Here's a screenshot: A live interactable version can be found here: http://s06eye.co.uk/0ad/techtree-v2 And the code is on github here: https://github.com/s0600204/0ad-techtree-v2 Please note that this is no more finished than 0ad is. There are changes to come, efficiency improvements, appearance tweaks and such. But I thought I'd share my progress and get some (hopefully favourable) feedback. Enjoy! Update! It is now possible to see this in-game. See this post for details! Code Updates: 21st October : Tooltip positioning is better. 22nd October : Stats are now loaded from parent templates properly 23rd October : Tooltips now have the same descriptions used in-game; and for units and structures, attack and armour stats are shown where applicable. 3rd December : Three more community mods available for comparison, rewrite much of the data parsing code. 30th March : Big update to mods' simulation data, and modifications to permit aristeia's phase-pair techs
×
×
  • Create New...