Welcome to Open Carnage

A resource for Halo 1 modding and tech, with unique means of rewarding individual content creation and support. Have a wander to see why we're worth the time! EST. 2012

Sign in to follow this  
Followers 0
Kavawuvi

Get weapon, vehicle, and equipment object tag IDs

Note: By itself, this script does nothing. This script's functionality is intended to be included in other scripts, only.

 

This script relies on the Weapons List, Powerups, and Multiplayer Information Vehicles in the globals tag. Halo uses this list to determine what weapon is what when using a non-default weapon set in a gametype (ITEM OPTIONS -> WEAPON SET). This method should bypass all forms of map protections as long as this list isn't modified.

 

Many custom maps with custom tag sets are not ordered correctly, so some values will not be as they are expected if this is the case. You may notice that these custom maps may work weirdly when you use a non-stock weapon set in the gametypes settings.

 

If the function fails (invalid list size or a multiplayer map isn't loaded), it will return nil. Otherwise it'll return a table with each key corresponding to a map's tag ID. These tag IDs can be used for spawning objects, object comparisons, and with the lookup_tag() function.

{
    ["assault_rifle"] = number,         -- weap: weapons\assault rifle\assault rifle
    ["flamethrower"] = number,          -- weap: weapons\flamethrower\flamethrower
    ["gravity_rifle"] = number,         -- weap: weapons\gravity rifle\gravity rifle
    ["needler"] = number,               -- weap: weapons\needler\needler
    ["pistol"] = number,                -- weap: weapons\pistol\pistol
    ["plasma_pistol"] = number,         -- weap: weapons\plasma pistol\plasma pistol
    ["plasma_rifle"] = number,          -- weap: weapons\plasma rifle\plasma rifle
    ["rocket_launcher"] = number,       -- weap: weapons\rocket launcher\rocket launcher
    ["shotgun"] = number,               -- weap: weapons\shotgun\shotgun
    ["sniper_rifle"] = number,          -- weap: weapons\sniper rifle\sniper rifle
    ["frag_grenade"] = number,          -- eqip: weapons\frag grenade\frag grenade
    ["plasma_grenade"] = number,        -- eqip: weapons\plasma grenade\plasma grenade
    ["plasma_cannon"] = number,         -- weap: weapons\plasma_cannon\plasma_cannon
    ["mp_needler"] = number,            -- weap: weapons\needler\mp_needler
    
    ["ball"] = number,                  -- weap: weapons\ball\ball
    ["flag"] = number,                  -- weap: weapons\flag\flag
    
    ["active_camouflage"] = number,     -- eqip: powerups\active camouflage
    ["double_speed"] = number,          -- eqip: powerups\double speed
    ["full_spectrum_vision"] = number,  -- eqip: powerups\full-spectrum vision
    ["overshield"] = number,            -- eqip: powerups\over shield
    ["health_pack"] = number,           -- eqip: powerups\health pack
    
    ["mp_warthog"] = number,            -- vehi: vehicles\warthog\mp_warthog
    ["ghost_mp"] = number,              -- vehi: vehicles\ghost\ghost_mp
    ["scorpion_mp"] = number,           -- vehi: vehicles\scorpion\scorpion_mp
    ["banshee_mp"] = number,            -- vehi: vehicles\banshee\banshee_mp
    ["c_gun_turret_mp"] = number,       -- vehi: vehicles\c gun turret_mp\c gun turret_mp
    ["rwarthog"] = number               -- vehi: vehicles\rwarthog\rwarthog
}

For your convenience, spaces and hyphens have been replaced with underscores.

 

Download source: get_map_ids.lua

giraffe and Tucker933 like this

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.