Stellaris

Stellaris

Modify the Galaxy
Modify your Stellaris experience by checking out the many mods created and shared by the community, including tweaks to almost any aspect of the game.
Learn More
Any mods that allows armies to gain xp outside of battle?
We have one for navies with a mega structure, though what about armies? Is there any mods that allows armies to gain experience outside of battles?
< >
Showing 1-15 of 18 comments
hi im not good at modding stellaris (only have a few rimworld mods so far), but maybe there can be some way of having an Event, where xp is given to the general of an army?

and maybe if the game allows, there could be a genetic trait like leader experience gain, but for armies,

actually, maybe an Event, which spawns an enemy army on your planets (but that particular enemy army is set to have a very low attack and morale), so that your army quickly can defeat it, and gaining you xp, might be the easiest way to do it
Proxy 9 Feb @ 5:42am 
What would those traits and events be?
ah maybe some kind of scripted event, which triggers when the player has a certain number of armies or something like that.
Geoff 10 Feb @ 2:07am 
Originally posted by pgames-food:
ah maybe some kind of scripted event, which triggers when the player has a certain number of armies or something like that.
I took a look at the code and couldn't find anywhere that clearly adds experience to defense armies, which I think means it's locked away in the base game code.

The best hack I could think of would be to run an "on_some_pulse" event that triggers "training exercises". It'd event spawn hostile but very weak armies to attack the defenders, thus generating xp. I'm not really sure though if xp is generated on a "per kill" basis or on a "per strength" basis. So even if that might be a viable workaround it'd might end up adding a lot of processing to little practical effect.
Proxy 10 Feb @ 5:58am 
What is this on_some_pulse?
Geoff 10 Feb @ 11:19am 
Originally posted by Proxy:
What is this on_some_pulse?
Well, it's more of an abbreviation than a real thing. In the folder "[your_path]\steamapps\common\Stellaris\common" there is another folder called "on_action." In that folder there is a file called "00_on_actions.txt." In that file there are a bunch of specification for which actions will happen after specific in-game events. So, for instance, to trigger an event whenever an army dies, there's a section of the code that looks like this:
#An army has been killed in ground combat # This = owner # From = army # FromFrom = opponent # FromFromFrom = planet on_army_killed_in_combat = { events = { emperor.450 necroids.15 colony.9080 } }

That means that those three events are triggered each time an army is killed in combat. I believe they're each tied to analyzing whether the unit's death triggers "victory" in a given event chain. I think colony.9080 turned out to be testing for if you'd defeated the Crystal Kraken with the "subterranean" origin, for instance.

There are a whole series of checks that can be done "on pulse" - which means that every fixed units of time, the event may be called. Basic structure looks like this:
# No scope, like on_game_start on_monthly_pulse = { events = { marauder.511 # Great Khan Dies #marauder.11 # Marauder infighting - commented out for now

The timespans between pulses range between one month and five years. So five year pulse events are ones that don't require a lot of constant checking. And the pile of monthly and yearly checks explain a big part of why the game always lags so hard on the first of the month and first of the year (in additional to autosave).

So I'm not sure of the wisdom of dropping in a "battle training" event as a regular pulse event. But like if I wanted to accomplish what you're asking for I would find an event that I know spawns hostile armies on a friendly world (the Sentinel archaeology site event chain probably) and figure out how they're spawning the empires. Using that code as a template, I'd create "training militias" or some other similar army type ( "armies" is also a folder in the "Stellaris/common" folders and defines various armies that can be invoked in-game. In your case, I'd be looking at 02_event_armies.txt) and then have them rez out and attack the defensive armies every so often.

I'm not sure if it would work - do defense armies accumulate XP, how often are they respawned by "phantom job switches", how much xp do they get for a kill and how is that collated? Those are all practical questions I'd answer with empirical trial and error until I got a result I was happy with. And maybe in that process some new insight on how it's configured would suggest a more efficient way to the same result. But that's the method I'd take to approaching the problem.

I have a folder on my computer that I call "Stellaris Mods" and in that each scenario/mod I'm working on has a separate folder with a complete copy of the game installed. I also keep a "Sandbox" folder in there which is where I test weird ideas like this before I put them in a mod I intend to play. Then when I'm done, I change the code in any existing mod set I want to play it with and reset the "sandbox" back to "out-of-the-box" condition. I find that a bit easier for myself than farting around with the official "mod" structure, which is nevertheless the advised way to deal with mod work: https://stellaris.paradoxwikis.com/Modding_tutorial
Last edited by Geoff; 10 Feb @ 11:21am
wow youre very knowledgeable geoff :)
where were you 2 years ago when i had these ideas lol :)

Lunar Tidal Harnessing, and Construction Co-ordinators :o)

https://steamhost.cn/steamcommunity_com/workshop/discussions/search/?appid=281990&gidforum=357285562492084361&q=pgfidea
Last edited by pgames-food; 10 Feb @ 7:29pm
Geoff 10 Feb @ 7:45pm 
Originally posted by pgames-food:
wow youre very knowledgeable geoff :)
where were you 2 years ago when i had these ideas lol :)
Don't think I'd bought the game yet, or if so I'd just acquired it. I was nowhere close to taking it apart and seeing how it worked yet.

If you can condense those asks, I'd be happy to take a closer look at them. I keep very good notes about where to find things, so if I've figured out where it is yet, I can at least point you in the direction. If you actually want to get it done, you'll probably have to do the work yourself, though.
ah cool ok thanks,
right now im still on v2.6 of stellaris with a big bunch of mods (which are surprisingly stable up until endgame crisis) in a game am tyring to finsh but will post back or get in touch once i can update to the latest version and get up to scratch etc
Last edited by pgames-food; 10 Feb @ 8:02pm
Geoff 10 Feb @ 8:26pm 
Originally posted by pgames-food:
ah cool ok thanks,
right now im still on v2.6 of stellaris with a big bunch of mods
I've been working backwards from v3.6. It seriously does seem to get better the more layers you scrape off. I can see why the earlier versions have so many adherents. It's a shame they took such a sharp turn in the current direction. We'll see how v4.0 turns out, but I'm skeptical.
Proxy 12 Feb @ 4:05am 
So there is a console command to spawn an enemy army?
Geoff 12 Feb @ 9:27am 
Originally posted by Proxy:
So there is a console command to spawn an enemy army?
There's "effect = { create_army = { [details] } }"
You can find the specifications for using it here: https://stellaris.paradoxwikis.com/Effects

Those specifications would go where I've put [details] - the owner of the army, the species, the unit name, and the army_type_key (which you'd get from the armies folder I mentioned earlier)

Any effect can be executed by entering code directly into the console. You just have to make sure you've scoped it properly (this is a "plaent scoped" effect, so have the planet window open where you want them to appear when using it).

There are a couple of problems with entering effect code directly into the console. You can't enter line breaks directly into the console (well maybe you can with shift+enter, I haven't tried everything). My workaround has been to write the code in a text editor first, then paste it into the console window. There appears to be some length limit as well - I can't enter large or complex code blocks into the console. I haven't tested the precise limits of it, but you can usually rez a single instance of some object like a ship or an army with it.
Proxy 12 Feb @ 6:54pm 
Got a example?
Originally posted by Geoff:
Originally posted by pgames-food:
ah cool ok thanks,
right now im still on v2.6 of stellaris with a big bunch of mods
I've been working backwards from v3.6. It seriously does seem to get better the more layers you scrape off. I can see why the earlier versions have so many adherents. It's a shame they took such a sharp turn in the current direction. We'll see how v4.0 turns out, but I'm skeptical.

hehe, i managed to reach 25k pops, and i think my max recorded pop growth was +15.17 per month :)
Geoff 12 Feb @ 11:29pm 
Originally posted by Proxy:
Got a example?

OK, so I've tested some and the following works as a proof of concept:
effect = { planet_event = { id = distar.33 } }

You need Distant Stars to pull it off, because it calls the event that triggers a rage virus among your population who begin attacking your defense garrison. The event itself is written in "distant_stars_events_1.txt" which can be found in the "events" folder in "[Your Path]/steamapps/common/stellaris/events"

If you don't have that DLC, you might want to look for a different example.
effect = { planet_event = { id = colony.105 } }
This one launches a deformed horde of mtuants against your garrison. Colony events should be vanilla gameplay and I've verified it works for me.

The event file would be "colony_events_1.txt"

Also, I checked since I had it open. Yes the defense armies do gain xp after fending off attackers.
Last edited by Geoff; 12 Feb @ 11:31pm
< >
Showing 1-15 of 18 comments
Per page: 1530 50