[ZM] Deterministic Moon characters
-
My friends and I started playing CoD Zombies to complete all easter eggs. We were always joining the lobby in the same order to play the same characters in each map. Except when we arrived at Moon and the characters were kind of randomized. This annoyed us greatly, so I decided to change this behavior by writing a script to make the character order deterministic.
// This scripts replaces Moon's default character pseudo-randomization with the behavior other maps have: // each player gets Dempsey (1st), Nikolai (2nd), Takeo (3rd) and Richtofen (4th) according to the order they joined. // If there are less than 4 players in the lobby, the last player to join is always Richtofen. // // Place this script in %LocalAppData%\Plutonium\storage\t5\scripts\sp\zom // and save it as zm_moon_deterministic_char.gsc. // Only the lobby host needs the script. init() { if (level.script == "zombie_moon") { level.zombiemode_give_player_model_override = ::give_player_model_override; } } give_player_model_override(entity_num) { multiplayer = GetNumExpectedPlayers() > 1; if (multiplayer) { if (entity_num == (GetNumExpectedPlayers() - 1)) { entity_num = 3; } self.zm_random_char = entity_num; } else { entity_num = self.zm_random_char; } self.entity_num = entity_num; if (entity_num == 0) character\c_usa_dempsey_dlc5::main(); if (entity_num == 1) character\c_rus_nikolai_dlc5::main(); if (entity_num == 2) character\c_jap_takeo_dlc5::main(); if (entity_num == 3) character\c_ger_richtofen_dlc5::main(); level._num_overriden_models++; } -
undefined bhfff referenced this topic on
-
Love this one! Never knew you could call those functions to change model

-
Thank you bhfff for linking to this script from your topic.
It was an adventure to figure out how scripting works and how to replace game logic. The script sources for BO1 and your code explorer were very useful resources. I hope those get advertised more prominently in the official Plutonium documentation.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login