• Content count

  • Joined

  • Last visited

  • Raffle Tickets


About mouseboyx

Extra Information

  • Gender
  • Location
    Kansas, USA
  • Occupation
  • Interests
    Guitar, Halo, Programming
  • Contributed
    $100 (US) to Open Carnage
  • Raffle Victor

Contact Methods

Computer Details

  • Central Processor
    i5 6600k
  • Graphics
    RX 590
  • Memory
  • Storage
    2x500gb sata ssd
  • Display
    144hz 1080p 16:9
  • Operating System
    Ubuntu 20.04 + Windows 7
  1. Of course this script doesn't actually work, but it's crazy how it can pull this out of thin air, among all the other language it can produce. I first asked it if it was familiar with Halo combat evolved, asked it if it knew of the 3rd party extensions to halo, etc... If this is an early model, I'm interested to see where this type of tech goes from here. Prompt: "Using sapp lua scripting can you write a script that replaces the assault rifle with the sniper rifle, using onobjectspawn" ChatGPT: Yes, here's an example script in SAPP Lua that replaces the assault rifle with the sniper rifle using the onObjectSpawn callback: api_version = "1.10.0" function OnScriptLoad() register_callback(cb['EVENT_OBJECT_SPAWN'], "OnObjectSpawn") end function OnObjectSpawn(PlayerIndex, MapID, ParentID, ObjectID) if MapID == 3 and ObjectID == 45 then -- Check for assault rifle spawn local new_object = spawn_object("weap", "weapons\\sniper rifle\\sniper rifle", 0, 0, 0) -- Spawn sniper rifle if new_object ~= nil then return new_object -- Return the new object's ID to replace the spawned assault rifle end end end This script checks for the spawn of an assault rifle (MapID 3, ObjectID 45) and replaces it with a sniper rifle by spawning a new sniper rifle object and returning its ID to replace the spawned assault rifle. Keep in mind that this script may not work in multiplayer games with anti-cheat measures.
  2. A collection of tests that might help someone with event_warp in lua scripting. Put 'antiwarp 3' without quotes into the sapp init.txt to enable the firing of the EVENT_WARP callback. While continuously moving, on the 3rd time that a player warps, with 'antiwarp 3', event_warp is fired. If the player stands still for a moment, there's a cooldown effect where they must move and warp 3 times again to trigger event_warp. Adding 200-300ms of latency then restoring a normal connection every 0.5-1.0 seconds is enough to trigger a warp event, but somewhere in the 180-220ms range and below the player can still warp, but the warp is very subtle and doesn't always trigger event_warp. Adding and subtracting a network delay above 300ms will surely trigger event_warp if it's applied continuously. I was using this quick and dirty linux bash script to simulate warp through the localhost, there is a tool called clumsy for windows on github that can simulate delayed, dropped, etc, packets that can also be useful for testing. for i in {0..10000} do sudo tc qdisc del dev lo root netem delay 150ms sleep 0.5 sudo tc qdisc add dev lo root netem delay 150ms sleep 0.5 done Run: sudo tc qdisc del dev lo root netem delay 150ms after testing to restore normal latency. Pushing a player with a vehicle can trigger EVENT_WARP even if both players have a perfect connection. I included an lua script that attempts to find warping distance of players who aren't in vehicles. It works ok, but doesn't take into account all the variables of what can happen in a game, like gravity, falling, player speed, being pushed by a vehicle, walking up an incline, or other things like that. The main motivation for testing is, players who apply a warp cheat, then do flag runs, I was hoping there might be a way to auto-kick abusive players like that. It may be possible, taking into account how many warp events happen in a time period, how far the player is warping each time, etc... My main concern is that I wouldn't want a script solution to auto kick an innocent player. event_warp.lua
  3. When first doing wiring I got a 5 pack of 25ft Cat 6 ethernet cable from microcenter, but every one of these from the 5 pack would eventually drop connection at 1gbps, so I had to manually set all my devices to 100mbps, so that the connection wouldn't drop out and auto-negotiate to 100mbps anyway. I replaced the ethernet cable for my main desktop quite a while ago and haven't had any issues since, but I just got around to getting some Cat 6a for my 2nd desktop, hoping this will work.
  4. So this is probably a really old thing with the halo client, seems to happen in both FV/CE. When the frame rate is locked to 30fps, the client/server doesn't update the players ping as often as when the frame rate is vsync or novsync. And the player's ping can read 0 for a long period of time upon joining until it is finally updated. I'm wondering if there could be another method to determine a player's latency, other than reading from get_var(PlayerIndex,"$ping")?
  5. I like the idea, it seems difficult to do a seek feature with that though. For each piece of data that didn't change it's true value could be any arbitrary length from the desired tick that's animating. It becomes easier if there's an ID associated with each object that didn't change, then seek backward through the file until you find each piece of data that you need. I can see how it would work, like if some float didn't change from the previous tick then write a single character in place of the float indicating to look to the previous tick, and do that every time it doesn't change. It seems like a necessary tradeoff, the file size will be smaller, but PHP will have to work harder, rewinding the file, parsing each line, checking if the data is there until it finds everything, then sending it off to js. js could then see that certain data hasn't changed from the seek position tick and fill that in as necessary. It gets a little complicated while buffering the animation data too, as well as buffering data while the animation is playing in reverse. Lmao the optimization never ends, in all seriousness though I'm glad I'm getting feedback to improve this. In other news I figured out an ok method of latency compensation while using SJ. Only have to set the camera's aim to a certain number of ticks in the future based on that player's ping. Ended up having a toggle to switch to use either average ping or instantaneous ping from each tick (seems like it might be necessary for certain warping conditions) Edit (Progress): Added a simple yet effective way to save space, vehicles, and flags and oddballs are the main culprit for bloating the file, because they can sit idle for long periods of time. An example string of how a vehicle was saved previously: ObjectID,tag_name,obj_x_coord,obj_y_coord,obj_z_coord,obj_front_x,obj_front_y,obj_front_z,obj_up_x,obj_up_y,obj_up_z,player_in_vehicle 3800236052,mp_warthog,46.338062286377,-64.705101013184,1.4689781665802,0.64794391393661,-0.758948802948,-0.064540214836597,-0.04084175080061,-0.11922907084227,0.99202638864517,-1 If none of that data changes in the next tick it's reduced to: 3799056386,p,69 ObjectID, the character 'p' to indicate to look to previous data, and 69 as the line number of it's last known data change. PHP then finds all of the 'p' occurrences and fills in the the first and last line of buffer data with the appropriate true values, then echos out the same 3799056386,p,69 like data for the rest of the stuff that doesn't change, and JavaScript fills in the spaces based on the first and last line. (I think this should work for reverse buffering because the last line true values are found based on the line numbers from the last line) With the latency compensation I'm going to add another toggle to compensate all player cameras and not only the SJ view. As long as the positions and rotations of objects remains true to the current tick, then all player cameras can be set into the future by an individual compensation factor to show where any player is currently aiming via a 3D object.
  6. I think the data collection is going to influenced by latency, here's a video of an aimbot that does horizontal aiming only, on the aimbot client the horizontal aim is always spot on, but the data collected is late, and this is through the localhost so it might be an even greater difference over the internet. Not sure if there's a way to account for this in the code, or if the person viewing the render will have to assume and compensate for latency. It's definitely possible to do a realtime render, but would take some extra work to make it possible. Edit: It might be possible using get_var(PlayerIndex,"$ping") and using that data to account for latency. Edit2: It looks like the data is late independent from sapp's custom_sleep command, or at least the data seems to be late relative to tick. For the player being sightjacked if their ping is anywhere from 1-33ish then their aim needs to be 2 ticks ahead of the current animation, then add 1 tick for every 33ms of ping-ish. For the rest of the players not being sightjacked their data needs to be 2 ticks behind the current animation from 1-33 then minus 1 extra tick for every 33ms. It may be challenging to find each "tick slot" a player falls into based on ping, then apply that delay in the render, lots of testing to be done...
  7. It would take me a while and some motivation to figure out how to make it work, but mysql has a C/C++ api that could be used to create an ffi dll for sapp so that you could call a mysql_query() function directly from an lua script. I thought about the real time option, if it was a public service I was worried about players using it to cheat, but if it was a private setup, that wouldn't be as much of an issue, the renderer code is built around a fixed recording file size but with a bit of tinkering it could work in near real time, there's currently a sync issue where the js animation runs slightly faster than halo's ticks. The issue is probably due to using the js setInterval() function for animation frame increments which technically isn't supposed to be used for timing precise events. Switching to using a timer like might solve the issue. I've had bad experiences with vps hosts in the past where I feel like I can't trust their connection enough not to lag a halo game in progress, I should probably do some testing beforehand to see what happens in different circumstances.
  8. This project is currently unfinished, there's a few more things I need to add and also figure out how to work out the logistics of how things will work server side with the vps. I wouldn't have made it this far without Pirate's hlm.lua library, sunstriker7's help, and also a few lua functions from Enclusion and pROPs. The way it works is that an lua script saves halo's tick data in plaintext to a file with the current unix time (1670292207.txt) that's created when a map loads. The first line of the file is the map name, mode data, and all of the scenery info, names,x,y,z and rotational vectors. After that, each tick it saves data for players, vehicles, projectiles, and I'm working on adding objectives like flags and oddballs. It writes out to that file every tick, it could very well be above 1GB per hour of data depending on how much is going on in the game. But a lot of that data is redundant (compressing the file with 7z makes it a fraction of the filesize). The render application is written in PHP and JavaScript, it buffers 1000 ticks of data at a time so that it can be animated. You can Sight Jack any player in the animation. I'm soon going to implement something so you could send a link to someone like: http://localhost/halo_game_replay/render.php?file=1670292207&start=1234&sj=5 if the application was hosted publicly, it would start on tick 1234 and begin sight jacking player index 5. Something like that could help with server administration, you wouldn't necessarily need to be there to catch someone in the act of using an aimbot. I was trying to think of a way to save the float data as binary rather than plaintext which would probably reduce the file size significantly, but so far haven't come up with a solution. Because each tick is separated by newline in the data structure, binary data could contain a newline character and break the data. I'll release the code when I get this to a more complete state. I also have no experience with animation of 3D models so all the models are just static placeholders to mimic whats going on. I'm going to extract the bsp and scenery from all the default maps and include that with the project. The script should technically work with custom maps, but you would have to provide all the models for the vehicles, bsp, and players in wavefront obj format. I've put a lot of work into this, but I'm getting to a point where I'm slowing down on development. More info: You can tell lua to only save data if there's a minimum of X number of players in the server, for this reason it would probably be best to setup afk_kick, alternatively the lua script could be setup to only record data on command. In the renderer vehicle models are loaded dynamically, so you could technically spawn 50 warthogs at any time in the game, and it should be able to accommodate it. For the vps side of things, I was considering maybe a 2 vps setup one vps for the halo server, and one as a web host for the renderer, I was thinking if you had both at the same time it might lag a game in progress. Or you could use this only as an administrative tool and save the recordings without ever having them be public. Possibly thinking about multiple cron jobs on the vps where it could compress and upload the data to another vps, or delete the oldest recording if the vps was running out of storage. The last line of the file is written on game end, it writes `game_end,1670292207` to help with writing cron jobs on what to do with the data at the end.
  9. My first car was a 1988 Honda Accord, it had a manual transmission, really fun to drive. I remember driving it home in a blizzard after taking it in for servicing. It eventually developed problems where if you shifted into neutral the rpm's would drop dangerously low and it would start sputtering while it was idling, so I would keep one half of my foot on the accelerator to prevent it from dying. The fix was to increase it's idling idling speed, I think that may have been a slow torturous death for that engine, it was still running when it was finally retired, but the torque was nowhere near it's original state. Having a manual transmission car as a teenager probably contributed to my delinquency, being able to rev up a carbonated 4 cylinder at the high school parking area seemed fun at the time. Dumping the clutch was also fun, doing mini burnouts or squeals. Even when I had acquired a newer Nissan Altima I still prefered to drive the '88 Honda to go places that were in town.
  10. m_object=get_object_memory(vehicle_object_id) obj_front_x = read_float(m_object + 0x74) obj_front_y = read_float(m_object + 0x78) obj_front_z = read_float(m_object + 0x7C) obj_up_x = read_float(m_object + 0x80) obj_up_y = read_float(m_object + 0x84) obj_up_z = read_float(m_object + 0x88) The offsets above give two 3D vectors, a front vector which is essentially pointing down the vehicles nose or front, and an up vector which always points towards the vehicles roof. Video for helping visualize the vectors (up vector in red, front vector in blue): It seems like one of the euler angles can be calculated using math.atan2() (correct me if I'm wrong), but I'm unsure about the other two: euler_z=math.atan2(obj_front_Y,obj_front_x) --this seems to be correct --euler_x=? --euler_y=? I'm looking for the complete math that would be used to calculate these angles, I've searched for this problem here and the answers are helpful, like how the vectors have been mislabeled in an offsets list, and how to calculate these vectors from the starting point of euler angles, but not this specific question. From what I'm reading a rotation matrix would help in solving this problem, but I'm uneducated on that topic. A hacky workaround that I've done out of ignorance is to calculate the euler angles on vehicle spawn, (since mostly but not always a vehicle spawns with only one dimensional rotation) then each game tick add the pitch,yaw,roll velocity values to those euler angles, because the velocity values are in radians. --Unsure if this will always work but I'd rather have a math based solution rather than relying on something like this. Edit: @Sunstriker7 Helped me find a solution to the underlying problem as well as a possibility finding the other two angles, and the condition of gimbal lock. I should have mentioned that the end result of wanting to know euler angles was to apply them to a library called three.js. However three.js has a lookAt() method that can be supplied with an up vector and a vector to look at. That method essentially solves the problem without having to know the angles, or work around gimbal locking.
  11. I'm looking for a way to get the object id of newly created projectiles that could be passed to get_object() within a chimera script for both FV and CE, specifically grenades, but if it's possible for any projectile that would be a bonus. I saw the below line in an offsets list, but trying to access this on game tick, the dword value is always 0 before a player throws any grenades and always 0xFFFFFFFF after any grenade has been thrown. unit_thrown_grenade_obj_id = readident(m_unit + 0x294) -- Confirmed. 0xFFFFFFFF when grenade leaves hand Does the chimera scripting api have something similar to sapp's EVENT_OBJECT_SPAWN? Or is there another way to do this sort of thing? Any help would be appreciated.
  12. I used an optic pack by Devieth for some of the functionality in script.lua. The default melody is the intro to Cannon in D. I've included a JavaScript app that will convert guitar tabs to be used within the script.lua. Convert the tab and replace melody={...} in script.lua with the line generated by the converter. The sound samples are simple square waves generated by audacity, starting at 82hz then incrementing by semitone up to 2637hz, using this pattern you can replace the samples with your own if you want to. I would recommend a sample length of 0.150 seconds to 0.250 seconds. The lower the better to avoid backing up the sound playing api.
  13. This script itself does nothing to extend the client. If you're not looking for a development example I would not recommend downloading and running this script. The code is really only a boilerplate of basic calls for someone to use as a starting point if they want to learn or figure out how to call C functions from a chimera lua script. I spent days trying to figure out how to do this, so I wanted to share the fruits of my labor in case someone else wants or needs this example. I still don't fully understand how it works, but I know that the code runs. The instructions for calling C from lua are included in the readme.txt in the zip. Is a good starting point to learn more about how to call C from lua.
  14. Thanks for testing it, I assumed it would work after it kicked based on the range {'',''}, but for some reason it was failing with other ip address ranges. I ended up wrapping all of the comparison statements within lua's tonumber() and it should work now I think. It worked at kicking a 192.168.x.x address based on the range {'',''} where as before the fix it failed to do that. Probably some strange quirk of lua, because it failed at the 3rd digit of banning, based on the rangeban of {'',''} I printed the strings encapsulated in quotes to makes sure there wasn't any whitespace or something funky with the strings cprint('"'..from_ip[3]..'","'..ip_digits[3]..'","'..to_ip[3]..'"') and it gave me "0","86","255", my assumption was that lua could compare these strings as numbers, but I guess not. (But it worked for the first 2 digits so it's strange) I'm probably spoiled by JavaScript and PHP where you can compare two strings like "12">"10" and it evaluates to true, then I write some lua and step into a string/number pitfall. basic_rangeban_fixed.lua
  15. With the unpredictability of the built in range banning feature of sapp, this seems like a good opportunity for someone to write an lua script to implement range bans differently or more correctly than sapp does. I'm thinking using EVENT_PREJOIN to execute the detection/kick logic, however it would be limited because it wouldn't work like a full ip ban. Also might be able to introduce a different syntax to the range ban, like start and end ip addresses. Like start at "" and end at "", I don't know if that's a good idea though but it seems like it would work. I went ahead and made the range ban lua script. I don't know if this will work for every possible range condition, because it checks starting at the leftmost ip address digit to the rightmost to see if it is in the range. I don't even know if this is the correct way to implement the idea but here you go basic_rangeban.lua