Welcome to Open Carnage

A resource for gamers and technology enthusiasts, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time!

IceCrow14

Member
  • Content count

    13
  • Joined

  • Last visited

  1. It's here, finally... To anybody who has ever read my topic about this in the CE development section, you may remember that I mentioned that this script would be meant to work for every single map that contains AI and that's what I'm going to release here. The game and the community deserve it. However, it still has some limitations: - This WILL NOT work for protected maps, if the server is running this script and it loads a map that is protected, it will crash, and even if it doesn't it is highly probable that it won't work at all. - The clients must have Chimera installed and the client script in their respective scripts folder. You can do this renaming the script to the name of the map with AI you want to sync and moving it to the map scripts folder if you want to keep it sandboxed, but I would recommend you to place it in your global scripts folder so you won't need to rename and copy it manually. I've disabled all the console_out commands to avoid annoying messages coming out every time a map is loaded. - There are some minor aesthetical glitches still, but they rarely would affect the gameplay (Most, if not all, are just related to aesthetics). And... I think that's all! If you are going to run a server with this on it just load the server script from the init.txt file and it will do the rest, I've made sure to reset everything that's needed every time a new match starts so you won't have to modify anything, however, I've kept some cprint and say_all lines for debugging purposes but I think they won't be needed anymore, you can disable them easily, just search any of those commands in the code and comment or erase them. To finish, a video of me running it on a dedicated server and playing as a client: In this file: AI synchronization scripts by IceCrow14 v.1.1.rar I've included both the server and the client scripts. If you aren't going to run a server, just drop the client script to your Chimera global scripts folder. Anyway, just for caution, if the bipeds' appearance looks strange try leaving and joining back the server you are playing in, if any error message jumps out to your console, feel free to send me any information about it and I'll try to find out what causes it (and possibly fix it) and delete the script if you feel it's needed.
  2. It's time for another update on the AI synchronization stuff, and I'm glad to say that I'm close to release a first public version of the scripts I've been using for this, because having the whole thing there just getting older... Well, it would be better if people would start making new content with it because it's stable now that I've fixed a lot of glitches for both the server and the client's scripts, and added a bunch of functions that do most of the scripting job that was needed automatically. Currently the only thing one has to do to sync AI for a new map is declare the path of the scenario tag inside a specific function in the scripts to get everything running, which makes the process a lot quicker and less susceptible to glitches because unlike in the previous version, you had to declare the bipeds used by the AI manually and you could accidentally forget to declare one biped type and everything would be messed up. The next step is making a function that retrieves the path of the scenario path and declares it automatically so having to edit the scripts won't be needed anymore. Just dragging the file to your map scripts folder and that's all. This is how everything has been going: I am going to write the main changes here, but will edit the main post aswell to have a full log of the progress that I've made since the beginning. Improvements - Now only the path of the scenario tag has to be declared and a bunch of functions do the rest. - The client's script only runs on dedicated servers, so you can test the map in single player or in a local multiplayer match if you want. - The limit of simultaneously existing AI has been increased to 300, however, I wouldn't recommend you to have more than 150 at the same time (seriously, don't do that). - The server's script runs a function that sets the projectiles of the weapons used by the AI not to be client-side only, so you will be able to see the fired projectiles. - Velocity synchronization: The bipeds' current velocity is sent to the clients, this means that you will be able to see their movement on 60 FPS (if you have Chimera's interpolation enabled). - Now the dead/alive state of the bipeds is updated automatically, this is a fix to a bug I had found in previous versions, which kept your crosshair flashing if you aimed at a biped with it's health empy unless you hit it one more time. Known glitches - Neither the bipeds' weapons or their firing effects show up for the clients, however, the weapons appear right after the biped holding them is killed. - I haven't set the "shields drained" effect to show up right (you can notice this in the video). - AI spawned by default when the map loads can't be synchronized yet (this is something that should only affect the server). - AI still doesn't sync inside of vehicles. I know how to get rid of the first three bugs right now, about the last one, currently I don't know but I'll set up a function that disables vehicle combat for the AI at least until I find a fix for it.
  3. Main post updated, I wrote the changes under the previous content.
  4. "Cprint" only prints the message to the server's console. I guess what you want to do is displaying the messages in the chat but without the server's prefix, if that's the case I think you could change the server's prefix to an empty string every time a death message is about to be displayed and then change it back to its default value. Something like this: elseif last_damage[PlayerIndex] == tank_shell then msg_prefix("") -- If not possible, you could try using " " instead, or a small character. say_all("$name was killed by $kname\'s Scorpion"), PlayerIndex)) msg_prefix("[Your default server's prefix]") Anyway, I only mod CE so I may be missing something. Hope this helps!
  5. As far as I know, there isn't a known offset/address for such variable, it probably exists in the engine, but I don't know its location and unfortunately I don't know how to find memory addresses on my own (yet), I've been working only with the ones that are on the memory addresses and offsets document. The addresses I've used are for the object's X, Y, Z, Pitch, Yaw and Animation state (I haven't messed with the ones for the biped's body parts' data because that would mean sending a lot of information to the client, that should be read as substrings and consequently end up reducing the performance of the game) and I've achieved nice results, like this: At the ending of the video you can see the glitch I mentioned before, some bipeds disappear when they play certain animations and still I haven't figured out what causes them to do such thing, it's almost senseless that they just go away like that because their coordinates are supposed to be updated on every tick, but strangely, if I erase/deactivate the code that updates the animations everything runs fine, just like it should... I'm actually thinking on using another method that involves using some client-side stuff instead of this, but I'm not sure if it would work.
  6. Awesome! Glad to see more people working on syncing AI, I just have a little question. Are you using client-side AI? I mean, something like using the server to send its bipeds' data to the clients so they can spawn their own local bipeds and move, rotate or animate them the way the server tells them to do instead of using the braindead bipeds spawned by the server on the client-side? (Sounds quite strange, but maybe you know what I mean), anyway, I could share the scripts from my last post if you think you could find something useful in them.
  7. Fortunately there are memory addresses for the object's rotations and animations, actually, I've already managed to update them too in a previous test but it was very resource consuming because the server had to send a message for every piece of data on every tick (For example, one for the biped's X, another one for the Y, for the Z, for the animation state, etc...) and as the amount of bipeds increased, the amount of messages did as well and at some point the server wouldn't be able to send all those messages to the client (about 7 per biped, multiply that by the amount of bipeds and then by the amount of players) or the client wouldn't receive all the messages it should, honestly I don't know but the result was that the client was disconnected from the server after a few seconds if you had about a dozen of bipeds. So what I'm doing currently is pure optimization, I made some changes to reduce the amount of messages per biped to 1 (That's why in the video you can see all the coordinates' data sent into one message. Much of the client's job is based on reading sub-strings). About the bones... I think there are offsets for their location and rotations too, but I'm only focused on the main object's properties to make this script somehow "universal" for every type of biped you include in the map. Finally, the animations... I've found very weird glitches that cause the bipeds to suddenly disappear when they play specific animations and I suspect it's something related with the "frame info type" setting of such animations. Currently I'm not able to upload a video, but in a few hours I will so you can see the advances I've made.
  8. 8/28/2018 Well, first of all, I haven't given an actual name to this thread (I'll do later) because there are two "projects" (if you want to call them that way) on which I've been working on. I'm not so good with explaining this kind of stuff without getting into details, so... Let's take a better approach: Biped / AI synchronization Recently I've been playing with both SAPP and Chimera's Lua scripts to achieve this, and I have managed to get a somehow "more authentic" way to sync client-side stuff like bipeds, scenery and even vehicle custom animations (in theory we should be able to sync even object permutations, which could allow any server manager to set different model permutations for every team's vehicles and players in a CTF game, for example) using remote console messages. By now, I've made a pair of scripts, one for SAPP (which sends the data to the clients) and another one for Chimera that modifies anything that the server tells the clients to change. In comparison with other AI sync methods I've seen before (like the one that uses map scripts to attach and detach vehicles to AI bipeds, or the SAPP one where the server spawns a vehicle for every biped depending on it's current animation state to then assign it the current biped's location, rotation, etc.) with this one the client updates the actual properties of the server's biped, so you can see aditional stuff that is missing within those methods such as their effects and the crosshair's flash when you aim at an enemy. Also, another incredibly good new about this is that you won't need to modify the map files in which you use these scripts as long as the AI encounters' data and tags are there. Another great feature of this is that you don't need to modify lots of code or do massive tag witchcraft to get different types of bipeds simultaneously, however there is a long way to get this working smooth and pretty at the same time. End of the speech, watch with your own eyes what I'm talking about: Flood survival (PvE and PvP) Something I wanted to work on since a long time ago, basically what I'll try to do, at least by now is a multiplayer map that supports all the gametypes but also allows the players to summon Flood hordes to bring a somewhat new and strategic approach to Halo CE and also spawns them automatically in certain areas of the map. I plan to use the default tagset but with some balance changes (No more OP pistol and useless automatic weapons), add upgraded variants of certain vehicles and weapons and if possible, an option to choose your battlefield's spawn point (I'll set the spawn points for team based game types inside a pair of ships, part of the BSP). I'll be posting updates on this thread, currently, the scripts are a bit unstable and the BSP isn't finished so... I guess I won't be able to release anything yet. 10/3/2018 UPDATE: AI sync It's been a long time since my last post, sometimes I wonder what I would be able to do if I was motivated enough... Enough sentimentality for today, because there's a lot of new stuff. Let's start, in my last post (from this topic) I mentioned something about taking advantage of some client side stuff to develop a somehow different mechanism to sync AI, and that's what I did (in the description of the video I wrote more information about it): Basically, the main difference is that the client no longer has to manipulate the bipeds spawned by the server (at least, not like it had to do before), what does this mean? That the bipeds a client sees in its map are spawned by itself (obviously, following the server's instructions received through RCon messages) and the bipeds spawned automatically by the server are moved to a hidden location (they are supposed to be deleted too, but it seems that it isn't possible). Now you may be asking yourself why I didn't just use these bipeds instead of spawning a local duplicate, well, because to manipulate an object's properties (a biped in this case) in the game through SAPP and Chimera you must know its object ID and memory address, and I had found that the object IDs between the server and the clients aren't the same (I already expected it would be that way before making sure), so I tried to use their "temporary" object IDs (iterating from 1 to 1024, the max amount of objects default Halo supports simultaneously, as far as I know, using a 'for' cycle to see which objects were bipeds and had a certain set of properties and so on... In the beginning I didn't think it would work, but it did), the problem about this was that once a biped disappeared, other objects spawned after that could take their temporary object ID, also, after leaving and joining back the server, the objects aren't spawned in the same order, besides making a join-friendly feature out this would've been incredibly tedious, this caused a lot of trouble that isn't worth mentioning. Let's move to the most important changes: Improvements The matches are join-friendly now, you can leave and join the same server as many times as you want and you'll always see the AI's bipeds at their current state (location, rotation, animation). The Lua scripts I wrote can be used to sync AI over any MP map without having to modify it, as long as any AI encounter/biped (other than the players') isn't set to spawn by default (there are more cautions that should be taken, but this is the most important one). The bipeds' effects are displayed properly. Limitations/Glitches The max amount of bipeds that can be synced is about 150, it may be a little higher, but know that some features may be unstable if you have this, or a higher than that amount of AI simultaneously. The total amount of AI bipeds a client will have in its map is the double of the server's current amount (for example, 17 AI would mean 34 bipeds spawned in the client side). Almost every biped must be hit one more time after being detected as dead by the server (this is just an aesthetic glitch). Bipeds that can be killed by chain reactions (like the flood carrier and the infection form) become glitchy after being destroyed by other biped's explosion. It seems like the server kicks the clients that can't receive all the RCon messages and execute the necessary commands after that on time (this may only affect low performance computers). Despite the limitations about this, I've automated as much as possible to make the process of syncing AI for a new map insanely faster than it was before, now just a dozen lines of code, or even less (actually, calls to other functions) can do all the job for themselves depending on the different amount of bipeds you include in a map.
  9. Something I made in minutes a pair of days ago (A rounds script, and some changes to my previous AI sync one). I'll make a proper thread for this when I have enough time and fix some of its worst bugs that currently make it unstable.
  10. I think the default directory for Lua scripts is "C:\Users\[your user name]\Documents\My Games\Halo CE\sapp\lua". Once you drop the script there you'll have to load it either writing in your init.txt "lua_load ai_sync_1" (without the quotes) or typing that same command through the server console.
  11. Thanks, and about how I started doing this... Well, it was like a gradual process before I knew anything about modding, I used to ocasionally watch videos about PC or console mods but at that time I could only be amazed by them because I used to think that such stuff could be added/changed only through the use of tools that my lack of knowledge wouldn't allow me to use at that time, such as Hex editors or anything that involved "breaking" (you know what I mean) the game, but when I knew the HEK was a thing and finally got it in my hands, everything changed. Now, about 5 months later I've done more than I thought would be possible with the engine and do not regret a single second. And yes, I hope to be helpful when possible during my stay, would love to see new and fresh content, just like the one you guys have been making through these years.
  12. I know that AI sync has been done before with a method similar to this, however, I haven't seen any stuff released, so... I made my own attempt and it seemed to work. I thought that not sharing it would be a waste, so, here it is. To test it you just need to load the script with SAPP and start a match in the sync_test_2 map, give it a try, take a look at the script if you want to test it with your own tags or understand how it works, I don't know. Feel free to ask me any questions about it or to let me know if you find a glitch on it, maybe I'll upload an improved version that fixes some of the bugs that it currently has. The sync_test_2.rar contains the map and the Lua script.
  13. Hello! I'm new to the community (This, and maybe to the whole Halo CE one too), now you may have already guessed the reason why I've come, I've been making content (some tags, scripts, and maps, obviously) for the Custom Edition. I've learned a lot from this forum and halomaps.org, and I thought that it would be time to return the favor (even though I might have come a "little" too late for it, lol). Maybe in a few hours/tomorrow I'll post my first release. Things you should know about me? Maybe that english isn't my main language, so, if I write something wrong (grammar or orthographic errors) please let me know (if possible by PM, otherwise it'd be pretty embarrassing). I'd be thankful about that. PS: I love the dark grey scheme of the site, congratulations to whoever thought of making it that way!