.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   Scenarios, Maps and Mods (http://forum.shrapnelgames.com/forumdisplay.php?f=146)
-   -   Curious problem with #newweapon (http://forum.shrapnelgames.com/showthread.php?t=41900)

Panpiper January 9th, 2009 05:50 PM

Curious problem with #newweapon
 
I need to create a magic spear that is one handed. This should not be a problem, or so I would have thought.

I have a commander that was carrying an enchanted spear and shield, this being thematic for the commander. However if a player were to give the commander say, a magic shield, the spear would disappear. This because the spear is defined in game as a two handed weapon. So I need to define a new weapon that is 'called' a spear, that is actually a single hand weapon, and to equip the commander with that new weapon. So I created:

#newweapon 733
#name "Spear of Slaanesh"
#dmg 6
#att 1
#def 1
#len 4
#magic
#rcost 0
#end

Now in game when playing, the commander is in fact carrying a weapon called in game; "Spear of Slaanesh" with the listed stats. However, if I give that commander a magic shield, just like before, the spear is no longer equipped. !!!

The above described weapon does not 'copystats' from a spear, it is ostensibly as far as I know a completely unique new weapon. Why on earth is the game treating it still as a two handed weapon? Does the length of it default to a two handed weapon? Is there a command I can use to force it into a one handed weapon?

Gandalf Parker January 9th, 2009 06:15 PM

Re: Curious problem with #newweapon
 
the "Enchanted Spear" (id 9) is length 4 and one-handed.
Try copying the stats from it

Sombre January 9th, 2009 08:28 PM

Re: Curious problem with #newweapon
 
You can't copystats weapons.

I'm not sure what the problem is here. I believe I've seen a modded weapon stay when a shield item was equipped.

Oh, hang on, I think I have the answer. Try removing the monster's native shield from your code, then give him the item in game and see what happens.

QXel January 12th, 2009 10:47 AM

Re: Curious problem with #newweapon
 
Hello everybody,

just a passing-by comment for what I had saw in my 3-years playing : for a commander which is by default equiped with two single-handed weapons (say MA Pythium assassin) with only ONE single-handed weapon, he loses the other one-handed basic weapon, and I saw this kind of thing with commander with a sword & a shield by default : give him a sword, or a shield, and IIRC, he loses the other default single-handed equipement.

So, maybe the problem is NOT with the mod,n but with the game (bug threaded?).

Tifone January 12th, 2009 03:06 PM

Re: Curious problem with #newweapon
 
I think it's quite a common problem. Try giving a 1-handed weapon to a 4-armed guy and he loses everything else too :(

Aezeal January 12th, 2009 03:50 PM

Re: Curious problem with #newweapon
 
Well I just gave a new trooper in my Shiar mod a new weapon and gvae that command 2x and he kept having it once... another trooper had that weapon and another one and didn't get the 2nd weapon either.

Panpiper January 12th, 2009 10:59 PM

Re: Curious problem with #newweapon
 
I was able to skirt the problem by using a weapon's number code rather than the name string when specifying the weapon. I don't know why that would make a difference, but it did. I suppose there might be more than one weapon defined that uses the same text string but only one reference number per weapon, so the system could get confused with the use of the name string and wind up using a weapon that has different stats than one would expect. Resulting in of course, sometimes strange behavior.

Aezeal January 13th, 2009 06:15 AM

Re: Curious problem with #newweapon
 
ow yeah that is known, but when placing weapons on units I always use the number already.


All times are GMT -4. The time now is 12:04 AM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2024, Shrapnel Games, Inc. - All Rights Reserved.