Jump to content

Ready made fortress on game start - can I get some further clarification?


LordStark
 Share

Recommended Posts

  Quote

Then you can use the skirmish replacer feature of the game. Basically skirmish entities are entities that get replaced by that of the current civilisation when the game starts. This is how for example iberians start with walls. Skirmish walls are placed all around civ centers and only iberians have a matching building. The rest get nothing instead.

Expand  

Can I get some advice regarding implementing this feature?

If I understand this correctly, I need to open up the scenario editor and then load every map in the entire game one-by-one and build a wall/fortress around every single starting location. So that means for an 8 player map, I would need to do 8 fortresses and then save the map and open up the next one.

For the wall, I would need to make a new wall called "special_anglo_wall" by simply copying and pasting the wall files for the Anglo side of Millennium AD and insert the line   <SkirmishReplacer/> in each file. Is that correct?

Link to comment
Share on other sites

  On 28/06/2022 at 12:43 PM, LordStark said:

If I understand this correctly, I need to open up the scenario editor and then load every map in the entire game one-by-one and build a wall/fortress around every single starting location. So that means for an 8 player map, I would need to do 8 fortresses and then save the map and open up the next one.

Expand  

That's correct. Luckily for you, we already did this for a few maps, because of the iberian walls.

The lines you are interested in are 75-79 of the following file https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/data/civs/iber.json#L76
 

  On 28/06/2022 at 12:43 PM, LordStark said:

For the wall, I would need to make a new wall called "special_anglo_wall" by simply copying and pasting the wall files for the Anglo side of Millennium AD and insert the line   <SkirmishReplacer/> in each file. Is that correct?

Expand  

That is incorrect. You just need to edit the civ.json file.

  • Like 2
Link to comment
Share on other sites

Thanks for your reply, I edited the anglo.json file. However, it did not work:

  Quote

    "SkirmishReplacements": {
        "skirmish/structures/default_house_5": "structures/{civ}/house",
        "skirmish/units/default_cavalry": "units/{civ}/cavalry_spearman_b",
        "skirmish/units/default_infantry_ranged_b": "units/anglo/infantry_javelineer_b"
            "skirmish/structures/wall_short": "structures/iber/wall_short",
          "skirmish/structures/wall_medium": "structures/iber/wall_medium",
          "skirmish/structures/wall_long": "structures/iber/wall_long",
          "skirmish/structures/wall_gate": "structures/iber/wall_gate",
          "skirmish/structures/wall_tower": "structures/iber/wall_tower"

Expand  

The green words are the  only change I made (after copy and pasting the lines fromthe Iber.json file. 

Link to comment
Share on other sites

I tried again and got this error:

  Quote

ERROR: JavaScript error: globalscripts/Templates.js line 17 JSON.parse: expected ',' or '}' after property value in object at line 108 column 3 of the JSON data loadCivFiles@globalscripts/Templates.js:17:21 loadCivData@gui/common/functions_utility.js:37:28 @gui/gamesetup/gamesetup.js:13:30 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: Failed to parse 'simulation/data/civs/anglo.json'

ERROR: JavaScript error: globalscripts/Templates.js line 20 data is undefined loadCivFiles@globalscripts/Templates.js:20:8 loadCivData@gui/common/functions_utility.js:37:28 @gui/gamesetup/gamesetup.js:13:30 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js line 51 can't access lexical declaration 'g_CivData' before initialization @gui/gamesetup/Pages/GameSetupPage/GameSettings/Single/Sliders/RelicCount.js:51:1 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: JavaScript error: globalscripts/Templates.js line 17 JSON.parse: expected ',' or '}' after property value in object at line 108 column 3 of the JSON data loadCivFiles@globalscripts/Templates.js:17:21 loadCivData@gui/common/functions_utility.js:37:28 init@gui/gamesettings/GameSettings.js:24:13 SetupWindow@gui/gamesetup/SetupWindow.js:29:39 init@gui/gamesetup/gamesetup.js:47:18 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: Failed to parse 'simulation/data/civs/anglo.json'

ERROR: JavaScript error: globalscripts/Templates.js line 20 data is undefined loadCivFiles@globalscripts/Templates.js:20:8 loadCivData@gui/common/functions_utility.js:37:28 init@gui/gamesettings/GameSettings.js:24:13 SetupWindow@gui/gamesetup/SetupWindow.js:29:39 init@gui/gamesetup/gamesetup.js:47:18 onPress@gui/pregame/MainMenuItems.js:90:13 performButtonAction@gui/pregame/MainMenuItemHandler.js:77:9 pressButton@gui/pregame/MainMenuItemHandler.js:63:10

ERROR: GUI page 'page_gamesetup.xml': Failed to call init() function

Expand  

And here is the code:

  Quote

    ],
    "SkirmishReplacements": {
        "skirmish/structures/default_house_5": "structures/{civ}/house",
        "skirmish/units/default_cavalry": "units/{civ}/cavalry_spearman_b",
        "skirmish/units/default_infantry_ranged_b": "units/anglo/infantry_javelineer_b"
        "skirmish/structures/iber_wall_short": "structures/anglo/wall_short",
        "skirmish/structures/iber_wall_medium": "structures/anglo/wall_medium",
        "skirmish/structures/iber_wall_long": "structures/anglo/wall_long",
        "skirmish/structures/iber_wall_gate": "structures/anglo/wall_gate",
        "skirmish/structures/iber_wall_tower": "structures/anglo/wall_tower"

    },

Expand  

 

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...