two handed switching script.

Post » Tue Mar 30, 2010 6:04 am

I was wondering where i could get a script to switch a sword from one handed to two handed. I know there are di-katanas and claymores but i'd like to make/modify some sword mods that let me choose between more power or using a shield :D
User avatar
Tiffany Holmes
 
Posts: 3351
Joined: Sun Sep 10, 2006 2:28 am

Post » Mon Mar 29, 2010 11:59 pm

I was wondering where i could get a script to switch a sword from one handed to two handed. I know there are di-katanas and claymores but i'd like to make/modify some sword mods that let me choose between more power or using a shield :D


That's an excellent idea but there are bounds to waht you can do. First, you'd have to create a one-handed version and a two-handed version for each sword in the CS and then attach the scripts to each version of every sword. If you wanted to use a key to switch them then you'd have to use MGE. Would be a good first WiP for soemone who wanted to get into modding in general or MGE modding specifically.
User avatar
Dorian Cozens
 
Posts: 3398
Joined: Sat May 26, 2007 9:47 am

Post » Tue Mar 30, 2010 2:19 am

That's an excellent idea but there are bounds to waht you can do. First, you'd have to create a one-handed version and a two-handed version for each sword in the CS and then attach the scripts to each version of every sword. If you wanted to use a key to switch them then you'd have to use MGE. Would be a good first WiP for soemone who wanted to get into modding in general or MGE modding specifically.


Ah. I wasn't even thinking MGE (or for that matter MWSE) lol. I've been looking at The Akatosh Sword by Spouch and noticed the needing two different weapons with the script. I recall seeing a weapon with a script attached that used the ctrl key to switch modes but i can't find it now. I was only going for personal use but now that the idea is out there it might be cool to try it and see what the community thinks :D

also as an aside, I've never done anything with scripting but im sure transferring and editing the script a script for each weapon and making the new ref for the 2 handed sword shouldn't be too hard. however I was wondering whether or not a script would be applied to a weapon if the weapon is changed in a mod after the scrip adding one in the load order?
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Tue Mar 30, 2010 6:19 am

The most straight-forward solution is two weapons, one two-handed and the other one-handed, with scripts that enables one that in turn disables the other. I wrote a pair of scripts years ago for someone who was creating such a mod. A claymore could be wielded one-handed if the player's strength was great enough. Later evolutions forced the player to fight two-handed if his/her fatigue drops too low. I cannot remember for whom I created the scripts. Perhaps you could search the usual places to download the mod if it was released publicly. It is possible that I have a copy of the mod someplace, but I have not played Morrowind in six years so if it is wanted it might take me a while to locate. I could find the scripts sooner if you are interested.
User avatar
Jessica White
 
Posts: 3419
Joined: Sun Aug 20, 2006 5:03 am

Post » Tue Mar 30, 2010 1:32 pm

The most straight-forward solution is two weapons, one two-handed and the other one-handed, with scripts that enables one that in turn disables the other. I wrote a pair of scripts years ago for someone who was creating such a mod. A claymore could be wielded one-handed if the player's strength was great enough. Later evolutions forced the player to fight two-handed if his/her fatigue drops too low. I cannot remember for whom I created the scripts. Perhaps you could search the usual places to download the mod if it was released publicly. It is possible that I have a copy of the mod someplace, but I have not played Morrowind in six years so if it is wanted it might take me a while to locate. I could find the scripts sooner if you are interested.



Actually I was thinking about adding a Strength/longblade skill requirement to weild claymores/dai-katans one handed and a longblade req to wield one handed swords, two handed. I figured in order to fully utilize the benefits of wielding a sword with two hands you'd need a certain amount of skill to do it. I wouldn't know how to go about adding that kind of requirement to the script though. If you wouldn't mind helping with a bit of the scripting I'd be very grateful. I just finished finals so I'll have to find a way to entertain myself lol.

Actually i just tested out the script from the Akatosh sword on Chrysamere and it worked well. I went on a killing spree in vivec to test it out and it was pretty cool chopping ordinators up with the one handed version. However while doing so i was thinking that it would have been great to have been able to actively switch between one handed and two handed during combat, depending on the situation,
User avatar
Emily Shackleton
 
Posts: 3535
Joined: Sun Feb 11, 2007 12:36 am

Post » Tue Mar 30, 2010 12:31 am

I did have a copy of the mod. It is Complete Claymore by IllTempered (I knew I helped him with his one-handed spear mod, but I didn't remember this was his project as well). It is not at Planet Elder Scrolls, but you could check other sites (perhaps Morrowind Modding History or Yacoby's mod search would turn it up). I can make it available for you to download if you want to examine it and cannot find it anywhere else.

Illtempered's mod created a unique weapon (two actually working together as one). If you are proposing a method for any existing weapon (unique weapons such as artifacts as well) to have this dual role you would be better served by a script extender. I do not have experience with such third-party utilities so I am of limited utility. Otherwise you will have to replace every long blade in the game with a new reference - that would be very tedious and invite all sorts of conflicts. If you are thinking about creating unique weapons that have the capability of being wielded one- or two-handed then I can assist you. I would need to know the requirements (strength, weapon skill, etc.) for using the weapons in a manner different than originally intended.

By the way, you may get more action (particularly script-extender expertise) if you posted in the construction set forum. I seldom view such threads in this forum.
User avatar
Marie
 
Posts: 3405
Joined: Thu Jun 29, 2006 12:05 am

Post » Tue Mar 30, 2010 2:11 am

One more thing - in order to get the wear and tear values on each version to match I think you'll need MWSE. And before you modify the values you'll need to unequip the weapons first. I tried for ages to modify the wear and tear on weapons that were held by the player but got nothing but CTDs. Good luck :) this sounds like a good mod.

Oh and I agree, you should post this in the CS forum. Scripters will see it there.
User avatar
N Only WhiTe girl
 
Posts: 3353
Joined: Mon Oct 30, 2006 2:30 pm

Post » Tue Mar 30, 2010 11:46 am

I did have a copy of the mod. It is Complete Claymore by IllTempered (I knew I helped him with his one-handed spear mod, but I didn't remember this was his project as well). It is not at Planet Elder Scrolls, but you could check other sites (perhaps Morrowind Modding History or Yacoby's mod search would turn it up). I can make it available for you to download if you want to examine it and cannot find it anywhere else.

Illtempered's mod created a unique weapon (two actually working together as one). If you are proposing a method for any existing weapon (unique weapons such as artifacts as well) to have this dual role you would be better served by a script extender. I do not have experience with such third-party utilities so I am of limited utility. Otherwise you will have to replace every long blade in the game with a new reference - that would be very tedious and invite all sorts of conflicts. If you are thinking about creating unique weapons that have the capability of being wielded one- or two-handed then I can assist you. I would need to know the requirements (strength, weapon skill, etc.) for using the weapons in a manner different than originally intended.

By the way, you may get more action (particularly script-extender expertise) if you posted in the construction set forum. I seldom view such threads in this forum.



Thanks. i managed to find it and i took a look a the scripts however most of it was beyond my understanding. Too bad there's not a rosetta stone for scripting lol. As far needing skills for the weapons, I would think that creating a script for the required skills which would only be strength and long blade would be sufficient for now. So long as you let me know in the script which variables I can modify i should be able to figure it out for each weapon/skill. Since it's only just and idea i only want to get the base mod worked out for now. later on if the project takes off maybe something like Illtempered's claymore, on a larger scale, might be possible.
User avatar
Elina
 
Posts: 3411
Joined: Wed Jun 21, 2006 10:09 pm

Post » Tue Mar 30, 2010 2:09 pm

Yes, I gathered that you wanted to condition it on strength and weapon skill. I need you to be very specific. At what levels of each do you require of the player to wield a two-handed weapon one-handed, and a one-handed weapon two-handed?

You might consider penalizing the player for using a weapon like a claymore one-handed. Something along the lines of making the maximum damage less and the weapon speed slower.

As I look over my old scripts I can see this is not an approach that will work efficiently for every weapon in the game. Besides the cumbersome code and copious conflicts (don't you just love alliteration?) I employ a global variable to keep track of what version is currently active. Perhaps I can come up with a work-around after I re-familiarize myself with the scripts. However I think you may have to turn to a script extender to do this on a grand scale.
User avatar
Ridhwan Hemsome
 
Posts: 3501
Joined: Sun May 06, 2007 2:13 pm

Post » Tue Mar 30, 2010 2:35 am

Yes, I gathered that you wanted to condition it on strength and weapon skill. I need you to be very specific. At what levels of each do you require of the player to wield a two-handed weapon one-handed, and a one-handed weapon two-handed?

You might consider penalizing the player for using a weapon like a claymore one-handed. Something along the lines of making the maximum damage less and the weapon speed slower.

As I look over my old scripts I can see this is not an approach that will work efficiently for every weapon in the game. Besides the cumbersome code and copious conflicts (don't you just love alliteration?) I employ a global variable to keep track of what version is currently active. Perhaps I can come up with a work-around after I re-familiarize myself with the scripts. However I think you may have to turn to a script extender to do this on a grand scale.


Ah. sorry about that. Well I wanted them to be different levels for different weapon types, ie. iron/steel/ebony etc. would all have different strength/stam reqs. probably start at around 40 long blade and go up 5/10 points or so per tier (depending how well all the weapons would fit into that scale before 90), same with strength when wielding 2h's as 1h's. Unique's would be at 90 skill i would think. So far i just finished actually making a mod which has two start scripts that check from the different weapons and whether or not sneak is activated to change them to their counterparts. It's done as far as that part goes. they still don't have any requirements although i do have a test mod which makes the chrysamere require 60 str/longsword at once in order to use it in 1h mode. It worked out well so i went from there with the switching script. if you dont mind, i've uploaded the mod so that you can take a look at the script. As far as globals i really don't know a thing about them or how to even use them. I'm about to put some swords in the world to test whether it works individually like i think (and hope) it will.

http://sharebee.com/9cc6d95b

Okay so after some testing the script didn't work like i thought it would... i have no clue how to fix it either
User avatar
JR Cash
 
Posts: 3441
Joined: Tue Oct 02, 2007 12:59 pm

Post » Tue Mar 30, 2010 11:56 am

also, i thought i left the script for the level reqs on the chrysamere, however i guess i took them off in that version. here is the script, it's taken from the Armor Requirements mod. Currently it is possible to switch to 1h version, however if the character does not have the required skills they cannot equip it. For now it's got the basic function that I was looking for, as far as small scale goes. However It'd be great if it checked for the requirements before it switched so that it could decide on whether or not the character is able to switch to 1h/2h mode.

Begin claymore_chysamere_unique_1h

Short DoOnce
short OnPCDrop
short OnPCequip
short drops
short PCSkipEquip

if ( OnPCDrop )
if ( drops == 0 )
set drops to 1
endif
endif

if ( drops == 1 )
disable
PlaceAtPC "claymore_chrysamere_unique", 1, 1, 1, 1
set drops to 2
endif

if ( Player->Getlongblade < 60 )
set PCSkipEquip to 1
else
set PCSkipEquip to 0
endif

if ( Player->Getstrength < 60 )
set PCSkipEquip to 1
else
set PCSkipEquip to 0

endif

if ( OnPCEquip )
set OnPCEquip to 0
if ( PCSkipEquip )
MessageBox "You do not have the skill to use this."
endif
endif

end

User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Tue Mar 30, 2010 2:08 am

One more thing - in order to get the wear and tear values on each version to match I think you'll need MWSE. And before you modify the values you'll need to unequip the weapons first. I tried for ages to modify the wear and tear on weapons that were held by the player but got nothing but CTDs. Good luck :) this sounds like a good mod.

Oh and I agree, you should post this in the CS forum. Scripters will see it there.


Unfortunately you cannot edit the condition of an item that is in an inventory. It has to be a world reference to be able to do such a thing.
User avatar
Lovingly
 
Posts: 3414
Joined: Fri Sep 15, 2006 6:36 am

Post » Tue Mar 30, 2010 8:02 am

so i think i figured out a way of making every sword work with the script, however it would require many start scripts. would that be possible or would it slow down the game much?
User avatar
Julia Schwalbe
 
Posts: 3557
Joined: Wed Apr 11, 2007 3:02 pm

Post » Tue Mar 30, 2010 6:14 am

You can't run it all in a single script, or just a few large ones? The general consensus is that a large more complex script is far more efficient than many small scripts.
User avatar
Elisha KIng
 
Posts: 3285
Joined: Sat Aug 18, 2007 12:18 am

Post » Tue Mar 30, 2010 2:57 pm

You can't run it all in a single script, or just a few large ones? The general consensus is that a large more complex script is far more efficient than many small scripts.



the thing is, I'm not sure how to get all the scripts to work together. I tried to put them all in a larger script, however when i went to switch the weapon it immediate created many copies each second.
User avatar
matt white
 
Posts: 3444
Joined: Fri Jul 27, 2007 2:43 pm


Return to III - Morrowind