Data Realms Fan Forums
http://forums.datarealms.com/

Walkpath Tutorial
http://forums.datarealms.com/viewtopic.php?f=1&t=13483
Page 1 of 2

Author:  Roon3 [ Thu Jan 15, 2009 9:50 pm ]
Post subject:  Walkpath Tutorial

Numgun requested a walkpath tutorial:

Things you'll need:

Calculator - Optional
MSPaint - or any other program that shows offsets
NotePad - Obviously
Registered version of CC - You'll need the actor veiwer

Lets take a look at the walkpath code:

Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, its start offset is the actor's hip joint.

Code:
StartSegCount = N

Causes the game to skip the first N AddSegment lines when not needed, (N being any number larger than zero) so actors can climb steep hills without having to raise their foot all the time. (Only when climbing)

Code:
AddSegment = Vector

Adds a segment in the walk "animation", will be explained in the next sections.

Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =

Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others can be ignored, they're a feature Data wanted to add to CC)

Code:
PushForce =

Don't know...

How do we start:

Start by copying the coalition light's torso code into a new a .ini, scroll down to the walkpath area and delete all the AddSegment lines. Do not erase the StartSegCount and StartOffset lines!
Change StartSegCount to 0. (We won't be using this for this tutorial, I might add a section about this var in the future)

Open the actor veiwer and start working, reload actor data whenever you make a change:

Now we begin by adding one add segment like so:
Code:
      AddSegment = Vector
         X = 0
         Y = 5  //You don't normally have to use five, I will in this tut

This is the first part of the walking animation, our actor will his foot by 5 pixels.

Now, press the move right key and have him raise his foot and take a pic:
Image

Now we want out actor to move his foot backwards and take it forward again so we draw a dotted "line" following the path like so:
Image
(The first dot should be in the center of the foot)

Now here comes the part where I think most people fail:
Look at the offset of the 1st dot: 50,50
And now the 2nd: 48,55
So the X drops by 2 and the Y gets added 5 so your next segment should look like this:
Code:
      AddSegment = Vector
         X = -2
         Y = 5

Now for the next segment:
2nd offset: 48,55
3rd offset: 44,56
So now:
Code:
      AddSegment = Vector
         X = -4
         Y = 1

And the one after that:
3rd offset: 44,56
4th offset: 37,57
So:
Code:
      AddSegment = Vector
         X = -7
         Y = 1

And finally:
4th offset: 37,57
5th offset: 28,58
Code:
      AddSegment = Vector
         X = -9
         Y = 1


And you're done, that wasn't as hard you thought it was right? Play around with these variables and make your own awesome walkpaths!

If you find any spelling/math errors/know what other vars do, please tell me.
Sorry if my bad grammar is confusing and hope I was able to help.

(Note: The walkpath in this tut is very basic and probably looks bad, don't expect to much)

Edit: Fixed image links
Edit: Added info about the other variables

Thanks to No_0ne and comment for explaining the StartSegCount.
Thanks to Capnbubs for explaining the travel speed variables.

Author:  ComikRadd [ Thu Jan 15, 2009 10:33 pm ]
Post subject:  Re: Walkpath Tutorial

This seems oddly useful.


Kudos dude.




Gonna go muck with it now.

Author:  Comment [ Thu Jan 15, 2009 11:47 pm ]
Post subject:  Re: Walkpath Tutorial

Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

Code:
StartSegCount = N

Causes the game to skip the first N AddSegment lines. (N being any number larger than zero)

Code:
PushForce =

Don't know...

My knowledge of walkpaths is very basic, but I think I can help with these.

I think that the 0,0 point for StartOffset is the join of the leg. I know that increasing the Y value of the offset will make the leg's foot start out further down. I didn't count the pixels, but it did appear to be the hip-to-foot offset.

StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

PushForce has something to do with either the force that the actor exerts on the ground when walking, or the force that the leg applies up on the actor in order to keep it upright.

Author:  No_0ne [ Fri Jan 16, 2009 12:23 am ]
Post subject:  Re: Walkpath Tutorial

Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

It starts at where the leg's jointoffset, or where the leg rotates on the body.
Comment wrote:
StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

StartSegCount is the number of the first movements that are skipped when they are not needed, so they can walk up steep hill and flat terrain with equal efficiency, without looking like stomping morons.

Author:  Roon3 [ Fri Jan 16, 2009 8:27 am ]
Post subject:  Re: Walkpath Tutorial

Thanks you two, added this info to the OP.

Author:  zalo [ Fri Jan 16, 2009 5:05 pm ]
Post subject:  Re: Walkpath Tutorial

That's a lot better than what I would've wrote.

I usually just fudge with it until I get something really cool. :grin:

Author:  Roon3 [ Fri Jan 16, 2009 9:27 pm ]
Post subject:  Re: Walkpath Tutorial

Wow, thanks Zalo.
Has anyone tried making the walkpath used in this tutorial? If so, how does it look? (Good, bad, etc...)

Author:  Geti [ Sun Jan 18, 2009 6:21 am ]
Post subject:  Re: Walkpath Tutorial

this helped making a huge tank, i was wondering why it was floating :-o

Author:  TheLastBanana [ Sun Jan 18, 2009 10:35 pm ]
Post subject:  Re: Walkpath Tutorial

Just an addition to the tutorial, the pushforce (as far as I can tell) is how much impulse force the walk path applies. It determines how much it eats away at terrain and how much force it puts onto actors.

Author:  ShadoWKilleR255 [ Fri Jan 23, 2009 10:29 pm ]
Post subject:  Re: Walkpath Tutorial

from testing i know that push force is the force applied to the movement between
the vector points if you put 999999999999999999999 push force it will send your
actor/s leg flying to the direction it was supposed to move to
Comment wrote:
Push Force has something to do with either the force that the actor exerts on the
ground when walking,
or the force that the leg applies up on the actor in order
to keep it upright.


the bold line is sort of right
its the force exerted by the foot on the direction it was set to move to.
dosent have to be the ground..



short version

low = looks like anemic kid trying to run a marathon
high = looks like strongest man on earth to hug a kid without causing to die

Author:  capnbubs [ Sat Feb 28, 2009 4:18 pm ]
Post subject:  Re: Walkpath Tutorial

Roon3 wrote:
Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =

Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others must have to do with special conditions)


Data says that the slow and fast variables were intended for different movement speeds he was planning on adding into the game, but they are currently not used and so can be ignored.

Author:  Roon3 [ Sat Feb 28, 2009 4:35 pm ]
Post subject:  Re: Walkpath Tutorial

Thanks again bubs, edited the OP to reflect this.

Author:  JeCa [ Mon May 18, 2009 3:22 pm ]
Post subject:  Re: Walkpath Tutorial

Hey, thanks Roon!
I've always understood the basic mechanic of Walkpaths but have never bothered to actually try editing one until now, as everything feels a lot easier from just knowing that there is a tutorial in that browser window.

A bit off topic, do you think one could make a item that (using lua) would make a character switch to use his FastTravelSpeed/SlowTravelSpeed? I know the performance-boosting energy drink is overdone, but there could be some other interesting uses for, like a gun that slows enemy characters.

Author:  nunu [ Tue May 26, 2009 1:34 pm ]
Post subject:  Re: Walkpath Tutorial

In theory I should be able to make my actors duck walk, no?

Author:  Roon3 [ Tue May 26, 2009 2:59 pm ]
Post subject:  Re: Walkpath Tutorial

Yeah, I guess, lemme try...

Edit:
Image
Yep, works

Page 1 of 2 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/