Jump to content

DOWNLOAD MODS

Are you looking for something shiny for your load order? We have many exclusive mods and resources you won't find anywhere else. Start your search now...

LEARN MODDING

Ready to try your hand at making your own mod creations? Visit the Enclave, the original ES/FO modding school, and learn the tricks of the trade from veteran modders...

JOIN THE ALLIANCE

Membership is free and registering unlocks image galleries, project hosting, live chat, unlimited downloads, & more...

Changing Item Weights


noderunner
 Share

Recommended Posts

I'm trying to set up a simple script that uses the OBSE SetWeight function to decrease the weight of all the weapons and armor in the game. I'll probably start out by cutting it down to a third (multiply original weight by 0.3), but for right now I'm having trouble just getting a single one to work. I'm trying to test out using the function by changing the weight of Renault's Akaviri Katana in the tutorial dungeon.

I've set up a quest script to run and change the weight of the weapon, but I think I'm referencing the weapon incorrectly.

Here is my code:


scriptname NRWeightScript


float fQuestDelayTime

float nuWeight


begin GameMode

	set fQuestDelayTime to 1

	if ( player.IsInCombat == 0 )

		message "Weights script executed."

		set nuWeight to 2

		CGAkaviriLongSwordRenault.SetWeight nuWeight

		return

        endif

end

The script does run (I get the "Weights script executed." output). But it doesn't actually change the weight. If I open up the console in the game, click on the sword, and type in "SetWeight 2" then it works fine. So OBSE seems to be loading properly. I'm just wondering if I need to be referencing the object some other way than using CGAkaviriLongSwordRenault? Is that the wrong approach?

Thanks. Eventually, I want to walk through all the weapons/armor in the game and decrease them, but....baby steps.

If you are wondering why I'm not editing these items directly, I'm trying to make a "More Realistic Weights" mod that is compatible with other mods which add weapons/armor to the game.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...