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

Katapraktoi

Captain
73 Badges
Jan 15, 2005
304
3
  • 500k Club
  • Magicka
  • March of the Eagles
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Europa Universalis: Rome
  • Rome Gold
  • Semper Fi
  • Sengoku
  • Victoria 2
  • Victoria 2: A House Divided
  • Victoria 2: Heart of Darkness
  • Rome: Vae Victis
  • Lead and Gold
  • Cities: Skylines
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Mount & Blade: Warband
  • Mount & Blade: With Fire and Sword
  • Crusader Kings II: Way of Life
  • Europa Universalis IV: Common Sense
  • Cities: Skylines - After Dark
  • Europa Universalis IV: Cossacks
  • Cities: Skylines - Snowfall
  • Europa Universalis IV: Mare Nostrum
  • Victoria 3 Sign Up
  • Divine Wind
  • Cities in Motion
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sword of Islam
  • Europa Universalis III
  • Europa Universalis III Complete
  • A Game of Dwarves
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Heir to the Throne
  • Europa Universalis III Complete
Well I'm new to modding, been at it for 3 hours now, never done it before so I'm not surprised my head is spinning. Here is my event which of course isn't working:

#######################
# The Wannan Incident
###########################

event = {
id = 121
random = no
country = CHC

trigger = {
exists = CHC
exists = CHI
random = 0
NOT = {
war = { country = CHC country = CHI }
}
}

name = "COC_1001_NAME" #The Wannan Incident
desc = "COC_1001_DESC" #During the blablbalba
style = 0
picture = "japanese_reinforcments3"

date = { day = 16 month = january year = 1941 }
offset = 0
deathdate = { day = 17 month = january year = 1941 }

action_a = {
ai_chance = 95
name = "COC_1001_ACTA" #This is outrageous! Stop this silly non-aggression with the Nationalists!
command = { type = leave_alliance } # Leaves alliance with Nationalist China
command = { type = end_access which = CHI } # Removes Nationalist China's military access
command = { type = relation which = CHI value = -20 } # -20 relation bonus with Nationalist China
}
action_b = {
ai_chance = 5
name = "COC_1001_ACTB" #No, we still need the alliance if we are to survive!
command = { type = relation which = CHI value = -5 } # -5 relation bonus with Nationalist China
}

}

The above has been added to my hoi2.txt file in the db\events folder.

Ok so now the problem is what I don't understand about modding:

1. Do I need both those random? What does the "random = no" do compared to the "random = 0" (or 50 or 70 etc)?

2. When I start my game, doesn't matter if it's 1936 or 1941, I get the message "Database Mismatch (type = 7 / id 121) already used!".
When I looked at HoI2 Wiki's ID rage page it said that 121 was free though, so I'm not sure what I'm doing wrong here. When looking at other people with problems creating their events, I always see their ids at like 500000 or something, how should I approach this?

3. What do I need to do with this ACTIONNAME thing? I named my event COC_1001 cause it's for CommieChina, and it's my first event.
So far I have gone to \config\ and opened the event_text excel file, and added:

#############
#Wannan Incident
#############
[column a] [column b]
COC_1001_NAME The Wannan Incident
COC_1001_DESC During the blabla
COC_1001_ACTA Outrageous!
COC_1001_ACTB No! Alliance needed!

I think those are the problems I have for now. I'm unsure what I've actually done, and what I need to proceed with. Have I forgot some place to put stuff, or done it wrong? Anyone out there who could please help me? Thank you so much in advance.
 
You don't have to use "COC_1001_NAME", you can just type "Wannan incident" or so. Same goes for the decisions and the other texts. Get another ID for the event. And use only one date, you can scrap the offset and deathdate.
Look at other events and you soon will understand how they work.

I hope you now can get this to work. Good Luck !
 
You don't specify which game you're modding, but when using WIKI, keep in mind that some of the information might only apply to the original HOI2, not to DD or ARMA.

There's an event 121 in ARMA :

event = {
id = 121
random = no
country = JOR

<remainder snipped>

Using large numbers (50000 for example) can usually avoid this problem.
 
Thanks for the tips, it started working now that I changed id from 121 to 50101!

I am playing HoI2 DD btw, 1.2 patch, that's why I thought that 102 would be free because it says at the wiki
As of the 1.2 patch the Death events file has had events removed and altered, Sadly all paradox said on this was "Revised, removed and edited some death events."
This leads me to believe that some IDs have been freed that are not listed. It would be a large amount of work to shift through 350+ events just to find a few unlisted IDs, So it is currently unchanged. Make note however, No events have been added, the old free IDs are still free.
Perhaps that's some really old message for HoI2 1.2?

Ok, here's a new problem though:
The event fires as it should, and when I click the first option to end the alliance, it does so without ctd. So far so good. But, I am still at war with Japan WITH N.China, something I wasn't prepared for. I thought I'd duke it out with Japan alone, but right now I still have shared vision with N.China and its puppet San Ma, just like during the alliance. I'm not sure how to make that disappear, I thought that leave alliance would lead to an end to the vision as well. When I look at other event files, like Yugoslavia's leaving the Axis alliance:

event = {
id = 5
random = no
country = YUG

trigger = {
war = { country = GER country = ENG }
alliance = { country = YUG country = GER }
random = 50
}

name = EVT_5_NAME
desc = EVT_5_DESC
picture = "yougoslavian"
style = 0

date = { day = 0 month = january year = 1936 }
offset = 3
deathdate = { day = 29 month = december year = 1963 }

action_a = {
name = EVT_5_ACTA
ai_chance = 80
command = { type = dissent value = 10 }
command = { type = domestic which = democratic value = -2 }
command = { type = domestic which = political_left value = -2 }
command = { type = domestic which = freedom value = -2 }
command = { type = domestic which = defense_lobby value = 1 }
}
action_b = {
name = EVT_5_ACTB
ai_chance = 20
command = { type = dissent value = -5 }
command = { type = peace which = ENG value = 1 }
command = { type = peace which = SOV value = 1 }
command = { type = peace which = USA value = 1 }
command = { type = leave_alliance }
command = { type = sleepevent which = 6 }
command = { type = trigger which = 3 }
Here I can see that there isn't much more to this event than mine, the leave_alliance is there just like for me. Not sure what I'm doing wrong here.

However, there are 2 more urgent problems that I would be grateful for some input:

1. One of my armies is standing in N.China's province Yuling, together with one of N.China's armies. It's N.China that controls province, and it is N.China's core province as well, but also my core province. Once I leave the alliance, that province becomes occupied by my army, but every hour I get a message saying "we have lost control over yuling to N.China". I'm thinking since we both have troops there perhaps he takes the province back when I take it, and thus the message gets repeated every hour? The province is red all the time though, it doesn't switch from yellow to red back and forth, it's constantly red. Only when my troops have reached my own province does the messaging stop. Any ideas about this?

2. When I go to the diplomatic screen for N.China or San Ma, and hover over the "start war" option, first of all it's greyed out, and when I see the info box it reads: "you cannot attack until January 0". So that must be something really strange since I thought 0 was the first day, which should read Jan 1, so if the info says 0 I'm really confused at what's happened.

Again, thanks in advance for any help.

EDIT:

Just came to think of something, discovered a command called control. Is there any possibility of making a command with that that says that all provinces I control outside my national provinces, whether they are core or not, shall be abandoned or given away or something? Can I do a command that does that to all I control at that time, or do I have to specify which provinces should be given control over by another nation?
 
Last edited:
I'm sorry to say that didn't work. =( I'm still suffering from shared vision, provice being in my hands but "lost to the enemy" every hour, and lastly the "cannot attack before january 0" problem.

Here is my current event:

#########################################################################
# The Wannan Incident
#########################################################################

event = {
id = 50101
random = no
country = CHC

trigger = {
exists = CHC
exists = CHI
random = 0
NOT = {
war = { country = CHC country = CHI }
}
}

name = "COC_1001_NAME" #The Wannan Incident
desc = "COC_1001_DESC" #During the .....
style = 0
picture = "japanese_reinforcments3"

date = { day = 16 month = january year = 1941 }
offset = 0
deathdate = { day = 17 month = january year = 1941 }

action_a = {
ai_chance = 95
name = "COC_1001_ACTA" #This is outrageous! Stop this silly non-aggression with the Nationalists!
command = { type = leave_alliance } # Leaves alliance with Nationalist China
command = { type = peace which = CHI value = 1 }
command = { type = relation which = CHI value = -20 } # -20 relation bonus with Nationalist China
}
action_b = {
ai_chance = 5
name = "COC_1001_ACTB" #No, we still need the alliance if we are to survive!
command = { type = relation which = CHI value = -5 } # -5 relation bonus with Nationalist China
}

}

I have also tried peace which = CHI value = 0, but with the same result.
 
Ok I've been experimenting a bit now, and so far I've come up with this:

If I include a command that offers peace to Japan, then my allince with N.China is followed through, and my troops are being redeployed to my capital as usual, rather than trying to occupy N.China's province. If I compare to the Yugoslavian event, I'm guessing this is why that one works but not mine, since that one has YUG leave the alliance with GER while at the same time making peace with ENG. However, I am still suffering from the "cannot attack N.China until January 0" problem, even with this solution. =(

This leads me to believe that since I am in a war with Japan together with N.China that is what fraks this event up.

Has anyone else had this kind of problem? I'm in some serious need of assistance. :*(