Modme Forums

Client Field Mismatch - Zombie Shield on Chronicles Maps

Game Modding | Call of Duty: Black Ops 3 | Scripting


Atchfam77:

Hello everyone. First I realize that I am making a new thread when I already have a similar one open, however, the issue has become something new, hence why I am making this post. Either way, sorry if this is considered spamming the forums.
I am trying to make a quality of life mod that includes repairing your shield with a Carpenter drop. The issue is my mod is crashing when loading a map without the Zombie Shield. I have been testing on Moon to try and fix this issue.

The "crash" is more of a boot-to-main-menu type error, and then BO3 spits out a "Client Field Mismatch." I tried following this page and received this from the console:

" CSC 'clientuimodel' set does not contain field 'zmInventory.shield_health' "

My intuition tells me this is because Moon's HUD doesn't support a zombie shield, but please correct me if I am wrong.

Is there any way to get this to stop happening, or to modify this "clientuimodel" set to include the required field? I'm out of ideas currently.

Here is my code if that helps:

function carp(player)
{
    players = GetPlayers();
    if(isDefined(level._get_game_module_players))
    {
        players = [[level._get_game_module_players]](player);
    }
    while(1)
    {
        self waittill( "carpenter_finished" );
        for (i = 0; i < players.size; i++)
        {
            if( !IS_TRUE( players[i].hasRiotShield ) )
                return;
          
            players[i] riotshield::player_set_shield_health( 1, 1 );
            w_weapon = players[i] getCurrentWeapon();
            players[i] takeWeapon( players[i].weaponRiotshield );
            players[i] giveWeapon( players[i].weaponRiotshield );
            if ( w_weapon.isriotshield )
                players[i] switchToWeapon( players[i].weaponRiotshield );
        }
    }
    
}

This code is similar to the code in HarryBO21's powerups pack from his Carpenter script, mixed with Treyarch's Max Ammo script. This has been tested and works fine on all DLC maps that have shields, except for Origins. Maps without shields crash and boot to the main menu with the error as stated above. Origins refuses to work no matter what I do. My guess for that is the Origins shield is not considered a "zm_weap_riotshield", but again I am lost as to how I should fix it.

Any help at all is appreciated. Thank you.


Atchfam77:

To add to my post:

An alternate solution I am pursuing is the ability to read the level ID in the script and automatically disable this part of my mod instead.

If someone has a way to either provide the map the missing clientfield via my mod script, or to somehow disable the section that attempts to call the shared zombie shield script, I would be very appreciative.

I intend on crediting all those who help me in the mod description on Steam forums once the problem is solved.

Thanks again.


Atchfam77:

I ended up just releasing a version of the mod that doesn't include this feature specifically for Zombies Chronicles and custom maps.

\end thread