ItsLeandro Posted January 2, 2017 Report Share Posted January 2, 2017 Hey all, I am busy with developing a modification for Emergency 5, but I am experiencing a few issues. I have been coding some new commands for units, but I have no idea how to implement them in the game. So my question is, does anyone of you know, how to move (modified/new) commands (from the SDK) into a modification/project? Thanks in advance. Quote Link to comment Share on other sites More sharing options...
Killerconsti Posted January 2, 2017 Report Share Posted January 2, 2017 Well basicly 3 steps: a) declare all commands that you want to export in your plugin.cpp file. QSF_START_CAMP_CLASS_EXPORT(user::CheerCommand, "CheerCommand", "Cheer command") QSF_GAME_CAMP_IS_COMMAND QSF_END_CAMP_CLASS_EXPORT b) Tell the game which plugins need to be loaded this is done in the project.json as example here is the one from the minimod. The thing that needs to be added is the "Plugin(s)"-Section { "Format": { "Type": "Project", "Version": "1" }, "Properties": { "Name": "killerconstis_mini_mod", "Locked": "false", "Version": "3.2", "Author": "Consti", "Description": "The only real mod right now" }, "AssetPackages": [ "content", "local", "required_files", "language_de" ], "Plugins": { "minimod_plugin": "em5_game em5_editor", "misc_crew_minimod_edition": "em5_game em5_editor" } } your *.dll file must be at your_mod_direction/x64/ . The easiest way is to declare this as your target direction in VS2015 c) use your commands ingame select the em5::CommandableComponent and add your Command into the array. For the example above it would be [user::CheerCommand] (in the editor) or "user::CheerCommand", if you directly edit the *.json file For testing it is usefull to set the playerId in the CommandableComponent to "0", this makes the unit belonging to player 1. If you still have problems, I recommend to have a look into the *.log files or the SamplePlugin+Samplemod with the CheerCommand/CheerAction/Observer/Event Quote Link to comment Share on other sites More sharing options...
ItsLeandro Posted January 2, 2017 Author Report Share Posted January 2, 2017 Hi Killerconsti, Thank you for your extensive answer. Right now I don't have the ability to test it out, but I do think I understand now. I will try it out as soon as possible. Thanks once again! Regards, ItsLeandro Quote Link to comment Share on other sites More sharing options...