Home Contests & Challenges Archives

How to EASILY to get your item in-game.

polycounter lvl 9
Offline / Send Message
larolaro polycounter lvl 9
[size=+1] This method is obsolete and no longer works, so don't use it! It would be equivalent to banging two rocks together.

Use "itemtest" command in the console instead, much easier![/size]


Hey guys,

Just thought I'd put a little tutorial up here to make it easier for people to get their weapons & hats into TF2 for testing.
I've noticed a lot of people working with V_models and W_models, valve don't use V and W models anymore, any new items valve implement are C_items. Which is both V and W in one.

Compiling your models as V_models and W_models is actually going to give valve a bit of extra work of having to transfer it to C_items to fit their unlock implementation system.

Anyway, Here is a very simple way to get your item in-game in both firstperson view and world view in your own server for general screenshots and testing. It only takes a few minutes.

All you need is GCFSCAPE.



1. Download and install GCFSCAPE


2. Make sure your model is compiled (I'm assuming you guys know how to compile your model)


3. Open up GCFScape, then open the Team fortress content.GCF and extract the items_game.txt file from "tf\scripts\items" into your corresponding folder "Steam\steamapps\STEAMNAME\team fortress 2\tf\scripts\items"

If you don't already have those folders set up, just create them.


4. Open up items_game.txt and search for a new unlock item that is used in the same slot as your weapon/hat replacement.

For example, if you're making a melee replacement for the pyro, look for the Axtinguisher or Homewrecker entry. It doesnt work with the original "non-unlock" weapons as they still us the redundant V_models and W_models.

With hats, you'll need to find a hat that you have and is wearable by the class you're working on. Universal hats like the halo or Ghastly Gibus are good to use.

The items_game.txt file is also the way to tool around with the stats of weapons for example making your rocket launcher fire a million rockets a second and +999999 HP on hit.


5. Once you've found it, edit the line where it's referencing to the .MDL and replace it with your .MDL path

The path is always relative to the 'models' folder, make sure to save the file and you're done.

For weapons, the section you're looking for should look like this:

"38"
{
"name" "Unique Achievement Fireaxe"
"item_class" "tf_weapon_fireaxe"
"craft_class" "weapon"
"item_logname" "axtinguisher"
"item_iconname" "axtinguisher"
"item_type_name" "#TF_Weapon_FireAxe"
"item_name" "#TF_Unique_Achievement_FireAxe1"
"item_slot" "melee"
"image_inventory" "backpack/weapons/c_models/c_axtinguisher/c_axtinguisher_pyro"
"image_inventory_size_w" "128"
"image_inventory_size_h" "82"
"model_player" "models/weapons/c_models/c_axtinguisher/c_axtinguisher_pyro.mdl"
"attach_to_hands" "1"
"item_quality" "unique"
"propername" "1"
"min_ilevel" "10"
"max_ilevel" "10"
"used_by_classes"
{
"pyro" "1"
}
"attributes"
{
"crit vs burning players"
{
"attribute_class" "or_crit_vs_playercond"
"value" "1"
}
"dmg penalty vs nonburning"
{
"attribute_class" "mult_dmg_vs_nonburning"
"value" "0.5"
}
"no crit vs nonburning"
{
"attribute_class" "set_nocrit_vs_nonburning"
"value" "1"
}
}
"mouse_pressed_sound" "ui/item_wood_weapon_pickup.wav"
"drop_sound" "ui/item_wood_weapon_drop.wav"
}


For hats it should look like this:


"115"
{
"name" "Halloween Hat"
"hidden" "0"
"item_class" "tf_wearable_item"
"loadondemand" "1"
"item_type_name""#TF_Wearable_Holiday_Hat"
"item_name" "#TF_Halloween_Hat"
"item_slot" "head"
"item_quality" "unique"
"min_ilevel" "10"
"max_ilevel" "10"
"image_inventory" "backpack/player/items/all_class/all_halloween"
"image_inventory_size_w" "128"
"image_inventory_size_h" "82"
"holiday_restriction" "halloween"
"model_player_per_class"
{
"scout" "models/player/items/scout/scout_halloween.mdl"
"sniper" "models/player/items/sniper/sniper_halloween.mdl"
"soldier" "models/player/items/soldier/soldier_halloween.mdl"
"demoman" "models/player/items/demo/demo_halloween.mdl"
"medic" "models/player/items/medic/medic_halloween.mdl"
"heavy" "models/player/items/heavy/heavy_halloween.mdl"
"spy" "models/player/items/spy/spy_halloween.mdl"
"engineer" "models/player/items/engineer/engineer_halloween.mdl"
"pyro" "models/player/items/pyro/pyro_halloween.mdl"
}
"drop_type" "drop"
"used_by_classes"
{
"scout" "1"
"sniper" "1"
"soldier" "1"
"demoman" "1"
"medic" "1"
"heavy" "1"
"spy" "1"
"engineer" "1"
"pyro" "1"
}
"visuals"
{
"hide_player_bodygroup_name" "hat"
"hide_player_bodygroup_name" "headphones"
}
}


6. Thats it, your done!


NOTE: Unfortunately you can't use this method on the following items, since they don't have C_items yet. You will still have to work with the V_models and W_models.

- Scout: pistol (unless you own the Sam & Max pistol)
- Soldier: shotgun
- Pyro: shotgun
- Demoman: grenade launcher
- Heavy: shotgun
- Engineer: wrench, pistol, shotgun, PDA
- Sniper: sniper rifle, SMG
- Spy: cigar case, knife



Now when you run TF2 and equip the item you replaced, it should be replaced with your model, It really is that easy! Now please stop working with V_models and W_models for just screenshots and testing, it really isnt necessary. :D

REMEMBER: this only works in your own servers, with default animations. You'll also need to close and re-open TF2 every time you edit the file - it won't update automatically.

I hope it helps! Good luck with the contest!

Replies

  • Fragus
    You deserve riches and fame, sir! Thank You! :)
    EDIT: Also, it's sad that Spy has no c_knife and c_cigar case :(
  • Mico27
    wtf I wasnt aware that valve only use c_model anymore!
    now I'll have to recompile all my weapons now >:(

    all this hard work making v_model and w_model WHY DIDNT VALVE TOLD US.
  • IdleTard
    Mico27 wrote: »
    wtf I wasnt aware that valve only use c_model anymore!
    now I'll have to recompile all my weapons now >:(

    all this hard work making v_model and w_model WHY DIDNT VALVE TOLD US.
    Don't worry.

    As long as you provide the animations for the v_model they can add them to the c_model spy hands in the case your stuff gets accepted.

    It will only take adding a couple of lines to the .qc and recompiling.
  • Progg
    Offline / Send Message
    Progg polycounter lvl 11
    thanks so much laro... works perfect the first time... saved me tons of trouble
  • x-quake
    Haha. Fitting that I am making engineer stuff anyway, so this does not apply. (Other than hats and etc.)
  • Karkasmolenklok
  • Acumen
    Offline / Send Message
    Acumen polycounter lvl 18
    so many thanks for that :)
    also while browsing the c_models i finally found a way to view and get access to the unlockable weapons - that i can't get via gameplay, cause i suck :D
  • 1Fort 2Fort
    Thanks alot dude, ive been having alotta trouble with this! Grade A man!

    PS c_models? cool, so i dont have to bother with world and 1st person view?
  • Guitbox
  • Frump
    Offline / Send Message
    Frump polycounter lvl 12
    Wow, talk about a PROTIP.

    Having to do v and w models separately is one of the reasons why I haven't bothered getting any of my stuff in yet. Man, such a simple thing that makes life a lot easier.
  • BaronVonFail
    You could use the scouts pistol from sam and max items if you really wanted a C_model purely for the purpose of testing it
    And it dose use the same animations and all as the default. so its more the engis pistol that doesn't have a C_model in essence
  • GoSsS
    Offline / Send Message
    GoSsS polycounter lvl 14
    Just a little question; if we have to create a v_model (I have to because i need to change the kukri (w_machete and v_machete_sniper)) how do we proceed for the hands of the character ?
    Becasue i don't have any problem with the w_model but don't see anything with my v_model.
    I opened the smd file of the v_model in 3ds max and placed my item where the kukri is and skinned it to the proper bone (and of course exported the whole scene with all the bones and the mesh in smd format)but nothing appeared in the game :(
  • larolaro
    Offline / Send Message
    larolaro polycounter lvl 9
    Thanks everyone, i'm glad the tutorial is of use.
    GoSsS wrote: »
    Just a little question; if we have to create a v_model (I have to because i need to change the kukri (w_machete and v_machete_sniper)) how do we proceed for the hands of the character ?
    Becasue i don't have any problem with the w_model but don't see anything with my v_model.
    I opened the smd file of the v_model in 3ds max and placed my item where the kukri is and skinned it to the proper bone (and of course exported the whole scene with all the bones and the mesh in smd format)but nothing appeared in the game :(

    GoSsS - You might want to craft the tribalman's shiv and replace that instead.
  • GoSsS
    Offline / Send Message
    GoSsS polycounter lvl 14
    Ok, thanks for the answer !
    Hard life .... I'll have to play to be able to work :D (I think there's worst in life :p)
  • Spazzo
    so, am I right in saying that if we wanted to replace the spies knife with custom animations the best way to go about it is get ahold of a decompiled v_model of the knife and remove the knife itself, and add in the knife you've made and make some animations out of that, then when you do contribute that item you simply contribute the knife model all by itself(which would be used in the hands viewmodel and the worldmodel), and then in a second zip you include custom animations in .smd format?

    sorry if I'm not entirely clear.

    oh, and just for future reference, you don't actually need to unlock the tribalman's shiv in order to see how the weapon goes in the viewmodel, simply open up the source model viewier, make sure that Team Fortress 2 is the selected game by source sdk, and then locate the weapons directory, and then in there locate the c_models directory, and then in there there should be a file for each classes hands viewmodel - the only exception to this is the engineer. certain classes are missing certain animations, I'll list each classes missing animations just here:

    Demo: missing the grenade launcher animations.
    Heavy: Shotgun and Minigun animations.
    Pyro: Shotgun
    Sniper: Sniper Rifle and SMG
    Soldier: Shotgun
    Spy: Knife, Disguise Case and Sapper.
    Engineer just flat out lacks a hands viewmodel. so all animations are absent.

    pretty sure I've got that all right there.
  • larolaro
    Offline / Send Message
    larolaro polycounter lvl 9
    The knife hasn't had an unlock yet, so the V and W models are still necessary for it unfortunately.

    He will have to unlock the tribalmans shiv because the method i explained is for getting your weapon in-game for screenshots and first hand testing.

    I've already listed the unavailable items for skinning in the original post at the top. ;)
  • BaronVonFail
    Just a little heads up on the tribalmans shiv, as its the wrong way in game due to a bug of some form all models compiled to it also will be the wrong way or from what i have heard.
  • nordahl154
    Offline / Send Message
    nordahl154 polycounter lvl 9
    Edit: Problem solved.
  • spetch
    Offline / Send Message
    spetch polycounter lvl 11
    Thanks Laro for posting this up! You know how much I hated getting stuff in. It took longer than making weapons.
  • Manuca
    Hi all! I'm trying to get my hat item in game, but I have been having a problem when I put my .txt file (items_game.txt) on the script folder.
    I followed the Larolaro's instructions and It worked fine at first time I Did, but then It has started to appear this error on loadout.
    The item I Had chosen to replace is the ''safensound"
    Do you have any idea What is causin this error? I tried to delete the local content, refreshing SDK content and also reset game configuration, but nothing!
    I hope you can helpme.
    error.jpg
Sign In or Register to comment.