Map & Kartenanpassung

  • Das sollte in die init.c

    Die Grünen Zeilen sind deine Objekte.

    Spoiler anzeigen

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    void main()

    {

    //costum spawned objects

    SpawnObject( "Land_Castle_Wall1_20", "14340.950195 6.779966 13282.156250", "0.000000 0.000000 0.000000" );

    SpawnObject( "Land_Castle_Wall1_20", "14340.950195 6.779966 13282.156250", "0.000000 0.000000 0.000000" );

    SpawnObject( "Land_Castle_Wall1_20", "14340.950195 6.779966 13282.156250", "0.000000 0.000000 0.000000" );

    SpawnObject( "Land_Castle_Wall1_20", "14340.950195 6.779966 13282.156250", "0.000000 0.000000 0.000000" );
    }

    Hier nochmal zum nachlesen: https://github.com/Arkensor/DayZC…rver-or-mission

    WIchtig wäre auch noch die BuilderItem Mod, da dort mehr Objekte zur verfügung stehen zum Bauen.

    https://steamcommunity.com/sharedfiles/fi…ext=builderitem

    [gdz]

    Einmal editiert, zuletzt von Mosin (30. November 2019 um 12:55)

  • Ich habe das mal so übernommen und habe die name.c geändert und den Importtext reingefügt und es lädt nicht, der Server geht in einem Loop, hat da jemand ne genaue Anleitung wie die init.c und custom.c aussehen muss ?

  • Bei uns schaut es so aus und wir können die 10.000 Items die von bohemia interactive vorgegeben sind voll ausschöpfen und das auf all unserer 5 Servern die wir aktuell laufen haben.

    Spoiler anzeigen

    #include "$CurrentDir:\\mpmissions\\Dayz.ExclusionZone\\Map\\NewZone01.c"

    #include "$CurrentDir:\\mpmissions\\Dayz.ExclusionZone\\Map\\NewZone02.c"

    void SpawnObject(string objectName, vector position, vector orientation)

    {

    Object obj;

    obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));

    obj.SetPosition(position);

    obj.SetOrientation(orientation);

    // Force update collisions

    if (obj.CanAffectPathgraph())

    {

    obj.SetAffectPathgraph(true, false);

    GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);

    }

    }

    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().SetLimits( 0.0 , 1.0 );

    weather.GetRain().SetLimits( 0.0 , 1.0 );

    weather.GetFog().SetLimits( 0.0 , 1.0 );

    weather.GetOvercast().SetForecastChangeLimits( 0.2, 0.4 );

    weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );

    weather.GetFog().SetForecastChangeLimits( 0.01, 0.02 );

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    weather.SetWindMaximumSpeed(25);

    weather.SetWindFunctionParams(0.1, 1.0, 50);

    weather.MissionWeather(true);

    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------

    int year, month, day, hour, minute;

    int reset_month = 05, reset_day = 20;

    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month == reset_month + 1) && (day > reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month < reset_month) || (month > reset_month + 1))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    }

    }

    //CEApi TestHive = GetCEApi();

    //TestHive.ExportProxyProto();

    //TestHive.ExportClusterData() ;

    NewZone01();

    NewZone02();

    //GetCEApi().ExportProxyData( "7500 0 7500", 20000 );

    }

    class CustomMission: MissionServer

    {

    void SetRandomHealth(EntityAI itemEnt)

    {

    int rndHlt = Math.RandomInt(40,100);

    itemEnt.SetHealth("","",rndHlt);

    }

    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)

    {

    Entity playerEnt;

    playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player

    Class.CastTo(m_player, playerEnt);

    GetGame().SelectPlayer(identity, m_player);

    return m_player;

    }

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

    /*

    player.RemoveAllItems();

    EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());

    EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());

    EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());

    */

    EntityAI itemEnt;

    ItemBase itemBs;

    // Setup custom classes

    switch (Math.RandomInt(0, 9)) {

    case 0:

    // Soldier

    player.GetInventory().CreateInInventory("CombatKnife");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 1:

    // Paramedic

    player.GetInventory().CreateInInventory("SalineBagIV");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 2:

    // Office worker

    player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 3:

    // Biker

    player.GetInventory().CreateInInventory("Matchbox");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 4:

    // Hiker

    player.GetInventory().CreateInInventory("Compass");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 5:

    // Cop

    player.GetInventory().CreateInInventory("Flashlight");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 6:

    // Lumberjack

    player.GetInventory().CreateInInventory("Apple");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 7:

    // Hood

    player.GetInventory().CreateInInventory("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);

    break;

    case 8:

    // Fireman

    player.GetInventory().CreateInInventory("FirefighterAxe");itemBs = ItemBase.Cast(itemEnt);

    break;

    }

    //Give universal gear

    player.GetInventory().CreateInInventory("alp_radboxtablets");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("AK101_Black");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("Mag_AK101_30Rnd");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("Mag_AK101_30Rnd");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("WaterBottle");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("AliceBag_Camo");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("KitchenKnife");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("SpaghettiCan");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("SpaghettiCan");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("Flashlight");itemBs = ItemBase.Cast(itemEnt);

    player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);

    itemEnt = player.GetInventory().CreateInInventory("Rag");

    itemBs = ItemBase.Cast(itemEnt);

    itemBs.SetQuantity(3);

    }

    };

    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    //return new GasCloudEventMission();

    }

    Einmal editiert, zuletzt von Stormii (2. Dezember 2019 um 15:57)

  • Stormii

    Irgendwo scheine ich noch einen denkfehler oder zu haben, vielleicht hast du ne Idee ?

    Meine Init.c

    Spoiler anzeigen

    }

    #include "$CurrentDir:\\mpmissions\\dayzOffline.deerisle\\customs.c"

    void SpawnObject(string objectName, vector position, vector orientation)

    {

    Object obj;

    obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));

    obj.SetPosition(position);

    obj.SetOrientation(orientation);


    // Force update collisions

    if (obj.CanAffectPathgraph())

    {

    obj.SetAffectPathgraph(true, false);

    GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);

    }

    }


    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------

    int year, month, day, hour, minute;

    int reset_month = 9, reset_day = 20;

    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month == reset_month + 1) && (day > reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month < reset_month) || (month > reset_month + 1))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    }

    }

    //CEApi TestHive = GetCEApi();

    //TestHive.ExportProxyProto();

    //TestHive.ExportClusterData();

    customs();

    //TestHive.ExportProxyData( "7500 0 7500", 15000 );

    }

    class CustomMission: MissionServer

    {

    void SetRandomHealth(EntityAI itemEnt)

    {

    if ( itemEnt )

    {

    int rndHlt = Math.RandomInt(55,100);

    itemEnt.SetHealth("","",rndHlt);

    }

    }

    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)

    {

    Entity playerEnt;

    playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player

    Class.CastTo(m_player, playerEnt);

    GetGame().SelectPlayer(identity, m_player);

    return m_player;

    }

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

    EntityAI itemTop;

    EntityAI itemEnt;

    ItemBase itemBs;

    float rand;

    itemTop = player.FindAttachmentBySlotName("Body");

    if ( itemTop )

    {

    itemEnt = itemTop.GetInventory().CreateInInventory("Rag");

    if ( Class.CastTo(itemBs, itemEnt ) )

    itemBs.SetQuantity(6);

    itemEnt = player.GetHumanInventory().CreateInHands("FNX45");

    itemEnt = itemTop.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");

    itemEnt = itemTop.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");

    itemEnt = itemTop.GetInventory().CreateInInventory("Mag_FNX45_15Rnd");

    itemEnt = player.GetInventory().CreateInInventory("UKAssVest_Black");

    itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Black");

    itemEnt = player.GetInventory().CreateInInventory("BalaclavaMask_Blackskull");

    itemEnt = player.GetInventory().CreateInInventory("BallisticHelmet_Black");

    itemEnt = player.GetInventory().CreateInInventory("DryBag_Black");

    itemEnt = itemTop.GetInventory().CreateInInventory("combatKnife");

    itemEnt = player.GetInventory().CreateInInventory("WaterBottle");


    SetRandomHealth(itemEnt);

    string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };

    int rndIndex = Math.RandomInt(0, 4);

    itemEnt = itemTop.GetInventory().CreateInInventory(chemlightArray[rndIndex]);

    SetRandomHealth(itemEnt);

    rand = Math.RandomFloatInclusive(0.0, 1.0);

    if ( rand < 0.35 )

    itemEnt = player.GetInventory().CreateInInventory("TunaCan");

    else if ( rand > 0.65 )

    itemEnt = player.GetInventory().CreateInInventory("Pear");

    else

    itemEnt = player.GetInventory().CreateInInventory("BakedBeansCan");

    SetRandomHealth(itemEnt);

    }

    }

    };

    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    }

    Meine customs.c

    Spoiler anzeigen

    void SpawnObject(string objectName, vector position, vector orientation)

    {

    Object obj;

    obj = Object.Cast(GetGame().CreateObject(objectName, "0 0 0"));

    obj.SetPosition(position);

    obj.SetOrientation(orientation);


    // Force update collisions

    if (obj.CanAffectPathgraph())

    {

    obj.SetAffectPathgraph(true, false);

    GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(GetGame().UpdatePathgraphRegionByObject, 100, false, obj);

    }

    SpawnObject( "Land_Mil_Tent_Big1_4", "1980.674072 3.370205 6625.929199", "-29.999998 3.000000 0.000000" );

    SpawnObject( "Land_Mil_Tent_Big1_4", "1993.245117 3.232500 6633.878906", "-29.999998 3.000000 0.000000" );

    }

  • Ist das die ini.c die du bei dir auf dem Server nutzt?,oder die die du im Community Offline Editor laden magst? Sieht nämlich etwas eigenartig aus!

    Der #include befehl ganz oben stimmt auch nicht so ganz...

    Bei uns ist er ganz oben!

    Sie dir doch einfach den aufbau unserer ini.c an und passe deine an unsere an

    Die läuft zu 100% auf all unseren 5 Servern!

    Deine customs.c ist auch total falsch.

    So sollte es ausschauen!

    Spoiler anzeigen

    void customs()

    {

    // customs

    SpawnObject( "Land_Mil_Tent_Big1_4", "1980.674072 3.370205 6625.929199", "-29.999998 3.000000 0.000000" );

    SpawnObject( "Land_Mil_Tent_Big1_4", "1993.245117 3.232500 6633.878906", "-29.999998 3.000000 0.000000" );

    };

  • Leider geht es seit der 1.05 nicht mehr das man mehr als ca. 220 Buildings am Stück im Editor laden kann,ohne das diese nach einem Neustart des Editors wieder geladen werden können.Wen es doch eine Möglichkeit zu gibt,dann wer ich da auch über eine Info sehr dankbar drüber.

    Man müsste sich da vielleicht mal mit Arkensor dem Erschaffer des Editors in Verbindung setzen und ihn fragen ob es da ne Möglichkeit zu gibt.

  • Opidium

    Die Änderungen im COM Editor werden in C:\Users\Euer_Windows_Benutzername\Documents\DayZ\COMObjectEditorSave.json gespeichert.

    Wenn du die Objekte unbedingt wieder im Editor haben willst, musst du die .json Datei editieren - die Objekte werden dort allerdings in einem anderen Format gespeichert. Beispiel:

    C: init.c
    SpawnObject( "Land_Mil_Tent_Big1_4", "1980.674072 3.370205 6625.929199", "-29.999998 3.000000 0.000000" );
    SpawnObject( "Land_Mil_Tent_Big1_4", "500 400 1000", "-29.999998 3.000000 0.000000" );

    Wird zu:

    Finde ich jetzt persönlich etwas zu umständlich ;) ... Aber wenn du das unbedingt machen willst! :D

    Würde an eurer Stelle immer einen Teil fertigstellen und dann in die init.c vom offline mode als permanenten Speicherpunkt hinzufügen. Dann kann das schon mal nicht mehr verloren gehen. Wenn dann alles fertig ist, packt ihr das in die init.c oder eine separate .c Datei auf eurem Server.

    MfG

  • Ich Wünsche einen schönen guten tag.

    Ich habe die letzten zwei tage daran gesessen eine Base mit dem OfflineEditor zu Bauen.

    das klappte auch alles sehr gut.

    Habe mich an diese Anleitung gehalten:https://github.com/Arkensor/DayZC…rver-or-mission

    Das was mir ausgegeben wurde habe ich der init.c hinzugefügt und auf dem Server geladen.

    Sobald die Datei drauf ist geht der beitritt nicht.

    DayZ sagt nur.... Ein unbekannter Fehler ist aufgetreten.

    Habe dann in diesem Beitrag alle Hilfestellungen ausprobiert nützt aber alles nichts.

    Vielleicht hat noch jemand eine Idee?

    würde mich sehr freuen.

    Spoiler anzeigen

    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------

    int year, month, day, hour, minute;

    int reset_month = 9, reset_day = 20;

    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month == reset_month + 1) && (day > reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month < reset_month) || (month > reset_month + 1))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    }

    }

    }

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    void main()

    {

    //Your custom spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }


    class CustomMission: MissionServer

    {

    void SetRandomHealth(EntityAI itemEnt)

    {

    if ( itemEnt )

    {

    float rndHlt = Math.RandomFloat( 0.45, 0.65 );

    itemEnt.SetHealth01( "", "", rndHlt );

    }

    }

    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)

    {

    Entity playerEnt;

    playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );

    Class.CastTo( m_player, playerEnt );

    GetGame().SelectPlayer( identity, m_player );

    return m_player;

    }

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

    EntityAI itemClothing;

    EntityAI itemEnt;

    ItemBase itemBs;

    float rand;

    itemClothing = player.FindAttachmentBySlotName( "Body" );

    if ( itemClothing )

    {

    SetRandomHealth( itemClothing );

    itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );

    if ( Class.CastTo( itemBs, itemEnt ) )

    itemBs.SetQuantity( 4 );

    SetRandomHealth( itemEnt );

    string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };

    int rndIndex = Math.RandomInt( 0, 4 );

    itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );

    SetRandomHealth( itemEnt );

    rand = Math.RandomFloatInclusive( 0.0, 1.0 );

    if ( rand < 0.35 )

    itemEnt = player.GetInventory().CreateInInventory( "Apple" );

    else if ( rand > 0.65 )

    itemEnt = player.GetInventory().CreateInInventory( "Pear" );

    else

    itemEnt = player.GetInventory().CreateInInventory( "Plum" );

    SetRandomHealth( itemEnt );

    }

    itemClothing = player.FindAttachmentBySlotName( "Legs" );

    if ( itemClothing )

    SetRandomHealth( itemClothing );

    itemClothing = player.FindAttachmentBySlotName( "Feet" );

    }

    };

    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    }

  • Sind das Vanilla Gebäudeteile oder brauchst du die Mod "BuilderItems" noch...dann bitte sicherstellen das diese bei Start auch mit geladen wird.

    Ansonsten gehört die SpawnHelperFunction ganz an den Anfang der init.c Datei...das erstmal auf die Schnelle als Antwort 8)

  • Ja das sollten alles Vanillagebäude sein, die "BuilderItems" mod habe ich gar nicht drauf.

    Ich habe jetzt den Text jetzt mal an denn Anfang gemacht (siehe Spoiler)

    Es kommt aber auch dort nach wie vor der selbe Fehler.

    Spoiler anzeigen

    void main()

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    void main()

    {

    //costum spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();

    //DATE RESET AFTER ECONOMY INIT-------------------------

    int year, month, day, hour, minute;

    int reset_month = 9, reset_day = 20;

    GetGame().GetWorld().GetDate(year, month, day, hour, minute);

    if ((month == reset_month) && (day < reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month == reset_month + 1) && (day > reset_day))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    else

    {

    if ((month < reset_month) || (month > reset_month + 1))

    {

    GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);

    }

    }

    }

    }

    class CustomMission: MissionServer

    {

    void SetRandomHealth(EntityAI itemEnt)

    {

    if ( itemEnt )

    {

    float rndHlt = Math.RandomFloat( 0.45, 0.65 );

    itemEnt.SetHealth01( "", "", rndHlt );

    }

    }

    override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)

    {

    Entity playerEnt;

    playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );

    Class.CastTo( m_player, playerEnt );

    GetGame().SelectPlayer( identity, m_player );

    return m_player;

    }

    override void StartingEquipSetup(PlayerBase player, bool clothesChosen)

    {

    EntityAI itemClothing;

    EntityAI itemEnt;

    ItemBase itemBs;

    float rand;

    itemClothing = player.FindAttachmentBySlotName( "Body" );

    if ( itemClothing )

    {

    SetRandomHealth( itemClothing );

    itemEnt = itemClothing.GetInventory().CreateInInventory( "Rag" );

    if ( Class.CastTo( itemBs, itemEnt ) )

    itemBs.SetQuantity( 4 );

    SetRandomHealth( itemEnt );

    string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };

    int rndIndex = Math.RandomInt( 0, 4 );

    itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );

    SetRandomHealth( itemEnt );

    rand = Math.RandomFloatInclusive( 0.0, 1.0 );

    if ( rand < 0.35 )

    itemEnt = player.GetInventory().CreateInInventory( "Apple" );

    else if ( rand > 0.65 )

    itemEnt = player.GetInventory().CreateInInventory( "Pear" );

    else

    itemEnt = player.GetInventory().CreateInInventory( "Plum" );

    SetRandomHealth( itemEnt );

    }

    itemClothing = player.FindAttachmentBySlotName( "Legs" );

    if ( itemClothing )

    SetRandomHealth( itemClothing );

    itemClothing = player.FindAttachmentBySlotName( "Feet" );

    }

    };

    Mission CreateCustomMission(string path)

    {

    return new CustomMission();

    }

  • du hast 2x void main drin

    Setze den void SpawnObject ganz an den Anfang der Datei.

    Oder lösche folgendes:

    [...]

    void main()

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    [...]

    Ich möchte mich für vermutlich unnötige Fragen im Forum, die man sich evtl durch testen usw selber beantworten könnte entschuldigen.

    Leider bin ich beruflich bedingt immer mal für 12 ganze Tage am Stück nicht zuhause!

    Ich arbeite deutschlandweit im Schichtdienst und das gut und gerne auch mal bis zu 16 Stunden.

    Mir steht nicht die Möglichkeit zur Verfügung einen Patch, eine Mod oder etwas anderes auf die schnelle zu testen.

  • Also erstmal vielen vielen dank für die Bemühungen.

    Bis jetzt habe ich es aber tatsächlich nicht hinbekommen.

    Ich habe die init.c wie folgt bearbeitet (mehreres ausprobiert da ich mir nicht genau sicher was was ich alles löschen soll)

    Ich weiß es ist ein bisel viel aber ich habe nicht genau verstanden ob alles weg soll oder nur das void main() deshalb bin ich alle varianten durch gegangen.

    Ich poste die mal als spoiler bis dahin wo was wetter anfängt.

    Spoiler anzeigen

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }


    {

    //costum spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    //INIT ECONOMY--------------------------------------

    Hive ce = CreateHive();

    if ( ce )

    ce.InitOffline();

    Spoiler anzeigen

    void main()

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }


    {

    //costum spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    Spoiler anzeigen

    {

    auto obj = GetGame().CreateObject( type, position );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }


    {

    //costum spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    Spoiler anzeigen

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject_WIP( type, position, ECE_CREATEPHYSICS );

    obj.SetFlags( EntityFlags.STATIC, false );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    //Your custom spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    Spoiler anzeigen

    void main()

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject_WIP( type, position, ECE_CREATEPHYSICS );

    obj.SetFlags( EntityFlags.STATIC, false );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    //Your custom spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    Spoiler anzeigen

    //Spawn helper function

    void SpawnObject( string type, vector position, vector orientation )

    {

    auto obj = GetGame().CreateObject_WIP( type, position, ECE_CREATEPHYSICS );

    obj.SetFlags( EntityFlags.STATIC, false );

    obj.SetPosition( position );

    obj.SetOrientation( orientation );

    obj.SetOrientation( obj.GetOrientation() ); //Collision fix

    obj.Update();

    obj.SetAffectPathgraph( true, false );

    if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );

    }

    //Your custom spawned objects

    SpawnObject( "Land_Village_Pub", "5211.245117 182.620300 3584.243896", "50.000004 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Greenhouse", "5222.144531 179.712952 3583.107666", "59.000000 0.000000 0.000000" );

    SpawnObject( "Land_FuelStation_Feed_Enoch", "5237.483398 179.219208 3591.264648", "57.999996 0.000000 0.000000" );

    SpawnObject( "Land_Misc_Well_Pump_Blue", "5216.048340 179.052048 3587.480469", "-25.000002 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5211.183105 180.498962 3601.516113", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5216.668457 180.549652 3605.205078", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5227.429688 182.484833 3606.719727", "-179.999985 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5236.079590 181.992615 3595.307129", "-55.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5218.542480 181.962067 3583.725586", "11.000000 0.000000 0.000000" );

    SpawnObject( "Land_Power_Pole_Wood1_Lamp_Amp", "5211.026367 182.390427 3595.397705", "90.000000 0.000000 0.000000" );

    SpawnObject( "Land_Garage_Row_Small", "5230.877441 180.006943 3588.543457", "-35.000004 0.000000 0.000000" );

    SpawnObject( "Land_Shed_W6", "5222.116211 180.566116 3608.897217", "-35.000004 0.000000 0.000000" );

    }

    void main()

    {

    //INIT WEATHER BEFORE ECONOMY INIT------------------------

    Weather weather = g_Game.GetWeather();

    weather.MissionWeather(false); // false = use weather controller from Weather.c

    weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);

    weather.GetRain().Set( 0, 0, 1);

    weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);

    Diese ganzen sachen habe ich ausprobiert aber keinen erfolg gehabt. Noch jemand ne idee ?