General S&S Editor Questions

Story and Stratagem (S&S) Editor Forum

Moderator: Vic

Post Reply
zgrssd
Posts: 4991
Joined: Tue Jun 09, 2020 1:02 pm

General S&S Editor Questions

Post by zgrssd »

Nice, the forum just started existing. Time to gather some questions.

My first question is:
In Lookup instructions, is there any way to provide the "Value to be parsed" via a variable?
I tried <LOOKUPTECHNAME=$ttOption1$> and <LOOKUPTECHNAME=[$ttOption1$]>, with "$ttOption1$ == 21" returning true - but all I got was "????" instead of "Solar Panels".

Edit: I would also need a way to do the same for a flag instruction, namly TECH.[$ttOption1$] and of course a Exe order - however I have very little worries regarding the Exe order, given that [REGIMEID] is already in use to hand in a variable.
eddieballgame
Posts: 881
Joined: Wed Jun 29, 2011 2:50 am

RE: General S&S Editor Questions

Post by eddieballgame »

Just starting to look into the S&S Editor.
No idea what I am looking at, atm. [:)]
Following 'zgrssd' intently (as should the rest of you would be modders) to learn about this tool, generously given by 'Vic'.
One thing I tried, out of curiosity more than anything else,...I renamed the 'randomgame.se1' file to 'randomgame.se1evlib'.
This extension change allows the S&S Editor to load this file so one can have a look at what is going on.
It also works for 'save' files but not the 'masterfile.se1master' file. (tried different renaming sequences to no avail)

Not sure if this is already a known thing, but thought I would share for anyone interested.
User avatar
Vic
Posts: 9282
Joined: Mon May 17, 2004 2:17 pm
Contact:

RE: General S&S Editor Questions

Post by Vic »

ORIGINAL: eddieballgame

Just starting to look into the S&S Editor.
No idea what I am looking at, atm. [:)]
Following 'zgrssd' intently (as should the rest of you would be modders) to learn about this tool, generously given by 'Vic'.
One thing I tried, out of curiosity more than anything else,...I renamed the 'randomgame.se1' file to 'randomgame.se1evlib'.
This extension change allows the S&S Editor to load this file so one can have a look at what is going on.
It also works for 'save' files but not the 'masterfile.se1master' file. (tried different renaming sequences to no avail)

Not sure if this is already a known thing, but thought I would share for anyone interested.

You don't have to do that. You can use the in-game debugger to inspect all the data tables present in the base game. And even better follow how some variables change with certain player actions.

Best wishes,
Vic
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
eddieballgame
Posts: 881
Joined: Wed Jun 29, 2011 2:50 am

RE: General S&S Editor Questions

Post by eddieballgame »

Thank you, Vic.
zgrssd
Posts: 4991
Joined: Tue Jun 09, 2020 1:02 pm

RE: General S&S Editor Questions

Post by zgrssd »

In Lookup instructions, is there any way to provide the "Value to be parsed" via a variable?
I tried <LOOKUPTECHNAME=$ttOption1$> and <LOOKUPTECHNAME=[$ttOption1$]>, with "$ttOption1$ == 21" returning true - but all I got was "????" instead of "Solar Panels".

Edit: I would also need a way to do the same for a flag instruction, namly TECH.[$ttOption1$] and of course a Exe order - however I have very little worries regarding the Exe order, given that [REGIMEID] is already in use to hand in a variable.
Okay, I found something with the cult Decisions:
"TEMP1=REGKEY.cult1_policy; TEMP2=REGKEY.cult1_relation;"
"Our current policy towards them is '<LOOKUPCULTPOLICY=<TEMP1>>'."
So it looks like <FLAGNAME> is a accepted way to use a variable in a lookup call.

I no longer have any need to check if it works for Flag Instructions as well, however.
User avatar
Pymous
Posts: 191
Joined: Thu Apr 01, 2010 7:12 am
Contact:

RE: General S&S Editor Questions

Post by Pymous »

Just a message to say thank you to zgrssdn, mroyer, Akrakorn, eddieballgame, and all you guys who are experimenting with the S&S editor. Can't wait to see your mods :D
[Mod]Shadow Stratagems Artpack for Shadow Empire game.
Akrakorn
Posts: 100
Joined: Mon Oct 19, 2020 8:58 am

RE: General S&S Editor Questions

Post by Akrakorn »

Vic, would it be possible to implement multiple "modify existing table" tables? Right now it's very hard to keep everything organized as you need multiple libraries even if the modifications are for one "mod"; for instance, modifying the AT model so they can have laser weaponry forces you to also modify the drawing helper table. Since there's also no mod override (only the last library will "apply" if they touch the same table), it encourages to keep all changes within one library.

Image
User avatar
Vic
Posts: 9282
Joined: Mon May 17, 2004 2:17 pm
Contact:

RE: General S&S Editor Questions

Post by Vic »

Maybe it is easier to use a google sheets? and import the csv from the debugger there and then copy and paste the lines in question to the final table you'll import in the s&s editor.

It is possible to modify a zillion vanilla tables from just 1 'modify existing table'

I understand why you ask though.

best wishes,
Vic
Visit www.vrdesigns.net for the latest news, polls, screenshots and blogs on Shadow Empire, Decisive Campaigns and Advanced Tactics
zgrssd
Posts: 4991
Joined: Tue Jun 09, 2020 1:02 pm

RE: General S&S Editor Questions

Post by zgrssd »

Has anybody found any fomrula or data for Population growth?
User avatar
Clux
Posts: 448
Joined: Sat Sep 15, 2018 9:00 pm
Location: Mexico

RE: General S&S Editor Questions

Post by Clux »

ORIGINAL: zgrssd

Has anybody found any fomrula or data for Population growth?

S1man from the discord server decopiled the formula and its something like this:

Code: Select all

float growth = 0.2;
 growth += growth * fertility / 100.0; // can be negative
 
 growth += 0.2 * zone.health / 100.0;
 growth += 0.2 * (100 - zone.culture) / 100.0;
 
 popChange = zone.pop * growth / 100.0;
 
 // maygicc starts, note that zone pop is measured in hundreds
 extraPopIncreaseChance = zone.pop * growth - fertility * 100;
 if (random(0, 100) <= extraPopIncreaseChance)
     popChnage++;
 
 zone.pop += popChange;

Hope you find it useful :)
Amateurs talk about strategy. Professionals talk about logistics!
zgrssd
Posts: 4991
Joined: Tue Jun 09, 2020 1:02 pm

RE: General S&S Editor Questions

Post by zgrssd »

ORIGINAL: Clux

ORIGINAL: zgrssd

Has anybody found any fomrula or data for Population growth?

S1man from the discord server decopiled the formula and its something like this:

Code: Select all

float growth = 0.2;
 growth += growth * fertility / 100.0; // can be negative
 
 growth += 0.2 * zone.health / 100.0;
 growth += 0.2 * (100 - zone.culture) / 100.0;
 
 popChange = zone.pop * growth / 100.0;
 
 // maygicc starts, note that zone pop is measured in hundreds
 extraPopIncreaseChance = zone.pop * growth - fertility * 100;
 if (random(0, 100) <= extraPopIncreaseChance)
     popChnage++;
 
 zone.pop += popChange;

Hope you find it useful :)
It definiely helps, thanks.
wooaa
Posts: 4
Joined: Mon May 26, 2014 1:44 pm

RE: General S&S Editor Questions

Post by wooaa »

Does anyone know how to make a stratagem start a story? I am working on a mod where my intention is to give you a stratagem which will kick off a story the next turn with a few basic decisions to give you regime points.

Using the Delta story format, I can mostly create the decisions I want. The issue is where I cant get the story to fire properly. If I leave the IF section blank, the story fires every turn, as one would expect.
So I created an If statement REGKEY.REGIMECHANGE>0

For the stratagem card itself in the AI effects library under the Set column I give it REGKEY.REGIMECHANGE=1

What "should" happen is that when a turn start, the story I made checks to see if REGKEY.REGIMECHANGE is more than 0, and if so starts the story, then at the end of the story I have instructions to set that variable back to 0.
When the stratagem is played REGKEY.REGIMECHANGE is set to 1, so it "should" start the story, but nothing happens.

has anyone else been able to get a stratagem to trigger a story?
Post Reply

Return to “Story and Stratagem (S&S) Editor”