Skip to content

Commit

Permalink
cw zombies eyes, some errors, tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ate47 committed Apr 16, 2024
1 parent 7470027 commit b8177f7
Show file tree
Hide file tree
Showing 12 changed files with 298 additions and 14 deletions.
19 changes: 17 additions & 2 deletions coldwar/scripts/core_common/dev/config.gsc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef ATIAN_MENU_DEV
function AtianMenuConfigDev() {
// zombies per round
self.zombies_per_rounds = 99999;
self.zombies_per_rounds = 7;

self.force_camo = 63;

Expand All @@ -16,7 +16,22 @@ function AtianMenuConfigDev() {
"tool_menu::Invulnerability"
);

self.zombies_eyes = #"random";

// zm halloween
setgametypesetting(#"hash_4751990deae37e66", true);
//setgametypesetting(#"hash_4751990deae37e66", true);

thread get_xp_multiplier_late();
}

function get_xp_multiplier_late() {
wait 10;
if (is_zombies()) {
level.var_3426461d = &get_xp_multiplier;
}
}

function get_xp_multiplier() {
return 99999;
}
#endif
1 change: 1 addition & 0 deletions coldwar/scripts/core_common/header.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include scripts\core_common\values_shared;
#include scripts\core_common\util_shared;
#include scripts\core_common\player\player_stats;
#include scripts\core_common\spawner_shared;

#namespace atianmenu;

Expand Down
2 changes: 1 addition & 1 deletion coldwar/scripts/core_common/menu_funcs.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ function func_unlock_all(item) {
#endif
}

func_3rdperson(item) {
function func_3rdperson(item) {
if (!isdefined(self.thirdperson)) {
self.thirdperson = false;
}
Expand Down
20 changes: 20 additions & 0 deletions coldwar/scripts/core_common/menu_items.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ function init_menus() {
self add_menu_item("zombies_speed", "Super sprint", &func_zombies_speed, "super_sprint");

self add_menu_item("tool_zm", "Open doors", &func_zombie_open_sesame);

self add_menu("zombies_eyes", "Zombies eyes", "tool_zm", true);
self add_menu_item("zombies_eyes", "Clear", &func_zm_set_zombies_eyes_color, #"clear");
self add_menu_item("zombies_eyes", "Blue", &func_zm_set_zombies_eyes_color, #"blue");
self add_menu_item("zombies_eyes", "Green", &func_zm_set_zombies_eyes_color, #"green");
self add_menu_item("zombies_eyes", "Red", &func_zm_set_zombies_eyes_color, #"red");
self add_menu_item("zombies_eyes", "Orange", &func_zm_set_zombies_eyes_color, #"orange");
self add_menu_item("zombies_eyes", "Random", &func_zm_set_zombies_eyes_color, #"random");
}

self add_menu("tool_weapon", "Guns", "start_menu", true);
Expand Down Expand Up @@ -375,9 +383,21 @@ function init_menus() {

self add_menu_item("dev", "test weapon 1", &func_dev_weap_1);
self add_menu_item("dev", "test weapon 2", &func_dev_weap_2);
self add_menu_item("dev", "test ee", &func_test_ee);
}
}

function func_test_ee(item) {
#ifdef ATIAN_MENU_DEV
isee = @zm_utility<scripts\zm_common\zm_utility.gsc>::is_ee_enabled;
if (isdefined(isee)) {
self iprintln("ee: " + [[ isee ]]());
} else {
self iprintln("ee: undefined");
}
#endif
}

function add_vehicle_obj(title, vehicule_type) {
if (!isassetloaded("vehicle", vehicule_type)) {
return; // vehicle not loaded or already in the enum
Expand Down
3 changes: 3 additions & 0 deletions coldwar/scripts/zm_common/zm.gsc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function __pre_init_zm__() {
level.player_starting_points = level.atianconfig.player_starting_points;
}
callback::add_callback(#"on_round_end", &on_round_end, undefined);
spawner::add_archetype_spawn_function(#"zombie", &on_zm_zombie_spawn);
}

function init_gametype_zm() {
Expand All @@ -24,6 +25,8 @@ function count_zombies(*round_number, *player_count) {

function on_round_end() {
level endon(#"hash_3e765c26047c9f54", #"end_game");

wait 10;

level flag::set("rbz_exfil_allowed");
}
73 changes: 73 additions & 0 deletions coldwar/scripts/zm_common/zombie_eyes.gsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
function on_zm_zombie_spawn() {
self.am_noted = 1;
if (isdefined(level.atianconfig.zombies_eyes)) {
color_id = zm_set_zombies_eyes_color_title(level.atianconfig.zombies_eyes);
// delay the call to bypass the default implementation
self thread zm_zombie_eye_glow_delay(color_id);
}
}

function func_zm_set_zombies_eyes_color(item, color_id) {
zm_set_zombies_eyes_color(color_id);
}

function zm_set_zombies_eyes_color(color_id) {
level.atianconfig.zombies_eyes = color_id;

all_ai = getaiteamarray(#"world");
if (isdefined(all_ai)) {
foreach (ai in all_ai) {
if (isalive(ai)) {
// set the zombies' color for the alive one
ai thread zm_zombie_eye_glow(color_id);
}
}
}
}

function zm_zombie_eye_glow_rainbow(color_id) {
if (color_id == #"random") {
return randomintrange(1, 5);
}
return color_id;
}

function zm_zombie_eye_glow_delay(color_id) {
self endon(#"death");
if(isdefined(self.in_the_ground) && self.in_the_ground || (isdefined(self.in_the_ceiling) && self.in_the_ceiling)) {
while(!isdefined(self.create_eyes)) {
wait(0.1);
}
} else {
wait(0.5);
}
wait 0.1;
self zm_zombie_eye_glow(color_id);
}

function zm_zombie_eye_glow(color_id) {
if(!isdefined(self) || !isactor(self)) {
return;
}
self clientfield::set("zombie_eye_glow", zm_zombie_eye_glow_rainbow(color_id));
}

function zm_set_zombies_eyes_color_title(color_title) {
if (!ishash(color_title)) {
color_title = hash(color_title);
}
switch (color_title) {
case #"blue":
return 2;
case #"green":
return 3;
case #"orange":
return 4;
case #"clear":
return 0;
case #"random":
return #"random";
default:
return 1;
}
}
25 changes: 25 additions & 0 deletions docs/notes/errors.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Baker 441 Proper Section 2346900383 not an object
Baker 917 Brute Goodnight 4104994143 can't allocate more script variables
Boy 108 Sapphire Sagittarius 766802866 Invalid fastfile header
Boy 145 Destructive Tank 3304446514 not an entity
Boy 44 Blood Lamprey 3971544690 time cannot be negative
Boy 601 Everest Tiger 312545010 not a vector
Boy 856 Burner Eclipse 1015938482 not an entity
Boy 986 Extreme Crossbones 3488519410 object is not an array, string, or vector
Expand All @@ -30,6 +31,7 @@ Charlie 530 Cut Security 2036025092 formatting can only be used with player enti
Charlie 555 Acid Jackpot 3812357892 script stack overflow (too many embedded function calls)
Charlie 643 Ace Alligator 1167526340 invalid session mode
Collar 543 Satellite Fort 1756043215 Usage: kill( <source position>, <attacker>, <inflictor>, <weapon>)
Collar 738 Destructive Crocodile 1156941583 Invalid threat bias group
Collar 772 Flying Shell 2378228303 invalid session mode
David 180 Camouflaged Asset 2572009355 vector scale expecting vector
David 246 Violet Axe 285416523 not an object
Expand All @@ -44,6 +46,7 @@ Delta 320 Monster Tornado 179749049 cannot cast to bool
Delta 515 United Mauler 3137736761 script stack overflow (too many embedded function calls)
Delta 694 Fierce Fort 1752379961 param is not an object
Delta 796 Nightshade Artillery 2274889209 Invalid type passed in from array into waittill parameter list
Delta 884 Aggressive Sunrise 3706227705 Invalid threat bias group
Delta 899 Urban Claw 2955023929 not an object
Dog 415 Dry Owl 409067247 No clientfield named found in set.
East 1005 Found Badger 269518924 Ammo count must not be negative
Expand All @@ -66,6 +69,7 @@ Fall 344 Camouflaged Cover 2655888797 endon must have at least one valid argumen
Fall 388 Quick Conflict 1364331101 Object must be an array
Fall 508 Solo Defense 1668598749 not an object
Fall 52 Air Spear 2921226909 Can't register dvar
Fall 697 Defiant Owl 417653725 EXE_PATCH_STATSOVERFLOW
Fall 78 Sub-zero Serpent 3098745181 invalid character index
Foxtrot 14 Nuclear Cobra 209668787 RandomInt parm must be positive integer.
Foxtrot 187 Aggressive Ordnance 2078816051 not a valid name for a clientfield set.
Expand All @@ -82,6 +86,7 @@ Golf 643 Earth Specialist 2417691091 Execution Queue out of memory
Hotel 151 Guerrilla Jackpot 3815761761 Error when loading fastfile
Hotel 173 Tragic Goblin 3459949409 Failed to alloc client field - MAX_CLIENTFIELD_FIELDS_IN_SET=512 exceeded.
Hotel 39 Weak Outlaw 4048135393 Can't find variable
Hotel 418 Grey Management 4229118753 Invalid threat bias group
Hotel 460 United Goblin 3456527393 script stack overflow (too many embedded function calls)
Hotel 511 Meridian Boar 114609313 USAGE: GetInfluencerPreset could not find influencer with name
Hotel 621 Dry Greyhound 476151073 invalid session mode
Expand All @@ -90,11 +95,14 @@ Ida 309 Barricaded Bandit 3210502050 not an object
Ida 635 Rightful Elephant 467754466 Error registering client field. bCallbacksFor0WhenNew (CF_CALLBACK_ZERO_ON_NEW_ENT) is disallowed for CF_SCRIPTMOVERFIELDS.
Ida 736 Quick Lamprey 3964856290 kill called on an entity with magic bullet shield (FL_DISABLE_DEATH)
Ida 941 Gray Mustang 3894031202 Can't find gamedata/playeranim/playeranimtypes.txt
India 185 Operation Crocodile 1147874990 start time must be between 0 and 1
India 36 Skyline Overlord 2903034222 Invalid mode id
India 441 Stealth Star 3857374126 caller is not an object
India 579 Deadly Gemini 657813230 Error registering client field. bCallbacksFor0WhenNew (CF_CALLBACK_ZERO_ON_NEW_ENT) is disallowed for counter type clientfields. Due to it's treatment of the old and new val as a ring buffer, the counter type is not valid on a new snapshot, new ent, or demojump
India 811 Max Thunder 530300974 divide by 0
Juliett 283 Apocalyptic Vulture 424587329 not a pathnode
Juliett 490 Quick Fury 2941436609 Invalid threat bias group
Juliett 510 Blazing Station 2797012161 distMax is less than distMin
Juliett 791 Null Lantern 3678699265 not a pointer
Juliett 859 Small Rookie 554833601 Can only do this call for node_turret
June 426 Hurt Tactics 2489324310 cannot switch on type
Expand All @@ -107,6 +115,8 @@ Kilo 717 Clockwork Refuge 4220857104 Cannot call IncrementClientField on a 'coun
King 1002 Fast Linebacker 3059411687 Argument and parameter count mismatch for LUINotifyEvent
King 220 Wartorn Fury 2940210599 Invalid Version Handling. Grab Bat !!!
King 30 Tough Asset 2577695271 SetModel can only be called on a script mover
King 404 Sapphire Ice 3635717863 end time must be between 0 and 1
King 593 Late Ant 1206320999 getClosestOrFarthestEntity: struct passed in doesn't have an origin
Lima 486 Flat Apocalypse 3361905947 Pointer is not an entity
Lima 495 Old Security 2033447003 not an array key
Lima 510 Bogus Rescue 2235303131 not a player entity
Expand All @@ -132,12 +142,16 @@ Nora 871 Orange Mirage 3255107847 LUINotifyEvent: entity must be a player entity
North 272 Hannibal Defense 1670707254 linking error
North 662 Military Plane 2104587190 Unknown client field set for clientfield
North 78 Blood Wolf 12065142 invalid session mode
North 803 Swamp Conflict 1359849142 not an entity
North 928 Fake Fury 2940431926 Invalid threat bias group
North 96 Sleeper Demon 544902518 parameter does not exist
November 116 Mythic Scorpio 750896894 Invalid bgCache type
November 268 Wild Greyhound 475330046 Invalid dvar type
November 417 Silver Sunrise 3692510654 Invalid type passed in from array into waittill parameter list
November 588 Barren Carrier 1593720126 Can't register dvar
November 670 Boiling Avalanche 829015102 not a pointer
November 670 Boiling Avalanche 829015102 var isn't a field object
November 817 Tall Shell 2369974846 Invalid threat bias group
November 990 Fake Operator 1480821566 Error registering client field. Attempted field size is not acceptable bit number range 1->32
Ocean 116 Confused Corps 1642120921 1st param should be a hash or a string
Ocean 270 Grounded Infantry 1850691545 Debug Break
Expand All @@ -150,6 +164,7 @@ Oscar 1009 Emerald Invasion 1908025062 parameter isn't a string
Oscar 771 Central Zeus 3329708710 Unable to find default bitfield, dropping
Papa 1018 Rocky Beastmaster 3030895505 Whitelist failure for title
Papa 209 Grey Cadet 1544804945 script stack overflow (too many embedded function calls)
Papa 530 Invisible Hippo 989284113 model not cached by the linker
Papa 656 Area Jaguar 1088278929 Raw file is not a file of the right type
Papa 810 Right Case 2606724305 parameter does not exist
Papa 859 Fierce Python 1047729873 exitlevel already called
Expand All @@ -167,6 +182,7 @@ Quebec 387 Poison Goodnight 4106063796 key value provided for array is not valid
Quebec 529 Knockout Headquarters 1804370036 Failed to verify file type
Quebec 794 Bog Fleet 1697447028 Can't use wait with profiler
Quebec 873 Midnight Operator 1487510644 Could not load gsc object
Quebec 919 Hidden Dawn 4077883892 Param can't be higher than 7
Quebec 965 Dangerous Jackpot 3810601716 undefined param
Queen 114 Rocky Medal 1957162421 Can't find bgCache entry
Queen 116 Classic Rattlesnake 124438261 not a script function pointer
Expand All @@ -177,6 +193,7 @@ Queen 235 Wicked Libra 732489269 Non-player entity passed to UploadStats()
Queen 254 Unfriendly Python 1053986869 GScr_UseBuildKitWeaponModel: called with weapon 'none'
Queen 427 Apocalyptic Treasure 4182670005 invalid session mode
Queen 47 Sick Eagle 325402485 script stack overflow (too many embedded function calls)
Queen 513 Ultraviolet Buffalo 1304594933 unable to spawn entity
Queen 577 Weak Manuever 1967731701 Invalid type passed in from array into waittill parameter list
Queen 964 Shellshocked Rank 2185211445 Can't register dvar
Roger 304 Hurt Honey 3797948576 not an object
Expand All @@ -187,6 +204,7 @@ Roger 630 Shadow Zombie 899599904 first arg to waittill_timeout must evaluate to
Roger 753 Fake Outlaw 4047738848 Invalid opcode (Recovery)
Roger 850 Grey Whisper 3524483616 Ammo count must not be negative
Roger 853 Lone Platoon 2122198496 The sound globals have been overwritten
Romeo 215 Early Stockade 2481266032 can't cast parameter to string
Romeo 459 Battle Traffic 2838301872 Gesture table key can't have the higher bit set
Romeo 534 Axiom Asset 2579736624 Incorrect number of parameters.
Romeo 569 Clipped Squad 2448966512 string too long
Expand All @@ -202,6 +220,7 @@ Sail 506 Blink Alligator 1167129573 key does not internally belong to generic en
Sail 543 Earth Whisper 3524990949 not an array key
Sail 630 Nuclear Bug 2894056997 DEV: CL_SetCGameTime: !cl->snap.valid
Sail 692 Sapphire Avalanche 833940261 divide by 0
Sail 946 Due Outlander 3922439973 ArraySort: array can only contain entities or structs or vectors
Sierra 190 Knight Thunder 530250396 Source Damage vector is invalid.
Sierra 54 Found Treasure 4178589916 Model was not cached by the linker.
South 1020 Calm Potato 2538360978 caller is not an object
Expand All @@ -228,6 +247,7 @@ Summer 620 Split Legend 2734491973 Error need at least one argument for LUINotif
Summer 738 Barracuda Pattern 2782299909 script stack overflow (too many embedded function calls)
Summer 986 Rare Operator 1480037573 Invalid canonical name hash
Tango 516 Advanced Tactics 2498210007 -- can only be used with integer type
Tango 534 Blind Asset 2572593175 unable to spawn entity
Tango 8 Knight Taurus 647662103 parameter can't be cast to a string
Tango 882 Aurora Invasion 1909233687 Optional argument must be a vector type
Tommy 439 Tin Highway 3592841213 cannot directly set the origin on AI. Use the teleport command instead.
Expand All @@ -243,6 +263,7 @@ Union 344 Blue Headquarters 1795335576 not an object
Union 701 Sick Eclipse 1013305560 Pointer types passed into waittill expressions must evaluate as arrays
Union 908 Evil Giant 876169112 key value provided for struct is not valid
Union 958 Mad Retreat 2253722136 CamAnimScripted can only be called on a player.
Vic 335 Small Pattern 2769479381 Invalid threat bias group
Vic 366 Crystal Lion 249068885 Failed to allocate from state pool
Vic 415 Aggressive Pisces 619241173 Failed to allocate from element pool
Vic 504 Pale Fury 2942156629 not an array
Expand All @@ -251,6 +272,7 @@ Vic 820 Nitro Goodnight 4103906837 Entity is not an item.
Vic 983 Extreme Traffic 2851002517 param is not an object
Vice 344 Spotted Doppelganger 4252738993 script stack overflow (too many embedded function calls)
Vice 400 Tall Dove 222443377 Pointer types passed into waittill_timeout expressions must evaluate as arrays
Vice 535 TD Rookie 562750257 ArraySort can only be called on an Entity which is of type Entity, Path Node, Vehicle Node, or Tacpoint.
Vice 697 Metal Service 2355618801 Gesture table key can't have the higher bit set
Vice 70 Grim Storm 1402557361 bad opcode
Vice 804 Axiom Conquest 3385008561 cannot set field on type
Expand Down Expand Up @@ -286,8 +308,10 @@ Yankee 687 Screech Snake 512306404 not a function pointer
Yankee 780 Bad Shell 2368908708 invalid session mode
Yankee 913 Evil Libra 725202020 caller is not an object
Yankee 921 Gothic Navy 2055356644 entity is not a script_brushmodel, script_model, script_origin, probe, or light
Yorker 54 Violet Zombie 889403597 SpawnCollision: Collision model name is not valid
Yorker 553 Broken Lion 243367053 The setHintStringForPlayer command can only change prompts for players.
Yorker 721 Nickel Platoon 2116335949 function called with too many parameters
Yorker 902 Small Doppelganger 4245873293 not a path node
Young 100 Skyline Pavement 3607664937 first arg to endon_callback must evaluate to a function value
Young 137 Blind Lantern 3679846953 LUINotifyEvent: entity must be a player entity
Young 598 Patient Command 1601358697 param is not an object
Expand All @@ -297,6 +321,7 @@ Zebra 32 Grizzly Lizard 377246011 invalid session mode
Zebra 84 World Bayonet 1524410875 Execution Queue out of memory
Zebra 909 Aurora Wave 3654063291 ScrEvent map is full, unable to register new event
Zed 105 Riptide Volley 2517242050 parameter does not exist
Zed 170 Extreme Gorilla 367932162 ArraySort: array contains more than 4096 entities
Zed 251 Silent Scorpio 753495682 RandomIntRange's second parameter must be greater than the first.
Zed 453 Kinetic Devil 1211376898 DEV: Could not load level fastfile for level
Zed 606 Tin Refuge 4213634562 precacheLeaderboards must be called before any wait statements in the gametype or level script
Expand Down
4 changes: 2 additions & 2 deletions docs/notes/funcs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,8 @@ GSC-Function-49b9ae0,recordent,1,1,1,BlackOps4.exe+330A630,nulled
GSC-Function-49b9ae0,recorderplayback,0,0,1,BlackOps4.exe+330A680,nulled
GSC-Function-49b9ae0,print,1,7fffffff,1,BlackOps4.exe+3397C50,nulled
GSC-Function-49b9ae0,println,1,7fffffff,1,BlackOps4.exe+3397C60,nulled
GSC-Function-49b9ae0,profileprintln,1,7fffffff,0,BlackOps4.exe+3397C70,
GSC-Function-49b9ae0,printtoprightln,1,3,0,BlackOps4.exe+3397C80,
GSC-Function-49b9ae0,profileprintln,1,7fffffff,0,BlackOps4.exe+3397C70,nulled
GSC-Function-49b9ae0,printtoprightln,1,3,0,BlackOps4.exe+3397C80,nulled
GSC-Function-49b9ae0,iprintln,1,7fffffff,0,BlackOps4.exe+3397C90,
GSC-Function-49b9ae0,iprintlnbold,1,7fffffff,0,BlackOps4.exe+3397CF0,
GSC-Function-49b9ae0,print3d,2,6,1,BlackOps4.exe+3397D50,nulled
Expand Down
15 changes: 15 additions & 0 deletions docs/notes/notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -1306,4 +1306,19 @@ music zm_frontend
Animtree = sub_2755AB0
DVAR_NONE = 0,
DVAR_ARCHIVE = 1 << 0, // 0x1
DVAR_USERINFO = 1 << 1, // 0x2
DVAR_SERVERINFO = 1 << 2, // 0x4
DVAR_SYSTEMINFO = 1 << 3, // 0x8
DVAR_LATCH = 1 << 4, // 0x10
DVAR_ROM = 1 << 5, // 0x20
DVAR_SAVED = 1 << 6, // 0x40
DVAR_INIT = 1 << 7, // 0x80
DVAR_CHEAT = 1 << 8, // 0x100
//DVAR_UNKNOWN = 1 << 9, // 0x200
DVAR_EXTERNAL = 1 << 10, // 0x400
//DVAR_UNKNOWN3x = 1 << 11-13, // 0x800-> // 0x2000
DVAR_SESSIONMODE = 1 << 15 // 0x8000
```
Loading

0 comments on commit b8177f7

Please sign in to comment.