Which parts can/should a SDK mod affect?
Posted: Fri Sep 25, 2020 6:29 am
Hi Guys,
I have a general question about the OpenRa project code. Currently I want to change some part of the map editor logic and which information it loads from a terrain template.
I'm editing the OpenHv project for this, but it also could be any other mod project.
So far I have managed to add new hotkeys to the editor by defining a new Logic module which gets loaded via the chrome yaml files. The code for this is completely in the mod project.
Now, for the extra information I want to include in a tile template I could edit the openRA main project file and it's class TileTemplateInfo and just add a field to it.
But that seems and feels "wrong" even though in any other software I'd just change the code. Now that raises my general question:
Which parts of the OpenRA engine code can be modified by an SDK mod? (That means by adding code to the mod project and NOT to the OpenRA.Game / Common etc.). Is it just those parts which connect via yaml to the Engine, like traits and chrome? Is there some way to identify the parts which can be changed by using only extensions?
As far as I know, I can't just re-define classes in the mod-SDK to overwrite the main project classes, right? So those are 'fixed' from my point of view. Or am I missing something?
Would you also encourage or discourage editing the main project code in an SDK mod?
Cheers,
----SirCake
I have a general question about the OpenRa project code. Currently I want to change some part of the map editor logic and which information it loads from a terrain template.
I'm editing the OpenHv project for this, but it also could be any other mod project.
So far I have managed to add new hotkeys to the editor by defining a new Logic module which gets loaded via the chrome yaml files. The code for this is completely in the mod project.
Now, for the extra information I want to include in a tile template I could edit the openRA main project file and it's class TileTemplateInfo and just add a field to it.
But that seems and feels "wrong" even though in any other software I'd just change the code. Now that raises my general question:
Which parts of the OpenRA engine code can be modified by an SDK mod? (That means by adding code to the mod project and NOT to the OpenRA.Game / Common etc.). Is it just those parts which connect via yaml to the Engine, like traits and chrome? Is there some way to identify the parts which can be changed by using only extensions?
As far as I know, I can't just re-define classes in the mod-SDK to overwrite the main project classes, right? So those are 'fixed' from my point of view. Or am I missing something?
Would you also encourage or discourage editing the main project code in an SDK mod?
Cheers,
----SirCake