• 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.
Yes that is the way the Baldwin events trigger.
Er, okay. I will go back and look at it. Sorry for filling up this thread with my nonsense if it was a mistake on my part. :p

As I recall, if you use a weight_multiplier it should trigger at the specified time. IF there is a weight_multiplier option for event triggering :D
Could you PM a poor fool like me with more details, please? I'd appreciate it.
 
@Gamengervi

Here is your problem in the Defines file:
Code:
    EVENT_PROCESS_OFFSET = 1,                       -- Events are checked every X day per character or province (1 is ideal, but CPU heavy)
In the above I have changed it in TRE to check daily. I think standard is every 30 days?
 
  • 1
Reactions:
No, none.
My system is Win 7 with:
systeminfo.jpg

with a NVIDIA GeForce GTX 659 Ti video card.

Not sure if this is above or below standard HOI IV players systems.
 
  • 1
Reactions:
Yes, it should fire the first day all conditions are met. If not all of the conditions are met in that time period it wont fire (like not controlling a specific province) after if other conditions are met later.
You shouldn't mess with those defines. It will greatly increase performance degeneration. Rather than lagging out in 1942 it will do so about 1940. The issue is, upping it like that, causes the check to evaluate on every valid actor, even if it shouldn't/

Code:
weight_multiplier = {
        days = 1
        modifier = {
            factor = 0.1
            has_character_modifier = magic_power_4
        }
}

Do note the example is from CKII, and I do not know if we can use weight_multipliers in HOI IV, that said they are expressly designed for events that need to fire within a 30 day interval.

That is a weight_multiplier, it is used in place of a MTTH block. Also, what is your MTTH setting? If it is set to 1 day then it should trigger as soon as the trigger conditions are valid. Alternatively, what is happening is the event is caching and not firing till the month end. No new commands really would fix that, unless they did some kind of dynamic on_action that let us specify an actual date in the on_actions, but from what I understand, that would be almost impossible.
 
  • 3
Reactions:
Oh god, I question everything now.
the other really hacky way to do it, is to use an on_action triggered event pulse, to set up the conditions for the day you want your event to occur. It is much more elegant a system. You can for instance do an event that triggers on game start, that will fire an event on December 7th 1941. You would need to calculate the exact date, and then use a days declaration in the event call, but it would be much more precise, and have an absolutely miniscule effect on performance.
 
  • 1
  • 1
Reactions:
@Zarathustra_the

You have seen my system specs above.

Here is video play in 1940. I have otherthings open like my web browser and I am running the recording software which takes real cpu usage. See for yourself. So far all my testing seem to work well.
 
@Zarathustra_the

You have seen my system specs above.

Here is video play in 1940. I have otherthings open like my web browser and I am running the recording software which takes real cpu usage. See for yourself. So far all my testing seem to work well.

It might not be an issue now, or today, but I can remember really bad things happening eventually in CKII when people started messing with it. In essence, in the event lacking country lacking HOI IV of now, your right, it probably is not an issue. In a HOI of endless expansions under Podcat's great vision, who knows what monstrosities will occur. And that is not to mention how inefficient it is from a programming standpoint, especially when there are other methods to achieve the same end, I give one possible and one certain way in my previous two posts :D
 
It might not be an issue now, or today, but I can remember really bad things happening eventually in CKII when people started messing with it. In essence, in the event lacking country lacking HOI IV of now, your right, it probably is not an issue. In a HOI of endless expansions under Podcat's great vision, who knows what monstrosities will occur. And that is not to mention how inefficient it is from a programming standpoint, especially when there are other methods to achieve the same end, I give one possible and one certain way in my previous two posts :D
I think I'll try your method first. The game doesn't need any more possible performance issues.
 
My coding skills are not the best. I need something that will work for about 500+ events to fire reliably on the day conditions are met. Some are as simple as not at war & a date, others are much more detailed. For me none are set on a hard date without other conditions. I know I had problems with HoI 3 with all but the date conditions needing to be fulfilled at the start of the month. Would that be the case with weight_multiplier ?
 
My coding skills are not the best. I need something that will work for about 500+ events to fire reliably on the day conditions are met. Some are as simple as not at war & a date, others are much more detailed. For me none are set on a hard date without other conditions. I know I had problems with HoI 3 with all but the date conditions needing to be fulfilled at the start of the month. Would that be the case with weight_multiplier ?
The only ever reliable method is on_action and triggered decisions. This oddly enough is ridiculously efficient.

Weight_multipliers in CKII and EUIV are largely used to add trigger modifiers to on_actions. For what your talking about, I would set up a scheduling event, one that presets every event firing when the game starts up. It is the single most efficient means of doing so and quite possibly the single most reliable means to do so as well.

In each of your events, you would then set your trigger conditions. If there is more than one way to trigger a particular event you would want to link that too, and would probably therefore be having a nested OR in the trigger block.
 
Any chance for more AI DDs like the ones Steelvolt did leading up to 1.3. They were absolutely fascinating regarding how the AI was thinking the way it would.
If there is interest I can see if its possible to do. Since we are talking focus on bugs and balance now they can probably be rolled into regular diaries. I am also pretty happy with performance optimizations, but I'm not sure if there is enough stuff thats interesting to write about there. Would it be interesting to read about some of that goes on when we hunt for lag spikes and performance problems?
 
  • 6
  • 5
Reactions:
If there is interest I can see if its possible to do. Since we are talking focus on bugs and balance now they can probably be rolled into regular diaries. I am also pretty happy with performance optimizations, but I'm not sure if there is enough stuff thats interesting to write about there. Would it be interesting to read about some of that goes on when we hunt for lag spikes and performance problems?

Absolutely!!! I think it would really help some forumites to understand the depths you have to dig and probe to find out what is not working, why it isn't, and that fixing the problem doesn't cause more issues in other areas.
 
  • 2
Reactions:
Cheers for the DD Havebeard, and love your work :D. Will be sooooo good to be able to manage dockyards in a less smoke-and-mirrors way (and in a way that forces the AI to use it as well), as well as have separate modifiers for dockyards vis-a-vis military and civilian industry :). Tech changes and state modifiers also great, as is everything else. Thank you very much for all your work :D.

I posted in the other thread, but this thread was made right around that time, so it may of been missed. I was wondering if it will ever be possible to have triggers fire on exact dates (and maybe exact times) in the future? Rather than the way it works now, where events fire in a general area around the date you set it to. Because, as far as I'm aware, there's no direct way to do this. Though there are workarounds, like Ted52 managed to do to trigger 9/11 in his mod.

Something like this is what I imagine:
Code:
date = 1949.1.3

Or with an exact time, which also could be extremely useful for historical events if possible:
Code:
date = 1949.1.3.13

Will we ever see something like this?

Quoted you so you see the method below :).

@Gamengervi

Can't you just do:
Code:
   date > 1949.1.13
date < 1949.1.15
That would need to fire in the 14th.

Unfortunately, this only works if the MTTH check happens to be on the 14th - it'll work in your mod because you've got the MTTH checking every day, but for the default event offset of 20, it'd be less likely.

the other really hacky way to do it, is to use an on_action triggered event pulse, to set up the conditions for the day you want your event to occur. It is much more elegant a system. You can for instance do an event that triggers on game start, that will fire an event on December 7th 1941. You would need to calculate the exact date, and then use a days declaration in the event call, but it would be much more precise, and have an absolutely miniscule effect on performance.

We don't have an on_game_start action at the moment (it's on the wishlist though), but what is possible is a trick that @Chondrite taught me - an event with tag = GER as the trigger and an MTTH as 0 will fire at the end of the first day. Giving you an 'anchor' event, the day of which is known (probably best this is hidden). You can then use immediate from this event to trigger any other events at a specific day - these events will still only trigger if the specific conditions for those events are met. Example of the one I'm using (with a days = added, I don't use it m'self here at the moment as the purpose of this is to give an 'intro to the mod with choices' on day 0, but syntax should help those looking to trigger at other dates) in spoiler below.

country_event = {
id = shipvariants.99

hidden = yes

trigger {
tag = GER
date < 1936.1.4
}

mean_time_to_happen = { days = 0 }

immediate = {
every_country = { country_event = { id = shipvariants.1 days = 100} }
}

option = {}
}
 
  • 1
  • 1
Reactions: