Jump to content

Classic encumberance - cant walk, when overencumbered


SOSPL

Recommended Posts

Hello!

 

 

First of all, I have been trying to do it myself, but with little success.

 

 

Here`s the thing: all I want, is to be unable to move while beeing overencumbered. Nothing; no jumping, no running, no walking. Crouching is ok, because you may want to rest ;)

 

Now I am aware that a script is required for that, but I`m not experienced enough to do one myself.

So I ask, could anyone do such a mod for me? :)

 

Best wishes!

Link to comment
Share on other sites

Yeah I think that one is pretty do-able. You'd want a quest script, the AV is carryWeight, use getAV (player.getAV carryWeight), and test it against inventoryWeight. You'd want it greater than or equal to (>=) and have it fire off disablePlayerControls (disable movement *only*, first flag 1) and have it flip a var (say set iStuck to 1). A 2nd part of the script would be switching your movement back on, started by an else (since you only have two states, movement and no movement). Make sure it is based on the var you flipped (iStuck == 1) and (&&) inventoryWeight <= carryWeight, then have it restore your movement (disablePlayerControls 0).

 

Encumbrance bonuses from perks and items might come into play, but I think they just feed themselves directly into carryWeight, so it shouldn't affect your script.

 

Anyway, that's the basic setup as I'd tackle it, and if you dabble in scripting it's a easier one to do. If you don't think you want to put it together yourself, shout and I bet one of us can write it up for you.

Link to comment
Share on other sites

For some reason FNV doesn't have the GameSetting for setting the modifier encumbrance has on movement even though the GECK wiki documents it.

 

And yeah the script is one way, but every time I use a GameMode quest script I die a little inside.

Edited by Cdr248
Link to comment
Share on other sites

Hi!

 

First of all, thank you for such a quick response!

 

Second, devinpatterson, I`m in debt. Such a detailed answer! Can`t wait to try it out. I`m currently busy ( got here just for a second, to check if there are any answers ) but I`ll definietly work on it; tommorrow most likely.

Nothing like a bit of learning, right ? :>

 

Cdr248: I know what you mean :)

Regards!

Link to comment
Share on other sites

 

but every time I use a GameMode quest script I die a little inside.

Why does it darken your soul?

 

 

when i can't use other blocktypes on quests like onEquip so I have to have a script run every couple of seconds to detect when a player equips something.

 

No matter how minuscule the performance hit, I just hate the concept that most my scripts are running and bottling up the cpu more often then they should be.

 

The encumbrance script would be so much better if it only activated when the player's inventory changes with an onAdd block or something. But since quests don't support onAdd you just have a detection script constantly running in the background to do something on the rarest of occasions.

Link to comment
Share on other sites

No matter how minuscule the performance hit, I just hate the concept that most my scripts are running and bottling up the cpu more often then they should be.

 

The encumbrance script would be so much better if it only activated when the player's inventory changes with an onAdd block or something. But since quests don't support onAdd you just have a detection script constantly running in the background to do something on the rarest of occasions.

Ah. But it's not actually the case. When you have a block like onEquip, onAdd or what have you in an object script it's actually running *every* frame. So say you have a weapon and it explodes in a fireball when you drop it (aqua teen hunger force style) that script is running *every* frame, checking for a drop, at least with a quest script you have control over how often the script is processed. An object script on a weapon or armor doesn't run when it's not equipped but you can start and start quest scripts to your hearts content to get that same advantage.

Link to comment
Share on other sites

 

No matter how minuscule the performance hit, I just hate the concept that most my scripts are running and bottling up the cpu more often then they should be.

 

The encumbrance script would be so much better if it only activated when the player's inventory changes with an onAdd block or something. But since quests don't support onAdd you just have a detection script constantly running in the background to do something on the rarest of occasions.

Ah. But it's not actually the case. When you have a block like onEquip, onAdd or what have you in an object script it's actually running *every* frame. So say you have a weapon and it explodes in a fireball when you drop it (aqua teen hunger force style) that script is running *every* frame, checking for a drop, at least with a quest script you have control over how often the script is processed. An object script on a weapon or armor doesn't run when it's not equipped but you can start and start quest scripts to your hearts content to get that same advantage.

 

 

Huh, never knew that. I was always kind of confused why the wiki says that Gamemode runs every frame even though there's a quest delay script but now I get it. Learn something new everyday.

 

Still kind of wish those blocktypes had some extra parameters so you can run them in quest scripts, just to make writing the stuff out a bit easier.

Link to comment
Share on other sites

never knew that. I was always kind of confused why the wiki says that Gamemode runs every frame even though there's a quest delay script but now I get it. Learn something new everyday.

Yeah, every frame for obj and effect.

 

Still kind of wish those blocktypes had some extra parameters so you can run them in quest scripts, just to make writing the stuff out a bit easier.

Yeah it seems like it would be really handy, but I think it has to do with the timing. If you have something like a onEquip check running every frame, there's no way an obj script can miss it. But if you had a onEquip block check in a script, running only once a second or the default (once every 5 seconds) chances are pretty good the script is going to miss that check, since the check is only active for that one frame the quest script fires off.

 

But I do understand the desire for a simple mechanic (like the block types) in a quest script.....it would be nice.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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