gigiwwa 0 Posted January 13, 2022 I have tried to edit the init.c to create a custom loadout. I definitely got something wrong as I now spawn without the 9V Battery my Init.c https://pastebin.com/y8Kse3Hq Share this post Link to post Share on other sites
indijdev 7 Posted January 14, 2022 Do all the other items spawn fine? I can't really find any issues with the file at first glance. I would remove the 'SetRandomHealth' below the battery to see if that's what causing the issue. Maybe try to spawn only the battery to confirm that it's actually possible. And ofc make sure that there actually is a 'Battery9v' in your Banov types.xml. That's the best advice I can give atm. Best of luck. -indij Share this post Link to post Share on other sites
gigiwwa 0 Posted January 15, 2022 changed it to https://pastebin.com/iAC11j87 and this is how I spawn Share this post Link to post Share on other sites
indijdev 7 Posted January 15, 2022 Allright. So, since the bandage and chemlight do not spawn either, it seems there's some other issue. I'll give it a second look and see if I can pinpoint the problem. Share this post Link to post Share on other sites
gigiwwa 0 Posted January 15, 2022 also tried this but nothing still spawning with the same stuff as before https://pastebin.com/VJjmwFSH Share this post Link to post Share on other sites
indijdev 7 Posted January 15, 2022 When comparing to my own init, I only notice a couple of things. Mine doesn't have the '//INIT WEATHER BEFORE ECONOMY' and the '//Loot spawn Creator' part, so I don't know if there are any issues with these. The '//DATE RESET' part is done in reverse in my init, but I can't find any syntax errors in yours, so that should be fine. The 'SetRandomHealth' is done with integers in yours, whereas it's done with floats in the Chernarus init. You can try to use floats to see if that's the issue: Spoiler void SetRandomHealth(EntityAI itemEnt) { if ( itemEnt ) { float rndHlt = Math.RandomFloat( 0.45, 0.65 ); itemEnt.SetHealth01( "", "", rndHlt ); } } I would try to remove all items and only spawn one, while trying to make it work. Maybe something like this: Spoiler //Vanilla Banov Init.c // Thank you for using my map void main() { //INIT WEATHER BEFORE ECONOMY INIT------------------------ //Banov 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(); //Loot spawn Creator //GetCEApi().ExportProxyData(vector.Zero, 100000); //Loot //GetCEApi().ExportClusterData(); //Fruit //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.55, 1.00 ); itemEnt.SetHealth01( "", "", 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"); itemEnt = itemTop.GetInventory().CreateInInventory("Battery9V"); } }; Mission CreateCustomMission(string path) { return new CustomMission(); } If this doesn't work, I'm not sure I can find the problem with the init file. Are you sure that you not using the chernarusplus missions in your serverDZ.cfg? (I guess banov should be something like template="dayzOffline.banov") And are you sure it is not the init in the \DayZServer\mpmissions\dayzOffline.chernarusplus you are editing? And did you make sure that everything you're trying to spawn is actually in the types.xml in your banov missions folder? These may be silly questions, but I'm at a bit of a loss tbh. -indij Share this post Link to post Share on other sites
gigiwwa 0 Posted January 17, 2022 (edited) Hi Indiji, thank you for trying, I do use the right Template for banov empty.banov. I looked at a few guide's and videos and it didn't look to complicated, but since I never got it working I figured I ask the community. maybe it just works only on chernorusplus. Edited January 20, 2022 by gigiwwa Share this post Link to post Share on other sites
gigiwwa 0 Posted January 20, 2022 found it in the end: https://github.com/salutesh/DayZ-Expansion-Scripts/wiki/[Server-Hosting]-Setting-up-Spawn-Gear Share this post Link to post Share on other sites
indijdev 7 Posted January 21, 2022 So it seems starting gear is handled different in expansion, if I understand correct. Good to know. Thanks for posting the solution. Will certainly be useful. -indij Share this post Link to post Share on other sites