Ludeon Forums

Ludeon Forums

  • December 07, 2019, 06:15:31 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [Modders Talk]Need external advices on mod update process with SteamWorkshop  (Read 367 times)

kaptain_kavern

  • Planetologist
  • ****
  • Posts: 2074
  • started 10 mods in one tick.
    • View Profile
    • RimWorldMod Slack - A place for live chatting about RimWorld modding

Ok, so here is the deal:

I released Modular Table mod on Steam (as Itchyflea asked me to take care of his mods). Got some reports and I suspect bad mods interaction. Indeed one of the modded item defName is just "StoolLinkable" so maybe another mod has something called the same.

Now after some tests, I find out that if I bluntly rename my defName and updates the mod on Steam I will make all already-placed modded building to vanished with an error message. As the mod already has nearly 5k user I'm reluctant to break things like that just for renaming a defName.

So I need help on how I could deal with that if anyone has ideas or already dealt with something similar. I only know XML modding, BTW

At first, I thought about introducing a renamed variant alongside the old one and keep it until I remove it in several months later, hoping by then everybody has built new renamed ones but I'm not sure it's the smartest things to do.

Thank you all in advance

dburgdorf

  • Planetologist
  • ****
  • Posts: 1380
  • The dorfiest of dorf modders.
    • View Profile
    • My Facebook page. *Shrug* It's the only Web site I have these days.

Your idea about adding a renamed variant is probably the best bet. Keep the original version in the XML, so as not to break saves, but give it an empty <designationCategory> tag, so it doesn't show up on any menus and can't be created new. That's essentially what I did months ago when I had a similar problem with some of the defs in "Fertile Fields."

(Users who have half-built stools in their saves when you update the mod might still have errors pop up, but they [hopefully] shouldn't be game-breaking. You might want to test that before releasing the update, though.)
Logged
- Rainbeau Flambe (aka Darryl Burgdorf) -
Old. Short. Grumpy. Bearded. "Yeah, I'm a dorf."



Buy me a Dr Pepper?

Nightinggale

  • Colonist
  • ***
  • Posts: 378
  • Refugee
    • View Profile

Conflicting mods: [B18] Tables+ and [B18] Tables+ (Linkables Only). However I'm not sure knowing the offending mods will help you. One approach which might work would be to use PatchOperationAdd to add the offending furniture(s) to >/Defs< if conflicting mods aren't loaded.

The patch sequence would look something like this:
ModCheck.isModLoaded, incompatible>true< (first mod)
ModCheck.isModLoaded, incompatible>true< (second mod)
PatchOperationTest
PatchOperationAdd

The test is to test for a path, which is only present in one file. The alternative is to patch every single xml file with the linkable stool.
« Last Edit: November 27, 2017, 07:00:17 PM by Nightinggale »
Logged
ModCheck - boost your patch loading times and include patchmods in your main mod.

kaptain_kavern

  • Planetologist
  • ****
  • Posts: 2074
  • started 10 mods in one tick.
    • View Profile
    • RimWorldMod Slack - A place for live chatting about RimWorld modding

Thanks to both of you!

@dburgdorf
The empty designationCategory tag trick was the kind of magical trick I was missing yo ordering the idea I had. I'm glad I read someone else having the same idea.

@Nightingale
Thanks for finding it my came from Tables+, after reading a bit in the comments I find that the author have just ripped off Modular Tables code to implement it verbatim in his own (rather useless without that, now) mod. Classy... But at least now I'm aware of it.

Now I think I will just post a "Not compatible with:" statement in description. But I find it cool knowing I can count on a friendly and knowledgeable community!

Plus both solution worth being written somewhere waiting for someone else to have the exact same problem. It could even be me in 6 month ;-)

Anyhow, thanks again
o7

Nightinggale

  • Colonist
  • ***
  • Posts: 378
  • Refugee
    • View Profile

Now I think I will just post a "Not compatible with:" statement in description.
Why do you expect people from not posting bug reports by adding something to the description? Add the incompatible note to the mod too with ModCheck.

Code: [Select]
<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="ModCheck.isModLoaded">
<modName>Tables+</modName>
<yourMod>Modular Table</yourMod>
<errorOnFail>true</errorOnFail>
<incompatible>true</incompatible>
<customMessageFail></customMessageFail>
</li>
<li Class="ModCheck.isModLoaded">
<modName>Tables+ (Linkables Only)</modName>
<yourMod>Modular Table</yourMod>
<errorOnFail>true</errorOnFail>
<incompatible>true</incompatible>
<customMessageFail></customMessageFail>
</li>
</operations>
</Operation>
Adding this will add a an error to the log while starting the game with either of those mods is loaded. That will make people notice and not report a bug even if they fail to read the full mod description.

customMessageFail can be removed or if you don't like the default message, you can write your own here. yourMod is supposed to the Name from About.xml from the mod you make. I took a guess at that one without looking it up.
Logged
ModCheck - boost your patch loading times and include patchmods in your main mod.