wowgetoffyourcellphone Posted May 16, 2017 Author Report Share Posted May 16, 2017 (edited) It happens the moment I first select the Civic Center or Female Citizen. Both have their own auras. Looks like it's related to the tooltip? There's also a problem with the struct tree, that may or may not be related, dunno. ERROR: JavaScript error: gui/structree/helper.js line 76 ReferenceError: GetTechnologyBasicDataHelper is not defined deriveModifications@gui/structree/helper.js:76:3 selectCiv@gui/structree/structree.js:53:23 __eventhandler234 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:40:3 __eventhandler204 (press)@menuStrucTreeButton press:2:8 ERROR: GUI page 'page_structree.xml': Failed to call init() function Edited May 16, 2017 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
elexis Posted May 16, 2017 Report Share Posted May 16, 2017 This sounds a lot like the Templates.js file being outdated: https://github.com/JustusAvramenko/delenda_est/blob/master/globalscripts/Templates.js Didn't delenda est have an issue with that some weeks ago already? Why is a copy of that around to begin with? If you need a new function, add it to a new file. If you need to change an existing function, tell us and we'll see what we can do to make 0ad work better with mods. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 16, 2017 Author Report Share Posted May 16, 2017 I will have to go back through my commits and see what was changed. Quote Link to comment Share on other sites More sharing options...
elexis Posted May 17, 2017 Report Share Posted May 17, 2017 Comparing the delenda est version with the public mod version from that time, the only difference is: @@ -368,7 +368,7 @@ ret.cost = { "time": template.researchTime ? +template.researchTime : 0 }; for (let type of resources.GetCodes()) - ret.cost[type] = +(template.cost && template.cost[type] || 0); + ret.cost[type] = template.cost && template.cost[type] ? +template.cost[type] : 0; ret.tooltip = template.tooltip; ret.requirementsTooltip = template.requirementsTooltip || ""; Since that file is outdated, things like the resource trickle tooltip and aura range parsing are missing here: https://code.wildfiregames.com/source/0ad/history/ps/trunk/binaries/data/mods/public/globalscripts/Templates.js https://github.com/JustusAvramenko/delenda_est/commits/master/globalscripts/Templates.js Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 17, 2017 Author Report Share Posted May 17, 2017 (edited) Okay, I believe I did this to allow the Glory costs to show up or something like that. Someone said, "hey, to fix it just add this line to the code, lol!" and I did and it worked. Fixing Template.js fixed the errors though. Edited May 17, 2017 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
elexis Posted May 17, 2017 Report Share Posted May 17, 2017 The current version of the copy of delenda est's file is the same as in the public mod one excluding this cost diff. The file (when it was added to delenda est on february 22nd), was either outdated by a commit which was the reverse of that hunk above (rP19213), or intentionally used the prior version. Now since that commit specifically fixed a delenda est bug, I wonder why delenda est reverts that x) This comment is especially about the changed line https://code.wildfiregames.com/D113?id=402#inline-2220 IMO the only real option you have here is deleting that file to stop having to keep it in sync and tell us if something is broken, we can fix it quickly. I've tested de with the deleted file and it works just fine. If you don't delete it, it will just throw random errors the next time we change it. Furthermore, your ptol_hero_cleopatra_3.json doesn't have a name nor description, thus bugs with the tooltips. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 18, 2017 Author Report Share Posted May 18, 2017 (edited) It's very possible a fix I request was added to the public mod and then I was not aware the fix was committed or I forgot. I'll delete my amended file and hope that doesn't screw with something I once thought was important. EDIT: No can do. Deleting my DE Templates.js gives an error in structree about the production queue and structree does not render at all when my file is deleted. DE has 2 units which research techs. The Worker Elephant and Chanakya.These may be the trigger to the error, or it may be because I have not gone through every single tech and added Glory costs to them. If the ultimate fix is to fix the tech costs, then I'll do it, but that means every other mod that adds a new resource will have to edit all existing techs in the game. ERROR: JavaScript error: gui/structree/structree.js line 273 TypeError: g_ParsedData.units[unitCode].production is undefined selectCiv@gui/structree/structree.js:273:1 __eventhandler38 (selectionchange)@civSelection selectionchange:0:1 init@gui/structree/structree.js:40:3 __eventhandler8 (press)@menuStrucTreeButton press:2:8 ERROR: GUI page 'page_structree.xml': Failed to call init() function Edited May 18, 2017 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted May 18, 2017 Report Share Posted May 18, 2017 ping @s0600204 ;-) 2 Quote Link to comment Share on other sites More sharing options...
s0600204 Posted May 18, 2017 Report Share Posted May 18, 2017 The problem you're having is with code added for D92 (which was literally just committed yesterday evening), that evidently wasn't tested fully. So, y'know, patch. 4 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted May 29, 2017 Author Report Share Posted May 29, 2017 On 5/18/2017 at 5:46 PM, s0600204 said: The problem you're having is with code added for D92 (which was literally just committed yesterday evening), that evidently wasn't tested fully. So, y'know, patch. Commented on the patch. Quote Link to comment Share on other sites More sharing options...
s0600204 Posted May 30, 2017 Report Share Posted May 30, 2017 12 hours ago, wowgetoffyourcellphone said: Commented on the patch. Replied to your comment. (In case you hadn't noticed/been otherwise notified.) 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 1, 2017 Author Report Share Posted June 1, 2017 (edited) Two requests before you guys go code freeze. #1: I get this error message often. Could it be because of my new resource type? Not sure. WARNING: JavaScript warning: simulation/components/Barter.js line 45 reference to undefined property multiplier.buy[resource] #2: I still get the problem where if there are civs with no building health civ bonus, then they think their buildings are damaged and need repaired. This hurts the AI significantly playing those civs when their units gather around buildings to "repair" them perpetually. To clarify, civs with a building health bonus, like the Greek civs, do not have this problem. Similarly, the Celts who have a building health penalty are likewise unaffected by the bug. I get no error messages pertaining. Maybe it's related to these weird values that show up in the tooltips. Rounding errors?: commands.txt Edited June 1, 2017 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 1, 2017 Report Share Posted June 1, 2017 For #1, I will check it's perhaps indeed related to the glory cost. @wowgetoffyourcellphone: Did you its 'trueprice' in that json file? edit: uhm yes you did https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/data/resources/glory.json 1 Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 1, 2017 Report Share Posted June 1, 2017 @wowgetoffyourcellphone: btw you don't have a player_gaia template? Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 1, 2017 Report Share Posted June 1, 2017 Well the problem is your custom https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/components/Player.js Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 1, 2017 Author Report Share Posted June 1, 2017 10 hours ago, fatherbushido said: @wowgetoffyourcellphone: btw you don't have a player_gaia template? DE just uses the public one. Perhaps a problem? Quote Link to comment Share on other sites More sharing options...
s0600204 Posted June 1, 2017 Report Share Posted June 1, 2017 (edited) The (vanilla 0ad) special/player_gaia template is not set up to inherit from special/player, and thus does not inherit the glory resource's barter multiplier when run in the Delenda Est mod. The template should probably be rewritten so it inherits what it needs. Patch: https://code.wildfiregames.com/D591 Edited June 2, 2017 by s0600204 Add link to prospective patch. 3 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 2, 2017 Author Report Share Posted June 2, 2017 2 hours ago, s0600204 said: The (vanilla 0ad) special/player_gaia template is not set up to inherit from special/player, and thus does not inherit the glory resource's barter multiplier when run in the Delenda Est mod. The template should probably be rewritten so it inherits what it needs. Thankyou. This should point me in the right direction. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 2, 2017 Author Report Share Posted June 2, 2017 7 hours ago, s0600204 said: The (vanilla 0ad) special/player_gaia template is not set up to inherit from special/player, and thus does not inherit the glory resource's barter multiplier when run in the Delenda Est mod. The template should probably be rewritten so it inherits what it needs. Alright, got it done. Thanks for that. No more error message. 1 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 12, 2017 Author Report Share Posted June 12, 2017 (edited) WARNING: JavaScript warning: gui/common/tooltips.js line 427 reference to undefined property template.resourceTrickle.rates[res] I get that when I select my first unit or building now, and when I first load structree. Edited June 12, 2017 by wowgetoffyourcellphone Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 12, 2017 Author Report Share Posted June 12, 2017 Also, a get this when I select the Chinese in structree. This one is puzzling me, because the Chinese civic center definitely has a Town Phase tech, you can even see it in the structree. WARNING: The "Town Phase" technology is not researchable in any structure buildable by the chin civilisation, but is required by something that this civ can research, train or build! Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 12, 2017 Report Share Posted June 12, 2017 Try perhaps to move the techs from https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/structures/chin_civil_centre.xml in https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/template_structure_civic_civil_centre.xml Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted June 12, 2017 Author Report Share Posted June 12, 2017 3 minutes ago, fatherbushido said: Try perhaps to move the techs from https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/structures/chin_civil_centre.xml in https://github.com/JustusAvramenko/delenda_est/blob/master/simulation/templates/template_structure_civic_civil_centre.xml Tried that. :/ Just now synced my latest files. Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 12, 2017 Report Share Posted June 12, 2017 Perhaps because you have `"autoResearch": true` in the chin phase town tech? Quote Link to comment Share on other sites More sharing options...
fatherbushido Posted June 12, 2017 Report Share Posted June 12, 2017 7 hours ago, wowgetoffyourcellphone said: WARNING: JavaScript warning: gui/common/tooltips.js line 427 reference to undefined property template.resourceTrickle.rates[res] I get that when I select my first unit or building now, and when I first load structree. I guess r19768 fixes it? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.