Page 1 of 1
Events/Script for newbies?
Posted: Mon Dec 05, 2016 9:13 pm
by SIPRES
I try to understand the script/events mechanism but so far I am a little bit confused by all the files (Unit.txt, decision.txt ect...) are they linked together?
Is there any tutorial?
For example as playing the Axis side how can I generate by script a garnison unit in warsaw, lets say few weeks after the fall of Poland?
thanks for your inputs
Christophe
RE: Events/Script for newbies?
Posted: Tue Dec 06, 2016 10:53 am
by pcpilot
I haven't gotten into the scripting yet as I am still working on my first map. But if it is anything like SC2, it will all be .txt files. I would look at an existing script in one of the campaigns, that might help a little. Sorry cant come up with more for you.
RE: Events/Script for newbies?
Posted: Tue Dec 06, 2016 2:15 pm
by BillRunacre
Hi Sipres
Have you taken a look at part 2 of the Manual on Designing your own Campaigns as it does contains details on the scripts?
I'd also recommend opening up some of the script files and taking a look at the descriptions at the top, and actual scripts used in the game that will appear below them in the file.
RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 1:14 pm
by prince_blucher
Hi, I've written a new decision and added it to \Campaigns\_1939 Storm over Europe\Scripts\Events\Decision.txt however it does not fire. Do I need to add the event name (the number - DE 674) in another files? Dies the event name (number) need to be sequential? My event does not appear within in-game scripts. Thanks.
RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 2:20 pm
by Razz1
I know one thing... You need to make sure that the DE number doesn't exist before you assign it. Can not have two numbers the same.
RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 2:23 pm
by prince_blucher
Yep check that.
I guess I should update \Templates\Events\Decision.txt as well? Same decision file exists there by the looks of it. I'll try that anyways. <-- Nope that's an empty file.
RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 2:36 pm
by sPzAbt653
Check this from page 114, 2.1.4 :
You cannot save over a default campaign, instead you will have to use Save As and give it a new name.
So, open the default campaign, save it as a new name, THEN add you DE to your newly named campaign, and it should work.
It should look like this, where my campaign name is '653H' [W7 pictured] :

RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 3:45 pm
by prince_blucher
Hello sPzAbt653, thanks for your reply. I try it now.
RE: Events/Script for newbies?
Posted: Sun Dec 18, 2016 5:23 pm
by BillRunacre
Once you've done File -> Save As and given your campaign a new name, you'll need to Update the scripts. It should ask you to do this during the save process.
RE: Events/Script for newbies?
Posted: Tue Dec 20, 2016 3:46 am
by prince_blucher
Thanks everyone. I understand now to load the editor, load the 1939 Campaign, save as XXX, and then edit decisions.