Preventing a Non-Beast Race from wearing Boots?

Post » Fri May 27, 2011 5:55 pm

Is it possible to prevent a humanoid race from wearing boots? Like the Beast-race limitations, expect that I want the race to still be able to wear helmets. I'm working on some personal edits to Westly's Halfling mod (Again, personal only), which is why I'm asking.
User avatar
Cccurly
 
Posts: 3381
Joined: Mon Apr 09, 2007 8:18 pm

Post » Fri May 27, 2011 8:20 pm

I'm sure there's a way to auto-equip a pair of "shoes" using scripting. But I'm not to familiar with scripting to offer much help.
User avatar
butterfly
 
Posts: 3467
Joined: Wed Aug 16, 2006 8:20 pm

Post » Fri May 27, 2011 8:14 am

Using Tribunal functions, you could stop the player from equipping boots if he's of a certain race.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Fri May 27, 2011 1:12 pm

^
That sounds about right. How do I go upon doing that? Sorry, but I'm a big newb when it comes to scripting.
User avatar
Joe Bonney
 
Posts: 3466
Joined: Tue Jul 17, 2007 12:00 pm

Post » Fri May 27, 2011 11:55 pm

Anyone? Sorry about bumping.
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Fri May 27, 2011 7:24 pm

It's probably http://www.uesp.net/wiki/Tes3Mod:GetArmorType he was suggesting. It probably doesn't work for clothing-type shoes, as it has only 1 return type for unarmored.

if ( player-> getarmortype, 5 >= 0 ) ;player is wearing armor boots
;insert code here to temporarily add shoes, force equip, then delete shoes

An altenative might be to have a dummy item script-equipped to the foot slot, maybe called "hairry feet" if it's a hobbit-race you're making. You'd need code to check if it is equipped, and whether it is still in the inventory.
User avatar
Tom Flanagan
 
Posts: 3522
Joined: Sat Jul 21, 2007 1:51 am

Post » Fri May 27, 2011 12:08 pm

Thanks :) I'm awful with scripting, so I guess I'll need to read some tutorials on it.
User avatar
MARLON JOHNSON
 
Posts: 3377
Joined: Sun May 20, 2007 7:12 pm

Post » Fri May 27, 2011 3:34 pm

Pick any old shoe item.

"player"->AddItem "shoe item" 1"player"->Equip "shoe item" 1"player"->RemoveItem "shoe item" 1


Run that in an if-block or something, and it's all you need. The add and remove in a single frame limit encumbrance issues and prevent the player from removing the item (and farming shoes).
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Fri May 27, 2011 9:10 am

Alright. Do I attach this to a shoe? How do I set to to run for only one race?
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am

Post » Fri May 27, 2011 3:19 pm

I don't remember the command to check race, but I'd make it a global script. If you have Tribunal, set it as a startscript. Just use this (it's a pretty well optimized inventory-management bit I came up with a while back):

short inMenusif ( MenuMode )    Set inMenus To 1else    if ( inMenus == 1 )        ; do your handling        Set inMenus To 0    endifendif

User avatar
Nathan Barker
 
Posts: 3554
Joined: Sun Jun 10, 2007 5:55 am

Post » Fri May 27, 2011 11:11 am

Thanks! I'll update this message with the script.
EDIT: Alrighty, here's what I've written:
begin Halfing_Feetshort inMenusif ( MenuMode )    Set inMenus To 1else    if ( inMenus == 1 )        ; do your handling        Set inMenus To 0    endifendifif block"player"->AddItem "_Kro_HalflingFeet" 1"player"->Equip "_Kro_HalflingFeet" 1"player"->RemoveItem "_Kro_HalflingFeet" 1endifend Halfling_Feet


EDIT 2: Loading the script in the CS or Morrowind gives me a message saying that the script isn't compiled, and It turns up blank!
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Fri May 27, 2011 11:23 pm

You proballly want your 'halflingfeet' if statment inside the invetory statement.(replacing the ':do your handling' comment)
IIRC playerrace is the variable but you had to have edited the start script to include your new race.
A more elegant solution if you are also having NPCs of this race is to just attach the script to an item and give it to all characters of that race.
User avatar
George PUluse
 
Posts: 3486
Joined: Fri Sep 28, 2007 11:20 pm


Return to III - Morrowind