[A17] Miniaturisation Overloaded

Started by notfood, August 03, 2016, 09:36:22 PM

Previous topic - Next topic

notfood

Abstract defs don't exist per se. They're just used in XmlInheritance. It'd be useless to try and replace them too because they only exist per mod being loaded. And Tynan himself has said you must copy over the abstracts if you want to use them.

About the capitalisation, it respects what the Class says so it's actually fertility. Let's keep it that way, playing the case game is dangerous.

@EldVarg

While it allows you to miniaturize Sarcophagus and CryptosleepCasket, it blows up if you try and crashes Rimworld. Containers shouldn't be miniaturized. Doors, Autodoors and ship parts are out of the scope but you can add them yourself as you found out.

Medical Training modname is a bug, I'll change it right now.

Did you test if the advanced hydroponics basins in Vegetable garden work? Last time I tried to miniaturize and move they caused weird behavior.

EldVarg

#136
Yes the advanced hydroponics works well - both versions.

Movable doors should be logical - like it that way. But yea, maybe might not like it.

Ok about the containers, did not try them.

But the rest, will you add them?

Only one I did not get to work is Force Field Generator - probably a spelling error.

notfood

Grow plants in the hydroponics, try to move them and it causes issues.

kaptain_kavern

Quote from: notfood on September 05, 2016, 10:20:47 AM


Mod Friendly Overrides
you dug too deep

Download Beta 8

Example OverrideDef.xml

Added Linq Filter. The whole Linq querying mechanism available now. You can call the object's functions, do math, and many more. It's practically SQL. I keep the Match Filter around because Linq has some quirks, for example strings need to be around " or \". You need to specify the Type as well. It's also much more complex.
<Override.Def Filter="Linq" Type="ThingDef" Match="mineable=True">

Added Comparer for comps:
<comps Mode="Replace">

I feel it's quite complete, some rough edges but it's fine for production already. Test this one last time and I make a release.

Hi notfood,

I was wondering if this is for testing purpose only or is it something we can use in our mods? I'm not sure about it as I can't find a distinct release thread or Github repo. And don't want to use it if it's not OK with you  ;D

RemingtonRyder

I've been trying it out myself. Just refer people back here to pick up the Mod Friendly Overrides core.

Like he said though, rough edges. Like, I haven't unleashed any MFO mods onto Steam because I'm still making sure it works as advertised. :) But I have pointed some people over here from the subreddit because one of my mods needs it.

Lubricus

I have problem with autoseller mod with the trading comms console I suspect it can be the miniaturization mod that disable it because it works fine with the caravans.

The Crafting Hysteresis  mod don't work either... but I can survive without it.

kaptain_kavern

#141
Quote from: MarvinKosh on October 18, 2016, 12:22:36 PM
I've been trying it out myself. Just refer people back here to pick up the Mod Friendly Overrides core.

Like he said though, rough edges. Like, I haven't unleashed any MFO mods onto Steam because I'm still making sure it works as advertised. :) But I have pointed some people over here from the subreddit because one of my mods needs it.
Thx Marvin,
So in the end, for the player, it is handled like for CCL? all they have to do is to activate MFO before in mod order right?

I'm still debating in my head, I don't know a dick about C# and for some of the mods I'm working on; I'm at the point where I want to just modify one tag in Vanilla code, so it's either using something like this or CCL (for "injecting"? I'm sure about the right word) or completely overwriting vanilla defs (and I'm afraid decreasing compatibility with other mods). That's why I asked there and i'm always happy to have pointers; especially from folks, I consider, more versed than me  :P

Serenity


RemingtonRyder

Quote from: kaptain_kavern on October 18, 2016, 01:34:00 PM
Thx Marvin,
So in the end, for the player, it is handled like for CCL? all they have to do is to activate MFO before in mod order right?

Yup. As usual, restarting the game after making changes to the mod list is recommended.

Quote from: kaptain_kavern on October 18, 2016, 01:34:00 PM

I'm still debating in my head, I don't know a dick about C# and for some of the mods I'm working on; I'm at the point where I want to just modify one tag in Vanilla code, so it's either using something like this or CCL (for "injecting"? I'm sure about the right word) or completely overwriting vanilla defs (and I'm afraid decreasing compatibility with other mods). That's why I asked there and i'm always happy to have pointers; especially from folks, I consider, more versed than me  :P

Yeah, CCL's post-load injection is what I used to override defs in a friendly way before MFO.

MFO is perfect if you just want to override individual tags in defs. You're using the same XML format, it's easy to look back and understand what you're changing, and it'll be relatively easy to update your MFO mod from one major version to the next.

On the other hand, if you need to change a def value inside a nested tag, you need to override the entire nested tag using MFO (unless I'm just doing it wrong) in which case CCL's post-load injection might become the more attractive option for your override.

A nested tag is something like this:

<plant>
      <leaflessGraphicPath>Things/Plant/Grass_Leafless</leaflessGraphicPath>
      <harvestWork>40</harvestWork>
      <fertilityMin>0.05</fertilityMin>
      <maxMeshCount>9</maxMeshCount>
      <visualSizeRange>
        <min>0.4</min>
        <max>0.6</max>
      </visualSizeRange>
<seedEmitMTBDays>2</seedEmitMTBDays>
<seedShootRadius>7</seedShootRadius>
<lifespanFraction>5</lifespanFraction>
<growDays>1.66</growDays>
      <topWindExposure>0.4</topWindExposure>
      <fertilityFactorGrowthRate>0.90</fertilityFactorGrowthRate>
      <fertilityFactorPlantChance>0.90</fertilityFactorPlantChance>
</plant>


^ In which there are tags within the tag, and tags within the tags within the tag. Tagception. :)

kaptain_kavern

Thanks a lot. That is the kind of feedbacks I was looking for.

So if I got things right, with the example you provide with grass I could change say the "lealless path" with only one change with MFO but I have to change the whole "visualRange" tag if I were to change only the "min" value; or even a tag inside a "ThingDef" is considered nested?

But I'm sure I will find out while trying, because now that I understand a bit more this could be the perfect solution for me. At first I only want vanilla factions to use a modded traderKind without overwriting  all their factiondef. Thx a-fuckin'-lot!

lc-soz

I'm trying to use the Miniaturisation Overloaded to reinstall my furnaces from Glitter Tech (gotta love ludicrous high tempetures) but I'm failing. "My code":

<?xml version="1.0" encoding="utf-8" ?>

<Defs>
    <Miniaturisation.MiniaturisationDef>
        <defName>MiniaturisationFurnace</defName>
        <requiredMod>Furnace</requiredMod>
        <targetsDefNames>
            <li>Furnace</li>
        </targetsDefNames>
    </Miniaturisation.MiniaturisationDef>
</Defs>


Someone knows what is happening?

notfood

Ah- I'm sorry...

Somebody recomended me Factorio and it has hijacked all my free time.

kaptain_kavern the source for MFO is in the zip, I'll upload it into github shortly.

Dingo

Quote from: lc-soz on October 20, 2016, 12:48:16 AM
I'm trying to use the Miniaturisation Overloaded to reinstall my furnaces from Glitter Tech (gotta love ludicrous high tempetures) but I'm failing. "My code":

Someone knows what is happening?

You wrote <requiredMod>Furnace</requiredMod> instead of <requiredMod>Glitter Tech</requiredMod>.

mrsebseb

Quote from: Dingo on October 25, 2016, 05:44:29 AM
Quote from: lc-soz on October 20, 2016, 12:48:16 AM
I'm trying to use the Miniaturisation Overloaded to reinstall my furnaces from Glitter Tech (gotta love ludicrous high tempetures) but I'm failing. "My code":

Someone knows what is happening?

You wrote <requiredMod>Furnace</requiredMod> instead of <requiredMod>Glitter Tech</requiredMod>.
That shouldn't be it, as Furnace, while in the Glitter Tech thread, is technically it's own mod (or did I miss something?).

Dingo