Index of Script Files
Table of Contents

SMOD has a variety of editable scripts, some new while others are inherited from Half-Life2. This is a brief summary of the scripts within SMOD and each script's function. Note that this list is not all-inclusive for the sake of brevity.

  • Addcontents.txt
    Used to mount other GCF based content into SMOD. Note that only Source engine games and mods will work, and any engine version more recent than Episode 1 isn't a good idea to mount due to conflicting engine issues.
  • ChapterBackgrounds.txt
    Used to change the chapter backgrounds used in the main menu. Can either set VGUI (2D) backgrounds or map-based backgrounds.
  • ExcludeWeapons.txt
    Used to completely exclude weapon classes from SMOD.
  • Game_sounds_ .. .txt
    Used to edit sound IDs, paths, settings, etc. Each file is named accordingly to what the sounds are used for (Weapon_MP5.Reload).
  • HudAnimations.txt and HudLayout.res
    Used to edit the HUD to some extent. HUDAnimations allows one to edit the animated scanline and some color effects. HudLayout.res edits the size, position, etc of the HUD.
  • kb_act.lst
    Used to edit the list of keyboard binds in the options menu.
  • level_sounds_music.txt
    Used to edit music that each map looks for. Useful for adding your own music via mapadds, though it isn't necessary.
  • npc_gib_model.txt
    Edits what gib models are used for each NPC once they explode in a haze of blood.
  • npc_replacemodel.txt
    Used to set model replacements per NPC either generally or map specific. It's best to precache any map specific models via mapadds to prevent in-game performance hits and other optimizational errors. Can be toggled on/off with wat.
  • npc_shieldset.txt
    Used to edit the model, position, attachment points, etc. of NPC shields. The frequency of NPC shields is controlled by enemies_useshield.
  • npc_sounds_ .. .txt
    Used to edit the sounds of NPCs.
  • npc_weapon_randomize.txt
    Used to edit the list of weapons each type of NPC will randomly carry. It can be toggled on/off with npc_randomize_weapon.
  • npc_weaponweight.txt
    Used to edit weapons' "weight", which determines how highly NPCs covet each weapon type. For example, a rebel with an MP5 (weight: 3) would be eager to switch for an AR2 (4) they find lying on the ground. She wouldn't trade down for a pistol (1), though. Weight is normally set inside weapon scripts, and this script will override those settings.
  • override_class.txt
    Used to edit entity overrides, replacing entities that show up with other entities. Typically used to easily introduce custom weapons into an SMOD mod, giving normal weapons a set probability to change into the custom ones.
  • smodaclist.txt
    Used to add to the console's auto-complete list, which suggests commands as you type characters in.
  • smod_custom_explosive.txt
    Used to create custom explosive entities. All kinds of things are possible, from airburst grenades to remote-controlled bombs and rockets that scatter shrapnel upon exploding.
  • weapon_ .. .txt
    Holds (some) data for all Hl2 and SMOD weapons that are DLL based. These are for basic settings like model path, ammo type, etc.
  • weapon_custom .. .txt
    Holds the data for custom weapons within SMOD. Alongside the basic settings, custom weapon scripts are used to completely customize the weapon's function; projectile type, firing mode (single, full-auto/burst, and so on), damage and more can be edited.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License