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

unmerged(91541)

Sergeant
3 Badges
Jan 23, 2008
74
0
  • Crusader Kings II
  • Hearts of Iron III
  • Victoria 2: A House Divided
Hello All,

I have a couple questions about events. I've read everything in the Wiki and have actually written some events that work. My question is more about some strange things. Here goes.

All the events I wrote work. They fire at the right time and all the commands do as coded. The strange thing is really the cosmetics portion of the event which displays the event name, description, and action name.

First I tried putting all those items between double quotes " ", and when the event fired It only showed the first word of each (event name, description, and action name).

Then I used the event_text file. Changed all the events to have a format of EVT_nnnn_NAME, _DESC, ACTIONNAMEnnnnA, etc. and placed all the text with the appropriate event id numbers in the event text file, using the same semicolon ;;; format for existing events. When the events fired this time they only dispalyed EVT_nnnn_NAME, EVT_nnnn_DESC, and ACTIONNAMEnnnnA, and not any of the real text.

By the way, when I made my events I simply appended them to the existing event file for the country in question in the /db/events folder.

In all examples of existing events the code shows something like...
name = "EVT_3000_NAME" and notice the double quotes. This is the way it is in the existing event files. I did the same thing.

Then on a whim, I got rid of the quotes to see what would happen, so my event would be coded...
name = EVT_nnnn_NAME with no quotes.

THIS WORKED! All name and text descriptions now showed up when the event fired.

So my question is what are the real rules to for getting the names and descriptions to show up properly. By the way, in the exact same country event file all the original game events still have the quotes around the name, desc, and action code, yet my code at the end of the file works only when quotes are not used!
 

unmerged(58571)

Field Marshal
Jul 1, 2006
6.288
0
Did you restart the programme between the attempt that worked and the prior one?
 

unmerged(91541)

Sergeant
3 Badges
Jan 23, 2008
74
0
  • Crusader Kings II
  • Hearts of Iron III
  • Victoria 2: A House Divided
Yes, restarted the game after each modification to any event file.
 

unmerged(71732)

Captain
Mar 14, 2007
399
0
Swifty*** said:
Hello All,

I have a couple questions about events. I've read everything in the Wiki and have actually written some events that work. My question is more about some strange things. Here goes.

All the events I wrote work. They fire at the right time and all the commands do as coded. The strange thing is really the cosmetics portion of the event which displays the event name, description, and action name.

First I tried putting all those items between double quotes " ", and when the event fired It only showed the first word of each (event name, description, and action name).

Then I used the event_text file. Changed all the events to have a format of EVT_nnnn_NAME, _DESC, ACTIONNAMEnnnnA, etc. and placed all the text with the appropriate event id numbers in the event text file, using the same semicolon ;;; format for existing events. When the events fired this time they only dispalyed EVT_nnnn_NAME, EVT_nnnn_DESC, and ACTIONNAMEnnnnA, and not any of the real text.

By the way, when I made my events I simply appended them to the existing event file for the country in question in the /db/events folder.

In all examples of existing events the code shows something like...
name = "EVT_3000_NAME" and notice the double quotes. This is the way it is in the existing event files. I did the same thing.

Then on a whim, I got rid of the quotes to see what would happen, so my event would be coded...
name = EVT_nnnn_NAME with no quotes.

THIS WORKED! All name and text descriptions now showed up when the event fired.

So my question is what are the real rules to for getting the names and descriptions to show up properly. By the way, in the exact same country event file all the original game events still have the quotes around the name, desc, and action code, yet my code at the end of the file works only when quotes are not used!


Sometimes the game show's unavaible "errors", this means, if you forgot to put the } in the right place, the event will tell you some errors like: Unkow command Action_a or Unknow command Date...

So in the end of an action put a }

In the end of the event put two
}
}

Perhaps that's why you're game gaved you those errors because you didn't put the } in the right place.

Well me i put this and it works:

name = "Civil War - German Support"
desc = "The Turkey civil war was a war between Ottoman's and nationalists, since it was a strategic position, many nation's around the world participated, Germany send materials and volunteers to help us in our cause"


Just this and it works, nothing else.
 

unmerged(91541)

Sergeant
3 Badges
Jan 23, 2008
74
0
  • Crusader Kings II
  • Hearts of Iron III
  • Victoria 2: A House Divided
Here's an example event I wrote. It loads and runs with no errors.

###############################################################################
# Excellency Day (by WFK 1-17-08)
###############################################################################

event = {
id = 3121
random = no
country = SPR

name = EVT_3121_NAME
desc = EVT_3121_DESC
style = 0

date = { hour = 3 day = 1 month = may year = 1937 }

action_a = {
name = ACTIONNAME3121A
ai_chance = 100
command = { type = dissent value = -5 }
}
}

Note that there are no quotes around EVT_3121_NAME, EVT_3121_DESC, and ACTIONNAME3121A. As written above, when this event fires it displays the text in the event_text.csv file associated with EVT_3121_NAME, etc. However, when I had quotes around "EVT_3121_NAME" and the other 2 variables then THAT's what got dispalyed on screen (EVT_3121_NAME got dispalyed) when the event fired. AND, when I wrote the full text out instead of EVT_3121_NAME, with quotes around it, it only dispalyed the first word (not everything within the quotes) on screen when the event fired. It's strange, and was wondering if anyone ran into something like that, or might know why it acts that way.

Keep in mind the above event displays properly only without the quotes, but the command part worked as expected in all cases.