[B18-A17] Sixs' Mod Showcase (News Updated: February 28th, 2018)

Started by Sixdd, June 02, 2017, 07:16:57 PM

Previous topic - Next topic

cuproPanda

Your Stuffed Construction mod causes my Expanded Power mod to error if both are installed, because you remove the costList from the defs. Are you able to just remove the entries from costList, leaving it blank? My patch file is 728 lines long, and if I check for your mod and make changes that would end up doubling the size of the file...
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

Worth mentioning that Expanded Power also reduces a lot of metal costs and in the process also adds a copper cost. That would need to be accounted for somehow.

Sixdd

@CuproPanda - Yeah I can make the change, it'll be up either later tonight or tomorrow morning.

@Love - Stuffified Construction doesn't lower any costs, it just converts them to stuff categories rather than one type. If you want reduced costs you could try loading a mod that does that after my mod and see if that works. I'll be putting more into compatibility this week, if it's just Expanded Power it may be done by the end of the week, possibly sooner, but I need to look over Expanded Power patches before I give a solid eta.

cuproPanda

Quote from: Sixdd on June 13, 2017, 08:00:46 PM
@CuproPanda - Yeah I can make the change, it'll be up either later tonight or tomorrow morning.

@Love - Stuffified Construction doesn't lower any costs, it just converts them to stuff categories rather than one type. If you want reduced costs you could try loading a mod that does that after my mod and see if that works. I'll be putting more into compatibility this week, if it's just Expanded Power it may be done by the end of the week, possibly sooner, but I need to look over Expanded Power patches before I give a solid eta.

Good luck with that. It's a huge file. If it would be easier or better for me to do it, just let me know. I already have the PatchOperationModDependent, so it's easy for me to make changes based on installed mods. Making changes to almost all vanilla buildings is the long/hard part.

I mentioned having you do it because simply removing the costList will cause errors with any mod that makes a change to the costList, assuming it's present. Simply removing the entries may cause an error, I'm not sure if you can have a blank cost list and I can't test it out at the moment.
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!

Sixdd

I've made some headway with making the mods compatible but the biggest problem I'm running into is not being able to run a patch operation conditionally. For example, I want to run a patch from my mod to clear the costlists, which is easy. But if my mod finds your mod I want it to not run that patch and allow yours to run. Any ideas?

AngleWyrm

Quote from: Sixdd on June 13, 2017, 11:06:57 PM
...the biggest problem I'm running into is not being able to run a patch operation conditionally.

Check out this thread

Quote
Quote from: skullywag on June 04, 2017, 02:32:54 AM
...to test for its existence and add it if it doesnt exist, you can then add values to it in a further path if thats needed as well. as per:


<Operation Class="PatchOperationSequence">
  <success>Always</success>
  <operations>
    <li Class="PatchOperationTest">
      <xpath>//ThingDef[defName = "DiningChair"]/costList</xpath>
      <success>Invert</success>
    </li>
    <li Class="PatchOperationAdd">
      <xpath>//ThingDef[defName = "DiningChair"]</xpath>
      <value>
        <costList />
      </value>
    </li>
  </operations>
</Operation>

<Operation Class="PatchOperationAdd">
  <xpath>//ThingDef[defName = "DiningChair"]/costList</xpath>
  <value>
    <Cloth>5</Cloth>
  </value>
</Operation>

My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Sixdd

Thanks Angle but that's not what I'm looking for. I need to be able to run a patch operation when given xpath does NOT exist. So what I'd like is basically an if else statement level of flexibility.

Love

Quote from: Sixdd on June 14, 2017, 12:18:29 AM
Thanks Angle but that's not what I'm looking for. I need to be able to run a patch operation when given xpath does NOT exist. So what I'd like is basically an if else statement level of flexibility.

Here you are:

https://github.com/cuproPanda/STN/blob/master/Source/CuprosStones/PatchOperationFindMod.cs
https://github.com/cuproPanda/STN/blob/master/Patches/Patches_StuffedFloors_STN.xml

Sixdd

#38
I've already seen that Love but thank you. That particular bit of code checks if a mod DOES exist, not if it doesn't which is what I need.

EDIT: @cuproPanda  I found out why adding ExpandedPower caused errors. I had my replace operations replace the "CostList" with"costList" which is technically different. It's always something small, ya know :)

cuproPanda

#39
Quote from: Sixdd on June 14, 2017, 02:40:30 AM
I've already seen that Love but thank you. That particular bit of code checks if a mod DOES exist, not if it doesn't which is what I need.

EDIT: @cuproPanda  I found out why adding ExpandedPower caused errors. I had my replace operations replace the "CostList" with"costList" which is technically different. It's always something small, ya know :)

I've been burned by that plenty of times. Glad it's working now! :)


EDIT:
As far as that code goes, it could be used to check if a mod DOESN'T exist simply by adding an exclamation mark (return modExists => return !modExists) or by adding <success>Invert</success> in the xml
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!

AngleWyrm

#40
Quote from: Sixdd on June 14, 2017, 12:18:29 AM
Thanks Angle but that's not what I'm looking for.
I need to be able to run a patch operation when given xpath does NOT exist.

Are you seeing some difference between your stated need and the following question & answer?


Quote from: AngleWyrm on June 03, 2017, 09:24:23 PM
The problem is that entryToModify may or may not exist in the record, and I want to add that entry if none currently exists.

Quote from: skullywag on June 04, 2017, 02:32:54 AM
You need to test for its existence and add it if it doesnt exist
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

Sixdd

#41
OMG I can't believe I didn't recognize that at first. Thank you Angle that actually is what I needed.

Also, thank you Cupro.

AngleWyrm

#42

  • Glad to hear it; was wondering if there might be some other facet to the problem.
  • Looks like reading comprehension isn't receiving sufficient educational focus in our school system to support detailed communications
My work-around is going to be placing an executive summary type sentence as the first part of a transmission, to spark recognition and sorting filters.
My 5-point rating system: Yay, Kay, Meh, Erm, Bleh

hoaxdream

i try to use the mod cheap lamp because the one that im using is effecient light which is not compatible with more furniture, after installing the cheap lamp, the power cost of vanilla lamp is still 75w and in more furniture is 50w. but when im using effecient light the vanilla lamp uses 25w.

weewee

The things that need wood as a fuel now cannot use wood. It's stuck there needing wood for fuel even though I have different kinds of woods in stock