• 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.
Showing developer posts only. Show all posts in this thread.
* Added is_exact_same_species that works like is_same_species used to work

I did not understand , could you explain?
I didn't make the change but from a quick check in the code they have implemented an non-species-object-unique-identity for species. Which means that while some species are not exactly the same species they might still be considered to share identity enough to be considered the same species as with the case of neo-humans.
 
I'm getting an error in error.log when using is_subject in portrait files. Both of those triggers are also missing from trigger_docs. Were they by chance not added in the patch?
Code:
[06:01:30][trigger_impl.cpp:904]: Error in scripted trigger, cannot find: is_subject
Unfortunately it got erroneously removed by a merge conflict in our subversion system. So it didn't make this patch. Thank you for poking me about the issue.
 
  • 1
Reactions:
Seems that is_exact_same_species is not working right either.

From reading the description of it in patch notes and trigger_docs. It is supposed to function the way is_same_species worked before patch 1.2.0
As is_same_species was changed to work so that it included subspecies.

So it is now works kinda like this before 1.2.0
Code:
or = {
    is_subspecies = ROOT
    is_same_species = ROOT
}

But is_exact_same_species still for whatever reason keeps including subspecies in it's checking. Which is not how is_same_species worked before the patch. And making it impossible for me to count the total number of primary species, as it also keeps including subspecies in the count....
There was an issue with the change that made both of them work like is_same_species. I fixed the issue but I don't know what patch that will reach you with that change.
 
  • 1
Reactions:
I'm interested too.

Soo, did I understand correctly that in 1.2 I can't overwrite the vanilla event by my own with the same id?
If so, then this is very bad for the modding, for me at least.
I think so but I'm not handling the merging to patches so I'm not sure. Try to use the effects in a script file and you'll get some obvious errors in the error log if they're not in.

You should be able to replace the whole vanilla event file that contains the event. Copying it and making the necessary changes inside your mod might achieve what you're after.
 
I think it's a bug when a file was called harderinvaders_game_start nothing worked. When I renamed it to fe_game_start the changes show up in the game.

Can i use set_species_homeworld in planet scope? Or only country?
Tried this:
owner_species = { set_species_homeworld = this }
but got an error in the log


Loks like variables working. May be you can edit the list of changes and add this important information?

Can i send my mineral/energy/science income to variables?
In better way then:
Code:
if = {
            limit = {
                has_monthly_income = { resource = energy value > 10 }
                }
            set_variable = {
            which = test2
            value = 11
                    }
                }
        if = {
            limit = {
                has_monthly_income = { resource = energy value > 11 }
                }
            set_variable = {
            which = test2
            value = 12
                    }
                }
etc...
The file merging is a bit difficult to remember at times but if I remember correctly you should probably have your file named game_start.txt so that you overwrite the games original file with your modded file. However make sure that the essential bits that are needed but you don't want to change also are part of your modded file as the original file should not be read at all on game start.

I guess your version works as well but only because your filename comes before the original event file in alphabetic order ( f->g->h ). This will probably cause some errors when reading the original event file, the errors might be contained to the initialization process of the game and not have any effect when the game later on is running but I personally prefer a little cleaner solution.

owner_species is not a valid scope-change from a planet.
Code:
<assumed planet-scope>
planet_owner = {
   owner_species = {
      set_species_homeworld = PREVPREV
   }
}
Might be close to what you're trying to accomplish?

We've been experimenting a bit with an effect called export_to_variable = { } in our older titles CK2 and EUIV recently and if they work well we will most likely look into porting that functionality to Stellaris. Right now you're unfortunately stuck with the if limits.
 
Last edited:
  • 1
Reactions:
If you want to override a vanilla file you should use the exact same name as the vanilla file in your mod.
No, a species can have 1 homeworld with the current functionality.
I think there are some ways to do it but other modders would have more experience with trying to do that than I have.
I don't see any obvious error with the code. And a galactic object is a star system.

But for the sake of this threads health and for me to be able to help more modders efficiently I'll henceforth answer questions like this in the quick questions thread where other people also can help out: https://forum.paradoxplaza.com/forum/index.php?threads/quick-questions-thread.926968/

Therefor I'll from here on delete all posts that are not directly related to my modding improvement updates in this thread.
 
  • 1
Reactions:
I've added a log trigger and a log effect to help with debugging scripts. I'm quoting a post I did in another thread with example usage.

There's no good reason why it doesn't exist. I've added a trigger and an effect that has the same syntax:
Code:
log = "My log message. Something happened for [This.GetName]."
Which would print "[09:23:04][effect_impl.cpp:16662]: [2200.1.1] Log command triggered from effect in file: events/colony_events.txt line: 2283. My log message. Something happened for Earth." as an output to the game.log file. Do note that the game.log file is wiped every time you start the game.

I think most of the localisation functions should be available for the output.
 
  • 2
Reactions:
Unfortunately we can't use variables as a right hand side value for triggers or effects even where it would make sense. Our current architecture prohibits an easy solution to the problem. It is something we understand would be very valuable and we will try to figure out a solution.
 
  • 1
Reactions:
- You can now get the value of a script variable to localized text. eg [event_target:my_planet.my_variable] (This means that variable values will now be printable with the log trigger/effect)
- Events now have support for an "after = { }" - effect field that executes after any event option is executed as opposed to the "immediate = { }" effect field.
- Added modifier weapon_type_strike_craft_speed_mult
 
Last edited:
  • 2
Reactions:
Divine can you please edit your posts to reflect whether a feature is actually in the current released version of the game or not? It's a bit confusing looking back and trying to determine if new features are in the current version or are waiting for a new major version, etc..
I'm not always in the loop when patch-schedules are changing or other things as I'm connected to four different projects at the moment. Unfortunately the changelog might get reformatted before release, so your best bet is to search for handles of effects or functions from posts in this thread in the changelog which should indicate if they've been implemented in the released version.

Hello Divine,

I was wondering if you could possibly pass this bug along to the devs for us. Basically right now modders can't create new kinds of stars with custom nebula and star light colors because there is no way to link a new star to a file in gfx/worldgfx. There is an entry in the files that suggests where a link should occur, but it does not work unless you use one of the existing star classes. This thread i made goes into detail about it and should explain it well to yourself and the devs: https://forum.paradoxplaza.com/foru...s-with-custom-light-and-nebula-colors.956033/ . If you could pass this along to them so that we might get a fix, that would be great!
I'll make sure that this is in our bug database.

Seems like is_same_species counts my species what I genetically modified, but does not count the ones that appear by the event (human superiror).
That sounds like a bug. I'll try to find some time to add species identity support to the create_species effect.
 
  • 1
Reactions:
- Events now have support for an "after = { }" - effect field that executes after any event option is executed as opposed to the "immediate = { }" effect field.
- You can now get the value of a script variable to localized text. eg [event_target:my_planet.my_variable]
- Renamed count_ships trigger to count_fleet_ships to better reflect what it actually evaluates.
- Added a new count_ships trigger which evaluates on ships in the entire galaxy.
 
  • 1
Reactions:
Any chance that we could get a Mod related version of
Code:
host_has_dlc = "name"  # Checks if the host has a certain dlc enabled
local_has_dlc = "name"  # Checks if the host has a certain dlc enabled

I tried using a Mods Name, the one set in descriptor.mod, but that always returned false.
This would be very usefull for split mods and would enable us to change how two parts of a mod work together.
For example an Anomaly Reward, if mod xyz is enabled get tech from mod xyz, else some research points.

Kind regards!
Sounds like a great idea. I'll see if it's a quick thing to add.
EDIT: Actually when I think about it. It is a bit of a problematic trigger. Especially the local_has_dlc/mod one. If it's used carelessly then it could easily create out of sync issues. And we do need a bit of extra data structuring to take care of a potential host_has_mod one which I hoped to avoid.

I'll try to look into it all more when I have time.
 
Last edited:
Divine, perhaps we could set up a second thread dedicated to reporting errors (or perceived errors) and core missing functionality like this? We have the suggestions thread, but a lot of the stuff in there is "I wish", and it would be good to have a more focused area that you look at from time to time where we can report things like this..
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.
@Divine , i've noticed that adding ship modifiers using "add_modifier" does not seem to be correctly using the "days" input variable (if I am not mistaken..) - currently all added modifiers to ships will last forever. Is a fix for this functionality coming any time soon? Without "days" when adding modifiers, i'm having to use flags and pulse events to remove modifiers, and it's getting very messy. :(
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.
 
  • 2
Reactions:
I'm just posting here as a notification that I'll be gone on vacation for 3 weeks from now. So be nice towards the team working with Stellaris in the meantime and I'll be back soon enough. Hopefully I'll be able to concentrate more on one project at a time then rather than keeping track of all of our projects at the same time. But time will tell what my tasks will be.

Happy modding while I'm brb.
 
  • 3
Reactions:
So and what?

As i tested, new features not added to 1.2.4.
[22:00:26][persistent.cpp:34]: Error: "Unknown modifier: weapon_type_strike_craft_speed_mult, near line: 2
It doesn't sound like it made the merge to the patch then. If my additions make it to the patch they will be in the changelog so the best way is always to keep an eye on those. They'll be similarly worded as my updates in this thread.
 
  • 1
Reactions:
Welcome back divine! I thought you might like to take a look at this: https://forum.paradoxplaza.com/forum/index.php?threads/mod-the-brunai-imperium.962113/

It's the mod i had been working on when you left (finally released). We still have that bug where we can't define our own worldgfx, guess that didn't make it into the patches.

Cool mod, hopefully you can get the galaxy icons working eventually. :)

Would be great if that was in the wiki at least. Are we supposed to look at the forums for random language features that may or may not have been added? Good job so far on the API (he said, sarcastically).
I'm working as an auxiliary on all of the projects. Therefor I'm not in charge of the patch schedule and whether or not my changes to the script language makes it in a patch or not. It's all at the discretion of the projects themselves if they make the cut or not. It would be rather confusing then if I add the script features to the wiki months in advance to when they actually hit the live version.
We've added the console command trigger_docs and effect_docs which will print the available triggers and effects to a log file in the newer titles (HoI and Stellaris).

Also the wiki is moderated by Meneth who'll make sure that it's a pleasant environment with a proper structure. However the wiki is community driven so if you see something that is missing there it would be most welcome to make a contribution to the wiki.
 
  • 2
Reactions:
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.