Talk:Adding Firing Modes to your weapons

From Valve Developer Community
Jump to navigation Jump to search

Localized string in kb_act.lst

To specify these strings in kb_act.lst, do something like "#MyMod_Firemode" (doesn't matter what this is, just have to be consistent and unique).

Now go to mymod_language.txt (so for english, this would be mymod_english.txt) and add a line like:

   "MyMod_Firemode"	"Change Fire Mode"

If you don't have a language file already, create one with the following format:

   "lang" 
   { 
       "Language" "English" 
       "Tokens" 
       {
           "MyMod_Firemode"	"Change Fire Mode"
       }
   }

You can also get a sample language file and work off of that. A good way to do this is get GCFScape and open up the gcf for hl2dm and copy/rename a file in there to your mod's resource directory and just add your extra language definitions.

Cheers. --AdityaGaddam 14:53, 24 February 2009 (UTC)

Suggested Merge

It’s been suggested to merge this tutorial, but I think more examples are better to maintain understanding. The inheritance approach to adding functions is a good teaching tool for how source code and game was designed. Ninjaofsauce (talk) 17:45, 12 November 2024 (PST)