Loading screen tips replacement mod

Started by Auld, August 23, 2021, 04:22:15 PM

Previous topic - Next topic

Auld

Hello,

I'm trying to make a mod that replaces the loading screen tips with my own text. Adding new tips to the rotation is easy enough - just stick a new Tips.xml with my text in the mod files. The problem is removing the old ones. Using any patch operation on the default Tips.xml causes the game to softlock before the main menu.

Does anyone have any advice on how to make this work? I found https://github.com/fluffy-mods/ShitRimWorldSays, but it's not quite the same thing as what I'm looking for.

RawCode

focus on reading
       
public static List<Tip> Tips {
            get {
                _vanilla ??= DefDatabase<TipSetDef>.AllDefsListForReading
                                                 .SelectMany(set => set.tips)
                                                 .Select(tip => (Tip_Gameplay) tip)
                                                 .ToList();

                if (ShitRimWorldSays.Settings.replaceGameTips) {
                    _tips ??= _quotes.InRandomOrder().ToList<Tip>();
                } else {
                    _tips ??= _quotes.Cast<Tip>()
                                   .Concat(_vanilla)
                                   .InRandomOrder()
                                   .ToList();
                }

                return _tips;
            }
}

also i don't see any of your code, you unlikely to ever understand anything if you are not trying.

Auld

#2
Thank you for your response. The reason I don't have any code to show is because I was viewing it as more of a technical issue to be solved (the softlock). I linked the project because it's only thing I found that's even slightly similar to what I want to do, I'm not asking for help picking through it. Is there anyone else who has any ideas?