• 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.
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:
So, looks like something broken in variables

Line minerals > "auto_build_cost" work as "auto_build_cost" = 0

My test event:
Code:
country_event = {
    id = autobuild.55
    title = "autobuild.3.name"
    desc = "autobuild.3.desc"
    picture = GFX_evt_alien_city
    #is_triggered_only = yes   
    hide_window = yes   
    immediate = {
        set_variable = {
            which = "auto_build_cost"
            value = 500
        }
        if = {
            limit = {
                check_variable = {
                    which = "auto_build_cost"
                    value = 500
                }
            }
            add_minerals = -4
            add_energy = 200
        }
        if = {
            limit = {
                minerals > "auto_build_cost"
            }
            add_minerals = -4
            add_energy = -250
        }
        }
    }
 
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..
 
  • 2
Reactions:
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!
 
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:
Hello Divine, if you have some time available, could you take a look at the linking between star classes and skyboxes? Right now its impossible to add a Skybox to a new Star Class, it simply refuses any world tag identifier that isnt one of the vanilla classes. Thanks in advance!
 
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!
 
- 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.


@Divine any chance the after = {} can get ported into HOI IV and CKII?