gameboy Posted August 2, 2017 Report Share Posted August 2, 2017 (edited) @wowgetoffyourcellphone Today, I tested the latest SVN19942 and the latest delenda_est, and when I started a new game, these errors occurred: ERROR: Error calling component script function GetFullRepresentation ERROR: JavaScript error: simulation/ai/common-api/shared.js line 146 TypeError: state is undefined m.SharedScript.prototype.init@simulation/ai/common-api/shared.js:146:19 InitGame@simulation/helpers/InitGame.js:78:2 WARNING: JavaScript warning: simulation/ai/common-api/baseAI.js line 40 reference to undefined property sharedAI.gameState ERROR: JavaScript error: simulation/ai/common-api/baseAI.js line 40 TypeError: sharedAI.gameState is undefined m.BaseAI.prototype.Init@simulation/ai/common-api/baseAI.js:40:2 InitGame@simulation/helpers/InitGame.js:78:2 ERROR: JavaScript error: simulation/components/Player.js line 178 ReferenceError: ApplyValueModificationsToPlayer is not defined Player.prototype.GetMaxPopulation@simulation/components/Player.js:178:2 Player.prototype.GetPopulationLimit@simulation/components/Player.js:168:18 GuiInterface.prototype.GetSimulationState@simulation/components/GuiInterface.js:100:16 AIInterface.prototype.GetNonEntityRepresentation@simulation/components/AIInterface.js:95:14 AIInterface.prototype.GetFullRepresentation@simulation/components/AIInterface.js:138:14 InitGame@simulation/helpers/InitGame.js:78:2 ERROR: JavaScript error: simulation/components/Player.js line 178 ReferenceError: ApplyValueModificationsToPlayer is not defined Player.prototype.GetMaxPopulation@simulation/components/Player.js:178:2 Player.prototype.GetPopulationLimit@simulation/components/Player.js:168:18 GuiInterface.prototype.GetSimulationState@simulation/components/GuiInterface.js:100:16 GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:2044:10 GetSimState@gui/session/session.js:197:16 updatePlayerData@gui/session/session.js:355:17 init@gui/session/session.js:290:2 reallyStartGame@gui/loading/loading.js:102:2 ERROR: Error calling component script function ScriptCall WARNING: JavaScript warning: gui/session/session.js line 471 reference to undefined property g_Players[g_ViewedPlayer] ERROR: JavaScript error: gui/session/session.js line 471 TypeError: g_Players[g_ViewedPlayer] is undefined initializeMusic@gui/session/session.js:471:1 init@gui/session/session.js:297:2 reallyStartGame@gui/loading/loading.js:102:2 ERROR: GUI page 'page_session.xml': Failed to call init() function ERROR: JavaScript error: simulation/components/Player.js line 178 ReferenceError: ApplyValueModificationsToPlayer is not defined Player.prototype.GetMaxPopulation@simulation/components/Player.js:178:2 Player.prototype.GetPopulationLimit@simulation/components/Player.js:168:18 GuiInterface.prototype.GetSimulationState@simulation/components/GuiInterface.js:100:16 GuiInterface.prototype.ScriptCall@simulation/components/GuiInterface.js:2044:10 GetSimState@gui/session/session.js:197:16 appendSessionCounters@gui/session/session.js:1406:17 updateCounters@gui/common/functions_global_object.js:77:3 __eventhandler286 (tick)@dataCounter tick:0:1 Edited August 2, 2017 by gameboy 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted August 2, 2017 Report Share Posted August 2, 2017 The ApplyValueModificationsToPlayer function was removed in r19924 and delenda est has a copy of Player.js. The only change in the copy is the maxpop = 500. @wowgetoffyourcellphone this max pop change doesn't work, does it? It's the gamesetup determining that right? IIRC it's different for skirmish/scenario and random maps. Modified copies from the public mod always run into that issue. A modified copy of population_capacities.json might do the trick already, dunno. Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted August 2, 2017 Report Share Posted August 2, 2017 (edited) 4 hours ago, elexis said: The ApplyValueModificationsToPlayer function was removed in r19924 and delenda est has a copy of Player.js. The only change in the copy is the maxpop = 500. @wowgetoffyourcellphone this max pop change doesn't work, does it? It's the gamesetup determining that right? IIRC it's different for skirmish/scenario and random maps. Modified copies from the public mod always run into that issue. A modified copy of population_capacities.json might do the trick already, dunno. I have some thoughts about mods, especially in these cases. If we want to change small function we need to copy the whole file. Could we make a logic, when mods has a javascript file (i.e. Player.js), which has only one function, overloaded from the original one, and we replace it with new version of the function? Or at least make it for components, to prevent such issues. Just an idea. Edited August 2, 2017 by vladislavbelov 2 Quote Link to comment Share on other sites More sharing options...
elexis Posted August 2, 2017 Report Share Posted August 2, 2017 Most GUI magic numbers and strings are non-const globals and can be changed from an external file directly. In the simulation it's more tricky, but it should be possible to change prototype variables with a trigger script or custom mod system component directly for example. There might be more systematic and/or nicer approaches. 2 Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 3, 2017 Report Share Posted August 3, 2017 14 hours ago, vladislavbelov said: I have some thoughts about mods, especially in these cases. If we want to change small function we need to copy the whole file. Could we make a logic, when mods has a javascript file (i.e. Player.js), which has only one function, overloaded from the original one, and we replace it with new version of the function? Or at least make it for components, to prevent such issues. Just an idea. I was under the impression from a comment made some time ago, like a year ago or more, that this was already possible. Your comment just now jogged this from my memory. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 3, 2017 Report Share Posted August 3, 2017 20 hours ago, gameboy said: Today, I tested the latest SVN19942 and the latest delenda_est, and when I started a new game, these errors occurred: I am focused on preparing the mod for A22 release. Don't have time to fix this yet. Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 3, 2017 Author Report Share Posted August 3, 2017 @wowgetoffyourcellphoneThis error has prevented me from playing the game. Please consider this question first. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 3, 2017 Report Share Posted August 3, 2017 Bruh I can't fix things for alpha 23 when I haven't bundled A22 yet. 2 Quote Link to comment Share on other sites More sharing options...
elexis Posted August 4, 2017 Report Share Posted August 4, 2017 Unless the fix (deleting Player.js) works for both 22 and 23. When testing DE, I couldn't find a way to get that 500 pop in the file, so nothing would be lost afaics. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted August 4, 2017 Report Share Posted August 4, 2017 That 500 in player.js controls the default max pop for scenarios last time I checked. Admittedly that was some time ago. 1 Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 5, 2017 Author Report Share Posted August 5, 2017 I want to know, my friend, can this problem be solved? Quote Link to comment Share on other sites More sharing options...
Stan` Posted August 5, 2017 Report Share Posted August 5, 2017 @gameboy It can and will be solved by the time A23 comes out. The plan now is to make a Delenda Est release in zip format for A22 so that people not using SVN version can use it. 1 Quote Link to comment Share on other sites More sharing options...
panther42 Posted August 6, 2017 Report Share Posted August 6, 2017 (edited) 13 hours ago, gameboy said: I want to know, my friend, can this problem be solved? @gameboy, just copy over the two lines(178 & 766) from r19924 into your delenda Player.js file. I tested and works fine... Edited August 6, 2017 by panther42 1 Quote Link to comment Share on other sites More sharing options...
Lion.Kanzen Posted August 6, 2017 Report Share Posted August 6, 2017 43 minutes ago, panther42 said: @gameboy, just copy over the two lines(178 & 766) from r19924 into your delenda Player.js file. I tested and works fine... He is ever that way, bother me and other users demanding things. Quote Link to comment Share on other sites More sharing options...
gameboy Posted August 6, 2017 Author Report Share Posted August 6, 2017 (edited) @panther42Thank you,my friend. My friend, Lion, I am very proud to see you again. Thank you for coming. Edited August 7, 2017 by gameboy 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.