Marcus Collins 0 Posted May 11, 2023 (edited) 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 May 11, 2023 by Marcus Collins Share this post Link to post Share on other sites
Sid Debian 88 Posted May 11, 2023 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