Jump to content

Photo

Better character movement (acceleration)


  • Please log in to reply
6 replies to this topic

#1
HunterDigi

HunterDigi

    Stranger

  • Members
  • Pip
  • 4 posts

Hi :}

 

A thing that annoys me in Bethesda games is that all characters just instantly move in any direction at their top speed, it's weird and unrealistic.

 

Can anyone make a simple mod that makes all characters accelerate and have to deaccelerate in order to change direction ? Like, any other shooter =)

 

There's a mod made for Skyrim like this: http://www.nexusmods...im/mods/38572/?



#2
devinpatterson

devinpatterson

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 7,575 posts
I can't comment on applying any inertia physics, but you can change the speed of teh player over a short time via script. Essentially a quest script that modifies speed based on how long the movement key is held down. Say starting at half speed and taking .8 or 1.3 seconds (or whatever) to reach full speed. It should also be possible to drop the speed down to that same half speed, if the player hits the straffing key.

There are scancodes for the mousekeys, but I don't think there is an analog for the mouse movement, so that is a separate problem. There are a lot of trig functions for determining a change in angle, but I don't think I could tackle that. So I couldn't change speed based on mouse movement, although there are scripters here who could.

I was under the impression taht there was a running mod that did have basic acceleration, but a quick search didn't turn anything up.

#3
HunterDigi

HunterDigi

    Stranger

  • Members
  • Pip
  • 4 posts

Well I'm only interested in character's walking, nothing mouse related.

 

It should affect all characters in the world, including animals and such.

 

I was hoping someone experienced could do it since I have no experience with the engine, even the notion that I have to use a quest to add such effects is weird to begin with xD



#4
devinpatterson

devinpatterson

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 7,575 posts

Well I'm only interested in character's walking, nothing mouse related.


Moving is mouse related, you change direction by mouse (most of pc users anyway use a mouse and kb type setup for pc), or similar controller.

It should affect all characters in the world, including animals and such.


No, I don't have a method for it to affect all characters, and a script running for every active ref is unrealistic. 

I was hoping someone experienced could do it since I have no experience with the engine,


Yes, that is why I explained what *I* could do and refereed to the personal pronoun in my post. However there are definitely peeps more experienced in the forum and some may have a more elegant solution. However you still have to work within the boundaries of what's possible with the game.

even the notion that I have to use a quest to add such effects is weird to begin with xD


Standard operating procedure, you'll see it over and over again. Scripting is what gives fallout it's flexibility to do so many things, and quest scripts are often used to implement them.

#5
HunterDigi

HunterDigi

    Stranger

  • Members
  • Pip
  • 4 posts

 

Yes, that is why I explained what *I* could do and refereed to the personal pronoun in my post. However there are definitely peeps more experienced in the forum and some may have a more elegant solution. However you still have to work within the boundaries of what's possible with the game.

 

Ah I see, I misunderstood, I thought you were telling me how to do it xD

 

 

And I was clarifying that I don't need mouse smoothing (I actually hate it) to save the extra effort, but if you really want to add that then please also add an option to disable it :P

 

 

No, I don't have a method for it to affect all characters, and a script running for every active ref is unrealistic. 

 

Unrealistic how ? o.O

 

 

Anyway, I hope you can make this mod happen :}



#6
devinpatterson

devinpatterson

    Resident poster

  • Supporter
  • PipPipPipPipPip
  • 7,575 posts

And I was clarifying that I don't need mouse smoothing (I actually hate it) to save the extra effort, but if you really want to add that then please also add an option to disable it :tongue:


Nothing to do with mouse smoothing. In the real world objects have a delta in their velocity (and a resulting change in momentum) when changing direction. You don't take a 90 degree turn without a change in speed and momentum because a vector has both direction as well as magnitude. I don't think I can simulate that as I don't think I have the mouse equivalent of NVSE's isKeyPressed from a single key on the keyboard. Instead it would require comparing changes in heading (made by mouse movement) via some of the trig functions, which I doubt I would tackle.

Unrealistic how ? o.O

 
 
Because the changes in speed rely on NVSE's keypresses functions, and NPCs aren't being controlled by via keyboard.

Anyway, I hope you can make this mod happen :}


I'm looking into it, although I can't say as of yet, so it's certainly a open request if anyone else wants to tackle it (or finds a mod that already does something like it).

#7
omega2008

omega2008

    Arindel

  • Premium Member
  • 1,716 posts

Hello

 

I'm trying to do smoother WASD movement myself, but currently I have no idea how to simulate deceleration since releasing WASD just stops the character instantly.

 

I hope someone can help me finish the final half, the deceleration.

 

This is the code, but I'm aware the method used here may not be really good:

It's running repeatedly at every 0.1s.

scn 007WASDsmoothSCR
 
Begin GameMode
 
if player.IsMoving != 0
   if player.GetActorValue SpeedMult < 100
      player.ModActorValue SpeedMult 10
      player.ModActorValue LeftMobilityCondition 1
      player.ModActorValue LeftMobilityCondition -1
   endif
elseif player.IsMoving == 0
   if player.GetActorValue SpeedMult > 10
      player.ModActorValue SpeedMult -10
      player.ModActorValue LeftMobilityCondition 1
      player.ModActorValue LeftMobilityCondition -1
   endif
endif
 
end


Edited by omega2008, 06 November 2015 - 10:11 PM.





Page loaded in: 1.621 seconds