## Search the Community: Showing results for tags 'Dev Utility'.

• ### Search By Tags

Type tags separated by commas.

### Forums

• OPENCARNAGE.NET (OC)
• Site Matters
• Member Introductions
• HALO: SOFTWARE EXTENSIONS (SE)
• Chimera: General
• SAPP: General
• HALO: CUSTOM EDITION (CE)
• Halo CE: General
• Halo CE: Development
• HALO: COMBAT EVOLVED (PC)
• Halo PC: General
• Halo PC: Development
• HALO: MASTER CHIEF COLLECTION (MCC)
• Halo MCC: General
• Halo MCC: Development
• General Gaming
• Tech Chatter
• Off-Topic

• 0 Replies

• 0 Reviews

• 0 Views

Found 14 results

1. ## Halo 1 Discord Bot

Halo 1 (PC/CE) Discord Bot (for SAPP servers) A Discord bot framework built using the Discordia API and Luvit runtime environment. - features - 1). Easily connect one (or more) Halo servers to a Discord server. -- 2). Sends a message to your Discord server when the following events are fired: Event Description ----- ------------------------ * event_join Player connected to the server. * event_quit Player disconnected from the server. * event_game_start A new game starts (shows map & mode). * event_game_end The current game ends (and shows who won). * event_chat Chat messages sent to defined global-channel. * event_score Message sent when player scores. * event_command Command logs sent to defined command-log channel. * event_death killed by the server, squashed by a vehicle, run over, betrayal, PVP, suicide, zombie-infect, first blood, guardians, killed from the grave, unknown. [note] The bot will ignore commands containing sensitive information (namely passwords). -- 3). Two-way chat integration - Send messages directory to the Halo server from Discord (and visa versa): Halo to Discord (as seen on Discord): [CHAT] Chalwk: This is epic! Discord to halo (as seen in-game): [Discord] Chalwk: This is epic! -- 4). The bot will feedback on the name of the winning player (or team) on Discord after each game. -- 5). The bot will automatically create and periodically edit an embedded status message. The embed will include the current map, mode, game type, player names and more. -- 6). Chat integration whitelist: Only users who have a specific role will be able to send messages to Halo from Discord. =========================================== FULL INSTALLATION INSTRUCTIONS AND UPDATES: DOWNLOAD PAGE Current version: 1.0.25 ===========================================
2. ## Alias System

This script is an advanced drop-in replacement for SAPP's built-in alias system. Lookup names linked to an IP address or hash. A full description of this mod can be found on the download page. DOWNLOAD PAGE ~edit: [05/04/22 @ 18:12 NZST] Small bug fix.
3. ## Block or Replace objects

A simple script that lets you block or replace a map object. Block or Replace.lua
4. ## Delay Skip

Delay Skip script Description: This script prevents players from skipping the game too early. Scenario: A player with a good ping (and bad intentions) joins the server after a new game has just begun and immediately types "skip", thus ending the game before anyone else joins. I've heard cases of people binding this to a key too. Delay Skip.lua
5. ## Stat tracking API

Today I am launching a very alpha version of a stats api for SAPP servers. If you run this script it will send back stats of all players (current and past) to the API server at http://api.halopc.com/stats/. Here is the script for the SAPP server: stats.lua Setting up the script: If you are on Windows server 2016 or newer, you can set use_powershell at the top of the script, all though this will make almost no difference. If you are on older versions of Windows do not change this setting, the script will attempt to download wget.exe to use that instead using commands that are compatible with powershell 2.0. If you are on wine you will have to download wget.exe and place it next to your haloceded.exe. Next you will need to download this: json.lua, place this lua script next to your haloceded.exe, this is required. (The server will try to download this with the current version uploaded on 6/15/2021. If it fails download it manually from here.) What data is collected: IP, hash, name, score, kills, assists, deaths, betrays, suicides, weapon stats, time played (in seconds), other gametype stats, and server details. How is a player tracked: Within the server, hash. With the API, IP or a custom UUID that be sent with a custom version of Chimera (based on -572) or with a script for Chimera. UUID is hardware based. Note: The script version will open a cmd window for a moment after launching Halo, if this is annoying I recommend using the custom version of chimera. Note2: Player IPs and Hashes are not exposed in the API. Registering your server: Severs must register their IP in order to send stats to the stats API, this can be done at http://api.halopc.com/register. Servers found sending modified player stats will be blacklisted. Polling stats: Stats can be pulled from the API in two ways, as a Lua table (http://api.halopc.com/stats/raw?lua) or as a Json string (http://api.halopc.com/stats/raw?json) If there are any issues please let me know, I can be found on the OpenCarnage discord server, feel free to @ me. Sorry if this post is kind of messy. Files in post: uuid.lua json.lua
6. ## Accurate Camera Position (or camera_track and You!)

For the technical details of camera_track, see the spoiler at the end of this post. Library: hlm.lua Sample (shown below): Vision Test.lua This library provides SAPP script writers with the ability to accurately determine a player's camera position and aiming directions (forward, left, up), using only SAPP memory functions and lua, up to and excluding camera interpolation, third-person camera hacks, and Halo script/console commands that control the camera. Practical applications include more accurate visibility and intersection testing from the camera and a boost command that works properly from vehicles (this is left as an exercise to the reader). Many of the functions provided by the library (hlm.lua) are reverse-engineered from the client, with the intent of preserving accuracy to the client. (There is a bit of a hiccup in the video at 0:38, my apologies for this). A sample script from my repository is attached (Vision Test.lua). If you intend to use this library, please read the instructions on setting it up. The sample script should get you up to speed on usage if you plan on using the library as pitched, although there are a number of related functions you may desire to take a look at, such as get_object_markers and get_node_transform. It should be noted that in the video above, the camera position as calculated is not clipped against the terrain nor certain collideables. This behavior is faithful to how Halo calculates the position of the camera for firing purposes. Technical details on the camera_track tag:
7. ## Halo Console Discord Bot

So I created a Discord bot that will allow you to run console commands from Discord. First thing is you will need to set up a bot with Discord and copy its Token over for use in the Discordia Script. https://discord.com/developers/applications When inviting your bot, do not give your bot administrative privilege, this is to make sure you make it so the bot can only read messages from admin channels by specifically adding that bot to category permissions or per-channel permissions. Here are the permissions you want to give it: How to invite your bot: https://discordpy.readthedocs.io/en/latest/discord.html ____________________________________________ After that you will need the Discordia + Bot package [ discord.lua ] and the server side script [ discord.lua ]. Setting up the Discordia bot: 1. Unzip the luvit.zip onto the same system your server is going to be running on. 2(a). Open the haloce.lua in the luvit.zip, at the top you should see this: -- Set up bot local bot_prefix = ">" local bot_token = "YOUR_BOT_TOKEN" -- Path to haloceded/haloded(s) local servers = {} servers['ce01'] = {"C:\\Users\\Gigabyte\\Desktop\\CE_Test", '-path "C:\\Users\\Gigabyte\\Desktop\\CE_Test"', "haloceded.exe"} --servers['ce01'] = {"C:\\Users\\Gigabyte\\Desktop\\PC_Test", '-path "C:\\Users\\Gigabyte\\Desktop\\PC_Test"', "haloded.exe"} 2(b). Take the bot token you got from your discord developers page and paste it in replacing YOU_BOT_TOKEN, and make sure that the quotations are still around it. 2(c). Now below servers you will want to set your server short-name (in my case it was ce01, so servers['ce01'] =). Set the server path, launch arguments, and executable name as well. (The second line is an example how to do a HaloPC server, or add another server.) NOTE: You cannot have 2 servers with the same short-name like I did by accident. 3(a). Take the discord.lua and paste it into your SAPP server's lua folder. 3(b). Remember to add lua_load discord to your SAPP init.txt. 4(a). Open t he discord.lua, at the top it should look like this: -- Path to Discordia bot. local discordia_path = "C:\\Users\\Gigabyte\\Desktop\\luvit\\" -- Path to read commands from. local command_file_path = "\\ce01\\command.txt" 4(b). For discordia_path, put the path were you have the the bot unzipped to, like shown above. 4(c). For command_file_path you need to put the server short-name where I did otherwise the server will not be able to pick up commands. 5. Start your Halo server + the bot (using the start_bot.cmd) Preview of how it should work when set up correctly: luvit.zip
8. ## Page Browsing Routines (library)

This library lets you view Lua table data on a per-page basis. Please see THIS PAGE for full details. Great if you need to send a player more than 20 lines of text via console. You can split data into pages and show them 1 page at a time.
9. ## Play Announcer Sounds

This is a simple function that will let you play any sound file referenced in globals.globals > multiplayer information > sounds. Simply call it with an ID of the sound from that list. function PlayAnnouncerSound(sound_id) local server_announcer_address = 0x5BDE00 write_dword(server_announcer_address + 0x8, 1) -- time until first sound in the queue stops playing write_dword(server_announcer_address + 0x14, sound_id) -- second sound ID in the queue (from globals multiplayer information > sounds) write_dword(server_announcer_address + 0x1C, 1) -- second sound in the queue will play write_dword(server_announcer_address + 0x50, 2) -- announcer sound queue end Here is an alternative for the client if you want to use it in a Chimera script. function PlayAnnouncerSound(sound_id) local announcer_address = 0x64C020 write_dword(announcer_address + 8, 1) -- delay until the sound starts write_dword(announcer_address + 20, sound_id) -- not sure what this is but it makes the sound play write_dword(announcer_address + 80, 2) -- announcer currently playing end Here is a list of the sounds you can play and their IDs: 0 play_ball 1 game_over 2 one_minute_to_win 3 30_seconds_to_win 4 red_team_minute_to_win 5 red_team_30_to_win 6 blue_team_minute_to_win 7 blue_team_30_to_win 8 blue_team_has_the_flag 9 blue_team_flag_returned 10 blue_team_score 11 red_team_has_the_flag 12 red_team_flag_returned 13 red_team_score 14 double_kill 15 triple_kill 16 killtacular 17 running_riot 18 killing_spree 19 oddball 20 race 21 slayer 22 capture_the_flag 23 warthog 24 ghost 25 scorpion 26 countdown_timer 27 teleporter_activate 28 flag_failure 29 countdown_for_respawn 30 hill_move 31 player_respawn 32 team_king_of_the_hill 33 team_oddball 34 team_race 35 team_slayer 36 king_of_the_hill 37 blue_team_ctf 38 red_team_ctf 39 hill_contested 40 hill_controlled 41 hill_occupied 42 countdown_timer_end 43 ting
10. ## Get Distance Utility Function

I figured since I couldn't find a command to do this in SAPP's documentation, and I needed it heavily in the mod I am working on, I thought it'd be a nice utility function to release: function getDistance(Player1, Player2) --returns the distance between two players Player1X = get_var(Player1, "$x") Player1Y = get_var(Player1, "$y") Player1Z = get_var(Player1, "$z") Player2X = get_var(Player2, "$x") Player2Y = get_var(Player2, "$y") Player2Z = get_var(Player2, "$z") local diffX = Player1X - Player2X --x1-x2 diffX = diffX * diffX--((x1-x2)^2) local diffY = Player1Y - Player2Y diffY = diffY * diffY local diffZ = Player1Z - Player2Z diffZ = diffZ * diffZ local sum = diffX + diffY + diffZ return math.sqrt(sum) end
11. ## Map Scenario Scripts

Saves map scenario scripts to a txt file. Based on Halo Script Extractor.exe by Skarma Added indentation to make scripts easier to read Fixed non static/stub scripts by removing return type Fixed empty variables by adding quotations Fixed variables with spaces by adding quotations Fixed executing static void scripts within other scripts Example output - bigass.map Download: http://pastebin.com/5cYveEvX
12. ## 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
13. ## Read Halo script global value in a SAPP script

Note: By itself, this script does nothing. This script's functionality is intended to be included in other SAPP scripts, only. read_global_value will return true/false for booleans, floats for real numbers, shorts for shorts, longs for longs, and dwords for everything else. It will return nil if the global could not be found. All globals are map-specific, so make sure the current map has it. Syntax is: read_global_value("global_name") For those of you who don't know what a global is, a global is a variable reserved for Halo scripts (scripts that are compiled within maps). Globals can be freely modified by Halo scripts, or by the set command. Feel free to include this in any script you make. I have tested this script on both Halo PC and Halo CE, and it should work on both. Let me know if there are any issues. Download (SAPP only): globals.lua
14. ## SAPP Scripts Shortlist

You can find many of the most useful SAPP scripts listed here. Map Download A script to replace/take place of SAPP's deprecated map_downlaod command. Rallied Teams This configurable script allows players to spawn at their respective team bases, like in CTF. Team Autobalance A handy autobalance script for team games that switches players appropriately only upon their death. Empty Server Reset Automatic map resetting once server has been empty for a defined amount of time. Team Shuffler Allows for configurable automatic team shuffling at the start of each game, and manual team shuffling. Votekick Allows players to vote an individual out of the server. Vehicle Telefrag Adds the telefrag feature to vehicle blockages. There are a number of ways to customize with this script how blockers are dealt with. Sprinting Adds sprint functionality to bipeds, and features a number of ways to customize or balance out. Command Bot This script runs a random command from a list that you can set in its configuration, which is handy for randomized messages and tips ingame. Profanity Buster A filter that automatically blocks chat messages containing profanity. Admin Groups Allows for multiple different admin permission sets. Discord Halo Server Bot A bot allowing you to integrate live server information with Discord. Discord Halo Server Console Bot A bot allowing you to issue commands to a Halo server via Discord.