Page 1 of 1

Infantry Square Mod

Posted: Sun Sep 01, 2019 9:42 am
by Cronos09
I added the Square script from FoG2 to P&S: https://drive.google.com/open?id=1EoGgl ... iw0SNlCBeQ (it's only a set of scripts, not a ready scenario)
To describe the infantry square in P&S, I give a quote from the FoG2 manual with my changes:
Units having a number of 900 (or 450 if multiplier is 50% etc) or more with bayonets and being on the open ground can form square. This uses the unit’s entire move allowance for the turn (but it still has a free turn - 45 degr). Units in square:
1. Are immune to flank or rear charges.
2. Cannot charge.
3. Never pursue even if raw.
4. Use their entire movement allowance to move 1 square, turn or leave square. After leaving square an unit has a free angle to turn (45 degr).
5. Have higher Close Combat Rating and less Shooting Attack Rating (about 65-70%% in comparison with their non-square formation).
6. Get more losses from enemy musket/arquebus and artillery fire.
7. Get all bonuses from bayonets against cavalry charges.
8. Have the arc of fire of 150 degr, and it is a full volley.
A unit cannot form or leave square while in close combat or it is behind obstacles. A unit in square automatically leaves square when it routs.
Leaving square also uses up the unit's full movement allowance for the turn. But it can shoot after leaving square as well as after the formation of the square and turn 45 degr.
You can activate-deactivate this mode with the right click on the unit like in FoG2. After activating the square mode the Sq icon will appear next to the unit flag in addition to writing to the infoboard. A player can only have 5 square formations simultaneously.
I removed bayonet bonuses from infantry units while they are not in the square formations. Thus, the cavalry becomes the main shock force on the battlefield.
Updated 20.10.2019.
Image

Image

Image

Image

Re: Infantry Square Mod

Posted: Sun Sep 15, 2019 9:18 am
by Paul59
Many thanks for this Cronos, it's always good to see modders still working on this game.

Is it possible to introduce Group Moves from FOG2 to P&S?


cheers

Paul

Re: Infantry Square Mod

Posted: Sun Sep 15, 2019 12:49 pm
by Cronos09
Hi, Paul!

I tried to add this feature to my General mod, especially there are already commands/groups in it. It was not difficult to add neccessary scripts, but as a result I had problems with unit routfinding when a unit had another unit on its rout at the initial position. I had to comment/remove SetUnitRouteMask command, as it's absent in the P&S battlescript. As I see it allows to change routefinding calculations for the required units.

Re: Infantry Square Mod

Posted: Tue Sep 17, 2019 3:17 pm
by rbodleyscott
Cronos09 wrote: Sun Sep 15, 2019 12:49 pm Hi, Paul!

I tried to add this feature to my General mod, especially there are already commands/groups in it. It was not difficult to add neccessary scripts, but as a result I had problems with unit routfinding when a unit had another unit on its rout at the initial position. I had to comment/remove SetUnitRouteMask command, as it's absent in the P&S battlescript. As I see it allows to change routefinding calculations for the required units.
Yes, it does, it allows them to ignore specified other units when routefinding, so they don't try and route round each other.

Unfortunately this is one of the features that was added in the ARCHON engine, and there is no equivalent in the STUB engine used for P&S.

Hence I don't think that group movement, in formation, is possible to Mod into P&S.

Re: Infantry Square Mod

Posted: Sun Apr 05, 2020 6:51 pm
by Cronos09
Command Move in P&S "on crutches".
In view of the above reasons, I added a restriction on the movement of units in a command/group to the "Move Command" script. An unit can move in a command/group if it has not another unit of its own group in front of it at the angle of 120 degr (6 squares in front of the unit). Thus, a command of three rows can be moved forward with three clicks on the "Move Whole Command" button:

Image Image

Image Image

"Turn Command" script works in P&S without problem:

Image Image

Re: Infantry Square Mod

Posted: Sun Apr 05, 2020 7:05 pm
by Athos1660
Well done! :-)

Re: Infantry Square Mod

Posted: Wed Apr 22, 2020 6:42 pm
by Cronos09
I found a way to use a more appropriate visual display square formations in P&S:
Image

Image

Image

Image

Re: Infantry Square Mod

Posted: Thu Apr 23, 2020 6:08 am
by rbodleyscott
Nicely done!

Re: Infantry Square Mod

Posted: Thu Apr 23, 2020 7:32 am
by Cronos09
Thank you. There is a simple way to relate unit conversion to their Type Index, eg:

Code: Select all

  // Replace Unit
	i = GetUnitTypeIndex(me);
	i+= 120;
	GetUnitTypeString(i); 
	RemoveUnit(me, 1);
	id = AddUnit(x, y, side, GetWorkString(), 1);
True in this case you have to order the necessary units in SQUADS.csv in a certain order.

Re: Infantry Square Mod

Posted: Thu Apr 23, 2020 8:23 am
by rbodleyscott
Cronos09 wrote: Thu Apr 23, 2020 7:32 am Thank you. There is a simple way to relate unit conversion to their Type Index, eg:

Code: Select all

  // Replace Unit
	i = GetUnitTypeIndex(me);
	i+= 120;
	GetUnitTypeString(i); 
	RemoveUnit(me, 1);
	id = AddUnit(x, y, side, GetWorkString(), 1);
True in this case you have to order the necessary units in SQUADS.csv in a certain order.
Yes, it is a clever workaround. No doubt I could have done a similar workaround in FOG2, but fortunately, being able to request engine changes, I was able to implement a more general solution.

Re: Infantry Square Mod

Posted: Fri Apr 24, 2020 5:56 am
by StuccoFresco
Very nice indeed.

Re: Infantry Square Mod

Posted: Fri Apr 24, 2020 8:10 am
by Adebar
Great ideas, and very well done!

Re: Infantry Square Mod

Posted: Fri Apr 24, 2020 11:07 am
by Cronos09
StuccoFresco, Adebar thank you. The ideas are inspired by FoG2.