Anomal 13 Posted December 8, 2018 Hey, I used the COM-Tool (Offline Tool) for spawning Tents and Buildings to Military Bases. After i forced my server to give me a new export xml's i did replace them. Now items do spawn, but its not military loot only. It seems like everything is just spawning randomly. Like: Car Wheel, Shirts, Guns, Hunter Jackets... etc. How can i make my tents & buildings spawn military loot only? (I only spawned military buildings) The second issue i have: Some of the spawned tents/buildings are flickering/clipping... (sometime you can see through) How can i fix this? Share this post Link to post Share on other sites
Sy8282 21 Posted December 29, 2018 You only needed to copy the mapgrouppos.xml the mapgroupproto.xml from the export is not defining the category of loot and sets all to default replace the mapgroupproto.xml with a fresh one from steam and it will be back to normal Share this post Link to post Share on other sites
Fun Automat 23 Posted December 29, 2018 On 8.12.2018 at 8:27 PM, K3l3g said: Hey, I used the COM-Tool (Offline Tool) for spawning Tents and Buildings to Military Bases. How did u do this ? over the init ? addon ? Because im stuck here -> Share this post Link to post Share on other sites
Sy8282 21 Posted December 29, 2018 Init.c or an add-on it's works the same way just put the exported code on the main function Share this post Link to post Share on other sites
Fun Automat 23 Posted December 29, 2018 3 hours ago, Sy8282 said: Init.c or an add-on it's works the same way just put the exported code on the main function Can u drop me a piece from your init here ? this would be very nice... Thanks! Share this post Link to post Share on other sites
Sy8282 21 Posted December 29, 2018 //Spawn helper function void SpawnObject( string type, vector position, vector orientation ) { auto obj = GetGame().CreateObject( type, position ); obj.SetPosition( position ); obj.SetOrientation( orientation ); //Force collision update vector roll = obj.GetOrientation(); roll [ 2 ] = roll [ 2 ] - 1; obj.SetOrientation( roll ); roll [ 2 ] = roll [ 2 ] + 1; obj.SetOrientation( roll ); } 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; int month; int day; int hour; int minute; GetGame().GetWorld().GetDate(year, month, day, hour, minute); if (((month <= 9) && (day < 20)) || ((month >= 10) && (day > 20))) { month = 9; day = 20; GetGame().GetWorld().SetDate(year, month, day, hour, minute); } SpawnObject("Land_Mil_Barracks1", "9108.145508 386.995789 9210.332031", "0.000000 0.000000 -0.000000"); SpawnObject("Land_Mil_Barracks1", "9108.466797 386.907684 9197.928711", "0.000000 0.000000 0.000000"); SpawnObject("Land_Mil_Barracks1", "9108.591797 386.746613 9185.626953", "0.000000 0.000000 0.000000"); 1 Share this post Link to post Share on other sites
Sy8282 21 Posted December 29, 2018 Add all your code where the spawn object crap is Share this post Link to post Share on other sites
Fun Automat 23 Posted December 30, 2018 Thank u! Btw...i placed 2 ponds with the init on the map...remove one out of the files and restart ...but this dont make a difference. Still 2 ponds on the map... I think parts from the map and the weather are stored in the persistence files.... Share this post Link to post Share on other sites
G_M_styler_M 2 Posted December 30, 2018 (edited) 10 hours ago, Fun Automat said: Thank u! Btw...i placed 2 ponds with the init on the map...remove one out of the files and restart ...but this dont make a difference. Still 2 ponds on the map... I think parts from the map and the weather are stored in the persistence files.... Yes, delete Events.bin in your storage folder and it works. The server creates a new one on startup. Edited December 30, 2018 by G_M_styler_M 1 Share this post Link to post Share on other sites