Jump to content

Is there a way to trigger Reinforcements with AI Triggers?

Recommended Posts

  • 1 year later...

I just bumped into this problem too.

What I wanted to do was to make the friendly armour show up as reinforcements only when the player successfully clears out a potential ambush spot.

If I just make the tanks show up after X minutes, the player will not have any motivation to push ahead before they arrive. Having reinforcement triggers would be a nice "carrot" for the player.

Link to comment
Share on other sites

SFNativeEngima and SlowMotion, I have a third party solution/work-around that may help... you maybe able to adapt it or rework it to suit your own needs.  I'll lay it out as it is intended to be used. 

I initially got the following idea from someone else who had started a thread about creating deployment rules with a random component (i think they pulled cards to generate their directives)... Couldn't seem to find the original thread unfortunately.

Basically, I programmed my own random generator (in Applesoft BASIC) that runs in a simple Apple II emulator (Javascript in a browser window).  Here is  the link for the emulator (http://www.calormen.com/jsbasic/ ).   Below I've included the programming code.   All you have to do to use it is to copy in my code and hit the 'run' button.  Now I'll explain how it works....

I made this mainly for meeting engagement vs the AI in WEGO in order to make my medium and large battles a bit more challenging and interesting by not allowing me to advance all available forces at once and to create a randomized and unpredictable reinforcement schedule.   But I suppose it could work for probes, attacks and assaults as well as certain defenses. 

Using a meeting engagement for example...  I'll usually hand pick my forces and when it comes to the set up screen, I'll place them line abreast as far back in the set up zone as possible (assuming the set up zone is initially out of visual contact from the enemy).  Then I start the battle and run my deployment generator...

It asks how many friendly HQ's are left in the battle...  Since it's the start of the battle, it would be all of them.  So let's say I have the following forces and HQ's organized in the following manner:

1st Infantry Battalion HQ1

   A Company HQ2

      1st platoon HQ3

       2nd platoon HQ4

       3rd platoon HQ5

   B Company HQ6

       1st platoon HQ7

       2nd platoon HQ8

3rd Armored Battalion HQ9

   1st Tank Platoon HQ10

   2nd Tank Platoon HQ11

Based on this selection I would have a total of 11 HQ's and I would enter it into my deployment generator.  It would then randomly select one of the 11 HQ's to have a chance to deploy... Let's say it selected the  6th HQ.  Going in sequential order of the above force selection, HQ6 would mean B company and all it's subordinate HQ's (HQ7 and HQ8) would have a chance to deploy .  Next the generator will ask what is the chance that HQ6 will be deployed.  I set it up so I can make my own odds based on a factor of 10.   I made my own rules as follows but you could make up your own:

Chance a whole battalion will deploy:  1 in 10

Chance a whole company will deploy:  3 in 10

Chance any particular platoon will deploy 5 in 10

Based on these rules I would enter 3...  then the generator would let me know if HQ6 (B company and all it's subordinates) would be arriving or not.   If it is, it would let me know if it would be arriving this turn or at some turn in the future (I have it programmed for a maximum of 5 minutes).    If it did not deploy, then I wouldn't be able to advance or use any of B Company's forces on that turn.  If it did deploy and say the generator said it would arrive in 2 minutes, then I could only advance or use B company after those two minutes passed.   If a unit deploys I would then take it off the list  and re-number my remaining HQ's before I ran the generator again for the next turn.  In this example, I would only have 8 more HQ's left so that is what I would put into the generator for the next turn.

Let's say it tells me that HQ8 has a chance to deploy and after entering its deployment odds of 5 it arrives on this turn ... in this example that would mean 2nd Tank Platoon would be available to advance.  I would then take it off the list and run the generator again for the next turn.   Now I have only 7 HQ's left.   So let's say the generator pulls up HQ1... that would mean 1st Battalion and any remaining subordinates, which would be A Company, 1st Platoon, 2nd Platoon and 3rd Platoon...  then of course I would put in it's deployment odds which would be 1.  Let's say it would be arriving in 5 min... then of course that would mean I could not advance or use any of 1st Battalion, A Company, 1st, 2nd or 3rd Platoon until 5 turns have passed.  

I would continue this process until all HQ's and their subordinates had deployed... certainly makes it more challenging in a meeting engagement when you don't get any forces to advance until 3-5 minutes into the battle for example.  Or it's 8 or 10 minutes into the battle and you are only fighting with a platoon  and are desperately needing more units to arrive and get into the fight.  I've played one game where it took almost 30 min for my tank battalion to show up... talk about challenging!'

If my instructions seem hard to follow or confusing, please let me know and I'll try to clarify.   But basically this system allows you to have reinforcements show up at unpredictable times.   You just have to run it outside of CM and make sure you keep track of what the generator dictates.  I just keep track of the the list and directives on a piece of paper.  If you are versed in the BASIC programming code, feel free to make your own adjustments/improvements or adapt it to your specific needs. 



------MisterMark's Deployment Generator Code-----

1 Rem MisterMark's Deployment Generator for CM
2 PR#3 : TEXT : HOME
3 PRINT "Press any key to generate mission parameters.";
4 CA = INT( RND(8) * 10)+1
5 T = INT( RND(1) * 6 )
6 S = INT( RND(8) * 20 )+1
8 GOTO 4

10 Rem Generate
11 PRINT "How many HQ's left in this battle?";
15 INPUT " ";H
16 IF H < 1000 AND H > 1 THEN GOTO 19
17 GOTO 11
19 FOR X = 1 TO 3000: NEXT X
20 S = INT( RND(8) * H )+1
30 PRINT "What is HQ";S "'s chance to be deployed?";
40 INPUT " ";C
41 FOR X = 1 TO 3000: NEXT X
42 IF C = 0 THEN GOTO 30
45 PRINT: PRINT "S t a n d b y . . ."
70 FOR X = 1 TO 17000 : NEXT X
80 CA = INT( RND(8) * 10)+1
81 IF C = 1 AND CA = 1 THEN GOTO 200
82 IF C = 2 AND CA <= 2 THEN GOTO 200
83 IF C = 3 AND CA <= 3 THEN GOTO 200
84 IF C = 4 AND CA <= 4 THEN GOTO 200
85 IF C = 5 AND CA <= 5 THEN GOTO 200
86 IF C = 6 AND CA <= 6 THEN GOTO 200
87 IF C = 7 AND CA <=7 THEN GOTO 200
88 IF C = 8 AND CA <=8 THEN GOTO 200
89 IF C = 9 AND CA <=9 THEN GOTO 200
110 PRINT: PRINT "HQ"; S " did not deploy or arrive on this turn."
115 GOTO 400
120 GET R
130 GOTO 5
150 REM IF CA = 1 THEN PRINT "HQ";H " will deploy in ";T " minuets"
200 T = INT( RND(1) * 6 )
250 IF T = 0 THEN GOSUB 275
255 IF T > 0 THEN GOSUB 300
260 GOTO 400
275 PRINT: PRINT "HQ";S " has arrived on this turn!"
300 PRINT: PRINT "HQ";S " will arrive in "; T " min!"
375 PRINT : FOR X = 1 TO 500 : NEXT X
400 FOR X = 1 TO 8000: NEXT X
401 PRINT: PRINT "Press any key to continue.";
1000 GOTO 10









Link to comment
Share on other sites


I like to see when players run up against some issue they find a work around that meets their needs. Like you did. It's a lot more fun that simply throwing up your hands and giving up. BFC is very good at listening and values constructive posts. 



Link to comment
Share on other sites

6 hours ago, Bulletpoint said:

That took me back to the days of computer magazines that always had several pages of code in them that you had to patiently hand-enter in your home computer to make it do something, like a simple game :) 

Yeah I did a few of those back in the day and always ended up frustrated.... got tired of putting in all the code and getting an error.   Too damn hard to debug a typo buried in hundreds of lines of code on an Apple IIc!




Link to comment
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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

  • Create New...