Arkensor / DayZCommunityOfflineMode

A community made offline mod for DayZ Standalone
Other
362 stars 194 forks source link

No Loot or Infected on server #295

Closed YourTheFinestIveEverKnown closed 3 years ago

YourTheFinestIveEverKnown commented 3 years ago

Offline Mode loads up fine, but there is no loot or infected anywhere on the map it seems. Police station, houses, cars, etc in Chernarus are completely void of all loot and zombies.

Checked my config in the CommunityOfflineClient.c file (as per the instructions found at: https://github.com/Arkensor/DayZCommunityOfflineMode/wiki/Toggle-loot-and-infected-spawn ) and it was already set to 'true'.

Including my config file just in case I am missing something. Thanks.

-----------------------CONFIG BELOW----------------------------

class CommunityOfflineClient extends MissionGameplay { protected bool HIVE_ENABLED = true; //Local Hive / Economy / Infected spawn

protected bool m_loaded;

void CommunityOfflineClient()
{
    m_loaded = false;

    NewModuleManager();
}

override void OnInit()
{
    super.OnInit();

    InitHive();

    SetupWeather();

    SpawnPlayer();

    GetDayZGame().SetMissionPath( "$saves:CommunityOfflineMode\\" ); // CameraToolsMenu
}

override void OnMissionStart()
{
    super.OnMissionStart();

    COM_GetModuleManager().OnInit();
    COM_GetModuleManager().OnMissionStart();
}

override void OnMissionFinish()
{
    COM_GetModuleManager().OnMissionFinish();

    CloseAllMenus();

    DestroyAllMenus();

    if( GetHive() )
    {
        DestroyHive();
    }

    super.OnMissionFinish();
}

void OnMissionLoaded()
{
    COM_GetModuleManager().OnMissionLoaded();
}

override void OnUpdate( float timeslice )
{
    super.OnUpdate( timeslice );

    COM_GetModuleManager().OnUpdate( timeslice );

    if( !m_loaded && !GetDayZGame().IsLoading() )
    {
        m_loaded = true;
        OnMissionLoaded();
    }
}

void SpawnPlayer()
{

// #ifndef MODULE_PERSISTENCY // GetGame().SelectPlayer( NULL, COM_CreateCustomDefaultCharacter() ); // #endif

// #ifdef DISABLE_PERSISTENCY GetGame().SelectPlayer( NULL, COM_CreateCustomDefaultCharacter() ); // #endif }

void InitHive()
{
    if ( GetGame().IsClient() && GetGame().IsMultiplayer() ) return;

    // RD /s /q "storage_-1" > nul 2>&1
    if ( !HIVE_ENABLED ) return;

    Hive oHive = GetHive();

    if( !oHive )
    {
        oHive = CreateHive();
    }

    if( oHive )
    {
        oHive.InitOffline();
    }

    oHive.SetShardID("100");
    oHive.SetEnviroment("stable");
}

static void SetupWeather()
{
    Weather weather = g_Game.GetWeather();

    weather.GetOvercast().SetLimits( 0.0 , 2.0 );
    weather.GetRain().SetLimits( 0.0 , 2.0 );
    weather.GetFog().SetLimits( 0.0 , 2.0 );

    weather.GetOvercast().SetForecastChangeLimits( 0.0, 0.0 );
    weather.GetRain().SetForecastChangeLimits( 0.0, 0.0 );
    weather.GetFog().SetForecastChangeLimits( 0.0, 0.0 );

    weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
    weather.GetRain().SetForecastTimeLimits( 600 , 600 );
    weather.GetFog().SetForecastTimeLimits( 600 , 600 );

    weather.GetOvercast().Set( 0.0, 0, 0 );
    weather.GetRain().Set( 0.0, 0, 0 );
    weather.GetFog().Set( 0.0, 0, 0 );

    weather.SetWindMaximumSpeed( 50 );
    weather.SetWindFunctionParams( 0, 0, 1 );
}

};