Anyone tried to make a scenario?

anansethespider

Warlord
Joined
Oct 27, 2016
Messages
288
I'd like to start playing with scenarios, but I haven't been able to successfully make a "clean slate" to start with that takes everything out of the game (tech, civics, units, etc), and is still able to load. Basically when I try to get to the point where i might start modding, I can't get it stable.

I think it'd be cool if we modders produced a good baseline for scenarios called Blank Slate or whatever, that takes out everything from the game that can be taken out, and adds nothing. That way we could all use it as a reference for future projects.
 
Sort of, depending on what you mean by scenario. I have experimented some with gameplay scripts. Backed off after finding out they break the CQUI mod. But the essence of them I have tried. What questions do you have?
 
Sort of, depending on what you mean by scenario. I have experimented some with gameplay scripts. Backed off after finding out they break the CQUI mod. But the essence of them I have tried. What questions do you have?

Well it's not so much a question about how to do it, as a request for help doing it :D

By scenario I mean a scenario, like Outback Tycoon or Jadwiga's Legacy - a heavily modified version of the game with a different ruleset and content. I think it would be a great resource to have a "blank scenario" that takes everything out of the base game and creates a clean slate for programming a new scenario that could be anything, ie High Fantasy elves vs goblins, Sci Fi, etc.
 
There is the despecialize mod to start with basic Civilizations, the rest will be a matter of tests to know how much we can remove from the game before it stop working.

And yes, it would be useful.
 
I'd be willing to go through a bunch of tests to see what can get taken out and what's necessary. The part that's intimidating to me is the playing with rulesets and config settings to set up the scenario itself. I tried modifying some code from the Australia scenario and kept getting crashes. It's just a little bit out of my wheelhouse...as much time as I've spent playing with XML tables and artdefs, I haven't made a single front-end change to the code. So I don't really know what I'm doing when it comes to the framework for a scenario itself, if that makes sense.
 
My "Combined Tweaks" mod qualifies as a scenario in the technical sense that it is considered a "top-level" mod, altho mod compatibility is a big priority for me, so I steer clear of going the full route.

What I can tell you is that the Firaxis scenarios rely on three key things:
  • Database edits (like most mods do)
  • A unique Ruleset
  • Lua files added by the Gamescript tag in the .modinfo
The Ruleset piece is easy enough to copy by looking at how the Jadwiga or Viking structure are set up. Just create it in a config file and reference in the modinfo.

Gamescripts are pretty easy too, at least at their most basic level. If you grab the Gamescript Lua directly from either of the mentioned scenarios (not sure about Australia) and plug it into a mod, it will start running. I used the Jadwiga scenario as a base for a Gamescript I wrote but removed (see below).

Database edits are straightforward enough. But they carry an annoying catch in that there is no simplistic way to hide leaders/techs/civs you don't want around versus delete them. And the second you start deleting anything you have to kiss goodbye to compatibility with many other mods. That can be fine if it's what you're going for, but its still an annoying extra. The Firaxis created scenarios don't work with even the most basic mods largely because so much gets purged from the database. Missing primary keys from tables = major reason for crashing.


More on Lua Gamescript editing. I said earlier it works. Well, it does, but it is also the opposite of fun to me. Ironing out bugs with the tools we're given I have found to be just short of nightmarish. It's possible I'm missing something and there are better ways to do it of course than coding, loading game, crashing to desktop or getting Lua error, repeat. But even when I did get stuff working, I immediately ran into conflicts with popular mods like CQUI, and that put a total stop to my gamescript meddling. If you're ok with all of this you can of course make it work.
 
My "Combined Tweaks" mod qualifies as a scenario in the technical sense that it is considered a "top-level" mod, altho mod compatibility is a big priority for me, so I steer clear of going the full route.

What I can tell you is that the Firaxis scenarios rely on three key things:
  • Database edits (like most mods do)
  • A unique Ruleset
  • Lua files added by the Gamescript tag in the .modinfo
The Ruleset piece is easy enough to copy by looking at how the Jadwiga or Viking structure are set up. Just create it in a config file and reference in the modinfo.

Gamescripts are pretty easy too, at least at their most basic level. If you grab the Gamescript Lua directly from either of the mentioned scenarios (not sure about Australia) and plug it into a mod, it will start running. I used the Jadwiga scenario as a base for a Gamescript I wrote but removed (see below).

Database edits are straightforward enough. But they carry an annoying catch in that there is no simplistic way to hide leaders/techs/civs you don't want around versus delete them. And the second you start deleting anything you have to kiss goodbye to compatibility with many other mods. That can be fine if it's what you're going for, but its still an annoying extra. The Firaxis created scenarios don't work with even the most basic mods largely because so much gets purged from the database. Missing primary keys from tables = major reason for crashing.


More on Lua Gamescript editing. I said earlier it works. Well, it does, but it is also the opposite of fun to me. Ironing out bugs with the tools we're given I have found to be just short of nightmarish. It's possible I'm missing something and there are better ways to do it of course than coding, loading game, crashing to desktop or getting Lua error, repeat. But even when I did get stuff working, I immediately ran into conflicts with popular mods like CQUI, and that put a total stop to my gamescript meddling. If you're ok with all of this you can of course make it work.


Thankyou, that was very informative. The lack of compatibility doesn't bother me at all, as I would be intending to use this to create very small, specific scenarios: say, a MP battle between two specifically formulated armies. Stuff like that :D

Your warning about lua modding is taken to heart. How much of it would there be, do you think, to accomplish the basic level of what I outlined above?
 
Back
Top Bottom