SRU Internal - Feature suggestions

Post mods you have finished or are working on here.

Moderators: Balthagor, Legend, Moderators

Post Reply
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

SRU Internal - Feature suggestions

Post by C0dingschmuser »

Hi guys,

i'm currently working on an internal Mod/Trainer for SRU meaning i'm able to do lots of funky stuff while the game is running. For Example:
  • Modifying values from any country (Treasury, Approval ratings, Goods, etc.)
  • Literally paint (change hex owner and/or loyalty) https://imgur.com/a/kM9rFlK
  • Make country a declare war on country b
  • Force countries to make peace with each other
  • Change diplomatic relations for anyone to anyone
  • Force any diplomatic offer onto anyone
  • Manipulate units, from the country they belong to to their speed
Now, since there is (almost) no limit to what this allows me to do i'm asking you guys for any ideas/suggestions/wishes you might have.
For Example, someone already proposed to not let the supply of any hex get below 1% so that AI doesn't get stuck in the middle of nowhere
and i already successfully implemented that (i'll make that toggleable though).

For anyone wondering, i'll release it in the next couple of weeks here and on the Steam Workshop.
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: SRU Internal - Feature suggestions

Post by evildari »

ill give a try - maybe you can do it:
1. disable automatic production adjustment.
2. change ressources (especially money) data type that is able to be calculated with higher precision than integer.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

evildari wrote: Sep 24 2022 1. disable automatic production adjustment.
Can you elaborate more on what you mean by that?

As for the variable types, unfortunatly i can't change these since that would require a full recompilation of the source code which only battlegoat has. And even then the options are limited because of 32bit :/
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: SRU Internal - Feature suggestions

Post by evildari »

C0dingschmuser wrote: Sep 24 2022
evildari wrote: Sep 24 2022 1. disable automatic production adjustment.
Can you elaborate more on what you mean by that?

As for the variable types, unfortunatly i can't change these since that would require a full recompilation of the source code which only battlegoat has. And even then the options are limited because of 32bit :/
here about that automatic production adjustment - it was some time ago an "economic change"
viewtopic.php?p=189314#p189314

with that automatic production adjustment you can completely deindustrialize the world and it still works:
viewtopic.php?p=188787#p188787

And here the issues for "normal" gameplay
viewtopic.php?f=72&t=29106

oh i hoped there would be a way to inject machine code (yea i guess iam that old) changes before initialization of the variables whitout need for a source - almost similar like most of unity mods do.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

Very interesting, i'll look into that. From a pure technical standpoint i should be able to disable that though, provided i can find it.
evildari wrote: Sep 25 2022 oh i hoped there would be a way to inject machine code (yea i guess iam that old) changes before initialization of the variables whitout need for a source - almost similar like most of unity mods do.
I mean you can inject machine code, a lot of the stuff i'm able to do only works because i overwrite and/or inject some assembly, but things like changing variable size is unfortunatly not possible with that because you would essentially need to modify every single instruction that references or modifies that variable. And that's only really doable by recompilation.

And a little update: I'm now able to force the AI to create colonies when they eliminate another country.
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

I may have found the automatic production adjustment variable. It seems to multiply the base production of goods with a small factor between 0.9 and 1.1 (every day)
Freezing it at 1 may be the solution everyone is looking for, but i need to test it further before i can be completely certain.

On another note i also found out how to create Units (deployed at coordinates or in reserve) so i'll be implementing that as well.
Oh and i expanded painting to being able to draw Mountains lol: https://imgur.com/a/XWvtD3M
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: SRU Internal - Feature suggestions

Post by evildari »

C0dingschmuser wrote: Oct 01 2022 I may have found the automatic production adjustment variable. It seems to multiply the base production of goods with a small factor between 0.9 and 1.1 (every day)
Freezing it at 1 may be the solution everyone is looking for, but i need to test it further before i can be completely certain.

On another note i also found out how to create Units (deployed at coordinates or in reserve) so i'll be implementing that as well.
Oh and i expanded painting to being able to draw Mountains lol: https://imgur.com/a/XWvtD3M
Very nice! :-) ill wait for you!
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

I'm now at a point where almost everything is implemented and working so you can expect the release to be this Weekend. Some of the new things i added include the manual setting of DEFCON for every country and some fun options for Units like making all units of a country invincible, super fast (and more!)
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: SRU Internal - Feature suggestions

Post by evildari »

Thank you very much,

using mainly your automatic production adjustment disabler and it seems to work very well (tried the 1914 brinkmanship scenario).
Map painting and unit placing in game is awesome too, i think this will enable more people to make some scenarios on the fly without the need to go the modding way.

Maybe you can add an option to change a region colors iel. selecting a region it shows that color code and the user can overwrite it.
For reference in the SR1936 Sandbox Brazil (selected them cause there are no multiple entries for brazil in the SR1936.cvp file)uses

Code: Select all

regioncolor 0xFFC8A05A
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

evildari wrote: Oct 15 2022 Thank you very much,

using mainly your automatic production adjustment disabler and it seems to work very well (tried the 1914 brinkmanship scenario).
Map painting and unit placing in game is awesome too, i think this will enable more people to make some scenarios on the fly without the need to go the modding way.

Maybe you can add an option to change a region colors iel. selecting a region it shows that color code and the user can overwrite it.
For reference in the SR1936 Sandbox Brazil (selected them cause there are no multiple entries for brazil in the SR1936.cvp file)uses

Code: Select all

regioncolor 0xFFC8A05A
Thank you, i'll look into it!
From a technical standpoint that should be possible quite easily, i just have to find it :D
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

Pleased to say that i found the country colors and can change them, will include it in the next Update (probably later today or tomorrow) :)

Image
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: SRU Internal - Feature suggestions

Post by evildari »

You are awesome!
Ready for another challenge? (you know: offer a hand - lost the arm):
Army gets fuel first instead of the civilians.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
User avatar
C0dingschmuser
Sergeant
Posts: 24
Joined: Sep 20 2022
Human: Yes

Re: SRU Internal - Feature suggestions

Post by C0dingschmuser »

evildari wrote: Oct 16 2022 You are awesome!
Ready for another challenge? (you know: offer a hand - lost the arm):
Army gets fuel first instead of the civilians.
Thank you :D

Well i can certainly look into it but it probably would be very complicated. Compared to the automatic production adjustment where i just had to find one variable which manipulates each resource production by a little bit, here i'd have to completely reverse engineer how fuel is calculated. Like is it done at one spot in the code(code meaning floating point assembly, not real code)? Or multiple? Are there even different subtractions for army and civlian or are they combined? If they are combined, how are they combined etc... (and floating point assembly is even less fun then normal assembly lol)
You see, it gets pretty deep pretty fast xD
Post Reply

Return to “Modding Show & Tell”