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

dejvid221h

Corporal
17 Badges
Mar 4, 2020
36
6
  • Hearts of Iron IV: Cadet
  • Europa Universalis 4: Emperor
  • Hearts of Iron IV: La Resistance
  • Hearts of Iron IV: Expansion Pass
  • Imperator: Rome
  • Hearts of Iron IV: Expansion Pass
  • Hearts of Iron IV: Death or Dishonor
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Rights of Man
  • Crusader Kings II
  • Semper Fi
  • Europa Universalis IV: Res Publica
  • Hearts of Iron III: Their Finest Hour
  • For the Motherland
  • Europa Universalis IV: Art of War
  • Europa Universalis IV
  • Hearts of Iron III
I used the events in the events folder as a model and created my own event which I saved in myevent,txt.

Nothing happened.

So I looked further and found in common their is a folder on_action which had references to all the events in the files in the events folder. I created common/on_action in my mod folder and place in it a copy of 00_monthly_country.txt there which I amended to reference my event.

Still nothing happened.

Am I on the right lines ( and have to check for typos and the like) or am I still missing something fundamental?
 
You are looking at the right part, yes. What was the code you put in the txt file in /common/on_action ?
 
My event is difalt.2 so I added it to my copy of 00_monthly_country.txt:

monthly_country_pulse = {

events = {
rel_flavor_druidic.10
dhe_rome.9
dhe_judea.2
dhe_judea.3
dhe_judea.4
dhe_judea.5
dhe_judea.7
family_events.1 #Rise of a Family
family_events.2 #Prune Family
family_events.5 #Rise of new Royal Dynasty
family_events.6 #Tribal family rise
family_events.7 #Tribal family fall
family_events.9 #Rise of Family in Republics
flavor_egy.15
difalt.2
}


And the first bit of my event file is:

namespace = difalt # Alternative way of doing difficulty

difalt.2 = { # Autonomy - city funds own building
type = country_event
title = "difalt.2.t"
desc = "difalt.2.desc
"

What I expect is for it to fire every month but I run the game for over six months just in case.
 
I don't really see anything wrong either.

some things I would try:

Maybe stupid question, but if you haven't tried: run you mod ingame with difalt.2 does it trigger / run correctly

Put this in a new file in common/on_action/mymod.txt instead of overwriting the vanilla file:
Code:
monthly_country_pulse = {
    events = {
        difalt.2
    }
 
I don't really see anything wrong either.

some things I would try:

Maybe stupid question, but if you haven't tried: run you mod ingame with difalt.2 does it trigger / run correctly
[/CODE]
Not at all a stupid question. I haven't tried that because I am having trouble getting a console (which I assume you need to do that).
(I do know that on Steam you need to set Launch Options, adding "-debug_mode" but there is something else that I'm missing)

But the next best thing is to make a copy of an existing event and trying to get it to run unchanged. That worked so the problem is a error in my modified event.

Thank you very much for putting my focus on to where the problem really lay.

Is there any way to get the game to show errors on events failing?


Put this in a new file in common/on_action/mymod.txt instead of overwriting the vanilla file:
Code:
monthly_country_pulse = {
    events = {
        difalt.2
    }

Though that wasn't the solution to my problem I can see that it is a much better way of doing things as there will be no clash with future updates of the game. So again, thank you.