Jump to content

Making equipped weapons have no carry weight


Recommended Posts

Alright, so I am able to add a new property through the menu, and I select âObject Modâ from the drop down. I put âNoWeightModâ as the name in place of âNew Propertyâ and then leave everything else blank. The property is added, then I single click on the property and select the object mod I made and then save everything and test but the effects arenât appearing in game.
Link to comment
Share on other sites

Here, I threw this together, because I suck at giving written instructions (I've always learned better visually, myself).

 

1. Add Script

MbbKL3l.png

 

2. Select [New Script], name it "lightweapons" and uncheck all the check boxes.

I5auMYl.png

Ort3geT.png

 

3. Paste in the code from my other post, click File->Save and then close the window.

roubmKw.png

 

4. Click the Properties button and add your weightless mod.

omQAIBG.png

 

That should do it.

 

~GKX

Link to comment
Share on other sites

I see the issue then, for me there are no properties when that menu pops up, I only have the option to create a *new* property. For some reason the creation kit isnât detecting the fact âNoWeightModâ should be a property.

 

It could be because I didnât make sure everything was unchecked. Iâll try that tonight.

Link to comment
Share on other sites

Alright, so it works, at least in the creation of the script.

 

Using it in game, when I equip the weapon it still has its weight the same but the equip and unequip sound plays at a high rate of fire, making it sound like a hundred typewriters typing at once lol. If I drop the gun it hovers in the air for a second before droping while the cursor text of the weapon flickers. I'm guessing the script is somehow looping something.

Link to comment
Share on other sites

If the script is looping unnecessarily, then there's a small trick you could do besides addressing the actual cause. You could introduce a variable, which I always name as "DoOnce" or "RunOnce," and set it to 0 (Type is Integer). Then put the looping code in an If statement (If DoOnce = 0). Right before the If statement ends, set DoOnce to 1 so the If statement doesn't get executed again.

 

This worked in Fallout: New Vegas, but scripting in New Vegas is much different from scripting in Fallout 4 Papyrus.

 

This Creation Kit Wiki page may help you in doing this.

Link to comment
Share on other sites

So something like this?

Scriptname noweightweapons extends ObjectReference

ObjectMod Property NoWeightMod Auto

Int Property DoOnce Auto

If DoOnce = 

Event OnEquipped(Actor akOwner)

	AttachMod(NoWeightMod)

EndEvent

Event OnUnequipped(Actor akOwner)

	RemoveMod(NoWeightMod)

EndEvent

Set DoOnce to 1
Link to comment
Share on other sites

More like..

Scriptname noweightweapons extends ObjectReference

ObjectMod Property NoWeightMod Auto

Int Property DoOnce Auto

Event OnEquipped(Actor akOwner)

        if DoOnce = 0
	    AttachMod(NoWeightMod)
            DoOnce = 1
        endif

EndEvent

Event OnUnequipped(Actor akOwner)

	RemoveMod(NoWeightMod)

EndEvent

You want to surround the code that loops with the if statement and nothing more. Maybe you can surround Events, but I don't remember. You also never ended the if statement. Personally, I wouldn't use a Property for that, I would use a variable since it's a local thing.. You could declare one by typing "int DoOnce = 0", which also sets it to 0 like it should be

Edited by Shadyfan4500
Link to comment
Share on other sites

Trying that script generates this error:

 

Compiling "Testscript11"...
C:\Users\TJ\AppData\Local\Temp\PapyrusTemp\Testscript11.psc(9,18): no viable alternative at input '='
No output generated for Testscript11, compilation failed.
Link to comment
Share on other sites

that might be because you didn't create a variable? If you copied the response I made then that means that you kept the Property, which I recommended you replace with "int DoOnce = 0." I could absolutely be wrong in saying that that might fix it, but that's where I'd begin.

Link to comment
Share on other sites

Sorry, should have included what I did.

Scriptname noweightweapons extends ObjectReference

ObjectMod Property NoWeightMod Auto

int DoOnce = 0

Event OnEquipped(Actor akOwner)

        if DoOnce = 0
	    AttachMod(NoWeightMod)
            DoOnce = 1
        endif

EndEvent

Event OnUnequipped(Actor akOwner)

	RemoveMod(NoWeightMod)

EndEvent
Link to comment
Share on other sites

  • Recently Browsing   0 members

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