Jump to content

Script or console command to set staff-attack-speed on game start-up


Spartacus2211

Recommended Posts

Dear community!

I want to run a script/console command on every game-start-up, which sets the staff-attack-speed for all staffs to a fixed value. I haven't tried myself yet, which number is ideal, but I guess something between 1.2 and 2.0.

Does anyone know, how such a script/console command would have to look like?
Could you please post it here and explain, how and where to put it, or link to a page, where this has been already done?

Thank you in advance!

edit:
Actually this must be really easy for Wrye Bash to add this option, since it already has the option to reweigh all staffs. Attack-speed is just another plain number of these items, that can be changed that way. I will suggest them as well.

----- SOLVED ------

 

1. This feature became part of Wrye Bashs Bashed Patch Tweaks since the nightly build 311.202301110833.
(You can download WIP builds of Wrye Bash here at the end of the second posting.)

 

2. qertyasdfgh posted a script below.

Edited by Spartacus2211
Link to comment
Share on other sites

Wow I didn't expect such a fast reaction there! The next nightly build of Wrye Bash will contain this feature!

https://www.afkmods.com/index.php?/topic/4966-wrye-bash-all-games/&do=findComment&comment=187266

 

Still I would enjoy to use a console command for this as well, so testing of various staffspeeds can be done faster PLUS once I will find my preferred staffattackspeed I will have to edit the Staffs from MOO by hand, which is a work of 5min, but still I will have to do it in xEdit by hand, since MOO should be placed below the BP to fully work, according to the popup-message in-game.

Edited by Spartacus2211
Link to comment
Share on other sites

This feature is now part of Wrye Bash.

Quote from Infernio:

"The new nightly build (311.202301110833) has the tweaks. There are two (Attack Speed: Staves (Maximum) and Attack Speed: Staves (Minimum)), though you probably only need the maximum one. They're available for Oblivion and Skyrim."

https://www.afkmods.com/index.php?/topic/4966-wrye-bash-all-games/&do=findComment&comment=187275

Link to comment
Share on other sites

Oh yes, in OBSE there is a nice trio of Get/Mod/SetWeaponSpeed commands, but as they're making setting in base object and in vanilla Oblivion are about 220 staffs defined, making such script would quite tiresome to say at least.

 

Another approach would be to use some kind of event for example OnActorEquip/OnActorUnequip event would be ideal. And using GetObjectType and GetWeaponType functions (OBSE again) should do the trick to identify if this is a staff to be equipped. Problem is that events in OBSE (at least in my ancient version 21.4) doesn't stack, so there will be stealing this event between mods if such mod is using this event too (the last in order most propably win).

 

And with your nice attempt for sarcasm, I'm questioning myself if I should even bother. Besides your problem seems solved anyway.

Link to comment
Share on other sites

Thanks for your reply. Where do you see sarcasm? All I wrote was serious. It took me only 5min (approximately) to edit the staffweights of MOO by hand some days ago, if that's what you mean. Maybe it was 7min, I didn*t watch the clock. In xEdit it's just scrolling and typing in every column at the same place the same number.

For the New Vegas Mod AWOP I set for most of NPCs (~all except Tech Raiders) the respawn-flag in xEdit in about 15min. Back then I watched the clock, so I certainly know.

 

If you mean the pic I posted on AFKMods, I am really surprised how fast it was implemented. Since everyone is working on this modding stuff for free and I have no idea of programming, for me this is a great and very appreciated service.

Edited by Spartacus2211
Link to comment
Share on other sites

Scripting is quite diffrent from simple editing. As I showed you knowing the exact command is often not enough, and such script must be written, debugged etc. And scripting for Oblivion is often full of unpleasant suprises, so you can spend long time even with such simple tasks as this.

 

I didn't want to start a fight or something. Maybe it was because I'm too often meeting people too accustomed to things to be delivered on the silver plate right under their noses, I reacted this way. I'm sorry and goddbye for now.

Link to comment
Share on other sites

There is actually an easy way to script this:

scn StaffSpeedScript

array_var iter
ref weapon

Begin GameMode
	if GetGameRestarted
		foreach iter <- GetLoadedTypeArray 33	;Weapons
			let weapon := iter->value
			if GetWeaponType weapon == 4	;Staff
				SetWeaponSpeed 1.0 weapon
			endif
		loop
	endif
End

Script requires xOBSE 22.6+ for GetLoadedTypeArray command which returns all records of a given type, be it from base game or any loaded mod.

Obviously, you'll need to pick your own value for SetWeaponSpeed command

Link to comment
Share on other sites

  • Recently Browsing   0 members

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