Page 1 of 1

attachment feature / new model with clothes

Posted: August 29th, 2009, 8:32 pm
by offtools
hi there,

this works only with the actual svn version and is experimental.
(textures are dummy textures).
its not really integrated into game modes (pickup stuff and wear it ...)
but useable in a modified way into certain game modes ...
screenshot_189329.png
screenshot_201088.png
screenshot_270654.png
[ 1. clean model 2. hair attachment 3. jacket and trouser ]


short docu:
--------------------------------------------------------------------------------
playermodel 7;
playerattach (getattachnum Hip) uh/attach/hair1 0
playerattach (getattachnum Head) uh/attach/trouser1 2
playerattach (getattachnum Belly) uh/attach/jacket1 2
playerdetach (getattachnum Hip)
playerdetach (getattachnum Head)
playerdetach (getattachnum Belly)
--------------------------------------------------------------------------------
getattachnum [ingame identifier] //returns tag number (see table below)
playerattach [tag number] [path to model] [animation rule] //animation rule (0=no animation, 1=everytime play idle animation, 2=run same animation as playermodel)
playerdetach [tag number] //remove attachment from player
--------------------------------------------------------------------------------


i added a new playermodel (based on Unihuman) to demonstrate the attachment feature.
it can be found in packages/models/uh/... you can also find also for this model in this folder.
the new models are not textured yet.

the feature works with all model they have following tag names are defined by now.

ingame identifier | tag name
------------------------------------------------------------
"Head" | "tag_head"
"Neck" | "tag_neck"
"LeftShoulder" | "tag_lshoulder"
"RightShoulder" | "tag_rshoulder"
"LeftArm" | "tag_larm"
"RightArm" | "tag_rarm"
"LeftForearm" | "tag_lforearm"
"RightForearm" | "tag_rforearm"
"LeftHand" | "tag_lhand"
"RightHand" | "tag_rhand"
"Belly" | "tag_belly"
"Hip" | "tag_hip"
"LeftThigh" | "tag_lthigh"
"RightThigh" | "tag_rthigh"
"LeftShin" | "tag_lshin"
"RightShin" | "tag_rshin"
"LeftFoot" | "tag_lfoot"
"RightFoot" | "tag_rfoot"

Re: attachment feature / new model with clothes

Posted: September 22nd, 2009, 9:52 am
by edtlov
Hey Everyone, I have a question. Are you putting this script in the CFG file and can I make a widget to let the player select the changes in outfits ?
Thanks
Ed

Re: attachment feature / new model with clothes

Posted: September 23rd, 2009, 2:44 pm
by offtools
hi,

it currently works only with the test playermodel [playermodel 7], which has the appropriate tags defined.
for sure you can make a widget. i would be happy :)
it should be run checks against playermodels and proper attachments. not all attachments will fit to all models etc.
if its necessary i can add a command to query attached items on a playermodel, but you can also cover that by a script, as you wish...

offtools.

Re: attachment feature / new model with clothes

Posted: October 13th, 2009, 10:05 am
by daniel_san
i know this post is quite old, but thanks for setting this up offtools. Is there anyway you could send me the .blend file that you exported from? Id like get some animations going.
I finally got around to skinning the head.
heres some screens.
waterpistol11.jpg
waterpistol12.jpg
waterpistol13.jpg
also i would like to give a thanks to ahab for originally finding unihuman.