Jump to content

Tech/Structure Tree Visualisation


Recommended Posts

Did you hear that? Something happened, didn't it?

(More seriously: r16276. Small resolutions aren't supported yet, and that will not be fixed for A18. Apart from that try to break it and report back, else have fun with it.)

And again a huge thank you to s0600204 for both creating it and letting us merge it!

nEAT! Works with the base game pretty good. Doesn't work with my mod for a reason I dont know:

WARNING: Unknown reqs operator: class

WARNING: Unknown reqs operator: number

WARNING: Unknown reqs operator: class

WARNING: Unknown reqs operator: number

WARNING: JavaScript warning: gui/structree/structree.js line 167 reference to undefined property g_ParsedData.phases[prod]

ERROR: JavaScript error: gui/structree/structree.js line 167 TypeError: g_ParsedData.phases[prod] is undefined selectCiv@gui/structree/structree.js:167:5 __eventhandler88 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:34:2 __eventhandler59 (press)@menuStrucTreeButton press:2:8

ERROR: GUI page 'page_structree.xml': Failed to call init() function

Engine exited successfully on 2015-02-07 at 01:03:44 with 321 message(s), 2 error(s) and 5 warning(s).

Is maybe because my mod has a pair for Town phase.

Some suggestion to make this great feature even better:

1. Call it the Game Library and make it one part of a bigger in-game manuel. Or Civilization Tree (for now, because it is all the game has) instead of "structure tree."

2. Launch this screen from the little 'i' icon in game setup insytead of using the old layout. I am starting to think the civ json files need to be extrended or streamline.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

And again a huge thank you to s0600204 for both creating it and letting us merge it!

:thank_you2: No problem! Glad people like it.

Is maybe because my mod has a pair for Town phase.

Quite possibly.

I've been playing around with the aristeia mod locally, getting the egyptian civilisation to conform to zophim's design specification, and part of what he spec'ed is that the user gets a choice when researching city phase - to go for either Rameses or Theban civ traits. And the structree really didn't like the phase-pairing required.

I did manage to resolve it, at least for A17 - but I don't run A18/SVN, thus I don't know if my changes are compatible with the work leper did to make the structree work with A18. No doubt we'll make something work...

Link to comment
Share on other sites

Nice. Great to see you still working on it. :) I remove the phase tech pair and things look better, except now that it is angry that some techs supposedly don't have a "specific phase."

WARNING: gather_lumbering_bowsaw doesn't have a specific phase set (structures/athen_storehouse)

WARNING: gather_capacity_wheelbarrow doesn't have a specific phase set (structures/athen_storehouse)

WARNING: special_storehouse doesn't have a specific phase set (structures/athen_storehouse)

WARNING: gather_draft_animals doesn't have a specific phase set (structures/athen_corral)

WARNING: siege_torsion_springs doesn't have a specific phase set (structures/athen_fortress)

WARNING: siege_flaming_munitions doesn't have a specific phase set (structures/athen_fortress)

WARNING: JavaScript warning: gui/structree/draw.js line 28 reference to undefined property g_CivData[g_SelectedCiv].buildList[pha]

ERROR: JavaScript error: gui/structree/draw.js line 28 TypeError: g_CivData[g_SelectedCiv].buildList[pha] is undefined draw@gui/structree/draw.js:28:12 selectCiv@gui/structree/structree.js:249:2 __eventhandler36 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:34:2 __eventhandler7 (press)@menuStrucTreeButton press:2:8

ERROR: GUI page 'page_structree.xml': Failed to call init() function

ERROR: CCacheLoader failed to find archived or source file for: "art/textures/ui/session/portraits/null"

Problem is, the techs do have a phase set, as seen in the tech's code:

"requirements": {"all": [{"tech": "phase_town"}, {"tech": "training_animals_husbandry"}]},

I am guessing the structree does not like "all" and "any" and things like this? :D Good work so far.

Link to comment
Share on other sites

@stanislas: Ah, now that's relatively easy. The norse civ doesn't have any structures it can build in the city phase. The code is expecting some and is complaining when it can't find any.

If you're running SVN/A18, then replace gui/structree/structree.js in your game's files with https://github.com/s0600204/0ad-structree-mod/raw/A18/gui/structree/structree.js and the error should clear.

@wgoyc: Does https://github.com/s0600204/0ad-structree-mod/tree/A18-delenda solve your problems? (If you download and install it as a mod)

Link to comment
Share on other sites

@wgoyc: Does https://github.com/s0600204/0ad-structree-mod/tree/A18-delenda solve your problems? (If you download and install it as a mod)

Actually, the svn version shows more. That one doesn't show anything.

ERROR: JavaScript error: gui/structree/helper.js line 77 TypeError: path.lastIndexOf is not a function depath@gui/structree/helper.js:77:2 unravelPhases@gui/structree/load.js:326:1 selectCiv@gui/structree/structree.js:119:2 __eventhandler256 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:34:2 __eventhandler227 (press)@menuStrucTreeButton press:2:8

ERROR: GUI page 'page_structree.xml': Failed to call init() function

Link to comment
Share on other sites

@wowgetoffyourcellphone: Typo, should be fixed. Try again?

It's getting closer! I see that some things are in the wrong order and for some reason has missing icons on the left.

For instance, in this shot you see in the Civic Center that the III and IV phase techs are in the wrong row. Also, buildings on bottom row should be in row above them (City Phase row).

Is there something I can do with my mod that I can fix so you don't have to keep editing your code for outlier? Or do you want to keep tweaking code to try and fix as many case as possible?

post-16580-0-32273500-1423442923_thumb.p

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

*chuckles* ^_^ Yeah, looks like the phase list is out of order.

There's a bit of code that works out the order of phases. Needless to say, it had a bug. It should now be fixed. Third time's the charm?

I wouldn't count this as an outlier - this bug would have popped up sooner or later.

Edit: I don't know why the phase icons down the side are missing. Thoughts, leper? Solved.

Edited by s0600204
Link to comment
Share on other sites

*chuckles* ^_^ Yeah, looks like the phase list is out of order.

There's a bit of code that works out the order of phases. Needless to say, it had a bug. It should now be fixed. Third time's the charm?

I wouldn't count this as an outlier - this bug would have popped up sooner or later.

Edit: I don't know why the phase icons down the side are missing. Thoughts, leper?

Workas great now. Everything is in right place. Last thing is that the icons on the left are still purple. Error is this:

ERROR: CCacheLoader failed to find archived or source file for: "art/textures/ui/session/portraits/null"

Link to comment
Share on other sites

  • 9 months later...

I would be nice to have the "live" version embedded on the main web

Unfortunately the UI (taking after the game itself) is quite ugly. A web version should be more dynamic and legible, but I agree it would be nice to have a generated manual/enyclopedia for some game content. See also #1840 for an attempt at generating a PDF manual.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...