Modding melee animations

Post Reply
Athos1660
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 286
Joined: Wed May 29, 2019 3:23 pm

Modding melee animations

Post by Athos1660 » Sat Jan 18, 2020 6:29 pm

I wanted to test the game without the melee animations and the idle ones but still with the move, charge and shoot animations on.
Ideally, melee animations between two units would be played only when the results of a given melee phase between those two units was to be displayed.

So I turned off the idle animations and tried to mod the melee ones in AnimationTools.txt located in FoGII\Data\scripts.

I am not a modder so I wanted to know if what I did was the right thing to do :-)

Here are the modifications I made :

1) I changed this...

Code: Select all

FUNCTION TriggerMeleeIdleIfInCloseCombat(me)
{
	if (IsInCloseCombat(me) == 1)
		{
			TriggerDifferentialAnimation(me, "MELEEIDLE", "REARMELIDLE", 0, 1);
		}
}
into...

Code: Select all

FUNCTION TriggerMeleeIdleIfInCloseCombat(me)
{
	if (IsInCloseCombat(me) == 1)
		{
			TriggerDifferentialAnimation(me, "MELEEIDLE", "REARMELIDLE", 0, 0);
		}
}
2) This...

Code: Select all

			AddVizUnitFormationNoWait(me);

			if (IsInCloseCombat(me) == 1)
				{
					TriggerDifferentialAnimation(me, "MELEEIDLE", "REARMELIDLE", 0, 1);
				}				
		}
into...

Code: Select all

			AddVizUnitFormationNoWait(me);

			if (IsInCloseCombat(me) == 1)
				{
					TriggerDifferentialAnimation(me, "MELEEIDLE", "REARMELIDLE", 0, 0);
				}				
		}
3) Banners

I also replaced all...

Code: Select all

SetUnitBannerAnim(id, 0, "XXXX")
with...

Code: Select all

SetUnitBannerAnim(id, 0, "WAIT");
Is it correct ? Did I miss something ?

Hoping it may help some too.

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

Re: Modding melee animations

Post by rbodleyscott » Sun Jan 19, 2020 6:50 pm

Sounds plausible. Did it work?
Richard Bodley Scott

Image

Athos1660
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 286
Joined: Wed May 29, 2019 3:23 pm

Re: Modding melee animations

Post by Athos1660 » Tue Jan 21, 2020 5:06 pm

Yes, it did. The animations of a given melee play only when the result is displayed. Otherwise the opponents stand still. A bit like in P&S and the melee sounds.

I like it this way too, not because I don't like these animations, but because the atmosphere is quieter. It helps me concentrate when I need it, while enjoying all the animations the rest of the time.

(edit) I also turn off ambient battle sounds. Likewise, the sounds of the animations remain audible this way.

(edit 2) I also like the 'miniature/tabletop' effect! :-)

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Wed Jan 22, 2020 6:14 am

good idea, it will probably speed the game up for those with older pc's.... would this create a script error in MP if both players don't have this modification?

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

Re: Modding melee animations

Post by rbodleyscott » Wed Jan 22, 2020 8:40 am

TimDee58 wrote:
Wed Jan 22, 2020 6:14 am
good idea, it will probably speed the game up for those with older pc's.... would this create a script error in MP if both players don't have this modification?
It depends where the modded scripts were placed. If they are in the main build, then yes, it would. If they were in a global mod, global mods should be inactivated for MP so probably not - but the animations would be as normal in MP.
Richard Bodley Scott

Image

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Wed Jan 22, 2020 10:59 am

Thats great I wonder if the Modder would care to upload his files here so they can be downloaded, I for one would like to do so (as my PC is a dinosaur) - Instructions would be great too

Athos1660
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 286
Joined: Wed May 29, 2019 3:23 pm

Re: Modding melee animations

Post by Athos1660 » Wed Jan 22, 2020 8:36 pm

TimDee58 wrote:
Wed Jan 22, 2020 10:59 am
Thats great I wonder if the Modder would care to upload his files here so they can be downloaded, I for one would like to do so (as my PC is a dinosaur) - Instructions would be great too
Of course :-)

This mod is limited to a single file, AnimationTools.bsf
Here is the link to it : http://www.mediafire.com/file/u1m10mqi7 ... s.bsf/file
That script is located in Field of Glory\Data\scripts.

First thing, a warning : don’t put this mod in your main game build. Read this.

Installation

1) That said, playing only SP battles, currently using no other mod and using Steam to easily re-download a fresh new main game build, I for one just copy/paste this file in Steam\steamapps\common\Field of GloryII\Data\scripts, replacing the Vanilla file by my modded one.

(you can previously save the Vanilla AnimationTools.bsf somewhere else to be able to replace the modded one with it whenever you want.)

2) To use this modded file in MP, if I am not mistaken (do correct me, please, if I am wrong) :
- Copy/paste e.g. MP_AGE_OF_BELISARIOS from Steam\steamapps\common\Field of GloryII\Multiplayer to Documents\My Games\FieldOfGlory2\MULTIPLAYER
- Rename the folder MP_AGE_OF_BELISARIOS in your Documents into MP_AGE_OF_BELISARIOS_NO_ANIM
- Open TEXT1.txt in MP_AGE_OF_BELISARIOS_NO_ANIM
- Replace the first line IDS_CAMPAIGN_NAME,"Age of Belisarius", with IDS_CAMPAIGN_NAME,"Age of Belisarius no Anim",
- Save TEXT1.txt and close it
- Then create the sub-folders : MP_AGE_OF_BELISARIOS_NO_ANIM\Data\scripts
- Copy/paste the modded file 'AnimationTools.bsf' in 'scripts'.

Do the same thing for Rise of Persia, etc.

3) To use this modded file in a mod already located in your Documents\My Games\FieldOfGlory2\,
if I am not mistaken (do correct me, please, if I am wrong) :
- Create the sub-folders : 'Your mod'\Data\scripts
- Copy/paste the modded file 'AnimationTools.bsf' in 'scripts'.

In game:

- go to the option menu
- turn off idle animations
- turn off ambient battle sounds

Have fun :-)

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Thu Jan 23, 2020 12:56 am

Thanks Athos, I'll do that in the morning.

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Fri Jan 24, 2020 8:09 am

Okay, installed, will test tonight

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Sat Jan 25, 2020 5:47 am

OK it does work, perfectly.

HOWEVER...

To me the game loses some of it's immersiveness (is that even a word?) and it seems a little harder to keep track of units that are in an ongoing melee.

It didnt noticably speed up my machines running of the program, which I had hoped for

So, 'nice idea but not for me i'm afraid' thanks for the attempt tho.

Athos1660
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 286
Joined: Wed May 29, 2019 3:23 pm

Re: Modding melee animations

Post by Athos1660 » Sat Jan 25, 2020 9:20 am

TimDee58 wrote:
Sat Jan 25, 2020 5:47 am
OK it does work, perfectly.

HOWEVER...

To me the game loses some of it's immersiveness (is that even a word?) and it seems a little harder to keep track of units that are in an ongoing melee.
You are absolutely right, melee animations :
  • help to distinguish between units in melee and units that are not. However, even without melee animations, there are still more indications of melee than in P&S.
  • simulate life, even though they could look quite repetitive to some and I for one don't know whether or not the FoG series need to follow the path of total visual 'realism' à la Total War.
I would say that this mod turns FoGII a little bit into a miniature tabletop game or P&S. And I like it.
But I also like the Vanilla animations.

De gustibus et coloribus non disputandum :-)

And it is nice that FoGII provides such modding tools to vary game experience!
TimDee58 wrote:
Sat Jan 25, 2020 5:47 am
It didnt noticably speed up my machines running of the program, which I had hoped for
Really sorry to hear that! I had hoped it'd help :-(

TimDee58
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 214
Joined: Wed Mar 07, 2018 1:32 am

Re: Modding melee animations

Post by TimDee58 » Sat Jan 25, 2020 10:59 am

Athos1660 wrote:
Sat Jan 25, 2020 9:20 am

Really sorry to hear that! I had hoped it'd help :-(
It IS a dinosaur of a PC so it's all good that I can run the game at all lol

Athos1660
Staff Sergeant - StuG IIIF
Staff Sergeant - StuG IIIF
Posts: 286
Joined: Wed May 29, 2019 3:23 pm

Re: Modding melee animations

Post by Athos1660 » Tue Mar 17, 2020 2:07 pm

Would anyone know how to remove dead soldiers lying/dying on the battle field ?

I guess it is a matter of 0 or 1, but...
I can see in AnimationTools.txt : GetUnitManDead, GetDeathMaskManDead, killMask, int killed, etc. but...

Post Reply

Return to “Field of Glory II: Modding”