tModLoader Cheat Sheet

crash i found
Object reference not set to an instance of an object.
at Terraria.NPC.SetDefaults(Int32 Type, Single scaleOverride)
at CheatSheet.UI.NPCSlot.Init(Int32 npcNum) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCSlot.cs:line 78
at CheatSheet.UI.NPCSlot..ctor(Int32 npcNum) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCSlot.cs:line 65
at CheatSheet.UI.NPCView..ctor() in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\RecipeBrowser.cs:line 145
at CheatSheet.UI.NPCBrowser..ctor(Mod mod) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCBrowser.cs:line 143
at CheatSheet.CheatSheet.AddCraftGroups() in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\CheatSheet.cs:line 54
at Terraria.ModLoader.ModLoader.AddCraftGroups()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
Can you make a mount catagory in the item spawner menu?
It's in.
is it possible to seclude the recipe function so you are only left with that one?
i'd like to use the recipe function while not having the ability to "cheat" items and npcs into the game
No, I mean, yeah, it is possible, but no, I'm not going to fragment my code and make it harder on myself. For now, all I can suggest is self control. Maybe assign the hotkeys for the other ones to something you'll never press.
crash i found
Object reference not set to an instance of an object.
at Terraria.NPC.SetDefaults(Int32 Type, Single scaleOverride)
at CheatSheet.UI.NPCSlot.Init(Int32 npcNum) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCSlot.cs:line 78
at CheatSheet.UI.NPCSlot..ctor(Int32 npcNum) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCSlot.cs:line 65
at CheatSheet.UI.NPCView..ctor() in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\RecipeBrowser.cs:line 145
at CheatSheet.UI.NPCBrowser..ctor(Mod mod) in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\UI\NPCBrowser.cs:line 143
at CheatSheet.CheatSheet.AddCraftGroups() in c:\Users\Javid\Documents\My Games\Terraria\ModLoader\Mod Sources\CheatSheet\CheatSheet.cs:line 54
at Terraria.ModLoader.ModLoader.AddCraftGroups()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
This should be fixed recently.
I don't know if it's just me, but every time I try to load the latest version, it always crashes with it saying there is a problem loading "recipes" and immediately disables the mod. I try disabling other mods but nothing happens.
This should be fixed.

If not, let me know. I downloaded all the mods earlier and they all loaded together fine.
 
v0.1.7 Released (aka The Super Sweet Menus update)

  • Super sweet animations
  • Now only one hotkey. Hotkey will toggle hotbar and reshow last used browser
  • Ability for modders to add cheat/debug buttons to a special menu.
  • Clear items on ground button
  • Prevent NPC spawning in multiplayer
  • Recipe craft groups now display properly

Attention Modders, you can now add your own buttons to Cheat Sheet, whether for debugging/testing purposes or if you have ideas for good cheats.

The idea is to make testing your mod easy by providing access to a quick button you can use to do various things. For example, your button could change a bossDowned value so you can check that enemy spawns are working as you think they are. I hope this will prove useful and speed up mod making.

If you make a button that players like, I'd be happy to bring the button into the regular Cheat Sheet menus and you'll get credit for your contribution. (If you'd like)

Here's how it works: Basically, you give CheatSheet a method to call when clicked, a method to call to get the tooltip, and a texture for the button.

Below is a complete example for code that would reside in your main mod class. This button will set the time to the next logical time.

Code:
        // Add your button by checking if CheatSheet is loaded in PostSetupContent
        public override void PostSetupContent()
        {
            Mod cheatSheet = ModLoader.GetMod("CheatSheet");
            if(cheatSheet != null && !Main.dedServ)
            {
                // "AddButton_Test" is a special string, in the future, other strings could represent different types of buttons or behaviors
                cheatSheet.Call("AddButton_Test", this.GetTexture("MyCheatButtonImage"), (Action)this.AdvanceTimeButtonPressed, (Func<string>)this.AdvanceTimeButtonTooltip);
            }
        }

        // This method is called when the cursor is hovering over the button
        public string AdvanceTimeButtonTooltip()
        {
            if (Main.dayTime)
            {
                if (Main.time > 27000.0)
                {
                    return "Advance to 7:30 PM (Dusk)";
                }
                else
                {
                    return "Advance to Noon";
                }
            }
            else
            {
                if (Main.time > 16200.0)
                {
                    return "Advance to 4:30 AM (Dawn)";
                }
                else
                {
                    return "Advance to Midnight";
                }
            }
        }

        // This method is called when the button is pressed.
        public void AdvanceTimeButtonPressed()
        {
            if (Main.dayTime)
            {
                if (Main.time > 27000.0)
                {
                    Main.dayTime = false;
                    Main.time = 0.0;
                }
                else
                {
                    Main.dayTime = true;
                    Main.time = 27000.0;
                }
            }
            else
            {
                if (Main.time > 16200.0)
                {
                    Main.dayTime = true;
                    Main.time = 0.0;
                }
                else
                {
                    Main.dayTime = false;
                    Main.time = 16200.0;
                }
            }
        }

Here that code is in action:

Also, if your mod does nothing else besides add cheat buttons, you can set "modReferences = CheatSheet" in build.txt to only allow your mod to be enabled if Cheat Sheet is enabled.
 
Last edited:
Sweet! Just amazing!
Maybe you could make that if the cheat sheet is opened then when you scroll the items in it - the hotbar won't scroll?
And also I would prefer to use a scrolling with clicking as it will be more convenient.
 
Last edited:
Can you provide link to previous version? I'm still on 0.7.1.1, most mods are still not on 0.8, that's why i need previous one.
 
When i close a menu using X button , i can't enable it anymore (ex.I want to open item browser, but nothing shows) I tried to restart the game, nothing happened.
 
Still isn't working after the update. Every time I try reloading mods to enable it the "recipe error" thing always disables it.
 
Sweet! Just amazing!
Maybe you could make that if the cheat sheet is opened then when you scroll the items in it - the hotbar won't scroll?
And also I would prefer to use a scrolling with clicking as it will be more convenient.
It's annoying that they both scroll, I'll spend some more time and see if there is away to prevent the other scrolling from happening.
Can you provide link to previous version? I'm still on 0.7.1.1, most mods are still not on 0.8, that's why i need previous one.
To be honest, I use to save past versions when I started modding, but I haven't with this mod since I updated so often, so I don't have it. Maybe someone else could post it if they are still on 0.7.

Anyway, there are only a few stragglers left not updated to 0.8, so maybe it won't be an issue for much longer.
When i close a menu using X button , i can't enable it anymore (ex.I want to open item browser, but nothing shows) I tried to restart the game, nothing happened.
That's weird, I tested that non-stop. Are you on the latest? The hotbar hotkey doesn't work? Clicking the button doesn't reselect it?
Still isn't working after the update. Every time I try reloading mods to enable it the "recipe error" thing always disables it.
I just downloaded every single mod and ran them all, it loaded fine. Maybe you need to update a mod.
 
Sometimes, when I close the Mob Spawn Menu, I can't open it back. Can't really tell how specifically I trigger it, as it happens randomly without me being able to catch what I really did.
 
When i close a menu using X button , i can't enable it anymore (ex.I want to open item browser, but nothing shows) I tried to restart the game, nothing happened.
same for me. have to restart terraria
Sometimes, when I close the Mob Spawn Menu, I can't open it back. Can't really tell how specifically I trigger it, as it happens randomly without me being able to catch what I really did.
1.Yes, i am. 2. It works. The menu doesn't work. 3. No.
K, fixed this.
 
Not sure if you're up for suggestions or anything of the like, but have you considered adding a free-cam mode?


Also, thanks so much for this :D
 
Is it possible to make a "real" version of the paint tool by taking the required items from your inventory as you paste it? So that this could be used by survival builders to build quickly while still using items to do it?
 
Back
Top Bottom