Scripting: Are there any Impetuous Troops? Enfilade Fire?

Post Reply
JamesManhattan
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 36
Joined: Mon Aug 15, 2016 1:54 am

Scripting: Are there any Impetuous Troops? Enfilade Fire?

Post by JamesManhattan » Mon Mar 19, 2018 9:56 pm

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

JamesManhattan
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 36
Joined: Mon Aug 15, 2016 1:54 am

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

Post by JamesManhattan » Tue Mar 20, 2018 2:15 am

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!

rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 23882
Joined: Sun Dec 04, 2005 6:25 pm

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

Post by rbodleyscott » Tue Mar 20, 2018 7:42 am

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.
Richard Bodley Scott

Image

JamesManhattan
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 36
Joined: Mon Aug 15, 2016 1:54 am

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

Post by JamesManhattan » Tue Mar 20, 2018 3:14 pm

Thank you!

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

Post Reply

Return to “Field of Glory II: Modding”