Checking if a Weapon is Unique

Post » Tue May 17, 2011 1:37 pm

Is there a way to check if a weapon is unique? So far, I have manually made a list of all unique weapons and using IsWeaponInList to check if its there. Thing is, this way is not very efficient. If a mod adds a unique weapon (i.e. WMK adding the modded unique weapons), It doesn't work as it should.
User avatar
ILy- Forver
 
Posts: 3459
Joined: Sun Feb 04, 2007 3:18 am

Post » Tue May 17, 2011 10:21 am

I do not believe so. There is nothing unique about unique weapons, except for the number of references used by the game. A "unique" weapon could still be used many times anyway. What you are really asking is how to check for the number of references for a specific form, and I don't think you can do that via script.
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Tue May 17, 2011 9:23 am

In theory, a weapon should be unique if it's not in its own repair list (found by using GetRepairList thing then seeing if ListGetFormIndex list thing is greater than -1). For example, A3-21's Plasma Rifle should have the Plasma Rifle repair list as its list, but shouldn't be on it so you can't repair regular plasma rifles with it and destroy it. However, I think a few vanilla uniques are usable to repair so that may not be totally reliable.
User avatar
maddison
 
Posts: 3498
Joined: Sat Mar 10, 2007 9:22 pm

Post » Tue May 17, 2011 6:03 am

That pretty much svcks... Thanks for the help, anyways...
User avatar
Andrea Pratt
 
Posts: 3396
Joined: Mon Jul 31, 2006 4:49 am

Post » Tue May 17, 2011 3:59 am

You could just make a FormList of the unique weapons, then check your reference against that. Of course this will only be reliable for weapons you specifically put in the list. Should be fine for vanilla uniques, but for DLC or mod-added uniques you'd need additional plugins and probably a user merge.

TalkieToaster's suggestion is good though. You may wanna check how consistent that repair list rule is - it may be good enough for your purposes.
User avatar
Kristian Perez
 
Posts: 3365
Joined: Thu Aug 23, 2007 3:03 am

Post » Tue May 17, 2011 3:09 pm

Couldn't you just make a form list of all the common weapons?
User avatar
Emmi Coolahan
 
Posts: 3335
Joined: Wed Jan 24, 2007 9:14 pm

Post » Tue May 17, 2011 9:54 am

Yes, but I believe the OP was looking for a way that would work when user made mods are added to the equation. A pre-made form list won't work in these situations.
User avatar
ChloƩ
 
Posts: 3351
Joined: Sun Apr 08, 2007 8:15 am

Post » Tue May 17, 2011 12:11 am

Couldn't you just make a form list of all the common weapons?

That's essentially what I just said, but in reverse, and so would be more work...

EDIT:
Oops, I guess I missed in the OP that he already did this, and that he was looking for a more universal solution - sorry...
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Tue May 17, 2011 6:17 am

Thanks for th replies. The point of my mod is that it doesn't need form lists to work, thus enabling it to work with any mod-added weapon. It doesn't really matter though, so thanks.
User avatar
Yama Pi
 
Posts: 3384
Joined: Wed Apr 18, 2007 3:51 am

Post » Tue May 17, 2011 6:57 am

Thanks for th replies. The point of my mod is that it doesn't need form lists to work, thus enabling it to work with any mod-added weapon. It doesn't really matter though, so thanks.
...that's why I specifically suggested a fully compatible solution that will work with any and all mod-added weapons?
User avatar
sw1ss
 
Posts: 3461
Joined: Wed Nov 28, 2007 8:02 pm

Post » Tue May 17, 2011 5:43 am

Even if some of the vanilla unique weapons are included in repair lists, I wouldn't expect any modded unique weapons to be able to be used to repair other weapons. If you first check against a form list of vanilla unique weapons, then if the weapon is not on the list use TheTalkieToaster's method to double-check, that should work fine.

Cipscis
User avatar
sophie
 
Posts: 3482
Joined: Fri Apr 20, 2007 7:31 pm

Post » Tue May 17, 2011 2:37 pm

I meant to say...
You put the vanilla common weapons in a formlist
then if isinweaponlist = 0
then weapon is unique

This way Mod-added weapons won't be in that list, and you will really be able to tell if it is unique

this is the best way I see it because you will only need to add common weapons from Vanilla, DLC, overhauls

if you were to do it the other way around you would have to add the unique weapons from Vanilla, DLC, overhaul, plus every unique weapon added by other mods.
User avatar
Mel E
 
Posts: 3354
Joined: Mon Apr 09, 2007 11:23 pm

Post » Tue May 17, 2011 3:58 am

That would cause all non-unique weapons added by mods to be treated as unique weapons. Using form lists alone cannot account for any items added by mods.

Cipscis
User avatar
Lynne Hinton
 
Posts: 3388
Joined: Wed Nov 15, 2006 4:24 am


Return to Fallout 3