• 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(11934)

First Lieutenant
Nov 25, 2002
250
0
Visit site
Hi everyone,

Please use this thread for any questions or help request in events writing. How to do this or that... Why is my event not firing... Why does the scenario stops when it loads... etc...

Post your event here with a problem description and either I or another events writer will help you...

Thanks

Extro :)
 
limit to number of control triggers?

G'day Extro,

The last week or so I've been modding 1.03 to try and give it some balance and the like, and have got a scenario that I'm pretty happy with and runs alright, and just needs a little balancing. The scenario has pretty much all of Bolted 1.02c, plus another say 2/3rds again of events, many with control triggers in them.

This morning though I thought I'd get ambitious and tried to write a set of basic AI switching events in an attempt to get the UK and the USA to coordinate landings in Europe and the Pacific - this involved an awful lot of control triggers, as the set of events needed to confirm each landing was secure before the AI switched and moved onto the next target. For the life of me I couldn't get it to load though, and thought that maybe I just needed a bit more experience and put it to the side.

The next event I tried to put in though was much more line and length - it checked for allied (so an OR trigger for AST, CAN, SAF, NZL, USA or ENG control) control of Rome and Taranto, then it checked for Italian control of Venezia and if everything turned up positive then it transferred ownership of the province to Germany (as because the AI doesn't like moving through puppets much at the moment I figured events like this would be the best way of having Germany meet allied forces in Italy, rather than Munich! That said, once they get the AI supporting its allies I'd still be keen to use a similar command as part of a routine setting up an Italian puppet state. When I tried to load it though, it fell over (ie; got two-thirds of the way through loading the scenario and went 'ping' and stopped). I've posted a thread in the general mods column but then I came across this thread.

I think this is something that's worth resolving. I've spent a couple of hours playing around and seem to have narrowed it down to not having enough room for control triggers, and if this is the case it's something whoever puts CORE together will need to be awake to.

Just wondering what your thoughts are, given that you're pretty experienced at this kind of thing?
 
Hi Axe,

If you want to, send me your events pack by e-mail. I'll try to load them on my HOI installation and see what it does... I'll have a look at them and try to figure out what the problem is... It's quite difficult for me to figure out what's wrong without the actual code...

Extro :)
 
G'day Extro,

This is very, very embarrasing, but it was my choke. I will humbly refrain from pretending to know anything about event writing from here on in! It's fixed now, and hopefully I should have more than questions to contribute very shortly!

Have a good one,

Axe

Hey - is it either possible to get rid of my posts, now that they're resolved, or do you want me to edit them down to one line apiece or something like that? Just to save people reading stuff that won't help them much.
 
Originally posted by Axe99
G'day Extro,

This is very, very embarrasing, but it was my choke. I will humbly refrain from pretending to know anything about event writing from here on in! It's fixed now, and hopefully I should have more than questions to contribute very shortly!

Have a good one,

Axe

Hey - is it either possible to get rid of my posts, now that they're resolved, or do you want me to edit them down to one line apiece or something like that? Just to save people reading stuff that won't help them much.

Hi Axe,

If I had 1$ for each hour I spent chasing "very embarassing" mistake that I made in events scripting, I'd be in Tahiti burried in the sand with a cool drink and a few chicks in sexy outfit... Forever after... :D

Don't even think about being embarassed... and yes leave your posts as is... It might help new event writer as far as not being scared to ask for help... ;)

Extro :)
 
Originally posted by Axe99
G'day Extro,

This is very, very embarrasing, but it was my choke. I will humbly refrain from pretending to know anything about event writing from here on in! It's fixed now, and hopefully I should have more than questions to contribute very shortly!

Have a good one,

Axe

Hey - is it either possible to get rid of my posts, now that they're resolved, or do you want me to edit them down to one line apiece or something like that? Just to save people reading stuff that won't help them much.
to delete a post, EDIT them and then look just below the path of the thread, you will find a checkbox and a button to delete the post.

:D
 
Originally posted by aowwt
Care to take a look at my modified US .inc file. Its for the 36 sceniro and everytime i load it, the game just stops. Anyhow I have a thread in the Sceniros and Mod forum. Take a look please! :D

Hi aowwt,

I must admit that I am no expert in .inc and .ai files... I looked at your file and compared it with existing .inc and it seems to me that you are missing a } at the end of the file to close the opening "country = {". Maybe it is just missing because of the copy and paste you did in the post... I'll keep looking anyway...

Let me know if you find out what's cooking...

Extro :)
 
It might be worth noting in this thread that certain errors cause the game to stop loading, while others tell you while it's loading that you've had a choke. In my experience I've found that having no trigger for an event, or leaving the 'end' (not closing all the '{'s with '}'s to ai, event, inc or scenario files makes it stop loading, while the other errors will politely let you know roughly where you've gone wrong. Have I missed anything there extro?
 
Hi Axe,

If I understand correctly ( sometimes my internal english to french translator plays tricks on me :D ) you're wondering why sometimes you have an error box showing the error ( with continue, ignore and cancel buttons ) and sometimes you don't. I found out that the box is actually always there. It's just that sometimes it doesn't display but it is still virtually there. It gives you the impression that the system is jammed but if you do <TAB><ENTER> you'll go back to the desktop. I also found out that if you keep trying to restart the scenario it sometimes displays the message despite the fact it didn't show the last time you tried to load the scenario... quite strange...

Again I'm not sure I fully understood your question...

Extro :)
 
French Event

I am working on the Naval OOBs for 36 atm. Right now Im doing France and I need to know how to script an event that pulls the battleship "Ocean" out of the game or have a 2nd possiblity that lets the ship be refitted/rebuilt and puts it into the builds pool.

Can anyone give me a hand with this??

Largus
 
Re: French Event

Originally posted by LargusMeans
I am working on the Naval OOBs for 36 atm. Right now Im doing France and I need to know how to script an event that pulls the battleship "Ocean" out of the game or have a 2nd possiblity that lets the ship be refitted/rebuilt and puts it into the builds pool.

Can anyone give me a hand with this??

Largus

you must use:
type = delete_unit which = [unit id/-1]
but i must warn you that i have never used... :rolleyes:
if it is a unit that is in the game from the beggining, you will know the ID from the start, if it is not the case, you are in trouble... :(

:D
 
What's the inverse of the sleepevent command? I've tried using trigger but it seems to trigger the event even if the other triggers aren't met. Also the game gives me an error with this action action_b = {
name = "Forget about it"
command = { type = dissent value = 20 }
}

Any ideas or suggestions on what could be the mistake and how I can solve it?

Edit: Also this event isn't happening eventhough the event hasn't been slept and the triggers are met.


event = {
id = 171006
random = no
country = FIN
trigger = {
atwar = { country = SOV }

NOT = {

alliance = { country = GER }
}
}
date= { day = 1 month = january year = 1936 }
offset = 2
deathdate = { day = 30 month = december year = 1947 }
#Nordic alliance goes into action

name = "The Nordic Alliance in action Swe"
desc = "The Nordic Alliance with only Sweden"
style = 0

action_a = {
name = "Call for support"
command = { type = trigger which = 171010 }
}
action_b = {
name = "Forget about it"
command = { }
}
}
 
Last edited:
there is no wakeevent command right now...
i do not know if this has been added in the new patch (i haven't donwload it yet).

about the dissent, i use this code and it worked ok:
command = { type = dissent value = -30 }

so, no clue why it gives you an error... :(
it doesn't say in which line is the error?
 
How do I add ships to a nation through an Event?

I know how to add Land Divisions, but what I want to do is to have the RN transfer 2 Destroyer Divisions to the RCN (remove two RN DD's and add 2 RCN DD's)?

Thanks!
 
Originally posted by Juba

alliance = { country = GER }


Hi,

The alliance command need two country...

alliance = { country = GER country = XXX }

That should solve your problem...

If not, post the new version again...


Extro :)
 
Originally posted by McNaughton
How do I add ships to a nation through an Event?

I know how to add Land Divisions, but what I want to do is to have the RN transfer 2 Destroyer Divisions to the RCN (remove two RN DD's and add 2 RCN DD's)?

Thanks!

Hi McNaughton,

You can remove units from the RN *IF* you know the ID of the units at the start of the scenario...
Then use the add_unit to give 2 destroyer units to the RCN. They won't be the same units thought but it's the closest way to simulate what you want to do...

Also you could cheat a little...:D... Give 2 destroyer division to the RCN and say in your event that they come from the RN without actually deleting them from the RN... It would be the safest way and since 2 destroyer division won't change the course of the war you should not worry about it...

Extro :)
 
Help - something not right on this - can't get the event to fire.

Have created my own independent Egypt and this is the first event I have written for it. Please note that this is still a beta version and I will change id's to fit the CORE numbers once the syntax is worked out. I have an independent Egypt that is allied to the Allies when war breaks out (not 100% historically accurate but the best I can do with the HoI AI so that Italy invades Egypt). What I want is to trigger a UK ultimatum to the Egyptian government to be more energetic in the war effort by replacing the government with a pro-British one, a demand that could have potentially lead to Egypt switching sides to the Axis if it refused. The trigger is the Italian occupation of Matruh. But so far I can't get the event to trigger even after the Italians have occupied Matruh for over a month. Any help appreciated in fixing the problems - it is probably some small syntax error but I can't find it. I have the event in its own "Egypt.txt" file in db\events so I think it is in the right place, and I wrote it with notepad like the other events in the file.

#########################################################################
# Abdin Palace Coup - Italian invasion
#########################################################################
event = {
id = 25050
random = no
country = EGY

trigger = {
war = { country = ITA country = EGY }
control = { province = 1090 data = ITA }
}

name = "Abdin Palace Coup"
desc = "Fearing Faruq will join the Axis, the British demand he form a pro-British government"
style = 0


Date = { day = 1 month = january year = 1937 }
Offset = 4
Deathdate = { day = 30 month = december year = 1947 }

action_a = {
name = "Accept" # Accept British Demands and form Wafd government
command = { type = headofstate which = 96021 }
command = { type = headofgovernment which = 96022 }
command = { type = foreignminister which = 96023 }
command = { type = armamentminister which = 96024 }
command = { type = ministerofsecurity which = 96025 }
command = { type = ministerofintelligence which = 96006 }
command = { type = chiefofstaff which = 96007 }
command = { type = chiefofarmy which = 96008 }
command = { type = chiefofnavy which = 96009 }
command = { type = chiefofair which = 96010 }
command = { type = alliance which = ENG }
}

action_b = {
name = "Refuse" # End British Domination Of Egypt and join the Axis
command = { type = leave_alliance }
command = { type = end_access which = ENG }
command = { type = peace which = ITA value = 0 }
command = { type = war which = ENG }
command = { type = alliance which = ITA }
command = { type = dissent value = 20 }
}
}
 
Hi OHgamer,

The code looks quite fine to me except the Date, Offset and Deathdate commands are beginning with a capital letter. In every example I have and in the Havard events writing guide, the first letter is always lowercase... Maybe this is the problem... maybe not...

Your egypt.txt file is in the events directory, but did you modify the events.txt file in the db directory to reference your egypt.txt file?

Check this and let me know what happens...

BTW: Please use the Events Writing Help Desk thread for question like this. It will keep the new thread creation to a minimum...

Thanks...

Extro :)