Dust trails. Unit animation.

Moderators: rbodleyscott, Slitherine Core, Gothic Labs

Post Reply
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Dust trails. Unit animation.

Post by jomni »

I noticed some units leave a dust trail while some don't.
Which parameter in the unit.txt controls this? Also do I also need to do something to the 3d model?

As for preferences, is it better to remove the dust for all units? Implement dust for all? Or only for selected fast units?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28014
Joined: Sun Dec 04, 2005 6:25 pm

Re: Dust trails. Unit animation.

Post by rbodleyscott »

jomni wrote:I noticed some units leave a dust trail while some don't.
Which parameter in the unit.txt controls this? Also do I also need to do something to the 3d model?

As for preferences, is it better to remove the dust for all units? Implement dust for all? Or only for selected fast units?
Sadly, the short answer to all this is that I haven't a clue. I will see if the artist, Rob Graat, (who is now working on other projects) has time to explain.
Richard Bodley Scott

Image
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Re: Dust trails. Unit animation.

Post by jomni »

No worries. At this point I only see the archers leaving a trail of dust.
RobGraat
Private First Class - Wehrmacht Inf
Private First Class - Wehrmacht Inf
Posts: 7
Joined: Mon Aug 04, 2014 9:45 am

Re: Dust trails. Unit animation.

Post by RobGraat »

Each model has particle emitters, or actually it has parts of a mesh called !#[EmitterID]. The dust particles are emitted by a submesh called either !#12 (small units), !#13 (wide units) or !#14 (normal width units). If a model does not have the correctly named submeshes it won't be able to emite particles associated with that emitter.

So the first step is adding a submesh called either !#12, !#13 or !#14.

The dust particles (along with all the other particles) are described in Pike and Shot\Core\explosions.fxf:

Code: Select all

[Dust24]						// 
VelBase 0 , 0 , 0               // Initial speed in X,Y,Z coordinates. Positive Z is upwards.
VelRand 0.1 , 0.05 , 0.1        // Random modifier of intitial speed.
RBase 250                       // Base colour.
GBase 200                       
BBase 140                       
ABase 50                        // Base alpha. 0 = invisible. 255 = opaque.
RRand 0                         // Random modifier of base colour.
GRand 0                         
BRand 0                         
ARand 100                       
RFadeBase 0                     // Fading.
GFadeBase 0                     
BFadeBase 0                     
AFadeBase -10                   // Negative value results in increasing transparency during lifetime.
RFadeRand 0                     
GFadeRand 0                     
BFadeRand 0                     
AFadeRand 0                     // Random modifier of fading.
SizeBase 2                      // Small size which grows larger.
SizeRand 6                      
SizeDelta 1.05                  
LifeBase 5                      // Base lifetime. 30 = 1 second?
LifeRand 10                     // Random modifier of lifetime.
TexBase 16                      // 0 based index of texture tile in atlas.
TexRand 3                       // Random texture tile selection over given range. 0 = no randomization.
TexWalk 15                      // ?
Type 1                          // 0 = all white texture | 1 = local coordinates | 2 = global coordinates | 3 = 
Gravity 0                       // Positive is upwards
Emission 1                      // Number of particles emitted per timeframe.
EmissionArea 0 , 0 , 24         // 3D space in which particles are emitted.
Hook up the particle to the emitter:

Code: Select all

[$EMIT_13]
PARTICLE Dust24
START 13
END 13
Give the particle emitter a FX ID to be used in the unit text file:

Code: Select all

[%FX_13]
LOOPS FALSE
MAXTIME 0.100000
EMITTER EMIT_13
EMIT_130> 0.000000
EMIT_130< 0.100000
Now make the emitters actually emit particles in Pike and Shot\Data\Battle\Units\[UnitName].txt:

Code: Select all

[MOVE00]		// Animation tag and index
FRM 17 27		// Frame numbers for this animation
FX 0 13			// FX [FrameNumber] [FX ID]
FX 1 13			// Emitter !#13 will emit at frame 1
FX 2 13			// Emitter !#13 will emit at frame 2
FX 3 13			// etc.
FX 4 13
FX 5 13
FX 6 13
FX 7 13
FX 8 13
FX 9 13
I hope this quick explanation will get you on the right track if you decide to add dust afterall.

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

Re: Dust trails. Unit animation.

Post by rbodleyscott »

Thanks Rob
Richard Bodley Scott

Image
jomni
Sengoku Jidai
Sengoku Jidai
Posts: 1394
Joined: Thu Dec 03, 2009 1:20 am

Re: Dust trails. Unit animation.

Post by jomni »

Thanks. Now time to digest.
beserko
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 108
Joined: Mon May 23, 2005 9:43 pm

Re: Dust trails. Unit animation.

Post by beserko »

can large dust trails impede LOS ? Horses certainly stirred up the dust.

Cannon fire and salvos produced alot of smoke. Sometimes obscuring vision at unfortunate times, would this be a major deal to set this up?
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28014
Joined: Sun Dec 04, 2005 6:25 pm

Re: Dust trails. Unit animation.

Post by rbodleyscott »

beserko wrote:can large dust trails impede LOS ? Horses certainly stirred up the dust.

Cannon fire and salvos produced alot of smoke. Sometimes obscuring vision at unfortunate times, would this be a major deal to set this up?
Probably not feasible, I fear.
Richard Bodley Scott

Image
stockwellpete
Field of Glory Moderator
Field of Glory Moderator
Posts: 14500
Joined: Fri Oct 01, 2010 2:50 pm

Re: Dust trails. Unit animation.

Post by stockwellpete »

What about mud? :D
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28014
Joined: Sun Dec 04, 2005 6:25 pm

Re: Dust trails. Unit animation.

Post by rbodleyscott »

stockwellpete wrote:What about mud? :D
Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)
Richard Bodley Scott

Image
stockwellpete
Field of Glory Moderator
Field of Glory Moderator
Posts: 14500
Joined: Fri Oct 01, 2010 2:50 pm

Re: Dust trails. Unit animation.

Post by stockwellpete »

rbodleyscott wrote: Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)
Yes, that would be good. Maybe that could come if you decide to include weather rules in your games at some stage? I was just wondering - do you envisage any great problems with writing scripts for weather conditions?

And I was also thinking that instead of a dust trail (summer) you could have the cavalry units throwing up clods of mud for the rest of the year (in Europe/Japan anyway). It would bring a nice little touch to your games.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28014
Joined: Sun Dec 04, 2005 6:25 pm

Re: Dust trails. Unit animation.

Post by rbodleyscott »

stockwellpete wrote:
rbodleyscott wrote: Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)
Yes, that would be good. Maybe that could come if you decide to include weather rules in your games at some stage? I was just wondering - do you envisage any great problems with writing scripts for weather conditions?
It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.
And I was also thinking that instead of a dust trail (summer) you could have the cavalry units throwing up clods of mud for the rest of the year (in Europe/Japan anyway). It would bring a nice little touch to your games.
That would be a lot harder.
Richard Bodley Scott

Image
stockwellpete
Field of Glory Moderator
Field of Glory Moderator
Posts: 14500
Joined: Fri Oct 01, 2010 2:50 pm

Re: Dust trails. Unit animation.

Post by stockwellpete »

rbodleyscott wrote: It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.
I was just thinking about the way weather conditions affected the War of the Roses battles and I suppose there were three main examples . . .

Northampton 1460 - poured with rain prior to the battle rendering artillery and handguns fairly useless

Towton 1461 - the wind direction favoured the Yorkist archers at the start of the battle and they were able to cause more casualties than their Lancastrian counterparts, although this was not decisive in terms of the outcome of the battle.

Barnet 1471 - the early morning mist/fog completely disoriented the Lancastrian army and played a big part in their eventual defeat.

So rain (and snow) would be OK to do, wind would be difficult, and I imagine mist/fog would be do-able as well seeing that we already have "fog of war" in games.
rbodleyscott
Field of Glory 2
Field of Glory 2
Posts: 28014
Joined: Sun Dec 04, 2005 6:25 pm

Re: Dust trails. Unit animation.

Post by rbodleyscott »

stockwellpete wrote:
rbodleyscott wrote: It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.
I was just thinking about the way weather conditions affected the War of the Roses battles and I suppose there were three main examples . . .

Northampton 1460 - poured with rain prior to the battle rendering artillery and handguns fairly useless

Towton 1461 - the wind direction favoured the Yorkist archers at the start of the battle and they were able to cause more casualties than their Lancastrian counterparts, although this was not decisive in terms of the outcome of the battle.

Barnet 1471 - the early morning mist/fog completely disoriented the Lancastrian army and played a big part in their eventual defeat.

So rain (and snow) would be OK to do, wind would be difficult, and I imagine mist/fog would be do-able as well seeing that we already have "fog of war" in games.
Well we already have Fog in the Lutzen scenario affecting visiblity, though there is no Fog visual effect.
Richard Bodley Scott

Image
Dino_SWE
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 94
Joined: Sat Jun 07, 2014 4:37 pm

Re: Dust trails. Unit animation.

Post by Dino_SWE »

Id love to see a mod that prolonged the gunsmoke gfx.
Mmmm, lingering smoke.

Could I edit the explosions.fxf myself for desired effect?

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

Re: Dust trails. Unit animation.

Post by rbodleyscott »

Dino_SWE wrote:Id love to see a mod that prolonged the gunsmoke gfx.
Mmmm, lingering smoke.

Could I edit the explosions.fxf myself for desired effect?
TBH I have no idea. I left the graphics to the graphics guy (Rob Graat).
Richard Bodley Scott

Image
Post Reply

Return to “Modders Corner”