[B18] cuproPanda's (Outdated) Mods

Started by cuproPanda, May 06, 2017, 05:29:32 PM

Previous topic - Next topic

Should Cupro's Drinks for A18 bring back the water system? This will include new features and integrations as well.

Yes!
37 (63.8%)
No!
12 (20.7%)
Either way is fine.
9 (15.5%)

Total Members Voted: 58

Love

#75
I found the culprit, did a save with only Expanded Power and the suspected mod conflict. It's Wild Cultivation, available here: https://ludeon.com/forums/index.php?topic=32192.0

here is the entirety of the source code:

namespace RWC_Code {

[StaticConstructorOnStartup]
internal static class RWC_Initializer {
static RWC_Initializer() {
HarmonyInstance harmony = HarmonyInstance.Create("net.rainbeau.rimworld.mod.wildcultivation");
harmony.Patch(AccessTools.Method(typeof(Designator_ZoneAdd_Growing), "CanDesignateCell"), new HarmonyMethod(typeof(Designator_ZoneAdd_Growing_RWC), "CanDesignateCellPrefix"), null);
harmony.Patch(AccessTools.Method(typeof(Designator_ZoneAdd_Growing), "CanDesignateCell"), null, new HarmonyMethod(typeof(Designator_ZoneAdd_Growing_RWC), "CanDesignateCellPostfix"));
LongEventHandler.QueueLongEvent(Setup, "LibraryStartup", false, null);
}
public static void Setup() {
ThingDef.Named("PlantWildCotton").plant.harvestedThingDef = ThingDefOf.PlantCotton.plant.harvestedThingDef;
ThingDef.Named("PlantWildCotton").plant.harvestYield = ThingDefOf.PlantCotton.plant.harvestYield;
ThingDef.Named("PlantWildDevilstrand").plant.harvestedThingDef = ThingDefOf.PlantDevilstrand.plant.harvestedThingDef;
ThingDef.Named("PlantWildDevilstrand").plant.harvestYield = ThingDefOf.PlantDevilstrand.plant.harvestYield;
}
}

[DefOf]
public static class ThingDefOf {
public static ThingDef PlantCotton;
public static ThingDef PlantDevilstrand;
public static ThingDef PlantPotato;
}

public static class Designator_ZoneAdd_Growing_RWC {
public static bool CanDesignateCellPrefix(ref float __state) {
__state = ThingDefOf.PlantPotato.plant.fertilityMin;
ThingDefOf.PlantPotato.plant.fertilityMin = 0.01f;
return true;
}
public static void CanDesignateCellPostfix(ref float __state) {
ThingDefOf.PlantPotato.plant.fertilityMin = __state;
}
}

}


It could also be the patch file

<Patch>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantAgave"]/plant</xpath>
<value>
<fertilitySensitivity>0.75</fertilitySensitivity>
<growDays>6</growDays>
<harvestYield>7</harvestYield>
<harvestWork>350</harvestWork>
<sowMinSkill>6</sowMinSkill>
<sowWork>450</sowWork>
<sowTags>
<li>Ground</li>
<li>Hydroponic</li>
</sowTags>
<wildClusterSizeRange>
<min>3</min>
<max>5</max>
</wildClusterSizeRange>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantGrass"]/plant</xpath>
<value>
<sowTags>
<li>Ground</li>
</sowTags>
<reproduceMtbDays>2</reproduceMtbDays>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantTallGrass"]/plant</xpath>
<value>
<sowTags>
<li>Ground</li>
</sowTags>
</value>
</Operation>

</Patch>

cuproPanda

Quote from: ZackWake on May 24, 2017, 05:04:31 PM
I'm not sure if it's just me. But when I mine certain objects for CAL (Alloys) Like lead for some reason leaves behind a place holder. I can give the mod list and also give it a shot with that as the only mods if you need it.

If the placeholder is a big magenta [X], I know about it and fixed it. The mods will be updated later tonight. If you see silver, that's just a feature of mining galena ore.

Quote from: Love on May 24, 2017, 06:26:59 PM
I found the culprit, did a save with only Expanded Power and the suspected mod conflict. It's Wild Cultivation, available here: https://ludeon.com/forums/index.php?topic=32192.0

here is the entirety of the source code:

namespace RWC_Code {

[StaticConstructorOnStartup]
internal static class RWC_Initializer {
static RWC_Initializer() {
HarmonyInstance harmony = HarmonyInstance.Create("net.rainbeau.rimworld.mod.wildcultivation");
harmony.Patch(AccessTools.Method(typeof(Designator_ZoneAdd_Growing), "CanDesignateCell"), new HarmonyMethod(typeof(Designator_ZoneAdd_Growing_RWC), "CanDesignateCellPrefix"), null);
harmony.Patch(AccessTools.Method(typeof(Designator_ZoneAdd_Growing), "CanDesignateCell"), null, new HarmonyMethod(typeof(Designator_ZoneAdd_Growing_RWC), "CanDesignateCellPostfix"));
LongEventHandler.QueueLongEvent(Setup, "LibraryStartup", false, null);
}
public static void Setup() {
ThingDef.Named("PlantWildCotton").plant.harvestedThingDef = ThingDefOf.PlantCotton.plant.harvestedThingDef;
ThingDef.Named("PlantWildCotton").plant.harvestYield = ThingDefOf.PlantCotton.plant.harvestYield;
ThingDef.Named("PlantWildDevilstrand").plant.harvestedThingDef = ThingDefOf.PlantDevilstrand.plant.harvestedThingDef;
ThingDef.Named("PlantWildDevilstrand").plant.harvestYield = ThingDefOf.PlantDevilstrand.plant.harvestYield;
}
}

[DefOf]
public static class ThingDefOf {
public static ThingDef PlantCotton;
public static ThingDef PlantDevilstrand;
public static ThingDef PlantPotato;
}

public static class Designator_ZoneAdd_Growing_RWC {
public static bool CanDesignateCellPrefix(ref float __state) {
__state = ThingDefOf.PlantPotato.plant.fertilityMin;
ThingDefOf.PlantPotato.plant.fertilityMin = 0.01f;
return true;
}
public static void CanDesignateCellPostfix(ref float __state) {
ThingDefOf.PlantPotato.plant.fertilityMin = __state;
}
}

}


It could also be the patch file

<Patch>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantAgave"]/plant</xpath>
<value>
<fertilitySensitivity>0.75</fertilitySensitivity>
<growDays>6</growDays>
<harvestYield>7</harvestYield>
<harvestWork>350</harvestWork>
<sowMinSkill>6</sowMinSkill>
<sowWork>450</sowWork>
<sowTags>
<li>Ground</li>
<li>Hydroponic</li>
</sowTags>
<wildClusterSizeRange>
<min>3</min>
<max>5</max>
</wildClusterSizeRange>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantGrass"]/plant</xpath>
<value>
<sowTags>
<li>Ground</li>
</sowTags>
<reproduceMtbDays>2</reproduceMtbDays>
</value>
</Operation>

<Operation Class="PatchOperationAdd">
<xpath>//ThingDef[defName = "PlantTallGrass"]/plant</xpath>
<value>
<sowTags>
<li>Ground</li>
</sowTags>
</value>
</Operation>

</Patch>


I don't see a specific reason why what you posted would cause an error, but I'll look into that mod and see if there's something I can work around to stop the errors. Thank you :)
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

cuproPanda

Mods have all been updated to the official version of A17!

Fences were removed from Powerless, and windows were added. Windows can be built into a wall and allow light in. Colonists can look out of the windows to get joy. The way pawns face is still buggy, but the windows work.

Minor improvements to the mods, changing small things in the defs. Cupro's Alloys recipes work now, and it adds a metals category for easier sorting.

I still have a few features I'd like to add before the mods are completely finished, but it'll take a few days, I'm going to be busy this week.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Djohaal

It'd be totally cool if you could put up the links for the A16 builds of the mods.

Love

Quote from: Djohaal on May 24, 2017, 10:03:41 PM
It'd be totally cool if you could put up the links for the A16 builds of the mods.

cuproPanda did not mod during A16, so there aren't any.

cuproPanda

I just realized all I did for Cupro's Stones was add names and colors, without changing descriptions or stats. Here I thought I spent some time editing the stats and balancing them, but I didn't. I'll spend my time tonight fixing that. Sorry for my laziness, everyone  :-\
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

AdamM88

Hello!
Would you please upload this mod to Steam Workshop?

cuproPanda

Quote from: AdamM88 on May 25, 2017, 06:45:24 PM
Hello!
Would you please upload this mod to Steam Workshop?
No. I don't like that steam forces users to use the newest version of mods because some changes may break saves. Plus, that's twice the work of uploading and checking comments
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Love

Quote from: cuproPanda on May 25, 2017, 02:40:27 PM
I just realized all I did for Cupro's Stones was add names and colors, without changing descriptions or stats. Here I thought I spent some time editing the stats and balancing them, but I didn't. I'll spend my time tonight fixing that. Sorry for my laziness, everyone  :-\

Honestly the main reason I haven't dipped my toe into the minor mods has a lot to do with the special instructions, like deleting certain directories if you use certain mods or patching one minor mod over another - makes it sort of a pain to update when necessary, and I have my updating process basically streamlined at this point.

If you could use the new patching system to make those hurdles unnecessary I'd super appreciate it.

cuproPanda

Quote from: Love on May 25, 2017, 07:19:22 PM
Quote from: cuproPanda on May 25, 2017, 02:40:27 PM
I just realized all I did for Cupro's Stones was add names and colors, without changing descriptions or stats. Here I thought I spent some time editing the stats and balancing them, but I didn't. I'll spend my time tonight fixing that. Sorry for my laziness, everyone  :-\

Honestly the main reason I haven't dipped my toe into the minor mods has a lot to do with the special instructions, like deleting certain directories if you use certain mods or patching one minor mod over another - makes it sort of a pain to update when necessary, and I have my updating process basically streamlined at this point.

If you could use the new patching system to make those hurdles unnecessary I'd super appreciate it.

They either already do or they will in the next update. I added patches sometime last night, but I don't remember if it was before or after the release. I'm almost done with today's stuff, and then the mods are done!
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

cuproPanda

Mods are updated. I added two new types of rooms - library and zen garden. Library is tied to reading books and triggers a thought, while zen garden is just a room definition. I added patches to mods that needed it, so no more addons are needed. I also adjusted the way PlantWithSecondarys grow, so the latex/fruit actually grows in the time defined, not the parent's time. Stone defs were updated to include descriptions and stats, balanced against vanilla stone stats. Other minor tweaks were also done.

The features are all added now, and the mods should pretty much be complete unless a bug is found!

There is still an issue with pawns facing the wrong direction when looking out a window, but the alternative is to detour the game's base code, something I'd rather not do. I'll look into setting the rotation manually, but I might resort to the detour.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Love

Quote from: cuproPanda on May 25, 2017, 08:08:40 PM
There is still an issue with pawns facing the wrong direction when looking out a window, but the alternative is to detour the game's base code, something I'd rather not do. I'll look into setting the rotation manually, but I might resort to the detour.

If it's about the code I PMed you about, I wouldn't worry about it. The worst case scenario is other people detour the base game code in the exact same way.


Quote from: cuproPanda on May 25, 2017, 07:31:38 PM
Quote from: Love on May 25, 2017, 07:19:22 PM
Quote from: cuproPanda on May 25, 2017, 02:40:27 PM
I just realized all I did for Cupro's Stones was add names and colors, without changing descriptions or stats. Here I thought I spent some time editing the stats and balancing them, but I didn't. I'll spend my time tonight fixing that. Sorry for my laziness, everyone  :-\

Honestly the main reason I haven't dipped my toe into the minor mods has a lot to do with the special instructions, like deleting certain directories if you use certain mods or patching one minor mod over another - makes it sort of a pain to update when necessary, and I have my updating process basically streamlined at this point.

If you could use the new patching system to make those hurdles unnecessary I'd super appreciate it.

They either already do or they will in the next update. I added patches sometime last night, but I don't remember if it was before or after the release. I'm almost done with today's stuff, and then the mods are done!

Cupro's Stones still lists this as an instruction: "If using Fluffy's Stuffed Floors or a similar mod, delete this mod's DesignationCategoryDefs folder and TerrainDefs folder."

cuproPanda

Updated Cupro's Drinks to 17.20, adding an insertion hook for dismar's Vegetable Garden mod. This will allow Vegetable Garden to patch Drinks recipes allowing more ingredients and new sodas!

Quote from: Love on May 25, 2017, 08:18:08 PM
Cupro's Stones still lists this as an instruction: "If using Fluffy's Stuffed Floors or a similar mod, delete this mod's DesignationCategoryDefs folder and TerrainDefs folder."

That's because I can't change my own code using a patch if another mod is present (I don't think). The way I understand it, I can check if something exists, then apply changes there.
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Love

The glowstone spawn rate still seems REALLY low. Not getting any exposed glowstone on several rerolls of mountainous maps. Can it be bumped up again?

Love

Oh, this is something I keep forgetting to bring up, but I actually think the hide beds should be an improvement over the normal beds, rather than the other way around.