The 3rd Age

Lone Wolf 2 Return of Dawn

Lone Wolf  2 Return of Dawn

Lone Wolf 2 Return of Dawn is a port/sequel to Lone Wolf Return of Shadow for BFME2.

Button for The 3rd AgeButton for The Dwarf HoldsButton for The Elven AllianceButton for Helm's Deep Last HopeButton for GothmogtheOrcButton for BFME+Button for The Four AgesButton for HDR HeadquartersButton for Middle Earth CenterButton for Project Perfect Mod

Become an affiliate!

   

Quick Lists

Top Rated Popular New Updated Last Comments Users

Register and log in to move these advertisements down

Locomoters and Locomoter Sets

Tutorial for Battle for Middle-earth BFME, Battle for Middle-earth II BFME 2, Battle for Middle-earth II: Rise of the Witch-king ROTWK

Avatar of Hostile

Hostile

Category: Code
Level: Intermediate
Created: Monday March 26, 2007 - 12:03
Updated: Monday March 26, 2007 - 23:33
Views: 4988
Summary: Locomoters: how units move and how fast they move

Rating

Staff says

3.2

Members say

3.7

Average

3.4/5.0

8 votes

The Basics - Locomotors

Written by: Hostile

The purpose of this tutorial is to give a better understanding on what locomotors are and how they affect a units behavior ingame.

A Locomotor tells a unit how to move. It controls the terrain types, turning speed, and dictates movement parameters.

Let's look at a locomotor...

              
Code
Locomotor HumanLocomotor
Surfaces = GROUND RUBBLE
TurnTime = 500
TurnTimeDamaged = 500
FastTurnRadius = 3 ; Can turn in a 10 foot radius circle when moving.
SlowTurnRadius = 1 ; Turns in place from a standing start.
Acceleration = 510 ; .5 second to accelerate to full speed.
FormationPriority = MELEE1 ;MELEE2

Braking = 510 ; .51 second to brake from full speed.
MinTurnSpeed = 0%
ZAxisBehavior = NO_Z_MOTIVE_FORCE
Appearance = TWO_LEGS
StickToGround = Yes ; walking guys aren't allowed to catch huge (or even small) air.
CanMoveBackwards = Yes ; Can move backwards when afraid.
BackingUpSpeed = 33%
End


Surfaces mean what kind of terrain can I move around on. I'm going to give a list of some examples of possible surface types.

              
Code
GROUND
RUBBLE
IMPASSABLE
WATER
AIR
OBSTACLE


TurnTime is how quickly can I turn.

TurnTimeDamaged is how much time to do the same as above if I'm really hurt.

FastTurnRadius = 3 ; Can turn in a 10 foot radius circle when moving.
SlowTurnRadius = 1 ; Turns in place from a standing start.

FastTurnRadius/SlowTurnRadius - determines how much space I need to turn if I'm arleady moving and if I'm standing still. Fast, by nature, should be larger than turning from a standstill.

Acceleration - How quickly do I speed up when I am told to move?

Braking - How quickly do I slow down when I am told to stop?

ZAxisBehavior = NO_Z_MOTIVE_FORCE - This allows the locomotor to move the unit along the ground. SURFACE_RELATIVE_HEIGHT would be used for airbourne units such as Fellbeasts and such.

Other possibilities include:

              
Code
SEA_LEVEL - AOD
FLOATING_Z - AOD
FIXED_ABSOLUTE_HEIGHT - Birds and such things that always stay at one height.


Appearance = TWO_LEGS - this tells the game the basic mode of travel. Looking to the Fellbeast is uses Appearance = WINGS. I'm not totally sure how it helps the game, but it's worth noting.

Other possibilities include:

              
Code
HUGE_TWO_LEGS
FOUR_WHEELS
HORDE
FOUR_LEGS_HUGE
HOVER
GIANT_BIRD


StickToGround = Yes - This is important to keep units attached to the ground as they roll over hills and such. If you were going to add a dune buggy to the game, than you certainly can adjust this and add many parameters to it to determine how much air you can catch.

CanMoveBackwards = Yes ; Can move backwards when afraid.
BackingUpSpeed = 33%

This allows a unit to backup and turn around to leave the scene. Also determines the speed by which a unit moves when backing up.

Setting the actual top speed itself is referenced in the unit code itself where you assign the locomotor.

              
Code
LocomotorSet
Locomotor = HeroHumanLocomotor
Condition = SET_NORMAL
Speed = NORMAL_GOOD_HERO_SPEED
End


Speed itself can be defined in gamedata.ini, as above, or you may simply place the value here.

Condition = SET_NORMAL - This can be adjusted to another condition state like SET_NORMAL_UPGRADED. That way when you get a locomotor upgrade you adjust adjust the speed here. Another common condition is SET_MOUNTED. This is used when you unit can mount and dismount. You can also use SET_MOUNTED_UPGRADED if your calvary get faster with an upgrade.

Behavior = LocomotorSetUpgrade ModuleTag_custom
TriggeredBy = Upgrade_YourUpgrade
End

This behavior can be added to your unit code to allow a locomotor upgrade to go into affect. Imagine using this to increase the speed of your calvary as they gain level? Many things are possible.

This gives some insite into locomotors. The best teacher is experience. So play with some numbers and see how the effects change the game. Any further questions should be addressed in our forums.

Go to top

 

"One site to rule them all, one site to find them,
one site to host them all, and on the network bind them."

 
17:40:25