Jump to content

Change run speed depending on location


PuceMooose

Recommended Posts

Is it possible to change run speed depending on the player's location? For example, on the main world map the run speed seems fine to me. However, when I'm inside I feel like I'm on rocket-powered roller skates zipping through the corridors.

 

Is it possible to make a mod that reduces player run speed when inside by 35% or so? Would it need to be a script?

 

Thanks for any ideas.

Link to comment
Share on other sites

You could do this with an Actor Effect. That way, you can use a condition of "IsInInterior" so that the effect is only applied while the player is in an interior cell.

 

For the Base Effect, you'll need to change the player's "SpeedMult" Actor Value. When this Actor Value is changed, an event that causes it to be recalculated must take place before the effect is noticed. If I remember correctly, these events are:

- Changing either of the following Actor Values - "LeftMobilityCondition"; "RightMobilityCondition"

- Toggling sneak mode

- Drawing or holstering a weapon

 

Cipscis

Link to comment
Share on other sites

Thanks for the help! That IsInInterior sounds exactly like what I needed.

 

However, I'm having trouble getting the actor effect to activate. As a test, I removed the interior condition from the condition list, and changed the effect to +2 Strength (just to test and see if it was working, as stat changes are quick to check.)

 

I can't seem to get the actor effect to 'activate.' I've put a check into PC Start and checked script effect always applies, but I can't get it to actually do anything. I did double check to make sure I'd checked the .esp in the mod manager.

 

I'm probably overlooking something simple. Thanks again.

 

 

This is in Game Effects ->Actor Effect ->Actor Effect. Here's a screenshot of the way I have it set up:

http://www.pucemoose.com/pics/newtest1.jpg

Link to comment
Share on other sites

"PC Start Effect" was used in Oblivion to ensure that the player can cast the spell from the beginning of the game. As far as I know, it has no effect in Fallout 3. Instead, you'll want to use some other method of ensuring that this effect is applied to the player.

 

In Fallout3.esm, one Actor Effect (PlayerConcussed, with the condition "PerceptionCondition == 0") is always applied to the player. This is achieved by using a Quest Script which runs the following lines of code in a GameMode block:

	If Player.HasMagicEffect Concussion == 0
	Player.CastImmediateOnSelf PlayerConcussed
EndIf

While you could use this method in a Quest Script of your own (ensuring that the Quest is marked as "Start Game Enabled" and has a very low Script Processing Delay so that it runs every frame), but this would make the player much slower than all other Actors while indoors. The method that I would recommend you use instead would be to use a scripted token (an unplayable, therefore invisible, piece of armour) to apply the effect.

 

The script on the token could be fairly simple:

ref rContainer

Begin OnAdd

set rContainer to GetContainer

End

Begin GameMode

if rContainer.HasMagicEffect NSFN == 0
	rContainer.CastImmediateOnSelf NSFN
endif

End

The hard part of this method is adding the token to all nearby Actors. To do this, you'll want to use a scripted explosion which is placed at the player's location regularly by calling PlaceAtMe from a Quest Script. Here is a good how-to about this by Reneer - Adding tokens with a scripted explosion

 

Good luck!

 

Cipscis

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...