Jump to content

My First Script Mod


Recommended Posts

Hi fellow warriors,:)

I have attempted to make my first mod to my variation scenario. It is a Decision Event and I copied and edited the Ribbontrop script giving Germany the option of giving the Soviet Union Eastern Poland.

What I am attempting to create is a similar option for the Japanese. The government of the United Kingdom moved to Sydney when Operation Sealion was a German success. The Krauts hold every inch of the British Islands. However, who get's credit for conquering the United Kingdom? The Japanese because they capture Sydney, then Canberra, then Melbourne (no place left for the Tommies to run after that).

So, I decided this would be my first mod. I wrote a decision event giving the Japanese the option to give the British Islands to the Germans. Here is what I have come up with:

; Event for Japanese Conquest of the United Kingdom

; What if event should the Japanese conquer the United Kingdom in Australia.

{

#NAME= DE 604 - Japan: Shall we give the United Kingdom to Germany? (AI - 99% Yes)

#POPUP= Minister of War %NLieutenant General Hideki Tojo %N%NFollowing the surrender of the United Kingdom's government-in-exile to Imperial Japan we have acquired the Island of Great Britian. The British Islands are very remote from our location and could be better managed by our German Ally.%N%NShould we allow the Germans to annex the British Islands?

#IMAGE=

#SOUND= teletype_1.wav, teletype_2.wav

#FLAG= 1

#TYPE= 0

#AI= 0

#LEVEL= 0

;Set global variable condition to always trigger (dummy value)

#GV= 1[1,100]

;Set link value to always trigger (dummy value)

#LINK= 0[0]

#COUNTRY_ID= 6

#TRIGGER= 100

#DISPLAY_ORDER= 0

; Set decision value

#DECISION= 604

#MPP_UPDOWN= 0

#MPP_TURNS= 0

#MPP_TEXT=

; Set AI acceptance % (AI will accept 99% of the time)

#AI_RESPONSE= 99

#AI_RESPONSE_POPUP= Japan allows Germany to annex the British Islands.

#DATE= 1939/09/03

;Set Friendly Position (Tokyo)

#FRIENDLY_POSITION= 177,22

; Set variable conditions:

; 1st Line - United Kingdom politically aligned with Allies and surrendered

#VARIABLE_CONDITION= 1 [2] [100] [1]

; Dummy condition position (always satisfied)

#CONDITION_POSITION= 0,0 [0,0] [0,0] [0] [0]

}

Did I do right by you expert modders? Does everything look okay?

Now, for the next issue I have. I went to the game editor opened my Variation scenario and attempted to put my mod in it. I went to Campaigns>Edit Scripts>Edit Event Scripts.

A window pops open with "Select Scripts" on one side and "Event Scripts" on the other. I selected Decision scripts and "Open/Edit." Next, I pasted my new script right after DE 603 leaving a single, empty line before and after my new script. I then saved it, went back to and selected "Update."

However, DE 604 does not show in the list of Event Scripts. I saved the game and double checked, still not there. Closed and opened the game editor and it's still not on the list. I went back to "Open/Edit" and see that the change I made is still on the notepad file with all the other scripts. The game just isn't recognizing it. It's not even giving asterix pointing out that there is an error.

Can someone tell me what I'm doing wrong in activating this script?:confused:

Link to comment
Share on other sites

Hi Geofighter

I'm not sure what's causing the second problem, but as to the script itself, there's nothing in it to prevent this decision from coming up when the UK government moved to Canada and the country has ultimately surrendered after a German invasion of Canada.

You could either set the condition position to be when a Japanese unit has taken Melbourne, or set Melbourne rather than Tokyo to be the friendly position. Or alternatively you could link this decision to DE106 where the UK gets to choose whether to move its capital to Australia or Canada. In that case, set the link to be: #LINK= 106[1]

I'm intrigued to know what's causing the second problem. If you add in other types of scripts, e.g. a Unit script, or Popup, do they appear ok?

Link to comment
Share on other sites

Okay, I've been fiddle faddling with this script I made all weekend. I just can't get it to show up in my "event scripts." window. This is frustrating me. I was really hoping that I was buying a game I could modify and it won't let me.

Link to comment
Share on other sites

Don't worry Geofighter, you have bought a game that you can modify, we just need to figure out what's stopping this script from working.

But you haven't answered my question asking whether you have been able to get other new scripts of different types to show up?

Link to comment
Share on other sites

Hi Geofighter,

I think this might have to do with 'Compatibility Files' under Windows 7/Vista. This is a bit of a problem with the newer Operating Systems and my guess is that it is saving your changes in the 'virtual folder' and not in your installation directory and as a result you are not seeing your changes.

Here is more info on what the new operating systems are doing under the hood:

http://www.hanselman.com/blog/VistasShowCompatibilityFilesAndTheScrumptiousWonderThatIsFileVirtualization.aspx

I think the easiest way to work around this is to reinstall the game into another folder other than the default 'Program Files' folder, i.e. for example, install to C:\Games instead.

As a result your installation will look something like this:

C:\Games\Strategic Command WWII Global Conflict

I only suggest this as the 'Compatibility Files' issue does not seem to come up if you install to another folder other than 'Program Files'

Let me know if this gets it working as expected,

Hubert

Link to comment
Share on other sites

Hi Bill101 and Hubert,

Bill, the this is the only mod I have attempted to make at this time. I haven't made any others to know if they would work or not yet. However, I do notice that I'll have to add another mod for this to work. I noticed that this mod doesn't transfer any territory to the Germans. It's just a "trigger" mod for an annexation to go through from what I can make of this.

I'm going to do what Hubert suggests and uninstall/reinstall the game outside the program files on the C drive and see if that will allow me to make mods. I'm just going to finish my scenario first as I'm enjoying it.

Cheers and thanks to you both.

Geofighter.

Link to comment
Share on other sites

×
×
  • Create New...