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

Sign in to follow this  
Marcus Collins

Modded class injection inside of mission file (init.c)

Recommended Posts

Hello there, I've been having trouble finding a conclusive answer from my googling.

Is it possible to write a modded class inside of init.c? I did manage to come across one project that seemed to do it successfully.

My next question, is if it is possible, does it work with classes from a mod?

Example: I'm trying to modify some logic in ExpansionAi by moddifying the eAIBase class, but getting an error "eAIBase type not found"

 

Thanks in advance!

 

Editing to say I found my answer. init.c is limited to 5_Mission and eAIBase is in 4_World

Edited by Marcus Collins

Share this post


Link to post
Share on other sites
21 hours ago, Marcus Collins said:

Hello there, I've been having trouble finding a conclusive answer from my googling.

Is it possible to write a modded class inside of init.c? I did manage to come across one project that seemed to do it successfully.

My next question, is if it is possible, does it work with classes from a mod?

Example: I'm trying to modify some logic in ExpansionAi by moddifying the eAIBase class, but getting an error "eAIBase type not found"

 

Thanks in advance!

 

Editing to say I found my answer. init.c is limited to 5_Mission and eAIBase is in 4_World

Logic dectates that it couldn't be happens.

Why? Because nature of linked classes (for the mission) are limited by itself. If you wish to override any game/mod class you need to write own overrided class and then pack in your mod (a public mod). That would be only way to override a class. Why you shall make a public mod and not the server-side? Because if you change something in base class then you may break it for client (because code base would be different and client will have no idea about changes that applied on server-side. When sever will send any RPC to client it wold be different results and that migh cause a great desynchronization).

Share this post


Link to post
Share on other sites
Sign in to follow this  

×