gameboy Posted March 18, 2019 Report Share Posted March 18, 2019 @wowgetoffyourcellphone I tested the latest https://github.com/justusavramenko/delenda_est, and I found these errors in the game. I played a single-player game. My operating system is Win1064. 8G RAM. ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:967:2 onSimulationUpdate@gui/session/session.js:897:2 __eventhandler165 (simulationupdate)@session simulationupdate:0:1 ERROR: JavaScript error: globalscripts/sprintf.js line 66 Error: [sprintf] property 'hotkey' does not exist sprintf.format@globalscripts/sprintf.js:66:1 sprintf@globalscripts/sprintf.js:50:16 getRepairTimeTooltip@gui/common/tooltips.js:399:3 displaySingle@gui/session/selection_details.js:257:34 updateSelectionDetails@gui/session/selection_details.js:463:3 updateGUIObjects@gui/session/session.js:967:2 onSimulationUpdate@gui/session/session.js:897:2 __eventhandler165 (simulationupdate)@session simulationupdate:0:1 ERROR: JavaScript error: gui/summary/layout.js line 252 TypeError: headerGUI is undefined updateGeneralPanelHeadings@gui/summary/layout.js:252:3 updatePanelData@gui/summary/summary.js:376:2 selectPanel@gui/summary/summary.js:212:3 __eventhandler351 (press)@resourcesPanelButton press:0:1 ERROR: JavaScript error: gui/summary/layout.js line 252 TypeError: headerGUI is undefined updateGeneralPanelHeadings@gui/summary/layout.js:252:3 updatePanelData@gui/summary/summary.js:376:2 selectPanel@gui/summary/summary.js:212:3 __eventhandler351 (press)@resourcesPanelButton press:0:1 ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:8: StartTag: invalid element name ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:9: attributes construct error ERROR: CXeromyces: Parse error: gui/pregame/userreport/userreport.xml:9: Couldn't find end of Start Tag object line 9 Quote Link to comment Share on other sites More sharing options...
Guest Posted March 18, 2019 Report Share Posted March 18, 2019 (edited) Broken translation most likely. I think you reported the exact same issue a while back. Edited March 18, 2019 by Guest Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 18, 2019 Author Report Share Posted March 18, 2019 This is not a translation error, this is something new, thank you. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted March 19, 2019 Report Share Posted March 19, 2019 Did you update base game? Quote Link to comment Share on other sites More sharing options...
gameboy Posted March 19, 2019 Author Report Share Posted March 19, 2019 @wowgetoffyourcellphone Yes, I always use the game content in SVN. Quote Link to comment Share on other sites More sharing options...
myou5e Posted August 12, 2020 Report Share Posted August 12, 2020 (edited) Hi I am getting the same error when I try to edit the schema in a Component File. I'm trying to make a "Renewable" resource that regenerates slowly, and that doesn't become exhausted after it is used up. I used the ResourceSupply component from Borgs mod to get the "Change" and "Fattening" which makes berries slowly regrow. Then I edited the berry template. The "Renewable" part under "ResourceSupply" is from the Component file which schema I edited. <?xml version="1.0" encoding="utf-8"?> <Entity parent="template_gaia_flora_bush"> <Identity> <Tooltip>Pick fruit for food.</Tooltip> </Identity> <Minimap> <Type>food</Type> <Color r="155" g="204" b="102"/> </Minimap> <Obstruction> <Static width="4.0" depth="4.0"/> <BlockMovement>false</BlockMovement> <BlockPathfinding>false</BlockPathfinding> </Obstruction> <ResourceSupply> <MaxAmount>200</MaxAmount> <Amount>200</Amount> <Type>food.fruit</Type> <Change> <Fattening> <Value>1</Value> <Interval>4000</Interval> </Fattening> </Change> <Renewable>true</Renewable> </ResourceSupply> <Sound> <SoundGroups> <select>interface/select/resource/sel_fruit.xml</select> </SoundGroups> </Sound> </Entity> The Schema in the Component File is like this(the Change part is from Borgs mod, the Renewable from my own): ResourceSupply.prototype.Schema = "<a:help>Provides a supply of one particular type of resource.</a:help>" + "<a:example>" + "<Amount>1000</Amount>" + "<MaxAmount>1500</MaxAmount>" + "<Type>food.meat</Type>" + "<KillBeforeGather>false</KillBeforeGather>" + "<MaxGatherers>25</MaxGatherers>" + "<DiminishingReturns>0.8</DiminishingReturns>" + "<Change>" + "<Growth>" + "<Constraint>Alive</Constraint>" + "<Value>2</Value>" + "<Interval>1000</Interval>" + "</Growth>" + "<Decay>" + "<Constraint>Dead</Constraint>" + "<Value>-1</Value>" + "<Interval>1000</Interval>" + "<Delay>2000</Delay>" + "</Decay>" + "</Change>" + "<Renewable>false</Renewable>"+ "</a:example>" + "<element name='KillBeforeGather' a:help='Whether this entity must be killed (health reduced to 0) before its resources can be gathered'>" + "<data type='boolean'/>" + "</element>" + "<element name='Amount' a:help='Amount of resources available from this entity'>" + "<choice><data type='nonNegativeInteger'/><value>Infinity</value></choice>" + "</element>" + "<optional>" + "<element name='MaxAmount' a:help='The max amount of resource the entity can reach when growing'>" + "<ref name='nonNegativeDecimal'/>" + "</element>" + "</optional>" + "<optional>" + "<element name='Renewable' a:help='Whether this resource is to be left alone(entity not removed) after it's resource supply is used up'>" + "<data type='boolean' />" + "</element>" + "</optional>" + "<element name='Type' a:help='Type and Subtype of resource available from this entity'>" + Resources.BuildChoicesSchema(true, true) + "</element>" + "<element name='MaxGatherers' a:help='Amount of gatherers who can gather resources from this entity at the same time'>" + "<data type='nonNegativeInteger'/>" + "</element>" + "<optional>" + "<element name='DiminishingReturns' a:help='The relative rate of any new gatherer compared to the previous one (geometric sequence). Leave the element out for no diminishing returns.'>" + "<ref name='positiveDecimal'/>" + "</element>" + "</optional>" + "<optional>" + "<element name='Change' a:help='Optional element for defining whether a resource supply would regenerate when it"s not gathered'>" + "<zeroOrMore>" + "<element a:help='Optional element for defining whether a resource supply would regenerate when it"s not gathered'>" + "<anyName />" + "<interleave>" + "<optional>" + "<element name='Constraint' a:help='Specifies the terrain type restriction for this building.'>" + "<choice>" + "<value>Alive</value>" + "<value>Dead</value>" + "<value>Both</value>" + "</choice>" + "</element>" + "</optional>" + "<optional>" + "<element name='Delay' a:help='Delay in milliseconds before the object starts growing or decaying'>" + "<ref name='nonNegativeDecimal'/>" + "</element>" + "</optional>" + "<element name='Value' a:help='The amount of resource added per interval'>" + "<data type='decimal'/>" + "</element>" + "<element name='Interval' a:help='The interval in milliseconds'>" + "<data type='nonNegativeInteger'/>" + "</element>" + "</interleave>" + "</element>" + "</zeroOrMore>" + "</element>" + "</optional>"; The other JS Code is, for now, just ResourceSupply.prototype.GetRenewable = function() { return this.Renewable == "true"; }; I think the logic which actually uses this function is irrelevant, because when I don't call this function at all I still get the "attributes construct error". ERROR: CXeromyces: Parse error: (null):9: attributes construct error ERROR: CXeromyces: Parse error: (null):9: Couldn't find end of Start Tag element line 9 ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: optional line 9 and element ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: interleave line 9 and optional ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: element line 9 and interleave ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: define line 9 and element ERROR: CXeromyces: Parse error: (null):9: Opening and ending tag mismatch: grammar line 1 and define ERROR: CXeromyces: Parse error: (null):9: Extra content at the end of the document ERROR: CXeromyces: Parse error: (null):0: xmlRelaxNGParse: could not parse schemas ERROR: RelaxNGValidator: Failed to compile schema I'm using version 23. I don't understand the logic of when to use <interleave> and <ref name='x'> vs <data type='x'> Edited August 12, 2020 by myou5e Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 12, 2020 Report Share Posted August 12, 2020 You can look at https://code.wildfiregames.com/D1718 If you don't want to use status effects you can look at the previous diffs 1 Quote Link to comment Share on other sites More sharing options...
myou5e Posted August 12, 2020 Report Share Posted August 12, 2020 2 minutes ago, Stan` said: You can look at https://code.wildfiregames.com/D1718 If you don't want to use status effects you can look at the previous diffs Can this prevent the berries from being exhausted when they get to 0? Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 12, 2020 Report Share Posted August 12, 2020 Nah I think it needs extra code. Could be added though I guess. EDIT: Just saw you used the old patch I gave borg- sorry 1 Quote Link to comment Share on other sites More sharing options...
myou5e Posted August 12, 2020 Report Share Posted August 12, 2020 1 minute ago, Stan` said: Nah I think it needs extra code. Could be added though I guess. I really want to know why editing the schema didnt work. Do you know what I did wrong? Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 12, 2020 Report Share Posted August 12, 2020 Yep. You forgot to replace the " ' " by " (in the help comment) 1 Quote Link to comment Share on other sites More sharing options...
myou5e Posted August 12, 2020 Report Share Posted August 12, 2020 (edited) 3 minutes ago, Stan` said: Yep. You forgot to replace the " ' " by " (in the help comment) <- Me right now Edited August 12, 2020 by myou5e Quote Link to comment Share on other sites More sharing options...
Freagarach Posted August 12, 2020 Report Share Posted August 12, 2020 @myou5e For your information, there is a lot of useful modding information in https://wildfiregames.com/forum/index.php?/topic/21083-how-to-modify-0-ad/ (Also about resources not getting exhausted IIRC.) 1 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.