ValveSoftware / ValveSoftware/source-sdk-2013
[TF2] Provide documentation on adding custom classes and weapons
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10k
- Forks
- 3k
- Avg merge
- 8d 11h
- Merged PRs (30d)
- 2
Description
It would be nice if there was documentation on how to add a custom TF2 class and weapon code to a mod.
I have managed to add a class but I'm unable to figure out how to get the loadout panel for said class working properly (using open_charinfo_direct works, but the CImageButtonEx for the class in the loadout panel doesn't work), nor am I able to figure out exactly how to define base items for said class and assign weapons to them.
I have also managed to implement a basic weapon class into the game code (as TF_WEAPON_RAYGUN_SINGLEPLAYER, based on pistol code) but am also unsure on how to get that weapon working ingame in items_game.txt - my class therefore has no weapon inventory apart from being given the Engineer buildings, for whatever reason, and my custom weapon (and the associated item prefab) shows up as an invalid item in both the inventory and ingame (using classname default).
Any advice? Here's how progress on getting a custom class working on my mod looks as of right now:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the issue's references to open_charinfo_direct, CImageButtonEx, TF_WEAPON_RAYGUN_SINGLEPLAYER, items_game.txt, item prefabs, and the default classname. The issue names no documentation files or tests; done would be clear documentation covering custom classes, loadout panels, base items, class weapon assignments, and custom weapon definitions.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation, game-dev
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100