[Resource] Recompileable GSCs for BO2
-
For the past month I have been working on restoring the scripts in patch_zm so that they can be compiled and loaded on dedicated servers. I have had a great deal of success and have learned a lot along the way. I've decided to make the project officially public on the forums because I have completed checking nearly every script in patch_zm/maps/mp/zombies. The scripts in patch_zm/maps/mp/zombies control a great deal of the mechanics of zombies so this is a big deal if you've ever wanted to modify core mechanics of the game like the cost of perks, or something advanced like the behavior of specific powerups.
The project is currently hosted on my github: https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies
If you encounter any bugs please report them in this topic so that I can get to fixing them. Not all of the scripts have been tested since its already time consuming enough to check them. They should all compile and are very likely to be stable if buggy.
If you want stability definitely stick to using scripts in the No Known Errors category since they have been tested to a degree and debugged sufficiently to the point where I haven't encountered any errors anymore.
If you would like to contribute to the project make sure you study how I have checked the scripts already available that way consistency is maintained.
-
I would like to help you with this I'm gonna take a look at some multiplayer scripts and see if i can get some of those working.
If you have any advice, please let me know!
EDIT #1 _callbacksetup.gsc seems to be working with barely any modification, no bugs found:
#include maps\mp\gametypes\_hostmigration; #include maps\mp\gametypes\_globallogic_vehicle; #include maps\mp\gametypes\_globallogic_actor; #include maps\mp\gametypes\_globallogic_player; #include maps\mp\gametypes\_globallogic; #include maps\mp\_audio; #include maps\mp\_utility; codecallback_startgametype() { [[level.callbackstartgametype]](); level.gametypestarted = 1; } codecallback_finalizeinitialization() { maps\mp\_utility::callback( "on_finalize_initialization" ); } codecallback_playerconnect() { self endon( "disconnect" ); self thread maps\mp\_audio::monitor_player_sprint(); [[level.callbackplayerconnect]](); } codecallback_playerdisconnect() { self notify( "disconnect" ); level notify( "disconnect", self ); client_num = self getentitynumber(); [[level.callbackplayerdisconnect]](); } codecallback_hostmigration() { println( "****CodeCallback_HostMigration****" ); [[level.callbackhostmigration]](); } codecallback_hostmigrationsave() { println( "****CodeCallback_HostMigrationSave****" ); [[level.callbackhostmigrationsave]](); } codecallback_playermigrated() { println( "****CodeCallback_PlayerMigrated****" ); [[level.callbackplayermigrated]](); } codecallback_playerdamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex ) { self endon( "disconnect" ); [[level.callbackplayerdamage]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex ); } codecallback_playerkilled( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset, deathanimduration ) { self endon( "disconnect" ); [[level.callbackplayerkilled]]( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset, deathanimduration ); } codecallback_playerlaststand( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset, deathanimduration ) { self endon( "disconnect" ); [[level.callbackplayerlaststand]]( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset, deathanimduration ); } codecallback_playermelee( eattacker, idamage, sweapon, vorigin, vdir, boneindex, shieldhit ) { self endon( "disconnect" ); [[level.callbackplayermelee]]( eattacker, idamage, sweapon, vorigin, vdir, boneindex, shieldhit ); } codecallback_actordamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex ) { [[level.callbackactordamage]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, boneindex ); } codecallback_actorkilled( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset ) { [[level.callbackactorkilled]]( einflictor, eattacker, idamage, smeansofdeath, sweapon, vdir, shitloc, timeoffset ); } codecallback_vehicledamage( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, damagefromunderneath, modelindex, partname ) { [[level.callbackvehicledamage]]( einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, timeoffset, damagefromunderneath, modelindex, partname ); } codecallback_vehicleradiusdamage( einflictor, eattacker, idamage, finnerdamage, fouterdamage, idflags, smeansofdeath, sweapon, vpoint, fradius, fconeanglecos, vconedir, timeoffset ) { [[level.callbackvehicleradiusdamage]]( einflictor, eattacker, idamage, finnerdamage, fouterdamage, idflags, smeansofdeath, sweapon, vpoint, fradius, fconeanglecos, vconedir, timeoffset ); } codecallback_faceeventnotify( notify_msg, ent ) { ent sendfaceevent( level.face_event_handler.events[notify_msg] ); } codecallback_menuresponse( action, arg ) { level.menuresponsequeue = []; level thread menuresponsequeuepump(); index = level.menuresponsequeue.size; level.menuresponsequeue[index] = spawnstruct(); level.menuresponsequeue[index].action = action; level.menuresponsequeue[index].arg = arg; level.menuresponsequeue[index].ent = self; level notify( "menuresponse_queue" ); } menuresponsequeuepump() { level waittill( "menuresponse_queue" ); level.menuresponsequeue[0].ent notify( "menuresponse", level.menuresponsequeue[0].action, level.menuresponsequeue[0].arg ); arrayremoveindex( level.menuresponsequeue, 0, 0 ); wait 0.05; } setupcallbacks() { setdefaultcallbacks(); level.idflags_radius = 1; level.idflags_no_armor = 2; level.idflags_no_knockback = 4; level.idflags_penetration = 8; level.idflags_destructible_entity = 16; level.idflags_shield_explosive_impact = 32; level.idflags_shield_explosive_impact_huge = 64; level.idflags_shield_explosive_splash = 128; level.idflags_no_team_protection = 256; level.idflags_no_protection = 512; level.idflags_passthru = 1024; } // 0xE78 setdefaultcallbacks() { level.callbackstartgametype = maps\mp\gametypes\_globallogic::callback_startgametype; level.callbackplayerconnect = maps\mp\gametypes\_globallogic_player::callback_playerconnect; level.callbackplayerdisconnect = maps\mp\gametypes\_globallogic_player::callback_playerdisconnect; level.callbackplayerdamage = maps\mp\gametypes\_globallogic_player::callback_playerdamage; level.callbackplayerkilled = maps\mp\gametypes\_globallogic_player::callback_playerkilled; level.callbackplayermelee = maps\mp\gametypes\_globallogic_player::callback_playermelee; level.callbackplayerlaststand = maps\mp\gametypes\_globallogic_player::callback_playerlaststand; level.callbackactordamage = maps\mp\gametypes\_globallogic_actor::callback_actordamage; level.callbackactorkilled = maps\mp\gametypes\_globallogic_actor::callback_actorkilled; level.callbackvehicledamage = maps\mp\gametypes\_globallogic_vehicle::callback_vehicledamage; level.callbackvehicleradiusdamage = maps\mp\gametypes\_globallogic_vehicle::callback_vehicleradiusdamage; level.callbackplayermigrated = maps\mp\gametypes\_globallogic_player::callback_playermigrated; level.callbackhostmigration = maps\mp\gametypes\_hostmigration::callback_hostmigration; level.callbackhostmigrationsave = maps\mp\gametypes\_hostmigration::callback_hostmigrationsave; } abortlevel() { println( "ERROR: Aborting level - gametype is not supported" ); level.callbackstartgametype = ::callbackvoid; level.callbackplayerconnect = ::callbackvoid; level.callbackplayerdisconnect = ::callbackvoid; level.callbackplayerdamage = ::callbackvoid; level.callbackplayerkilled = ::callbackvoid; level.callbackplayerlaststand = ::callbackvoid; level.callbackplayermelee = ::callbackvoid; level.callbackactordamage = ::callbackvoid; level.callbackactorkilled = ::callbackvoid; level.callbackvehicledamage = ::callbackvoid; setdvar( "g_gametype", "dm" ); exitlevel( 0 ); } codecallback_glasssmash( pos, dir ) { level notify( "glass_smash", pos, dir ); } callbackvoid() { //blank function }
-
Deicide Yeah if your interested I am starting the gametypes_zm series of scripts now. Most of them should be similar to their mp counterparts but I've already found some differences between them. I didn't mean to but I uploaded the zm versions of some scripts instead of the mp versions to my patch_mp folder on the github. So now when I upload the real mp versions we'll actually be able to see the differences between them. I've already noticed several scripts don't have much differences between them other than includes using gametypes instead of gametypes_zm and so on.
If you want to help with the project check out my debugging guide:
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies/blob/master/debugging_guide.mdAs well my debugging mod:
https://github.com/JezuzLizard/Recompilable-gscs-for-BO2-zombies/blob/master/debugging mod/readme.md -
does it work on lan?
-
JezuzLizard patch_zm/maps/mp/zombies/_zm_perk_electric_cherry.gsc on function electic_cherry_precache() is precacheshader( "specialty_fastreload_zombies" ); but is the shader for speed cola and i don't know what is the name for electric cherry. I test with "specialty_electric_cherry_zombies" and "specialty_grenadepulldeath_zombies" but not works and result with grey case. I test on Origin an MoTD maps.
-
NexT-_McDonalds Unfortunately I do not know what the correct name is only that whatever that script is currently is correct to the best of my knowledge.
-
JezuzLizard disculpen mi ignorancia, no se mucho ingles, que hacen estos gsc en si?
-
NexT-_McDonalds its like minimap_electric_cherry or something of that sort i dont remember off hand TBH
-
luigismansion44 hi, after an certain update of plutonium, without change my scrip, the shader of electric cherry appears correctly with this name : "specialty_electric_cherry_zombie"