You're unfortunately getting to the point where I start having to say "I don't know" - but it definitely shouldn't be showing the wrong models. I THINK the problem is with an older version of the _FOHuman.fo3d. The layer you want to be looking at is "# Right Handle Layer 1" (this corresponds to param 151 by in game code).
In different versions I have, one starts with :
(I've spoilered the three chunks of code here)
# Right Handle
Layer 1
Value 1 Attach WP_bazooka.x Link R_Handle_1 Scale 1 RotX -90 RotY -15
Value 2 Attach WP_223Autoloader.fo3d Link R_Handle_1 Scale 50
Value 3 Attach WP_223Autoloader_GunSilencer.fo3d Link R_Handle_1 Scale 50
Value 4 Attach WP_Minigun.fo3d Link R_Handle_1
Value 5 Attach WP_club.x
another starts with :
# Right Handle
Layer 1
Value 4 Attach WP_knife.x Texture 0 WP_knife.bmp Link R_Handle_1 Scale 3.5 RotY -90 MoveX 1
Value 5 Attach WP_club.x Link R_Handle_1 Scale 1.2 RotZ 110 RotX 90 RotY 9
Value 6 Attach WP_sledgehammer.x Link L_Handle_1 Scale 2.5 RotX 85 RotY 11 RotZ -70 MoveX 2
Value 7 Attach WP_spear.fo3d Link R_Handle_1 Scale 0.56 RotY 180 RotX 6 MoveX 3 MoveY -4
I've also got one grouped in sections, which I believe to be the newest and best
# Right Handle
Layer 1
#Pistols
Value 241 Attach WP_223pistol.x Link R_Handle_1 Scale 3.7 RotY -90 RotZ 10 MoveX 4 MoveY 1
Value 313 Attach WP_magnum.x Texture 0 ITEM_44magnum.jpg Link R_Handle_1 Scale 2.3 RotY -90 RotZ 10 MoveX 4 MoveY 1
The former has objects listed at every number, the middle has only objects listed at the correct number for their object ID and the latter is grouped in sections.
I've uploaded the last one here >
FOHuman.fo3d.
If you're lucky, you can maybe drop that in and it will just work. What you ask about linking weapon/model... that's what it's meant to do, but might not do yet
The layer IDs SHOULD correspond to the object IDs, and the code in CLIENT_main.fos :
case 1 : handle = 1 ; break;
should be pretty much saying "When it's ID#1, look at value#1 in the Fo3d" (I think). This should mean that some of the numbers don't exist any more, so there is no line for wearing armour ID#4 (layer 3 value 4), because ID#4 is a knife, so will only be in Layer 1 (active hand) and possible Layer 2 (inactive hand). The general skin and hair layers aren't drawing numbers from the object IDs, so should currently be simply in sequence (i.e. 1, 2, 3, 4 etc).
Basically, the main problem is that loads of this stuff is half done, and various bits are uploaded in different places, with different bits working. I've tested lots of things myself, but it means my own in-progress "FOHuman" is completely incompatible with Karpov's in-progress "FOHuman". It also means I have 5 or 6 different versions of FOHuman in different folders. They can be combined later with things like "Winmerge" or manually correcting them though.
For the general question about how the bits link together, it's again a little beyond my knowledge, but I'd assume anyone who's successfully added extra objects to the game (like the 2238 devs) should know how this all works properly.
The bits I am aware of are roughly as follows :
server\data\
ItemNames.lst < this lists all objects in game, and ID numbers. I'm not sure if it's just for reference, or whether it affects anything
server\proto\
weapon.fopro < this gives all the info for each of the weapons. "Pid" is the ID and the "Weapon.Anim1=" line specifies which animation set to use. You can see these animation sets listed at the bottom of _FOHuman.fo3d, though it shows as ABCD instead of 1234 (i.e. knife uses Weapon.Anim1=4, which corresponds to animation set "Anim D". Armour is in "armor.fopro".
server\text\engl\
foobj.msg < These are the in-game names for the objects. Seems to follow ID00 = short name, ID01 = description, i.e. assault rifle is ID 23, so 2300 = "Assault Rifle" etc. I don't know if these are hardcoded from ID, or whether they're specified in a file somewhere.
server\scripts\
CLIENT_main.fos < has loads of other stuff in I don't understand, but also contains the object/animation links at the bottom. The older one said :
case PID_10MM_PISTOL: handle = ATTRIBUTE_Handle_Weapon_22Autoloader; break;
Which meant "when you equip the object with "10MM_PISTOL" ID, load the model "Weapon_22Autoloader".
The newer one should say :
case 1 : handle = 1 ; break;
"When you equip the object with ID 1, load the model listed under value 1 in the relevant layer of the fo3d file".
I hope that makes some sense to you - I only just understand what I'm trying to say myself