Page 1 of 1

Scripting: Are there any Impetuous Troops? Enfilade Fire?

Posted: Mon Mar 19, 2018 9:56 pm
by JamesManhattan
Are there any Impetuous Troops in the game right now? I think I remember in the old version, some of the French Knights were "Impetuous" so they would randomly charge the closest enemy. You couldn't always control them. Am I remembering that wrong? Does the scripting already exist in the game to allow that type of behavior?

Could you for example make a script to generate random number on start of a player's turn to see if a knight goes impetuous, modify it based on how close a General is, then take away control of the knight, and give it to the A.I. for the turn, force the Knight charge or move closer, then give back control at the end of that?

Also 2nd Question, in scripting..
What is the code to output floating text right to the screen. For Example: I want to check if an army was shot from behind, and add floaty text saying "Enfilade Fire". Similar to how when someone is charged in the Flank or Rear floaty text pops up.

Also 3rd Question are there plans for taking FoG II to the Medieval age? Like 'Wolves from the Sea' or 'Storm of Arrows'?

4th Question sorry, (I looked in the rulebook and did not find it)
Right now in the game is there a modifier in melee combat for having a friendly unit directly behind you in "Support"? Would it be hard to add such a modifier to the game?

Thanks

Re: Scripting: Are there any Impetuous Troops? Enfilade Fire

Posted: Tue Mar 20, 2018 2:15 am
by JamesManhattan
I found the answer to enfilade fire, in the CombatTools.BSF script. You can copy it from the Artillery part of the code. I also created the floaty text too!

Re: Scripting: Are there any Impetuous Troops? Enfilade Fire

Posted: Tue Mar 20, 2018 7:42 am
by rbodleyscott
JamesManhattan wrote:Are there any Impetuous Troops in the game right now? I think I remember in the old version, some of the French Knights were "Impetuous" so they would randomly charge the closest enemy. You couldn't always control them. Am I remembering that wrong? Does the scripting already exist in the game to allow that type of behavior?
No to all these.
Could you for example make a script to generate random number on start of a player's turn to see if a knight goes impetuous, modify it based on how close a General is, then take away control of the knight, and give it to the A.I. for the turn, force the Knight charge or move closer, then give back control at the end of that?
Probably - although it would require a fair amount of scripting.
Also 2nd Question, in scripting..
What is the code to output floating text right to the screen. For Example: I want to check if an army was shot from behind, and add floaty text saying "Enfilade Fire". Similar to how when someone is charged in the Flank or Rear floaty text pops up.
AddVizText(x, y, text, colour, [alwaysShow]);

//add a display of text to the tile center, in the colour (colour is a string hex value). alwaysShow means show even if tile is not visible to viewing side
Also 3rd Question are there plans for taking FoG II to the Medieval age? Like 'Wolves from the Sea' or 'Storm of Arrows'?
Yes
4th Question sorry, (I looked in the rulebook and did not find it)
Right now in the game is there a modifier in melee combat for having a friendly unit directly behind you in "Support"?
No
Would it be hard to add such a modifier to the game?
It would require some scripting.

Re: Scripting: Are there any Impetuous Troops? Enfilade Fire

Posted: Tue Mar 20, 2018 3:14 pm
by JamesManhattan
Thank you!

Can't wait for some Medieval and Dark Ages armies.