Digus / StardewValleyMods

My Stardew Valley Mods
GNU General Public License v3.0
17 stars 29 forks source link

PFM - Feature Request for Logging #86

Open etmoonshade opened 4 years ago

etmoonshade commented 4 years ago

I just spent most of the day trying to figure out what ended up being a mod conflict with a few mods that use PFM.

Would it be possible to add (either to the SMAPI debug log or the main log) something that lets us know that two PFM configs are stomping on each other somehow, and which one is the winner?

(my specific case was using Quality Artisan Products with Custom Producer Framework)

etmoonshade commented 4 years ago

Just to add: https://smapi.io/log/26daa02be72d4924be483a4b8352c1cd is a log that I produced for another bug I was running into, but shows the above situation. I have plenty of warnings for stuff that doesn't exist (I assume that QAP has configs that include something else,) but I don't have any warnings explicitly saying that there's a conflict of some sort.

Digus commented 4 years ago

If I remember correctly, there are logs about conflicts. Unless a mod uses the override property over another mod.

It's saying one mod can't override the other. image

On Sun, Oct 25, 2020 at 12:03 AM etmoonshade notifications@github.com wrote:

Just to add: https://smapi.io/log/26daa02be72d4924be483a4b8352c1cd is a log that I produced for another bug I was running into, but shows the above situation. I have plenty of warnings for stuff that doesn't exist (I assume that QAP has configs that include something else,) but I don't have any warnings explicitly saying that there's a conflict of some sort.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Digus/StardewValleyMods/issues/86#issuecomment-716086372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXLS64E7ETAEANHWMJXKJDSMOIRLANCNFSM4S6AQVXQ .

etmoonshade commented 4 years ago

That one is reporting, yes, and that's the odd part to me - the next couple of lines aren't saying anything about QAP not being able to override CPF, unless I'm missing it. It's funny, because between that and the later log lines with "No Output found," I assumed that it'd also log some detail about recipe conflicts.

It's definitely conflicting in some way, because the PFM kegs I used correctly used the QAP recipes (which basically say quality in = quality out as far as I understand the configs,) while a vanilla keg placed next to it did not. I'll admit though, now that I'm thinking it through, it might be that the way it's conflicting isn't something that the code is expecting - maybe adding the same property twice or something? I'll look at QAP and CPF configs side by side and see if I can come up with something useful.

etmoonshade commented 4 years ago

So, CPM looks like this (keeping in mind that I was using coffee for my tests - quick brewing and all that): { //Coffee "ProducerName": "Keg", "InputIdentifier": "433", "InputStack": 5, "MinutesUntilReady": 120, "OutputIdentifier": "395", "Sounds": [ "Ship", "bubbles" ], "PlacingAnimation": "Bubbles", "PlacingAnimationColorName": "DarkGray" },

while QAP looks like this: { //Coffee "ProducerName": "Keg", "InputIdentifier": "433", "InputStack": 5, "MinutesUntilReady": 120, "OutputIdentifier": "395", "Sounds": ["Ship", "bubbles"], "PlacingAnimation": "Bubbles", "KeepInputQuality": true, "PlacingAnimationColorName": "DarkGray" },

The only difference between them is the "KeepInputQuality" line. Many of the other recipes are similar, although mead specifically has some extra config to use the input honey to determine the properties of the mead.

Digus commented 4 years ago

If there were conflicts, we you see them reported after this line: 10:29:29 TRACE Producer Framework Mod Reading content pack: [PFM]Quality Artisan Products 1.0.4-1 from D:\Games\Steam\steamapps\common\Stardew Valley\Mods[PFM] QualityArtisanProducts Rules are storage by producer name and input Index. In this case they have both the same name and Input Identifier, so they should definitely conflict and if I remember correctly, the first one loaded would be kept. So, somehow they are not conflicting, and both rules seem to be stored. That would explain why some times it uses one rule and other times the other. But I have no idea how this is happening. Do you have more than one machine with the name Keg?

On Sun, Oct 25, 2020 at 12:39 AM etmoonshade notifications@github.com wrote:

So, CPM looks like this (keeping in mind that I was using coffee for my tests - quick brewing and all that): { //Coffee "ProducerName": "Keg", "InputIdentifier": "433", "InputStack": 5, "MinutesUntilReady": 120, "OutputIdentifier": "395", "Sounds": [ "Ship", "bubbles" ], "PlacingAnimation": "Bubbles", "PlacingAnimationColorName": "DarkGray" },

while QAP looks like this: { //Coffee "ProducerName": "Keg", "InputIdentifier": "433", "InputStack": 5, "MinutesUntilReady": 120, "OutputIdentifier": "395", "Sounds": ["Ship", "bubbles"], "PlacingAnimation": "Bubbles", "KeepInputQuality": true, "PlacingAnimationColorName": "DarkGray" },

The only difference between them is the "KeepInputQuality" line. Many of the other recipes are similar, although mead specifically has some extra config to use the input honey to determine the properties of the mead.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Digus/StardewValleyMods/issues/86#issuecomment-716089099, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHXLS6Z5RYKO6Y6UUCVT5U3SMOMWNANCNFSM4S6AQVXQ .

etmoonshade commented 4 years ago

As far as I can tell, it was consistent about whether it used the rule or not - a vanilla keg will NOT use the rules, while the upgraded kegs I have (which are named in the format of "ProducerName": "Keg - Copper", so I don't think that counts as a conflict) WILL use the rules. Sorry if I was confusing about that.