Jump to content

s0600204

WFG Programming Team
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by s0600204

  1. @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.
  2. Wow. Thank you all for the feedback and positive comments.

    (GunChleoc) ...on the lowest row, the tooltips get cropped on small screens.

    (feneur) ...the lowest tooltips get cropped on larger screens as well, possibly the size of the area is hardcoded?

    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.

    (GunChleoc) As a feature idea, display what the technologies do on the tooltips.

    (feneur) I definitely agree with adding what the technologies do on the tooltips...

    (niektb) The addition of a tooltip description and/or stats of the building / unit / tech would be a good addition indeed as others already pointed out.

    They're already on my todo list ;)

    (feneur) Am i correct in assuming that this could at one point be added to the game directly?

    (niektb) Could this maybe be combined with the history screen?

    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 center should appear on phase 1...

    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 :P)

    Ah, well, it doesn't seem to show custom technologies and custom icons.

    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).

  3. (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:

    DEcfcpT.jpg

    Ideally this will evolve from a static design concept into an online interactive Structure Tree that updates itself whenever changes are made to 0 A.D.

    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:

    ZVPpiAU.jpg

    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

    • Like 17
×
×
  • Create New...