Jump to content

[Stellaris] Modding Help, Ideas and Suggestions


Recommended Posts

Total modding noob here.

 

Is is possible to mod existing jobs instead of adding new ones?  I'm trying to overwrite an existing job, but I end up just removing the job from the game. Even just placing an unedited copy of the job in mod/common/pop_jobs seems to break it, without attempting any actual changes. I'm looking at other mods and I see people do this with buildings and it works, but I don't see other people doing it with jobs, which makes me worry maybe the game just doesn't support this. (All I'm looking to do right now is just prevent pops with a certain trait from working certain vanilla jobs.)

 

Thanks in advance.

 

EDIT:  Probably resolved. The key was not changing the filename of the jobs file after moving it over to mods/... . I'll leave the post up in case other modders ran into the same roadblock.

Edited by Il Duce
Link to comment

Well, I'm stumped again.

I'm trying to set a Leader flag but I can't seem to get it right. The below is called by On Action for On Leader Spawned. The add_trait effect is working, but the set_leader_flag is not, which really has me confused because it tells me the trigger is working and that the leader scope is working. (This example is for Rulers, but I have the same issue with all other initial leaders with the flag not being set)

Quote
immediate = {
        from = {
            if = {
                limit = { leader_class = Ruler }
                add_trait = leader_trait_ruler_myleadertrait
                set_leader_flag = myflag
            }
        }
    }

It looks to me that this is nearly identical to some vanilla code that I have to assume works:  limit to a leader class, add a trait, add a flag. 

 

Quote

if = {
                limit = {
                    leader_class = admiral
                    num_traits < 3
                    NOT = { has_leader_flag = has_gained_level_trait }
                }
                random_list = {
                    90 = { }
                    10 = {
                        modifier = {
                            factor = 1.5
                            has_level = 3
                        }
                        modifier = {
                            factor = 2.5
                            has_level = 4
                        }                        
                        modifier = {
                            factor = 5
                            has_level > 4
                        }
                        add_random_leader_trait = yes
                        set_leader_flag = has_gained_level_trait

 

Any idea what I'm getting wrong?

Thanks!

Link to comment

At a glance, nothing you're doing is wrong, so if I had to hazard a guess, are you checking for whether a leader has the leader flags in the places that you should be checking that in? I have some fairly similar code for a little mod that I made, and as far as I can tell nothing's wrong with what you have.

 

Quote
on_leader_spawned = {
    events = {
        elves.2
    }
}
Quote
# New Leaders Get Elves Trait
country_event = {
    id = elves.2
    is_triggered_only = yes
    hide_window = yes
 
    trigger = {
        from = {
            species = {
                has_trait = trait_elves
                NOR = {
                    has_trait = trait_cybernetic
                }
            }
        }
    }
 
    immediate = {
        from = {
            if = {
                limit = { leader_class = admiral }
                add_trait = leader_trait_admiral_elf
                add_ruler_trait = leader_trait_ruler_elf
                set_leader_flag = test_flag
                break = yes
            }
            if = {
                limit = { leader_class = general }
                add_trait = leader_trait_general_elf
                add_ruler_trait = leader_trait_ruler_elf
                set_leader_flag = test_flag
                break = yes
            }
            if = {
                limit = { leader_class = governor }
                add_trait = leader_trait_governor_elf
                add_ruler_trait = leader_trait_ruler_elf
                set_leader_flag = test_flag
                break = yes
            }
            if = {
                limit = { leader_class = scientist }
                add_trait = leader_trait_scientist_elf
                add_ruler_trait = leader_trait_ruler_elf
                set_leader_flag = test_flag
                break = yes
            }
            if = {
                limit = { leader_class = ruler }
                add_trait = leader_trait_ruler_elf
                add_ruler_trait = leader_trait_ruler_elf
                set_leader_flag = test_flag
                break = yes
            }
        }
    }
}

image.png.d394817515fa4a1873738ef84a7d400b.png

 

(This was checked using debugtooltip if you weren't doing that already.)

 

You'll need to give more context/information for me to help you, I'm afraid.

Link to comment
5 hours ago, Anondylar said:

At a glance, nothing you're doing is wrong, so if I had to hazard a guess, are you checking for whether a leader has the leader flags in the places that you should be checking that in? I have some fairly similar code for a little mod that I made, and as far as I can tell nothing's wrong with what you have.

 

image.png.d394817515fa4a1873738ef84a7d400b.png

 

(This was checked using debugtooltip if you weren't doing that already.)

 

You'll need to give more context/information for me to help you, I'm afraid.

 

Thank you so much. I somehow managed to convince myself that the problem was on the setting side and not the checking side. I went back, undid my haphazard workaround and did it the old way again, but paid close attention to scoping, and it worked on the first attempt. This is so much better, thanks again!

 

 

Now I just need to figure out why my origin-based starting citizenship got fucked when I switched my test civ from xenophile to spiritualist.

 

 

Link to comment

I'm back with another one. Apparently I'm not using set_event_target correctly. O pervs of the void, what is your wisdom?

 

To provide some context, I'm using the anomalies system to set a trap for an enemy science ship. The player investigates an anomaly, receives an option to leave a trap behind; if the player picks that option, the location is flagged as trapped so that when someone else's science ship scans that location, an alternate version of the same anomaly spawns. If they investigate the anomaly, the trap triggers. And then, because this is pr0n, a scene is supposed to play for the player so you can see just how much fun the enemy crew is having.  Getting the "scene" event to run upon the trap being triggered is what's failing.

 

When the trap is set, I try to set an event target so I can reference the player's country later so that the scene can run later as a country event called in the player's country's scope. Spoiler alert: this is probably where the mistake is.

 

Quote
country_event = {
    id = tt_ship_corruption.1
    hide_window = yes
    is_triggered_only = yes
 
    immediate = {
        this = {
            save_event_target_as = tt_Ancient_Life_Pod_corruptor
        }
    }
}

At one point, I had this event set a country flag to confirm this event was running and that the active scope was the player's country. It is, and it is. I've also tried it without the "this" scope.

 

Then when the trap is triggered, it's supposed to call the "scene" event (the .4 installment in the event series). And I'm trying to scope to the player's country before I call it:

Quote
ship_event = {
    id = tt_ship_corruption.3
    hide_window = yes
    is_triggered_only = yes
 
    trigger = {
        owner = {
            has_country_flag = tt_corruptable_primary_species
        }
    }
 
    immediate = {
        set_ship_flag = tt_ship_corruption_step1
        save_event_target_as = tt_Ancient_Life_Pod_victim
        event_target:tt_Ancient_Life_Pod_corruptor = {       (note: this is line 54 quoted in the error log below)
            country_event = { id = tt_ship_corruption.4 }
        }
    }
}

The ship flag is being set correctly, so I know this event is firing. And the error log shows the enemy ship is saved as an event target successfully. But the scope switch to the player country via the event target isn't working, at least according to the error log:

Quote

15:41:27][eventtarget.cpp:2011]: Undefined event target: tt_Ancient_Life_Pod_corruptor, location:  file: events/tt_ship_corruption_events.txt line: 54
[15:41:27][effect_impl.cpp:291]: Script Error: Invalid context switch [event_target:tt_Ancient_Life_Pod_corruptor] from JNS Suulnar the Stalwart [ship]

The error log seems to be telling me that I never saved the event target. But that's what I thought I did in the .1 portion of the event series. 

Also, I am able to call .4 manually from the console and it runs, so I more or less know that .4 works, it's just not being called by .3 like it's supposed to be.

 

EDIT: I ran another test where I tried scoping to the event target immediately after setting it in .1 and it worked. So apparently this is failing because the event target is getting cleared between .1 and .3 somehow? An event target is supposed to be valid throughout the namespace, right? 

 

Any thoughts?

 

 

Update: 

I figured out a workaround that solved the problem. Instead of an event target, I used a limit criteria that allowed me to call the "scene" event for the corruptor empire only. That said, if anyone read this and knows why the event target method failed, I'd be most appreciative of your thoughts--it really bothers me that I failed to use the event target function for exactly what it was intended for.

glory.png

Edited by Il Duce
new info
Link to comment

From 

On 8/22/2021 at 9:36 AM, Il Duce said:

An event target is supposed to be valid throughout the namespace, right? 

Not exactly. From what I can tell from from reading the Stellaris Modding Den discord, event targets are saved across the same unbroken event chain (and if two of the same event trigger at the same time for different empires they won't mix event targets).

 

From what I can tell, your mod's logic is something like this:

Anomaly -> Event Trigger -> Flag Location -> Scanning the Flagged Location -> Creates Anomaly -> Anomaly -> Event Trigger

 

It's probably gets cut off at the point where the location is flagged and scanning the flagged location creates an anomaly. You could try to save the empire that set the trap as a global event target, which should work so long as two empires that can take this particular action don't exist (because global event targets will probably get overridden by another trigger of that same event by another empire).

Edited by Anondylar
Link to comment
  • 1 month later...

Looking for some help. Does anyone know what causes this and how to fix it?

 

1951107017_Stellarismissingportraits.jpg.4b090930470f4bc67233b3121e998565.jpg

 

I really love the idea behind what Calcifire and Mugginato are doing, but it's not quite to my tastes. For my game, I've been trying to find human-ish portrait mods to use for different custom empires, but they don't play well together.

 

I think I have an idea of how to fix those that are missing random names (show up blank when LV tries to create a subspecies), but the missing portrait issue has me stumped so far.

 

In this case, I've got Additional Humanoid Portraits (pictured above) with SE Humanoid.

 

I'm still learning conflict resolution in Irony Mod Manager, but I don't see anything that obviously looks like the problem. There don't appear to be any conflicting files at all.

 

(On a side note, though, the "random" section under asset_selectors has me baffled as well. It looks like SE Humanoid is conflicting with itself... but, hovering over each, it looks like these are actually different files. Not sure why Irony is presenting them like they're overwriting each other.)

 

139771582_Stellaris2.png.fef43b2ccb5218d05997946c1df98c04.png

 

 

Totally unrelated: Since this section appears to be for ideas as well... I notice in Calcifire's trait pack, there are traits for breast sizes. When going over conflicts in different builds, I also saw that the breasts in the SE Humans and Humanoid packs were significantly bigger than some of the other bodies (such as Elves of Stellaris),

 

That made me wonder: Is it possible to do a mod that actually lets the bodies show different breast sizes/outfits based on the breast size traits?

 

Clearly, it's outside of my current abilities (as I'm struggling just to get multiple portrait packs to work together), but I couldn't help but wonder how plausible such an idea was.

 

 

Update:

I've been doing a little bit of my own homework here, looking at the assets for the various mods and included text files. I think I'm starting to get an idea of how these things work (and I'm starting to realize it's a wonder that many mods work together at all, since it appears they all need to edit the same files).

 

On the concept of trait-based breast size images...I didn't realize that heads and bodies were treated as one object for most of these. So, I can picture two ways for doing this:

1: Swap the entire body based on the trait.

2: Make the bodies part of the clothing.

 

Given that different portraits use different skin tones, I think #1 would be the ideal way to go. Examining how SE Humans does it, a portrait definition looks a bit like:

human_female_01
    entity = "portrait_human_female_04_entity"
    clothes_selector = "mammalian_human_female_clothes_01"
    hair_selector = "human_female_hair_01"
    greeting_sound = "human_female_greetings_01"
    character_textures = "gfx/models/portraits/human/human_female_body_01.dds"

 

The clothes and hair are actually defined in text files elsewhere, and have all of the variations based on jobs, civics, etc. The "entity" part looks to be more complicated (as it links the images and the meshes?).

 

What I'm wondering about is the "character_textures" part. In the example, it just points to a single DDS file. Is it possible to have it point to a text file like the ones that the clothes and hair use to select assets?

 

 

 

 

Edited by emes
Link to comment
  • 4 weeks later...

I just wanted to mention if this would be a possible addition as a mod. But could it be possible for someone to add a tentacle species portrait into the game. like a legit one. There are some species in the plantoids and mollusks section that can kinda fit in for tentacle creature but not really. I'm surprised to be honest that this game has gone this long with out the addition of a mod that adds a tentacle species with portraits. I just wanted to ask if it would be possible to add such a thing in the game.

Link to comment
On 8/21/2021 at 6:36 PM, Il Duce said:

I'm back with another one. Apparently I'm not using set_event_target correctly. O pervs of the void, what is your wisdom?

 

To provide some context, I'm using the anomalies system to set a trap for an enemy science ship. The player investigates an anomaly, receives an option to leave a trap behind; if the player picks that option, the location is flagged as trapped so that when someone else's science ship scans that location, an alternate version of the same anomaly spawns. If they investigate the anomaly, the trap triggers. And then, because this is pr0n, a scene is supposed to play for the player so you can see just how much fun the enemy crew is having.  Getting the "scene" event to run upon the trap being triggered is what's failing.

 

When the trap is set, I try to set an event target so I can reference the player's country later so that the scene can run later as a country event called in the player's country's scope. Spoiler alert: this is probably where the mistake is.

 

At one point, I had this event set a country flag to confirm this event was running and that the active scope was the player's country. It is, and it is. I've also tried it without the "this" scope.

 

Then when the trap is triggered, it's supposed to call the "scene" event (the .4 installment in the event series). And I'm trying to scope to the player's country before I call it:

The ship flag is being set correctly, so I know this event is firing. And the error log shows the enemy ship is saved as an event target successfully. But the scope switch to the player country via the event target isn't working, at least according to the error log:

The error log seems to be telling me that I never saved the event target. But that's what I thought I did in the .1 portion of the event series. 

Also, I am able to call .4 manually from the console and it runs, so I more or less know that .4 works, it's just not being called by .3 like it's supposed to be.

 

EDIT: I ran another test where I tried scoping to the event target immediately after setting it in .1 and it worked. So apparently this is failing because the event target is getting cleared between .1 and .3 somehow? An event target is supposed to be valid throughout the namespace, right? 

 

Any thoughts?

 

 

Update: 

I figured out a workaround that solved the problem. Instead of an event target, I used a limit criteria that allowed me to call the "scene" event for the corruptor empire only. That said, if anyone read this and knows why the event target method failed, I'd be most appreciative of your thoughts--it really bothers me that I failed to use the event target function for exactly what it was intended for.

glory.png

Hey what mod is that from?

Link to comment
  • 2 weeks later...
  • 2 weeks later...

So, I'm trying to make some "all male/all female" galaxy settings using the change_species_characteristics command from LEM, working from the way the Clone Army origin is set up as a model. However, while my event does change the species to be male/female only, it doesn't touch the starting leaders, who stay randomly gendered (or if I change my event to Indeterminate, they stay male/female even when newly generated leaders are properly neuter). Now, the commentary for the clone army origin event in on_game_start implies that those events happen before leaders are generated, and the Clone Army origin properly genders/portraits all of the starting leaders, so I don't know why my event isn't also doing that.

 

This is the current state of my event after stripping it down to the bare bones:

event = {
	id = darg_setup.1
	hide_window = yes
	is_triggered_only = yes

	immediate = {
		every_playable_country = {
			limit = {
				is_ai = yes
			}
			every_owned_species = {
				change_species_characteristics = {
					gender = female
				}
			}
		}
	}
}

 

I guess what I'm asking is: why isn't changing the species_characteristics in an on_game_start event causing a species to be generated with leaders of the appropriate gender, the same way the Clone Army origin does? Normally, I'd assume the Clone Army changes to leader generation are just elsewhere in the files, but the developer commentary in on_actions implies that setting a species gender in on_game_start is supposed to do that.

Edited by Dargaron
Link to comment
  • 5 weeks later...
  • 2 months later...
On 3/3/2022 at 4:44 PM, flamelordytheking said:

Hey, I'm looking for a species art pack specifically for humans. I know that aliens are usually all the rage, but I like playing humans, and the vanilla portraits are rather lacking, so if anyone has a collection of human portraits they can direct me to, that would be wonderful. 

 

Thanks in advance!

Have you seen SE Restyled?  It's modifies human and human-like species portraits to be a fair bit sexier, and then there is a mod called SE Restyled Plus Plus that tweaks the costume selection.  Slaves are either naked, or in bondage gear, stuff like that.

Link to comment
21 hours ago, schroecat said:

Have you seen SE Restyled?  It's modifies human and human-like species portraits to be a fair bit sexier, and then there is a mod called SE Restyled Plus Plus that tweaks the costume selection.  Slaves are either naked, or in bondage gear, stuff like that.

I have not. do you have a link?

Link to comment
  • 4 weeks later...

Last time I played Stelaris was version 2.8...

 

now coming back to it again because of the new dlc...

 

and now like before the launcher fucks up the mods... it's not appearing anymore  even when I put it on the mods folder in the My Documents...

 

so how do you install mods manually in this latest version?

Link to comment
1 hour ago, arpaschad said:

Last time I played Stelaris was version 2.8...

 

now coming back to it again because of the new dlc...

 

and now like before the launcher fucks up the mods... it's not appearing anymore  even when I put it on the mods folder in the My Documents...

 

so how do you install mods manually in this latest version?

Yes, the paradox launcher often causes problems. For me I always only see mods if I restart the launcher again.

Just use the Irony Mod Manager

Link to comment
  • 4 weeks later...

Hi guys. so due to the Paradox launcher causing me a lot of pain when it comes to my mods i need some help in this regard on these two following actions.

1. How do you wipe all the mod history from paradox launcher so it knows not to load all the legacy stuff (like old mods you have already unsubscribed and/or removed.)

2. How to bypass the Paradox launcher entirely using the Irony Mod Manager. 

I ask this because due to the mod history keep trying to redownload all the older unsubscribed mods, its causing havok with my Irony launcher. to the point i've frustratingly gave up trying to play modded or unmodded Stellaris. 

Link to comment
  • 4 weeks later...

So, the new patch somehow broke SE Human 2. The pops now only wear like 2-3 variants of the same black outfit.

Do you guys know how to fix this?

Link to comment
On 5/28/2022 at 8:39 AM, schroecat said:

So the most recent update seems to have broken the naming conventions in the game, and if I have any mods loaded, then every leader is named "TWO_NAMES_FORMAT".

 

Has anyone looked into this yet?

This means a mod that adds name lists has not updated the name lists yet.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use