Nescio Posted November 5, 2017 Author Report Share Posted November 5, 2017 Yeah, I understand that part, and I quite agree. However, it's not entirely clear to me what to put into a separate file or patch. How to load a new js file into an existing one? And would you prefer to spin off just the resources part of the session.js file, or also population and the other lines concerning the top panel? Quote Link to comment Share on other sites More sharing options...
leper Posted November 6, 2017 Report Share Posted November 6, 2017 Given that we consider population as a resource in some parts, I'd also split that. The function already handles just the top panel, or am I missing something? As for loading js files, look for the corresponding xml files that include things. There is also some diff to load most things instead of specific ones. Quote Link to comment Share on other sites More sharing options...
Nescio Posted February 18, 2018 Author Report Share Posted February 18, 2018 (edited) Hi there! I could use some help again to figure out what I'm doing wrong  27. Recently I reinstalled my operating system (Fedora 27). Unfortunately I did not succeed in getting phabricator working again. So I installed the dependencies listed at https://trac.wildfiregames.com/wiki/BuildInstructions#Fedora (including php-xml), git cloned libphutil and arcanist as described at https://secure.phabricator.com/book/phabricator/article/arcanist/ , and added the path to the .bash_profile file. However, when I try running `arc update` or any other `arc` command, I get the following error: /usr/bin/env: ‘php’: No such file or directory Any suggestions how to get phabricator working again? (@bb_?)  50. Because there were too many templates to comfortably work with, I moved all structures/{civ}_*.xml and units/{civ}_*.xml templates to {civ}/*.xml in my 0abc mod ( https://github.com/0abc/0abc-unified ). The game handles it unproblematically, however, the tech tree doesn't. How to fix this (in A22)? Any suggestions how to get the tech tree working again? (@s0600204?) Edited February 22, 2018 by Nescio ce Quote Link to comment Share on other sites More sharing options...
bb_ Posted February 22, 2018 Report Share Posted February 22, 2018 47. maybe this from the arc install help gives a clue (I guess installing php7 in dnf would do the same trick): Quote Arcanist is written in PHP, so you need to install the PHP CLI first if you don't already have it. Arcanist should run on PHP 5.2 and newer. If you don't have PHP installed, you can download it from http://www.php.net/. Â Quote Link to comment Share on other sites More sharing options...
s0600204 Posted February 22, 2018 Report Share Posted February 22, 2018 On 18/02/2018 at 6:28 PM, Nescio said: 50. [...] I moved all structures/{civ}_*.xml and units/{civ}_*.xml templates to {civ}/*.xml in my 0abc mod Therein lies the problem. (if you'd moved them to "structures/{civ}/*.xml" and "units/{civ}/*.xml" you wouldn't have the problem, and you'd have even fewer files in each folder.) The simplest "fix" would be to move 'em back (or into the "{structures|unit}/{civ}/*.xml" folder layout). A "code fix" wouldn't really be worth it, as A23 should be released within a month or so. Thus, any code "fix" for A22 would have to be replaced by another "fix" for A23; and would make it harder to upgrade your mod to be compatible with A23. Considering where the change would have to take place, a "code fix" would also be unpleasant. 2 Quote Link to comment Share on other sites More sharing options...
Nescio Posted February 23, 2018 Author Report Share Posted February 23, 2018 On 05/11/2017 at 12:44 AM, leper said: Moving the part that does the layout of the resource objects into a function and calling that from the function where you replaced horizontallySpaceObjects with verticallySpaceObjects. Possibly placing that in some other file if you want to. Mostly so in your mod (or someone else in a mod) can just replace that new function without having to ship a modified copy of session.js. You added full copies of session.js and functions_utility.js to your mod, with small modifications. This is going to be hard to maintain. If the only thing you actually ship in your mod are two script files, one with the verticallySpaceObjects function, and one with the modified placement/layout function (which needs that part to be split from the function it is currently in), then the amount of work you will have to do when you upgrade to the next release will be reduced by a lot. Done (I think): https://code.wildfiregames.com/D1324   On 22/02/2018 at 3:10 PM, bb_ said: 47. maybe this from the arc install help gives a clue (I guess installing php7 in dnf would do the same trick): Thanks, `dnf install php-cli` did solve it indeed! Now arcansist works again, I could finally address the changes requested at https://code.wildfiregames.com/D906   20 hours ago, s0600204 said: Therein lies the problem. (if you'd moved them to "structures/{civ}/*.xml" and "units/{civ}/*.xml" you wouldn't have the problem, and you'd have even fewer files in each folder.) The simplest "fix" would be to move 'em back (or into the "{structures|unit}/{civ}/*.xml" folder layout). A "code fix" wouldn't really be worth it, as A23 should be released within a month or so. Thus, any code "fix" for A22 would have to be replaced by another "fix" for A23; and would make it harder to upgrade your mod to be compatible with A23. Considering where the change would have to take place, a "code fix" would also be unpleasant. Moving them back is easier said than done; 0abc contains nearly two thousand promoted unit templates (because each soldier can promote a dozen times). Furthermore, although I considered moving to `structures/{civ}/*.xml` instead of `{civ}/structure_*.xml`), I decided against, because having both units and structures of a single faction in the same folder makes some things easier, at least for me. Will the tech tree accept my template reorganization in A23? And how much work would the "unpleasant" code fix be in A22? (Because not everyone will switch immediately to A23 when it's released.)  Quote Link to comment Share on other sites More sharing options...
s0600204 Posted February 23, 2018 Report Share Posted February 23, 2018 4 hours ago, Nescio said: Will the tech tree accept my template reorganization in A23? It should now. Not backport-able:Â you will need to update your mod to be A23-compatible to use it. 2 Quote Link to comment Share on other sites More sharing options...
Nescio Posted February 24, 2018 Author Report Share Posted February 24, 2018 (edited) 12 hours ago, s0600204 said: It should now. Not backport-able:Â you will need to update your mod to be A23-compatible to use it. Thanks a lot! Eventually I'll update my mod to A23, but not before it's released. PS Using your A23 patch as an example, I tweaked A22's `gui/structree/structree.js` file and was able to fix it within five minutes (that was a lot less "unpleasant" than I expected); 0abc's tech tree works again! Without you pointing the way I wouldn't have had any idea what to look for, therefore thanks again! Edited February 24, 2018 by Nescio Thanks again! 1 Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 10, 2018 Author Report Share Posted May 10, 2018 It seems the idle worker button actually checks for the CitizenSoldier class, not the Worker class. I guess it's intentional but I also think it's confusing. Where can I change this? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 10, 2018 Report Share Posted May 10, 2018 How do you mean? The button is active when a unit of any of the following class is idle. var g_WorkerTypes = ["FemaleCitizen", "Trader", "FishingBoat", "CitizenSoldier"]; Â Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 10, 2018 Author Report Share Posted May 10, 2018 16 minutes ago, (-_-) said: How do you mean? The button is active when a unit of any of the following class is idle. var g_WorkerTypes = ["FemaleCitizen", "Trader", "FishingBoat", "CitizenSoldier"]; Â Yeah; now I want to replace "CitizenSoldier" with "Worker"; where can I find and modify the "g_WorkerTypes" variable? Quote Link to comment Share on other sites More sharing options...
Guest Posted May 10, 2018 Report Share Posted May 10, 2018 (edited) 50 minutes ago, Nescio said: where can I find and modify the "g_WorkerTypes" variable? https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/gui/session/session.js#L191 Edited May 10, 2018 by Guest Replaced with a link. Quote Link to comment Share on other sites More sharing options...
Nescio Posted May 30, 2018 Author Report Share Posted May 30, 2018 Quote WARNING: mod version of 0abc-a22 may only contain numbers and at most 2 periods, but found '0.0.22.105'! Why limit mod version numbers unnecessarily? Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted May 30, 2018 Report Share Posted May 30, 2018 Try writing the parsing code Enjoy the Choice  Quote Link to comment Share on other sites More sharing options...
Nescio Posted June 30, 2018 Author Report Share Posted June 30, 2018 How to assign a hotkey to open and close the trade and barter menu? Quote Link to comment Share on other sites More sharing options...
elexis Posted June 30, 2018 Report Share Posted June 30, 2018 https://trac.wildfiregames.com/wiki/HotKeys Quote barter.toggle = "Ctrl+B"    ; Toggle in-game barter/trade page  Quote Link to comment Share on other sites More sharing options...
Nescio Posted October 4, 2018 Author Report Share Posted October 4, 2018 Currently I'm working on my mod (Â https://github.com/0abc/0abc-a23.git ) again, reorganizing templates. When I generate a skirmish map, it starts without any errors, but when I attempt to generate a random map, I get six errors, and then it quits: ERROR: CCacheLoader failed to find archived or source file for: "simulation/templates/structures/gaia_fortress.xml" ERROR: Failed to load entity template 'structures/gaia_fortress' ERROR: Invalid template found for 'structures/gaia_fortress' ERROR: CMapGeneratorWorker::LoadScripts: Failed to load script 'maps/random/rmgen-common/wall_builder.js' ERROR: JavaScript error: globalscripts/Templates.js line 165 TypeError: template is undefined GetTemplateDataHelper@globalscripts/Templates.js:165:1 readyWallElement@maps/random/rmgen-common/wall_builder.js:265:17 loadWallset@maps/random/rmgen-common/wall_builder.js:49:26 loadWallsetsFromCivData@maps/random/rmgen-common/wall_builder.js:33:1 @maps/random/rmgen-common/wall_builder.js:8:20 @maps/random/kerala.js:2:1 ERROR: CMapGeneratorWorker::Run: Failed to load RMS 'maps/random/kerala.js' I haven't touched any map files or scripts, nor does a `gaia_fortress.xml` file exist, so I have no idea what causes these errors. And because I usually test with a AI vs AI skirmish map, but no random maps, I don't know when these errors where introduced by my mod. Can anyone help me identify and solve the problem? @elexis, perhaps? (There are also 14 unrelated "Could not remove token 'ConquestCritical' ..." warnings, which can be solved with D1626Â .) Quote Link to comment Share on other sites More sharing options...
Stan` Posted October 4, 2018 Report Share Posted October 4, 2018 Did you apply you Gaia patch on your repository ? This looks like one of the fortress is using the wrong civ Quote Link to comment Share on other sites More sharing options...
Guest Posted October 4, 2018 Report Share Posted October 4, 2018 (edited) Just a guess but it's probably triggering the error on L240 of wall_builder.js, heres L239 But I have no clue how "gaia" could be in g_CivData. Maybe you modified "loadCivFiles" in globalscripts/Templates.js? Nevermind. I think the wallsets templates are the issue. Your templates are different from the vanilla ones and as Stan mentioned, there is a <civ> element with gaia on the parent template which I could not find in vanilla. Maybe you didnt overrule that field in the individual civ templates? Edited October 4, 2018 by Guest Quote Link to comment Share on other sites More sharing options...
Nescio Posted October 4, 2018 Author Report Share Posted October 4, 2018 (edited) Thank you for your quick replies! 1 hour ago, stanislas69 said: Did you apply you Gaia patch on your repository ? This looks like one of the fortress is using the wrong civ 59 minutes ago, (-_-) said: Just a guess but it's probably triggering the error on L240 of wall_builder.js, heres L239 But I have no clue how "gaia" could be in g_CivData. Maybe you modified "loadCivFiles" in globalscripts/Templates.js? Nevermind. I think the wallsets templates are the issue. Your templates are a *lot* different than vanilla ones and as Stan mentioned, there is a <civ> element with gaia on the parent template which I could not find in vanilla. Maybe you didnt overrule that field in the individual civ templates? Adding or removing the <civ> element in the parent wallset template has no effect. And yes, all fortresses, wallsets, and other structures under simulation/templates/structures/{civ}/* overrule the civ element. And even if a structure would have no <civ>, it results into only a warning, not an error. E.g. if I remove the <civ> from all wallsets (parent and children) in my mod, I get: "WARNING: The "structures/athen/wallset_city" template has a defined civ of "undefined". This does not match the currently selected civ "athen". This does not prevent a game from starting. In other words, the problem is something else in my mod. And skirmish maps start without errors. Only random maps fail to generate. Edited October 4, 2018 by Nescio no syntax highlighting Quote Link to comment Share on other sites More sharing options...
elexis Posted October 5, 2018 Report Share Posted October 5, 2018 First thought about D900? Other mods with new civs had this issue too, so you may want to take a look around. But given that it complains about "structures/gaia_fortress" might relate to some gaia patch? It sounds like the rmgen wall_builder doesn't ignore gaia in your mod but might ignore it for the public mod. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted October 6, 2018 Report Share Posted October 6, 2018 Maybe issue with "gaia" in the template name. Quote Link to comment Share on other sites More sharing options...
Nescio Posted October 6, 2018 Author Report Share Posted October 6, 2018 On 10/5/2018 at 4:19 PM, elexis said: First thought about D900? Other mods with new civs had this issue too, so you may want to take a look around. But given that it complains about "structures/gaia_fortress" might relate to some gaia patch? It sounds like the rmgen wall_builder doesn't ignore gaia in your mod but might ignore it for the public mod. Thanks for pointing out that patch; indirectly it helped me figure out what I did wrong in my mod. What caused the random map errors was that I had edited the "WallSets" in the {civ}.json files. After I reverted those to the default values, the errors disappeared, and random maps can now be generated again. Although I still don't understand why the error message complained about a (non-existent) 'structures/gaia_fortress', it is now gone. Quote Link to comment Share on other sites More sharing options...
Nescio Posted January 12, 2019 Author Report Share Posted January 12, 2019 56. Something else I'm contemplating is replacing the AI's resource gain (Medium 100%, Very Hard 160%) with resource costs and build time multiplier(s), e.g. Very Easy 200%, Medium 100%, Very Hard 50%. Any suggestions on how to do that? Quote Link to comment Share on other sites More sharing options...
Imarok Posted January 13, 2019 Report Share Posted January 13, 2019 On 1/12/2019 at 7:42 PM, Nescio said: 56. Something else I'm contemplating is replacing the AI's resource gain (Medium 100%, Very Hard 160%) with resource costs and build time multiplier(s), e.g. Very Easy 200%, Medium 100%, Very Hard 50%. Any suggestions on how to do that? rP21256Â Â Â Â Â Â Â changes the difficulty, so you can look where the difficulty is set. Then you could look where this variable is used. 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.