• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Hello, @Divine, could you clear some moments, please. Here's some comments inside sector_types.txt:

Code:
# production_targets: strategic resources
# ships: ships to build
# military_station: set to yes if want to build military stations
# modifier: modifiers

In the comments, modifier section is listed, however, it doesn't work ingame, causing error. Is it for future plans?
I took a little bit of an investigation on this one. It was a planned thing to be used with sectors but it never actually got implemented. I've made sure that the comments of modifier and the other unused entry military_station are removed for the next patch for clarity.

If you find the idea of modifiers applied to sectors in that regard useful then feel free to suggest it to be added and we'll investigate in due time. However we have quite a back log right now due to various reasons.
 
Thanks for your answer.
Yeah, with the sector_settings.txt military_station seems unnecessary. However, modifier section could be a good tool to bring additional difference to sector types.

And another related questions. When I was investigating the create_sector effect, I've found two additional parameters. First, it's sector type, which is defining the sector focus. So, if we could set it up while creating the sector and operate with him later, could we ask devs to implement something like get_sector_type? Seems, that it's not so hard to make.
And the last. In documentation we can see this:
Code:
create_sector = { capital = <target> type = <string> additionalsystems = <target> }
Are there any examples using the additionalsystems parameter?
 
About log comand.

tryed this:
log = "plague start on planet [root.GetName]"

And
In event desc this:
population_improved_plague.10.desc:0 "[event_target:population_improved_plague_count.population_improved_plague_pop_num]\n\n[population_improved_plague_count.population_improved_plague_pop_num]"

And get this:
Code:
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:38][game_text.cpp:314]: Unknown property: population_improved_plague_pop_num
[22:27:38][game_text.cpp:314]: Unknown property: population_improved_plague_pop_num
 
As discussed in this thread: https://forum.paradoxplaza.com/foru...d_planet_flag-based-on-size-of-planet.978735/

We attempted to figure out why a malformed token was being returned in a set_timed_planet_flag statement. We discovered that, apparently, days must always be passed an explicit numeric value. Attempting to give it a dynamic non-explicit value from a variable caused the code to seize up, and all uses of days by paradox themselves also only ever uses explicitly defined whole numbers. This is somewhat complicating as this means we would have to create an if statement for each assignment. This greatly limits flexibility in handling events where a countdown timer is preferred over a less defined, probabilistic function such as MTTH.

Is it possible for days/months/years to have better assignment values? One example would be such that "....days = 1000" could also be "....days = some_variable" or potentially "....days = this.some_variable"
 
  • 1
Reactions:
About log comand.

tryed this:
log = "plague start on planet [root.GetName]"

And
In event desc this:
population_improved_plague.10.desc:0 "[event_target:population_improved_plague_count.population_improved_plague_pop_num]\n\n[population_improved_plague_count.population_improved_plague_pop_num]"

And get this:
Code:
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:34][game_text.cpp:314]: Unknown property: GetName
[22:27:38][game_text.cpp:314]: Unknown property: population_improved_plague_pop_num
[22:27:38][game_text.cpp:314]: Unknown property: population_improved_plague_pop_num
Have you tried with [Root.GetName]? I think our text system is still a bit harsh on case-sensitivity.
Scoping to an event_target in text functions should not include the prefix "event_target:" unlike how it's used in the script files. Then I guess that you're trying to print the value of a scope-stored variable? It should work with just writing the name of the variable on the right-hand-side of the dot. However if the variable name is not initialized for that scope then it will throw that error for you.

As discussed in this thread: https://forum.paradoxplaza.com/foru...d_planet_flag-based-on-size-of-planet.978735/

We attempted to figure out why a malformed token was being returned in a set_timed_planet_flag statement. We discovered that, apparently, days must always be passed an explicit numeric value. Attempting to give it a dynamic non-explicit value from a variable caused the code to seize up, and all uses of days by paradox themselves also only ever uses explicitly defined whole numbers. This is somewhat complicating as this means we would have to create an if statement for each assignment. This greatly limits flexibility in handling events where a countdown timer is preferred over a less defined, probabilistic function such as MTTH.

Is it possible for days/months/years to have better assignment values? One example would be such that "....days = 1000" could also be "....days = some_variable" or potentially "....days = this.some_variable"
We know that having variables on the right-hand-side of numerical parts of script triggers and effects would be immensely powerful. It's however quite an overhaul on all of the projects that is required since we need to update the code on all of the relevant triggers and effects. I won't promise anything but if I see a possibility to port a system for this across all of our projects in a semi-smooth way I'll be right on it. In the meantime however you'll unfortunately have to make due with what is available.
 
  • 1
Reactions:
@Divine
I looked to anything that can affect planet fortification, like set_fortification for a planet, but could not find it.
There are set_planet_health and set_planet_health_max that do totally nothing.
Can you please look into this as there are so many things that can be done with it (e.g. planetary generator not allowing to bomb fortifications below set level).
 
Last edited:
To have it assign leaders for a sector seems like a solid suggestion. The set_sector_name effect should definitely not crash the game, my guess is that some changes to the underlying code of sectors messed up the effect.

Unfortunately I've been tasked to help out other projects with non-mod related stuffs for a while longer so I can't really look into these issues for some time being.
 
  • 5
Reactions:
To have it assign leaders for a sector seems like a solid suggestion. The set_sector_name effect should definitely not crash the game, my guess is that some changes to the underlying code of sectors messed up the effect.

Unfortunately I've been tasked to help out other projects with non-mod related stuffs for a while longer so I can't really look into these issues for some time being.
Thanks for your answer.
Yeah, there is something with hardocded part of sectors, cuz I have pretty pure and clear code for set_sector_name test without any errors.
 
To have it assign leaders for a sector seems like a solid suggestion. The set_sector_name effect should definitely not crash the game, my guess is that some changes to the underlying code of sectors messed up the effect.

Unfortunately I've been tasked to help out other projects with non-mod related stuffs for a while longer so I can't really look into these issues for some time being.

Hey just wanted to say thank you for your help so far in clarifying some of this stuff! I really appreciate you taking the time to answer our questions regarding modding functions. Hope you can swing around again soon :D
 
Stickied due to relevance and importance to the modding community of Stellaris.

Thanks,
Dylan
 
@Divine
I looked to anything that can affect planet fortification, like set_fortification for a planet, but could not find it.
There are set_planet_health and set_planet_health_max that do totally nothing.
Can you please look into this as there are so many things that can be done with it (e.g. planetary generator not allowing to bomb fortifications below set level).

Any changes to mentioned problem in upcoming patch?
 
There seems to be some missing modding functionality posts already in the suggestions thread. But if the modders at large feel that the forum would benefit of keeping two threads alive at the same time and separating the issues then by all means, go ahead and organize one. As long as it doesn't become half a dozen threads I should probably be able to at least try and keep up.

Unfortunately this isn't an easy issue that about add_modifier. This seems to be an issue that the ships doesn't update the decay on their modifiers. I'll notify the team on this but since it might impact performance on the game I'm leaving it up to them to find a solution.

@Divine any word on if add_modifier's day variable has been fixed?
 
@Divine

Is it possible to mod a fixed starting point into a custom made galaxy?

I tried this,
Code:
system = { id = "0097" position = { x = -426 y = -252 } }
system = { id = "0098" position = { x = -426 y = -222 } }
system = { id = "0099" position = { x = -438 y = -168 } }
system = { id = "0100" position = { x = -426 y = -162 } initializer = sol_system_initializer }
system = { id = "0101" position = { x = -426 y = -40 } }
system = { id = "0102" position = { x = -426 y = 92 } }
system = { id = "0103" position = { x = -426 y = 372 } }
system = { id = "0104" position = { x = -424 y = -128 } }

but I doesn't work. It sets the sol system to this location, but I still start with another sol system randomly somewhere in the galaxy

Thank you for your time!!!
 
May be wrong id
from my mod
Code:
system = {
        id = 0
        position = {
            x = -91
            y = -380
        }
    }

ID is not the problem, because the galaxy with 2700 systems work well. It's just an initializing problem of the starting point.