XML code only runs with another mod present? Is this possible?

Started by jacob814, August 04, 2016, 07:36:06 PM

Previous topic - Next topic

jacob814

Is it possible to have certain lines of xml code run if another mod is present without code? and if not does someone have this code made wiling to share with me?
My Mods:
Glass&Lights

1000101

What do you mean "xml code run?"  xml is a text based data container, not program code.  It doesn't run or execute.

If you mean how do you deal with specific fields (tags) when specific mods are installed, look at notfoods miniturization mod.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

jacob814

@1000101 I saw in his forum post that you mentioned he beat you to the punch... Could you please add it to CCL so people don't need 2 dependencies?

Not a huge deal if not but I would rather not have my mod create errors when another mod isn't loaded. It isn't anything that is game breaking but errors are errors, no one likes them.
My Mods:
Glass&Lights

1000101

What is it exactly that you are looking for?  His mod can be updated with xml files to include your mods buildings (ThingDefs), that's the point of how he did it.  He's using CCL and the CCL API to do most of the heavy lifting such as detecting the presence of other mods and "bootstrapping" (CommunityCoreLibrary.Find_Extensions.ModByName, CommunityCoreLibrary.SpecialInjector).  So his code is handling the actual mod work of doing the specific injection of minifiedDef and all that entails into the other mods ThingDefs.
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

jacob814

Just to have that ability to only have and xml file to run if a mod is present. Btw I was able to fix what I wanted to do. Thankyou though.
My Mods:
Glass&Lights