Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Kol_Den

mod doesn`t work

Recommended Posts

I just started getting into modding. I am following the official guide. Wrote this mod:
 

modded class PlayerBase
{
	override void OnJumpStart()
	{
		super.OnJumpStart();
		Print("My first mod, yay!");
	}
}

Also, following to the official guide, I created a single player game in init.c

Mission CreateCustomMission(string path) 
{ 
  return new MissionGameplay(); 
} 

void main() 
{ 
  PlayerBase player; 
  ItemBase item; 
  player = PlayerBase.Cast((GetGame().CreatePlayer(NULL, "SurvivorF_Linda", "2200 10 2200", 0, "NONE"))); 
  item = player.GetInventory().CreateInInventory("TShirt_Black");  
  item.GetInventory().CreateInInventory("Apple"); 
  GetGame().SelectPlayer(NULL, player); 
}

I launch the game with the help of a .bat file:

start DayZDiag_x64.exe "-mod=D:\MyServer\Mods@FirstMod" "-mission=./missions/firstMission.ChernarusPlus" -nosplash -noPause -noBenchmark -filePatching -doLogs -scriptDebug=true

After starting I jumped a few times then exit the game. 
I open the log file and can`t see my messages there. 

During few days I try fix it but no result. My mod doesn't work.

What am I doing wrong?

Edited by Kol_Den

Share this post


Link to post
Share on other sites

There seems to be missing a \ between "Mods" and "@FirstMod" in your path to the mods. Unless you named the mod "Mods@FirstMod" for some reason.

Share this post


Link to post
Share on other sites

×