Logo Platform
logo amplifiers simplified

Adding "script" compatibility with others mods (CommunityModProject)

Reply
Copied to clipboard!
7 years ago
Jan 29, 2018, 4:29:53 AM

Can I adding compatibility script into mod, which triggered when detect other?


Like:


def CompatibilityScript():

if mod.detect.CommunityModProject:

load (bla-bla-bla.xml) 

load (bla-bla-bla(2).xml)

else:

load (bla-bla-bla(3).xml) 

load (bla-bla-bla(4).xml)

Because I didn't found this option in documentation 

0Send private message
7 years ago
Jan 29, 2018, 10:01:10 AM

Hey osfox!


Unfortunately this is not possible:

Our architecture of XML data is based on "if it has the same name, replace it", so that mods can easily override "vanilla" data.


We'll consider adding a compatibility feature based on loaded mods, but you might want to create an Idea so we can "officially" look into it.

0Send private message
7 years ago
Jan 29, 2018, 11:37:01 AM

I would be intrested in having such a feature but in the mean time I can think of a way to make mods compatible (for the most part)


The rough Idea would be instead of any mod editing ClassEmpire (& the other large simulation descriptors) there is a single mod set as a dependency that incorporates all the changes the other mods need.


As most mods just need to have properties defined in ClassEmpire etc.

But for those that add/change modifiers their lines could be enabled or disabled by the presence (or lack of) a new property that indicates if the relevant mod is enabled.

I.E. In ClassEmpire there could be [isCommunityModProjectEnabled] which normal 0 disabling the Community Mod Project Code would get set to one if the mod was enabled by a hidden turn one quest activating an effect or Empire Improvement.


Not sure if that would work, I may try it if other modders are interested.


But in the meantime, I could try make Community Mod Project compatible with yours if you tell me what the mod is / send me the files if it’s not public yet.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message