-
Content Count
6 -
Joined
-
Last visited
Community Reputation
0 NeutralAbout RoxberrySWE
-
Rank
On the Coast
-
Spawngear setup in init.c - DayZ Server
RoxberrySWE replied to RoxberrySWE's topic in Troubleshooting
Hmm... Ok. I guess I´ll have to some more investigation then. -
Spawngear setup in init.c - DayZ Server
RoxberrySWE replied to RoxberrySWE's topic in Troubleshooting
And now it starts without any errors. But the character do NOT spawn with the gear that is set in the init.c file. I have reset all player files (db and spawnpoint), reset everything. But still it is not spawning with the right gear. I am using the Expansion mod tho, can that have anything to do with it? -
Spawngear setup in init.c - DayZ Server
RoxberrySWE replied to RoxberrySWE's topic in Troubleshooting
Added the code you wrote, exactly as you wrote it. Got a compile error (picture) This is why I cant follow tutorials. They are ALWAYS wrong in some way, a line in the wrong place or a . , ; : missing or in the wrong place. That´s why I asked for someone that maybe could write a finished init.c file with the spawngear I showed in the initial post. Because I have followed tutorials, videos and so on HUNDREDS of times, but there is ALWAYS something wrong. I will paste the whole init.c file here so maybe someone can see exactly what is wrong with it now. /** * init.c * * DayZ Expansion Mod * www.dayzexpansion.com * © 2020 DayZ Expansion Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. * */ #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\ExpansionObjectSpawnTools.c" #include "$CurrentDir:\\mpmissions\\Expansion.ChernarusPlus\\expansion\\missions\\MissionConstructor.c" void main() { bool loadTraderObjects = false; bool loadTraderNPCs = false; string MissionWorldName = "empty"; GetGame().GetWorldName(MissionWorldName); if (MissionWorldName != "empty") { //! Spawn mission objects and traders FindMissionFiles(MissionWorldName, loadTraderObjects, loadTraderNPCs); } //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.02, 0.1), 1, 0); weather.GetRain().Set( 0, 1, 0); weather.GetFog().Set( 0, 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 = 8, reset_day = 10; 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) { 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"); Class.CastTo(m_player, playerEnt); GetGame().SelectPlayer(identity, m_player); return m_player; } override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { EntityAI itemEnt; ItemBase itemBs; player.RemoveAllItems(); itemEnt = player.GetInventory().CreateInInventory("MountainBag_Blue"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("TShirt_Red"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("Jeans_Grey"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("Sneakers_Green"); itemBs = ItemBase.Cast(itemEnt); itemEnt = player.GetInventory().CreateInInventory("SpaghettiCan"); itemBs = ItemBase.Cast(itemEnt); } }; Mission CreateCustomMission(string path) { return new CustomMission(); } -
Spawngear setup in init.c - DayZ Server
RoxberrySWE replied to RoxberrySWE's topic in Troubleshooting
Ok, thank you very much. I will try this. I will let you know if I f*ck it up or not =P / Rox -
Spawngear setup in init.c - DayZ Server
RoxberrySWE replied to RoxberrySWE's topic in Troubleshooting
So this what I´ve head problems with. I have done this so many times but it only brakes. Where do I add a backpack tho? Just in the list there. And also, do I HAVE to have the "Rag" line? -
RoxberrySWE changed their profile photo
-
RoxberrySWE started following Spawngear setup in init.c - DayZ Server
-
Hello! I have been trying to figure out how to setup the spawngear for my server, and have watched multiple videos, read countless tutorials on how to set it up. But I seem to always do something wrong because it just wont work. I was wondering (and hoping to be able to take the lazy route) if someone just could help me write the proper text to put into init.c? The things I want as spawnloot can be found in the picture posted in this thread. Thanks on before hand / Rox