Page 1 of 1
2 Questions on scenario design
Posted: Sun Mar 22, 2009 10:41 am
by AB
Hi there,
I'd need some help with designing scenarios. Two questions:
1) How can you make the AI keep specific units in one place (on one specific square) for the whole game? E.g. to simulate a garrison that won't leave the town it's defending no matter what.
2) How to script an event that changes a specific SFT on the map to another?
Thanks a lot for your help!
[:)]
AB
RE: 2 Questions on scenario design
Posted: Sun Mar 22, 2009 11:20 am
by Lunaticus_matrixforum
1. The AI very much likes to move thinks around. I think you need to set your garrision to a movement type "immobile" which has 9999 for all movement and also set the weight of the unit so high that it cannot be transported away...
2. You might like to try (from the manual):
ExecSingleMutateSFType ( areaslot, areacode, from sftype, too sftype )
Affects only unit in specified areaslot with areacode value on a hex. 1st individual in 1st subformation of 1st unit with sftype specified will be replaced by too sftype.
ExecSingleMutateXY( x, y, from sftype, too sftype )
Affects only unit in specified in hex x,y. 1st individual in 1st subformation of 1st unit with sftype specified will be replaced by too sftype.
If you want to exchange all units you will need to loop.
Good luck modding...
RE: 2 Questions on scenario design
Posted: Sun Mar 22, 2009 1:28 pm
by AB
Thanks, Lunatics, for your fast reply. Greatly appreciated! [:)]
As for my second question - the problem is, I am working on a Star Wars mod. So when the Empire plays the "I am your father" card, the unique "Good Luke"-SFT should have a random chance to change to a unique "Dark Side Luke". Now the problem is, that you never know on which hex Luke is when he might change. Do you have an idea how to deal with that?
Thanks again!
[:)]
RE: 2 Questions on scenario design
Posted: Sun Mar 22, 2009 3:11 pm
by Lunaticus_matrixforum
Aah another Sci-Fi mod. I am always looking forward to more fantasy and sci-fi mods.
I think there is a standard way which has one drawback:
You can make two connected loops (tempvar 1 from 0 to checkmapwidth , tempvar 2 from 0 to checkmaphight) and then checkSFType in tempvar1, tempvar2 which will give you exactly the hex Luke is in .... unless Luke is being passively transported in a ship or similar in which case you will not find him afaik because the game systems does not see him in the hex. So you might need to implement your event that if Luke is not being transported he gets a chance to be lured to the dark side and if he is being transported the card is returned to the dark side to be played later or the system memorises the card having been played with no effect and simply checks again next turn.
I think there are very good opportunities in the system to implement important leaders with special effects which fit well to Fantasy/Sci-Fi setting so looking forward to see this mod...
Best Regards
RE: 2 Questions on scenario design
Posted: Sat Mar 28, 2009 5:30 pm
by AB
Thanks a lot for your help!
Greatly appreciated.
[:)]