• 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.

Fu.Th.Sy.

Captain
8 Badges
Jul 25, 2009
309
34
  • Arsenal of Democracy
  • Darkest Hour
  • Europa Universalis: Rome
  • Crusader Kings II
  • Europa Universalis IV
  • 500k Club
  • Imperator: Rome
  • Imperator: Rome - Magna Graecia
I'm trying to fire an event that triggers when a country, let's say Germany, has 5 transport divisions (ships for transporting divisions)
So after some testing...
transport = { country = GER value = 5 }
... or
transport = 5
... they both seem to trigger when a country has 5 or more convoys in pool, not transports.
 
Try this:
[transport] = { country = GER value = 5 }

It should work anyway, as info states, that "transport" is for transport ships, not convoys. Convoys are "transports"
 
I did try what you suggested and it didn't work.
NOT = { transport = { country = GER value = 3 } }

Maybe if it's used with 'NOT' then it doesn't recognize the trigger?
 
Code:
event = {
    id = 1000000
    random = no
    country = GER
    persistent = yes
    
    trigger = {
        NOT = {
            transport = {
                value = 3
            }
        }
    }

    name = "text a"
    desc = "text b"
    picture = "Germany_invaded"
    style = 0   
    
    date = { day = 1 month = january year = 1936 }
    offset = 1
    deathdate = { day = 29 month = december year = 1999 }

    action_a = {
        name = "text c"
        command = { type = add_division value = transport when = 0 }
    }
}
 
I found out what was preventing the event to fire, so now it works as it should. Trigger didn't work because of those 9 transport ships in construction que (scenarios\1936\germany.inc). If construction of TPs is removed the event does fire. It seems that the code checks for not only what is already built but also for what is currently beeing built (construction que).
 
  • 1Like
Reactions:
It's absolutely bad design. You can easily exploit this fact by simply adding units to production, then moving them at the end of the list. Eventually you might be surprised by a suuden event just because you put some units to production.