KawiRider Posted January 9, 2008 Share Posted January 9, 2008 Hello All, Well I decided to pick up Oblivion again after a several month hiatus, this time with modding ambitions. My modding project: mod weapons from the "Defense of the Ancients" custom map from Warcraft III into Oblivion.DotA Items page I decided to start with a simple sword mod, based on the "Yasha" sword from DotA. Following LHammond's tutorial, I successfully re-textured the Akaviri Katana to resemble the sword. However, I'm having difficulty writing the script I want to use for it. The Yasha gives the following bonuses:+16 Agility+5% Attack Speed+5% Movement Speed My script currently looks like this (based on the Scales of Pitiless Justice Script)Scriptname YashaScript short GotYasha Begin OnAdd Player if GotYasha == 0 player.ModActorValue agility 16 set GotYasha to 1 endif End Begin OnDrop Player if GotYasha == 1 player.ModActorValue agility -16 set GotYasha to 0 endif End Boosting Agility by +16 works as it should, however I'm not sure exactly how to increase movement speed or attack speed through scripting. Ideally, I would like the bonuses to apply regardless of what weapon is equipped, so long as the Yasha is in the player's inventory. For example, say the player has a longsword equipped. Upon picking up the Yasha, the longsword now receives a +5% attack speed bonus. If I equip any other weapon in the future, it will also receive this bonus so long as the Yasha is in my inventory. Likewise, the player will always have a +5% movement speed bonus so long as the Yasha is in my inventory. Any ideas? Is this even possible? Thanks,KawiRider Link to comment Share on other sites More sharing options...
Vagrant0 Posted January 9, 2008 Share Posted January 9, 2008 As with all mods based on things outside Oblivion, some things can't really be done. Attackspeed and atleast as far as percentage wise movementspeed are one of them. Additionally, stats like agility aren't exactly a 1 to 1 comparison with any other game. A 14 point increase just for picking up a weapon is fairly large. You should really be using abilities instead of direct changes to player stats too since added stats can cause issues with leveling while fortify effects don't. As far as getting something close to what you want, I would personally aim for a fortify agility 4 or 5 points, and fortify athletics 5 points. Athletics affects movement speed in a way which is based off the speed stat, so an increase would be something like a percentage increase. Attack speed simply cannot be done. Link to comment Share on other sites More sharing options...
KawiRider Posted January 9, 2008 Author Share Posted January 9, 2008 Ah, well it was worth a shot. Thank you, Vagrant, for your expertise once again. As for balance issues - I'm not too concerned with it at the moment since I'm not yet ready to start making my mods public (I'm horrible at texturing, and new to scripting) but I agree that the weapon is way overpowered. Also, good point about using fortify instead of hard-coding the value (maybe the Scales should also do this?). I didn't consider the fact that it could create leveling issues. I guess I'll just have to be satisfied with fortifying attributes and giving just the Yasha greater attack speed by hard-coding the value in the construction set. My initial approach would have been to use Begin GameMode and use ModWeaponSpeed to increase the currently equipped weapon's speed by 5%. That is, until I realized that would essentially result in the weaponspeed increasing infinitely. On a side note, placing objects in the world is quite a hassle. I drag the entity into the world at approximately where I want it, then use the x-, y-, and z-axis modifiers to place it approximately where I want it but I end up with floating items or at best awkwardly placed ones. Am I missing something? Thanks,KawiRider Link to comment Share on other sites More sharing options...
Vagrant0 Posted January 9, 2008 Share Posted January 9, 2008 The issue with modweaponspeed is not so much that. You could certainly setup conditionals to detect when a different weapon was equipped or unequipped, and apply the change only once. The issue is that modweaponspeed works on the base weapon type, not the player or the weapon the player has. This means that any other instances of that weapon held by NPCs would also be faster. Even though it would be mostly custom weapons that the player will probably be using, and -.05 speed wouldn't make too much of a difference, as you will probably be using other items which affect weapon speed, this could get bad very quickly. Not to mention, all those checks and functions when an item is equipped can occasionally cause performance issues and any effects which change a base item can be dangerous if you aren't aware of what you're doing. Just having that weapon a bit faster is probably the best way to go. Less scripting, fewer complications, no OBSE required. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.