Jump to content

Latest Commit Breaks Paired Techs


wowgetoffyourcellphone
 Share

Recommended Posts

http://trac.wildfiregames.com/changeset/18773

 

I believe this is the commit that break paired techs^

 

Quote

 

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_mining_pickaxes"

WARNING: This entity cannot research "gather_lumbering_ironaxes"

WARNING: This entity cannot research "gather_wicker_baskets"

WARNING: This entity cannot research "cost_structures_rubble"

WARNING: This entity cannot research "pop_house_01"

WARNING: This entity cannot research "gather_lumbering_ironaxes"

 

Single techs unaffected by this warning.

  • Like 1
Link to comment
Share on other sites

Not sure if it's related to that changeset or a earlier changeset that changed the structree code, but now I am getting this problem:

ERROR: JavaScript error: gui/structree/draw.js line 187 TypeError: prod is undefined draw@gui/structree/draw.js:187:1 selectCiv@gui/structree/structree.js:303:2 __eventhandler162 (selectionchange)@civSelection selectionchange:0:1

 

^That's when I select the Mauryans. Probably do not like the Worker Elephant and Chanakya units having techs.

 

ERROR: JavaScript error: gui/structree/structree.js line 121 TypeError: techPairs[pair.req] is undefined selectCiv@gui/structree/structree.js:121:7 __eventhandler162 (selectionchange)@civSelection selectionchange:0:1

 

^This one I think has a problem with a tech pair superseding a single tech. Only happens with civ that have a tech pair (Olympic Wrestling/Hoplite Race) superseding a single tech (Greek Martial Arts).

 

Also, when structree problem occurs, it 'pause' the game when I go back to the game, but have no pause dialog.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

9 minutes ago, elexis said:

The tech tree one sounds like http://trac.wildfiregames.com/ticket/3993

Maybe (for the tech pair supersede problem, look like I'm not only modder who have trouble with the Struct Tree), but Chanakya (unit who can research techs) was displayed fine before the recent structree changeset. ¯\_(ツ)_/¯  

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

http://trac.wildfiregames.com/changeset/18746 is the only one that changed the tech tree recently, and that only resized the phase bar, so should be unrelated.

I dont have any issues in vanilla 0ad with the tech tree. The patch from http://trac.wildfiregames.com/ticket/3823 also doesn't affect the tech tree nor the techs itself (only the way they were displayed ingame)

Link to comment
Share on other sites

I turned off DE and ran vanilla game. The Selecudic fortress pair is broken in vanilla. So, problem #1 is a vanilla problem too. Cannot click a paired tech. Get warning message. The weird selection visualization could be a symptom.

Problem #2 with structree and not showing Chanakya or Worker elephant on the right is that it does not like the Worker Elephant having paired techs. Could maybbe solved by solving #1? If not, it's a problem with structree and the ticket you link could be the solution.

Problem #3 with not liking the paired tech supersede tag to go after a single tech, not sure what's happening here. I can guess it's related back to #1 again since it happend at the same time.

Edited by wowgetoffyourcellphone
Link to comment
Share on other sites

8 hours ago, Imarok said:

Edit2: Now it is fixed

Yep, last patch I renamed the txt to .diff and apply with svn. It fix everything except structree problem, but I think that is a battle for another day unless you want to tackle that guy. For this alpha, to temporary fix the strcutree errors, I will probably just remove the pair techs from the worker elephant and I will remove the supoersedes from the paired barracks tech. Structree also show 3 different phase tech for each phase (lol), because not parse civ and notciv tags right. 

 

*Or I can release disclaimer that structree will be broken and keep the gameplay intact.
 

EDIT: Did your patch just alllow player to upgrade more than 1 unit at a time? Is nice.

Edited by wowgetoffyourcellphone
  • Like 1
Link to comment
Share on other sites

About #3993 (broken tech requrements in the structure tree of non-vanilla 0 A.D.):

For the tech tree issue (tech requirements) there is a patch in http://trac.wildfiregames.com/ticket/3993https://github.com/s0600204/0ad/commits/3993_notciv, that one function is just a bit ugly (14 layers of nesting). @fatherbushido said he also has some other ugly hack that he hates if you're looking for some temporary workaround.

Everytime the tech requirements logic was changed in the simulation, it broke the tech tree and the AI since these 3 places each copy the logic instead of reusing the same function. The aim of the ticket was to unify that code in the globalscripts directory. (However the proposed solution moves a bit too much structure tree specific code to globalscripts, as the AI and simulation only need a very short check).

If the code is not unified, every further change to the tech requirements logic will break the AI code and the tech tree code again, as most coders are unaware of how these code mazes work (it's also not obvious that the other places have this duplication at all).

 

  • Like 1
Link to comment
Share on other sites

I did not think the structree fix would be easy or swift, but thanks for the explanation. I don't think I will include the patch in my mod for this time around, or if I do, I will wait until the release candidate is release and make sure there are no conflict with s0600204's patch.

Edited by wowgetoffyourcellphone
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...