Jump to content
Sign in to follow this  
Gustophus

Editor Design Questions

Recommended Posts

Bill,

The file was emailed to you.

Also, I want an event that will trigger the construction of fortifications based on a decision. How can I have the result of adding them to the map if the decision is yes?

I'm afraid that fortifications cannot be added by Decision Events, but the best possible solution I can think of would be to have a Decision Event which fires a unit script, deploying Engineers to build the Fortifications.

Share this post


Link to post
Share on other sites

Thanks for looking at the file and revealing that for me. I will have to rework some things. I believe having withdrawal units arrive by script is the best solution. As far as the de Lattre line fortifications, I was thinking about the solution you just offered as a possibility. Your advice confirms that. When this is finished I shall have to share the campaign with you for all your help.

Share this post


Link to post
Share on other sites

Yes, it'll be interesting to see how it develops, and the best thing to do will be to upload it to the Repository once you've got a working version ready.

Share this post


Link to post
Share on other sites

Scripts are evil and driving me crazy!

I get an error message in surrender #2 and in annexation script sheets telling me that Country IDs and Transfer IDs are invalid. I recheck the numbers and they line up with the countries. Even if they didn't, not sure why it would matter. Should it just make the transaction regarding the country number listed either way?

What am I missing?

Share this post


Link to post
Share on other sites

Also, for the partisan scripts the error I am getting is:

Error: partisan.txt

Line (707): found {; expected}

Not sure what this is.

Once these three scripts are fixed, there only remains the AI scripts to complete.

Share this post


Link to post
Share on other sites
Also, for the partisan scripts the error I am getting is:

Error: partisan.txt

Line (707): found {; expected}

Not sure what this is.

Once these three scripts are fixed, there only remains the AI scripts to complete.

Hi Gustophus

What the editor is saying here is that in Line 707 of the document, where an } should be, instead it is finding an {.

These have to be correct as they denote the start and finish of each particular script.

Bill

Share this post


Link to post
Share on other sites
Scripts are evil and driving me crazy!

I get an error message in surrender #2 and in annexation script sheets telling me that Country IDs and Transfer IDs are invalid. I recheck the numbers and they line up with the countries. Even if they didn't, not sure why it would matter. Should it just make the transaction regarding the country number listed either way?

What am I missing?

Can you post an example of each script type here so we can take a look?

Thanks

Bill

Share this post


Link to post
Share on other sites

This is the first Surrender #2 script that it questions:

{

#NAME= Remove DE LATTRE LINE

#POPUP= de Lattre Line Engineers Return To Metropolitan France

#IMAGE=

#SOUND= troops2.wav

#FLAG= 0

#TYPE= 0

#AI= 0

#GV= 1[1,100]

#LINK= 113[1]

#LEVEL= 0

#COUNTRY_ID= 10

#TRANSFER_ID= 58

#ARMISTICE= 0

#TRIGGER= 100

#DATE= 1951/12/15

; Set variable conditions:

; France politically aligned with French Union and not surrendered

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

; Dummy condition position (always satisfied)

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

}

This is the first Annexation script that it questions:

{

#NAME= Chinese Civil Ends

#POPUP= Communist China Defeats Nationalist China in Chinese Civil War. Nationalists Flee to Taiwan.

#IMAGE=

#SOUND= troops1.wav

#FLAG= 0

#TYPE= 1

#AI= 0

#GV= 1[1,100]

#LINK= 0[0]

#LEVEL= 0

#COUNTRY_ID= 5

#TRANSFER_ID= 8

#TRIGGER= 100

#DATE= 1949/10/01

}

Share this post


Link to post
Share on other sites

Hi

Try these instead with the Flag= 1.

If the Flag line is set to zero then the script won't fire unless it is turned on in the Options when starting the game.

The reason for this switch is so that people can switch off the variable dates we might have some events fire, and switch on their historical equivalents should they wish to.

Regarding the Editor's tests, I've been running the scripts from the campaign you sent me recently and the first Territory script is complaining because there are some sea tiles included in it, e.g. 78,81 and 88,77. There may be more, and may be the case with the Annexation scripts too?

Hopefully changing the Flag and removing all the sea tiles will be enough to get these working. If not, you can send me through updated script and cgn files for the campaign (I won't need the images again) and I'll take a more in depth look.

Thanks

Bill

{

#NAME= Remove DE LATTRE LINE

#POPUP= de Lattre Line Engineers Return To Metropolitan France

#IMAGE=

#SOUND= troops2.wav

#FLAG= 1

#TYPE= 1

#AI= 0

#GV= 1[1,100]

#LINK= 113[1]

#LEVEL= 0

#COUNTRY_ID= 10

#TRANSFER_ID= 58

#ARMISTICE= 0

#TRIGGER= 100

#DATE= 1951/12/15

; Set variable conditions:

; France politically aligned with French Union and not surrendered

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

; Dummy condition position (always satisfied)

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

}

This is the first Annexation script that it questions:

{

#NAME= Chinese Civil Ends

#POPUP= Communist China Defeats Nationalist China in Chinese Civil War. Nationalists Flee to Taiwan.

#IMAGE=

#SOUND= troops1.wav

#FLAG= 1

#TYPE= 1

#AI= 0

#GV= 1[1,100]

#LINK= 0[0]

#LEVEL= 0

#COUNTRY_ID= 5

#TRANSFER_ID= 8

#TRIGGER= 100

#DATE= 1949/10/01

}

Share this post


Link to post
Share on other sites

Having some issues with AI scripts.

1. ALL garrisons leave their post. When they do it triggers other events which is meant to discourage not having garrisons. The French then get pummeled way too early. Here is an example:

;

{

#NAME= Hue Garrison

#POPUP=

#FLAG= 1

#TYPE= 2

#COUNTRY_ID= 1

#COUNTRY_ID= 10

#COUNTRY_ID= 11

#COUNTRY_ID= 12

#COUNTRY_ID= 13

#COUNTRY_ID= 15

#COUNTRY_ID= 17

#COUNTRY_ID= 18

#COUNTRY_ID= 19

#COUNTRY_ID= 20

#COUNTRY_ID= 23

#COUNTRY_ID= 24

#COUNTRY_ID= 25

#COUNTRY_ID= 27

#COUNTRY_ID= 28

#COUNTRY_ID= 29

#COUNTRY_ID= 30

#COUNTRY_ID= 37

#COUNTRY_ID= 38

#COUNTRY_ID= 39

#COUNTRY_ID= 41

#COUNTRY_ID= 49

#TRIGGER= 100

#GV= 1[1,100]

#LINK= 0[0]

#LEVEL= 0

#LENGTH= 300

#HOLD= 0

#GOAL_POSITION= 84,42

#DATE= 1947/01/01

; Set friendly positions: Hue

#FRIENDLY_POSITION= 84,42

; Set variable conditions: France politically aligned with French Union and not surrendered

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

; Set tactical conditions: (dummy condition)

#TACTICAL_CONDITION= 63,15 [3]

#ACTIVATE_POSITION= 84,42 [1,100] [1,1] [1]

#ACTIVATE_POSITION= 84,42 [0,0] [1,1] [2]

; Set cancel position (dummy condition):

#CANCEL_POSITION= 0,0 [0,0] [0,0] [0]

}

I used two #ACTIVATE_POSITION's. One for proximity of enemy and one for troops occupying the tile right off. I added both hoping it would keep garrisons at the locations.

I initially used the #TYPE= 2, #LENGTH= 1 combo activated by the position listed on the script sheet to keep a permanent garrison. It did not do the trick, so I made the length 300 hoping to hold them.

The have multiple #COUNTRY_ID because all these "countries" are under French command and hoped it would allow AI to use all available forces. Initially I had it listed only for France, but thought this limited garrison forces available.

2. The AI seems geared to attack in all directions outright at any enemy or objectives in reach without any of my prompting by the scripts. This tendency than yanks all garrisons away. I rechecked the #STEAL setting and I have placed a 0 in all offensives to limit this, except for ones I want to happen for sure. Is this aggressiveness a default setting in the game besides the scripts?

Share this post


Link to post
Share on other sites

Hi Gustophus

Apologies for the delay in replying, I'm now starting my return to work at long last! :)

I'll discuss the GARRISON scripts with Hubert to see what the best solution might be, and I think when that's done it should solve your second question too.

With regards to the Victory pop up, the best thing to do will be to add a Victory script for when France's National Morale reaches zero to trigger a Viet Minh Decisive Victory.

It's this line in the script:

#NATIONAL_MORALE_TRIGGER= 0 [0] [0]

Bill

Share this post


Link to post
Share on other sites

Hi Gustophus,

I seem to have missed this one while Bill was on his break but just immediately off hand I can tell you that by listing all those country IDs it will not work, or at best it will only work for the first listed country ID which is #COUNTRY_ID= 1.

If you indeed want it to work for all those country IDs then you'll have to create individual GARRISON events for each country.

As far as I can tell, setting it to #TYPE= 2, #LENGTH= 1 should also do the trick for what you are after.

Hope this helps,

Hubert

Share this post


Link to post
Share on other sites

I have altered events to accommodate the inherent AI in the game system and it seems to work better even if it did not fit my original intent. I did remove the list countries and left one. They will not hold their garrison though. They will charge off and attack the nearest threat they find, though there are a few exceptions oddly enough. I have tried to accommodate this action into the design. Hopefully this will work out.

I have been play testing and my latest issues shut the game down in play.

1. The pop up reads: (FAILED) draw_strength_value_on_map_surface): Segmentation violation.

This triggers every time I move the same unit to the same tile on the map. Do you have any insight into this?

2. Also, I have a decision event that happens when all units are destroyed for a country. This is the condition position I use:

#CONDITION_POSITION= 60,6 [0,99] [0,0] [1] [6]

It triggers when the unit is still alive when the script states it should only trigger when there are no units within proximity of the location (in this case none on the map whatsoever). What am I missing?

Share this post


Link to post
Share on other sites

Hi Gustophus

I'm not sure offhand about point 1, but for the second, changing it to the following should make it work better:

#CONDITION_POSITION= 60,6 [99,99] [0,0] [1] [6]

Share this post


Link to post
Share on other sites

I made the change as you suggested with the condition position and will see how it will play out.

I cannot get past the glitch I told you about. It is the tile position itself. Any unit I move to it causes the game to crash. I have advanced turns without moving there to see if I could bypass it, but it crashes no matter how far along. In a prior test game I didn't have that result for the same tile. Not sure what this could be. It leaves me stuck in 1947 and I have to get to 1956! LOL.

I am going to restart another game and see if it happens again or not, though I will save that file to see if it can be corrected or not.

Share this post


Link to post
Share on other sites

Do you have the location of the tile in question?

You can always email me the cgn file and scripts so I've got an updated version of the campaign, to see if I can recreate it.

Bill

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...