Scenario modding

Juku Salonen

Chieftain
Joined
Feb 14, 2017
Messages
27
How does one change the included scenarios via mods?

I made a quick test mod by copying over the 'months and seasons' option from another mod into turnScale-change.xml. Seemed to work fine.

Then I copied over the LBP_ABLE scenario data into a 'scenario-change.xml' file and tried to change DisableOptions to 0, remove difficulty from ParametersInvalid, or even change Babylon to Egypt. None of that took. Just in case, I tried the same using scenario-append. No dice, either.

Am I missing something obvious, or is this just not possible this way?
 
You aren't able to have a mod affect Mohawk scenarios. What you could do is copy all the scenarios files into a new mod with a different name.
 
Thank you, that seems to be the case indeed.

But I'm not progressing much even then. I now have the scenario (or duplicate scenario, really) show up in the list, but clicking on it makes the game think for a bit and then nothing happens. I presume there's something wrong, but I can't spot anything obvious. The mod file in its totality is this:

XML:
<?xml version="1.0"?>
<!-- edited with XMLSpy v2014 rel. 2 (x64) (http://www.altova.com) by Soren Johnson (private) -->
<Root>
    <Entry>
        <zType>SCENARIO_LBP_ABLE_1</zType>
        <Name>TEXT_SCENARIO_LBP_ABLE</Name>
        <SubTitle>TEXT_SCENARIO_LBP_ABLE_SUB</SubTitle>
        <ScenarioClass>SCENARIOCLASS_LBP</ScenarioClass>
        <zIcon>BookIcon</zIcon>
        <zMapFile>LBP-BabylonTheAble</zMapFile>
        <zModName>LearnByPlaying6</zModName>
        <azAchievements>
            <zValue>ACHIEVEMENT_LBP1</zValue>
        </azAchievements>
        <Nation>NATION_BABYLONIA</Nation>
        <TeamNation>TEAMNATION_GAME_UNIQUE</TeamNation>
        <Difficulty>DIFFICULTY_JUST</Difficulty>
        <TurnScale>TURNSCALE_MONTH</TurnScale>
        <OpponentLevel>OPPONENTLEVEL_PEACEFUL</OpponentLevel>
        <DevelopmentLevel>DEVELOPMENT_NONE</DevelopmentLevel>
        <AdvantageLevel>ADVANTAGE_NONE</AdvantageLevel>
        <TribeLevel>TRIBELEVEL_WEAK</TribeLevel>
        <EventLevel>EVENTLEVEL_HIGH</EventLevel>
        <DisableOptions>0</DisableOptions>
        <ParametersInvalid>
            <zValue>Nation</zValue>
        </ParametersInvalid>
    </Entry>
</Root>

I suspect it may be the map that's missing, but I've found no obvious place for it to be.
 
Scenarios are treated like mods by the game, so by themselves they aren't automatically loaded when you run the game. To get another mod to load with your mod (or scenario in this case), then you need to set the required mod as a dependency.

Open your modinfos file and add the original LearnByPlaying1 as a mod dependency should do it.

XML:
  <modDependencies>
    <string>LearnByPlaying1</string>
  </modDependencies>
 
Hmm, that did work. I now have a learning scenario with settings enabled. But...

In the meanwhile I put together a little mechanics mod, building on the expanded turn scaling settings I began with. And these don't take with the scenario, either by pasting the *-change.xml files into the scenario, or making that mod a dependency as well. I'm sure this is again something obvious, but it's late and every moddable game has its own quirks and I haven't really figured these out yet.

Erm, are any of my questions answered in a guide or something I can read to learn how these things go in the Old World and stop wasting other people's time here?
 
In the actual scenarios map file itself, all the game settings are defined there. See below:

XML:
<?xml version="1.0" encoding="utf-8"?>
<Root
  Version="Version: 1.0.62078"
  SaveDate="09 August 2022"
  MapWidth="74"
  MapEdgesSafe="False"
  MapPath=""
  GameId="aa8010e9-9da1-476b-ac02-6bf787ad9c80"
  MapClass="MAPCLASS_MapScriptSeaside"
  MapSize="MAPSIZE_MEDIUM"
  GameName=""
  FirstSeed="45286525"
  MapSeed="45286525"
  GameMode="SINGLE_PLAYER"
  TurnStyle="TURNSTYLE_STRICT"
  TurnTimer="TURNTIMER_NONE"
  OpponentLevel="OPPONENTLEVEL_PASSIVE"
  TribeLevel="TRIBELEVEL_PASSIVE"
  Development="DEVELOPMENT_NONE"
  Advantage="ADVANTAGE_PENALTY_MODERATE"
  SuccessionGender="SUCCESSIONGENDER_ABSOLUTE_COGNATIC"
  SuccessionOrder="SUCCESSIONORDER_PRIMOGENITURE"
  Mortality="MORTALITY_STANDARD"
  TurnScale="TURNSCALE_YEAR"
  TeamNation="TEAMNATION_GAME_UNIQUE"
  ForceMarch="FORCEMARCH_UNLIMITED"
  EventLevel="EVENTLEVEL_LOW"
  NumAutosaves="10">

To get around this you'll have to copy the Maps folder into your mod, name the mapfile something different, then in your scenario-add file point the mapfile setting to your new version of the map. Then adjust the settings as you want them.

I have some modding tutorials on my site http://dales.world, but unfortunately nothing specific for scenarios.
 
Well, the scenario stuff seems pretty hard to pull off. I tried doing as you said, but I keep getting 'Failed to generate new game: please try different settings' and 'Failed to load scenario map'.

Additionally, the problem with these Learn by Playing scenarios is that I can't see any maps for those in the Reference directory. Trying some other scenario map gets me 'Failed to load', too. Might be because there's lots of custom stuff in these map files.

For reference, the scenario minimod that refuses to work is attached. I even tried putting the map in the general Maps directory, but that didn't help, either.

Is there perhaps a way to save a map from a game in progress and use that, like it used to be in Civ4 at least?
 

Attachments

  • LBPScenario.7z
    30.6 KB · Views: 3
At the end of the day, the scenarios are not designed to be modded. :)

So point form, what's the goal of this little mod you're trying to pull off?
 
Last edited:
Well, goal number one would be to actually load the Learn by Playing scenario map with custom settings.

Goal number two is to add the small mechanical changes that seem to work fine with the 'play with mods' random new games.

I kinda noticed I can toggle the scenario mod in the 'mods' option at the very end using that, would this be the way to make a modded scenario?
 
So you want to use the map from LBP1, but with custom settings like a sandbox game, with a mod enabled?

* Btw sorry, my statement above should have been that the scenarios are NOT designed to be modded.
 
Yes, exactly. Preset maps seem to work when selected instead of random map generation, but I think at least your starting location is still random? So if I could get at the map itself, I suppose it might be workable without trying to make a faux scenario.
 
Just coming back to this because something you said earlier triggered something for me:

Additionally, the problem with these Learn by Playing scenarios is that I can't see any maps for those in the Reference directory.

I have fixed this, and they will appear in the reference folder of tonight/tomorrow's (depending where you are) Test build. :)

Otherwise, leave this with me for a day or two. If I haven't popped back in by Friday, ping me.
 
Or just grab the map from here.
 

Attachments

  • Learn To Play One.xml
    240.3 KB · Views: 1
Thank you, the map does indeed work with a modded setup. Except... this is Learn To Play, but what I was after is Learn By Playing, the curated full game maps/scenarios.
 
I'm so sorry, I'm an idiot!
 

Attachments

  • LBP-BabylonTheAble.xml
    1.4 MB · Views: 2
Thank you very much!

I think this adresses pretty much all that I wanted to do, so as far as I'm concerned, the matter can be considered closed.
 
Top Bottom