IsWeaponSkillType syntax question

Post » Fri May 27, 2011 5:48 pm

Anyone know the proper usage for this? Nothing listed under it's entry on the wiki.

Trying to make so code that will detect if the player has a melee weapon or hth equipped. Or is there another method that might work better?
User avatar
Madison Poo
 
Posts: 3414
Joined: Wed Oct 24, 2007 9:09 pm

Post » Fri May 27, 2011 1:17 pm

Anyone know the proper usage for this? Nothing listed under it's entry on the wiki.

Trying to make so code that will detect if the player has a melee weapon or hth equipped. Or is there another method that might work better?


Use http://geck.gamesas.com/index.php/GetWeaponAnimType instead.
User avatar
Logan Greenwood
 
Posts: 3416
Joined: Mon Jul 30, 2007 5:41 pm

Post » Sat May 28, 2011 12:24 am

I was looking at that one, are the returns listed on the wiki current for FNV as well?
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Fri May 27, 2011 3:21 pm

IsWeaponSkillType takes one parameter, an Actor Value.

Actor Values are the same parameter type as is taken by the ModActorValue (modav) command. To give you an idea of how it might work. Here is an example of that command:

player.modav luck, -10

"luck" is the Actor Value.

Here are possible Actor Values you can use:

Spoiler

"Aggression"
"Assistance"
"Confidence"
"Energy"
"Responsibility"
"Mood"
"Strength"
"Perception"
"Endurance"
"Charisma"
"Intelligence"
"Agility"
"Luck"
"ActionPoints"
"CarryWeight"
"CritChance"
"HealRate"
"Health"
"MeleeDamage"
"DamageResist"
"PoisonResist"
"RadResist"
"FireResist"
"ElectricResist"
"FrostResist"
"EnergyResist"
"EmpResist"
"SpeedMult"
"Fatigue"
"PerceptionCondition"
"EnduranceCondition"
"LeftAttackCondition"
"RightAttackCondition"
"LeftMobilityCondition"
"RightMobilityCondition"
"BrainCondition"
"Karma"
"XP"
"UnarmedDamage"
"Barter"
"BigGuns"
"EnergyWeapons"
"Explosives"
"Lockpick"
"Medicine"
"MeleeWeapons"
"Repair"
"Science"
"Guns"
"Sneak"
"Speech"
"Survival"
"Unarmed"
"InventoryWeight"
"Paralysis"
"Invisibility"
"Chameleon"
"NightEye"
"Turbo"
"WaterBreathing"
"RadiationRads"
"BloodyMess"
"Variable01"
"Variable02"
"Variable03"
"Variable04"
"Variable05"
"Variable06"
"Variable07"
"Variable08"
"Variable09"
"Variable10"
"IgnoreCrippledLimbs"
"Dehydration"
"Hunger"
"SleepDeprevation"
"DamageThreshold"


Hopefully, you can find your answer by trying some things out with those values.
User avatar
RAww DInsaww
 
Posts: 3439
Joined: Sun Feb 25, 2007 5:47 pm

Post » Fri May 27, 2011 5:47 pm

'isweaponinlist' can get you the info, although in a different way.

It's a different way but also is in some respects more powerful, in that you can make your own formlist and get real, real specific with what you want. There may also be a pre-existing list you can use.

'isweaponinlist' is more efficient internally than doing similar with 'getequipped', btw.
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Fri May 27, 2011 3:29 pm

For what you're describing you want to use IsWeaponSkillType. This will look at the equipped weapon and the skill type defined for it. Valid skills:

EnergyWeapons
Explosives
Guns
MeleeWeapons
Unarmed

Unarmed *~ should ~* now also return true if the player is actually just using fists.

Something like IsWeaponInList is more useful for arbitrary groupings in form lists. E.g. the Cowboy and Laser Commander perks both simply point to form lists filled with appropriate weapons. The only drawback is that this list has to be manually updated to account for any new content you create/use.
User avatar
Jamie Lee
 
Posts: 3415
Joined: Sun Jun 17, 2007 9:15 am

Post » Fri May 27, 2011 8:23 pm

Thanks for all the input!

That drawback you pointed out is why IsWeaponSkillType seemed like the best idea. With that info the usage looks pretty straightforward. Since I'm looking for any generic "Melee"/etc weapon I'm afraid GetWeaponAnimType or checking form lists won't hold up in the long run when more player mods start coming out.

I've give it a shot later this weekend after having some Halloween fun with my son.
User avatar
Kahli St Dennis
 
Posts: 3517
Joined: Tue Jun 13, 2006 1:57 am


Return to Fallout: New Vegas