tModLoader Creative Mode Mod - The Commander

Jofairden

Duke Fishron
tModLoader
02547877.png

Last update: 8th of June, 2016
kdcROYP.png

I know that I didn't notice anyone about it, but this mod is going to merge with Cheat Sheet originally by @jopojelly My mods has certain features that Cheat Sheet and Hero's Mod lack, which will now become fine additions to Cheat Sheet. There is no reason for me not to merge, as Jopojelly is super friendly and Cheat Sheet has easy to use GUI similar to Hero's Mod. I cannot tell you what the future holds, I can tell you that you should use Cheat Sheet from now on. This also mean you can expect this mod's exclusive features, such as /vacuum, to soon be available using Cheat Sheet if they aren't already.


Link to Cheat Sheet: http://forums.terraria.org/index.php?threads/cheat-sheet.41407/
kdcROYP.png

UPDATED TO V0.1.0.4 WORKS WITH TML V0.8.1 (WINDOWS)
Changelog (v0.1.0.4)
Type /help or /? to view for in-game help!
[x] Added ModItem support for /giveitem, e.g: /giveitem Example Sword
[x] Now works with tML 0.8.1 (Windows)
[x] Changed version to 0.1.0.x as tML no longer supports letters ;-;

Table of contents:

  1. Introduction
  2. Overview
  3. Download
  4. Change Log
  5. Versions
  6. Credits
kdcROYP.png

Introduction

This mods adds handy 'cheat' like commands to Terraria. Think about spawning npcs, giving you items, granting yourself godmode, setting the in-game time, teleporting and more! In the future, I'm going to add UI for this mod so you don't have to use commands all the time (currently UI isn't supported) You can view a full list of commands and their usage below (type /? or /help in-game)

kdcROYP.png

Overview
Please report bugs in this thread, I highly appreciate it :passionate:

NO LONGER UPDATING THIS LIST, USE /? OR /HELP IN-GAME TO VIEW COMMANDS.
MP NOT SUPPORTED (YET)


!<argument> means that the argument is not yet supported (most likely for mutiplayer)
argument1|argument2|argument3 means that you can choose between arguments
[argument] means that the argument is optional

/help
/?
Shows a list of useable commands (shifted commands not displayed)

/npc type [x] [y] [number]
Spawns NPCs
/npc 22
This spawns the guide on the player
/npc 22 ~0 ~-32
This spawns the guide 2 blocks (16x16) above the player
/npc 22 ~64 ~0
This spawns the guide 4 blocks (16x16) to the right of the player
The base of the command is '/npc'
Then after that, the first argument needs to be the type of the npc. For example 32 should be the guide npc.
So '/npc 32' will spawn a guide on top of you. If you wish to spawn multiple npc's you will need to enter coords first, for example '/npc 32 ~0 ~0' will do the same as '/npc 32', if the coordinates are preceded by a '~' they will be relative to the player. Then after the coordinates you can set the amount to spawn. (might still be bugged in the latest version, fixed it for the next release though) i.e: '/npc 32 ~0 ~0 5' will spawn 5 guides. Remember to look in OP as there are examples in spoilers below each command.

/npctype mod npc
Gets a mod NPC
Used in conjunction with /npc
/npctype ExampleMod Octopus
This returns the type of ExampleMod's NPC 'Octopus'
Now you could use this type in conjuction with /npc

/giveitem type|name [amount] !player
Give x amount of items to a player
/giveitem 1326 (gives 1 rod of discord)
/giveitem 1326 3 (gives 3 rod of discord)
/giveitem Rod of Discord
/giveitem meowm (gives meowmere)

/itemtype mod item
/moditem mod item
Gets the type of a moditem similar to how /npctype works
This is used in conjunction with /giveitem
/itemtype ExampleMod ExampleItem
This returns the type of ExampleMod's item 'ExampleItem
Now you could use this type in conjunction with /giveitem

/rod [true|false]
Toggle Rod of Discord debuff immunity (health usage)
/rod, /rod true, /rod false

/stat hp|mp|hpmax|mpmax amount
Modifies a player statistic
/stat hp 500 (sets hp to 500)
/stat hpm 500 (sets max hp to 500, yes hpm is a hpmax slang)
/stat mpm 500
/stat mp 500
hp cannot be set below 1, minimum hpmax is 100 and maximum hpmax is 500
minimum mpmax is 20 and maximum mpmax is 400

/time add|sub|set numticks [true|false]
Add, subtract or set the in-game time. (in ticks)
true 54000.0 turns into false 0.0 and will then go to 32400.0 and then turn into true 0.0.. rinse and repeat
(this boolean translates to Main.dayTime being set to true or false)
/time add 5000
/time set 54000.0 true (nightfall)
/time set 0.0 false (nightfall)
/time set 16200.0 false (night)

/godmode [true|false]
/gm [true|false]
Toggles godmode
ie. features: No health/mp drop, infinite ammo, infinite flight time, can't be hit by projectiles and npc's, and much more!
/gm, /gm true, /gm false

/down npc [true|false]
/npcd npc [true|false]
Toggles the downed state of a boss
(for example if you need to have downed Golem for a certain thing to be able to happen)
'plantera', 'moonlord', 'golem', 'cultist', 'thedestroyer', 'thetwins', 'skeletronprime', 'mechanicalbosses', 'nebula', 'solar', 'stardust', 'vortex', 'skeletron', 'eyeofcthulhu', 'eaterofworlds', 'brainofcthulhu'
'plant', 'moon', 'cult', 'destroyer', 'twins', 'skeletronp', 'mechs', 'm3', 'eye', 'cthulhu', 'eow', 'boh'
/down plant or /npcd plant
/npcd destroyer or /down destroyer

/event name
/e name
Force start an event
(I have stripped all event requirements! You can have a blood moon with less than 120 HP!)
'goblininvasion', 'bloodmoon', 'slimerain', 'frostlegion', 'frostmoon', 'pumpkinmoon', 'solareclipse', 'pirateinvasion', 'martianmadness', 'lunar'
'goblins', 'snowlegion', 'martians', 'mm'
/event martians
/event bloodmoon

/stopevents
Force stop ALL events (including invasions)
/stopevents

/rain [true|false]
/downfall [true|false]
Toggles rain/downfall state
/rain, /rain true, /rain false

/teleport location !player
/tp location !player
Teleports a player to a specified location, view locations to see which you can use
dungeon, hell, spawn, random, temple
/tp dungeon or /teleport dungeon
To teleport to to hell: /tp hell

/butcher [true|false]
/killall
Butcher all NPCs (excluding town NPCs) Including true will kill everything including town NPCs, including false will kill just town NPCs
(this works nice in conjunction with /vac -1)
/butcher, /killall

/vacuum type|-1 [type2] !<[player]>
/vac type|-1 [type2] !<[player]>
Vacuum all items or items in item range to a player
/vac 71 (vacuums copper coins)
/vac 71 74 (vacuums copper, silver, gold and platinum coins)
/vac -1 (vacuums all items)
keyword support.. eg: /vacuum weapon melee
(will vacuum all weapons that deal melee damage)
/vacuum armor 50 true
(will vacuum all armor that have 50 armor or higher)
/vacuum armor 50 false
(will vacuum all armor that have up to 50 armor)

/peace [true|false]
Makes the world a peaceful place..
(for now, stops NPCs from spawning EVER, already spawned NPCs should be killed using /butcher
/peace, /peace true, /peace false

/position !player
/pos !player
Returns the player's position in tile size (you can directly enter these values into /tp x y)
/pos, /position

/shine !player
Makes you shine as if you used a Shine Potion (doesn't use a buff slot, lasts until you disable)
/shine

/tilerange x [y] !player
/tr x [y] !player
Changes a player's tile range
/tr 150 150
sets x and y tilerange to 150 (amount of tiles = value * 16)

/builder [true|false]
/bm [true|false]
Builder mode with infinite inventory stacks (999, non depleting, stacks
with infinite flight and tilerange!
/builder

/itemprefix name|index|list
/itempre name|index|list
Sets a prefix to your currently selected item in your hotbar
The prefix will only be set if it is a valid and possible prefix for that item.
(if you use an integer, you can only use numbers 1-83
Use 'list' to see possible prefixes
/itempre 83
This command attempts to give "Mythical"
/itempre "Mythical" or /itempre Mythical
This does exactly the same!
/itempre list
This shows a list of possible prefixes

/itemsound type [true|false]
Allows you to disable certain sounds (such as Meowmere's)
Not implemented yet

/last
/latest
Runs your last used command. The code also saves any arguments you used.
Does not require you to pass any arguments

/clear [true|false]
/cl [true|false]
'Clears' the world of items and projectiles.
Pass true to only clear of items, and false to only clear of projectiles. Pass nothing to clear both.
/clear true (clears all items)
/clear false (clears all projectiles)
/clear (clears items and projectile)

/buff type numticks !player
Adds a buff to the player. Only works with a type for now (names aren't working yet)
Default numticks is 600 (10 seconds). To calculate amount in seconds: numticks / 60
To convert from seconds to ticks: numseconds * 60
/buff 11 (adds 'Shine' for 10 seconds)
/buff 24 1200 (adds 'On Fire!' for 20 seconds)

/debugmode [true|false] [true|false]
/debugmode -i [true|false]
/debugmode -p [true|false]
Enables or disables debugmode for either: npcs, items or projectiles. In fact, everything can be enabled or disabled using: (slang)
/dm all
or
/dm reset
By default it controls npcs, pass true twice to also enable for friendlies: /dm true true
or: /dm -p true
What it looks like:
7KrzKgA.png


kdcROYP.png

Download

Please download the latest version via the in-game mod browser.
You can download older versions below (not recommended)


AS TML HAS NOT YET UPDATED FOR MAC/LINUX, THIS MOD WILL NOT WORK ON THOSE PLATFORMS EITHER!

Current version: Alpha 1.0.4 (0.1.0.4)

Download for Mac/Linux: link

DOWNLOAD [Pre-Alpha R3]

DOWNLOAD [Pre-Alpha R2]
DOWNLOAD [Pre-Alpha R1]

Please report any bugs you find in this thread!


kdcROYP.png

Change Log
[x] Added ModItem support for /giveitem, e.g: /giveitem Example Sword
[x] Now works with tML 0.8.1 (Windows)
[x] Changed version to 0.1.0.x as tML no longer supports letters ;-;
[x] .tmod file size reduced by alot (now ~90 KB) due to buildIgnore support
[x] Now works with tModLoader v0.7.1.1
[x] Added /help version (/? v or /? -v) to show the current version. Use /help versions (/? va or /? -v-a) to view all versions
[x] Fixed/completed /tilerange (or /tr) (that command wasn't even finished, lol)
[x] Added /debugmode (or /dm) to show npc debug info (use /dm true true to also run on friendly npcs) (-i or -p for items or projectiles)
[x] Rewritten /giveitem from scratch, should now work in any situation! (ModItems only work by passing their type)
[x] All commands now give some sort of feedback via chat
[x] Fixed /last or /latest crashing when used before any other command
[x] Fixed /itemprefix or /itempre giving random prefixes
[x] /time freeze should now freeze without passing a bool as well as unfreezing
[x] A lot of bugs should be fixed because the code now checks command slangs individually, rather than checking if the slangs CONTAIN whatever command you passed.
[x] Optimized a lot of toggling code (shorter code)
[x] /peace should no longer show the butcher message
[x] /buildermode or /bm should now be toggable with a bool (/bm true or /bm false)
[x] .tmod size should be a lot smaller now ;)
You can use /dm item (/dm -i) or /dm projectile (/dm -p) to debug items or projectiles. Debugmode shows a lot of info about an entity, such as position, aiStyle, health etc.
To control all debugs, use /dm all or /dm -all. To reset use /dm all false or /dm reset. By default you control npcs
Format: /dm [-i|-p] [true|false] [true|false]
[x] No longer readable by tModReader, you can use GitHub instead
[x] Fixed the '/npc' not spawning the number of npcs you entered and multiple npcs now spawn next to each other a bit
[x] Shifted '/stopevents' to '/event stop'
[x] Gave /itemprefix support for edit distance
[x] Fixed a bug where /stat mpmax and /stat hpmax would be reversed and /stat no longer has requirements, meaning you can set stats 'out of range' (hp lower than 100 or higher than 500, etc)
[x] Added a /last command which runs your last used command (or /latest)
[x] Added a /clear command which 'kills' all active items and projectiles (or /cl, /cl true for items only, /cl false for projectiles only)
[x] /peace now automatically butchers active monsters (not town npcs)
[x] Added a /buff command (/buff type numticks)
GENERAL:
* Added tModLoader v0.7 support
* Mod should now be readable using the tModReader application
* Simplified /help, non-working arguments now just use ! and optional listed arguments are no longer between brackets {}.

BUG FIXES:
* /giveitem works again and now uses edit distance to guess which item you meant (not perfect)
* /npc should no longer spawn npcs an incorrect amount of times

OTHER CHANGES:
* A lot of code has been moved to ModPlayer
* I have rewritten almost everything as try-catch which should translate for easier programming for me, and no crashes for you

GOD MODE:
* /godmode [true|false] or /gm [true|false] now completely shifted to ModPlayer. Remember that true/false can be omitted for fast use!
* You now ignore any contact from mobs, deal quadripled damage and suffer from increased critical strikes.
* Also a neat buff should appear while God mode is active. Eventually I want this to be a crown or divine circlet hovering your character.
* God mode features:
* Infinite mana and health pool
* Infinite flight (24 hours)
* Quadripled damage
* 100% more critical strike chance
* No more damage taken by any source, even spikes
* No more gore and no more damage sound noises
* No more aggro drawn
* Ammo is not consumed
* Immune to all negative debuffs (buffs with a positive effect such as 'Feral Bite' should still work)

TILE RANGE COMMAND:
* /tilerange x [y] or /tr
* Change your tilerange! Set an x and y value and set nothing to return to default.
* eg: /tr 999 999 (999x16 = 15984 tiles.. nuff said)

BUILDER COMMAND:
* /builder or /bm
* Now lets you enter build mode! This mode gives you:
* Infinite flight (24 hours)
* Infinite inventory stacks (non-depleting stacks)
* Infinite tilerange

ITEM PREFIX COMMAND:
* /itemprefix name|type|"list" or /itempre name|type|"list"
* This command sets a prefix on your currently selected item! (eg: /itempre 81 this will give 'Legendary')
* Index ranges from 1 to 83, but you can also enter the name of the prefix! (eg: /itempre legendary)
* Use /itempre list to see all possible prefixes for your selected item

ADDITIONS:
* Added 'day' and 'night' for /time (/time day and /time night)
* Added a teleport to the temple! Use /tp temple
* Added edit distance calculation for /item
* Added /tilerange x y (eg: /tilerange 150 150 use /tilerange or /tr to reset it to your normal values)
* Added skeletron, brain of cthulhu/eater of worlds and eye of cthulhu to /down or /npcd

[Pre-Alpha] Release 2 on 24-10-2015
  • (Major) Shifted 9 commands, reducing the total amount of commands by 7
    • All time commands shifted into /time
    • All hp/mp commands shifted into /stat
    • /spawn and /random shifted into /tp
  • (Feature) Changed how /peace works
    • Now no longer works like /godmode did. Instead, it stops all NPCs from spawning.
  • (Critical) Fixed a bug that caused /peace to lag the game
  • (Bugfix) Fixed /vacuum item count bug
    • Previously it would always call 401 items, now it actually counts the total amount of items picked up.
  • (Feature) All commands now use lowercase calls and arguments
  • (Feature) The mod is now compatible with tML v0.6 and is downloadable via the in-game Mod Browser.
  • (Change/Feature) The mod no longer requires the Snippet.dll
  • (Addition) Added a readme.txt to the winrar zip file (for manual installation)
[Pre-Alpha] Release 1 on 22-10-2015
  • 27 exclusive commands of which 26 working
  • More commands to be added in future updates

kdcROYP.png

Versions

Current state: Alpha #
Current format: Alpha #

This mod in Alpha! This means the mod is likely to have bugs, which you should report here.

kdcROYP.png

Credits

Thanks to @bluemagic123 for always helping me when I need it and creating tModLoader.
Thanks to the Terraria devs for making the game :)
Anyone that has ever helped me with the code or is part of the 'team' will be listed here.
Also thanks to @jopojelly and @Eldrazi for helping with certain things. 'nuff said
 
Last edited:
Alright no comments as of yet.. Just wanted to quickly post an update:

Almost all current commands are working. The only one that doesn't work yet still is /teleport 'location' and /godmode (needs more Player support)
I have coded /random, /stopevents, /event (fully working except for lunar events)
I have also added /peace which makes all enemies turn friendly (they still attack you though, lol)
The /events was quite a hassle.. but definitely worth it!

/teleport will be used to teleport to the dungeon, hell layer, golem temple etc. :)

New amount: 23 (up from 20)
Working: 21 (up from 17)

I will also make some headers for this thread in photoshop.

Aand.. just tagging some peeps whom might be interested
@bluemagic123 @Eldrazi @miniek

Please guys, leave suggestions for more commands :)
My favorite command so far is /vacuum
 
Alright no comments as of yet.. Just wanted to quickly post an update:

Almost all current commands are working. The only one that doesn't work yet still is /teleport 'location' and /godmode (needs more Player support)
I have coded /random, /stopevents, /event (fully working except for lunar events)
I have also added /peace which makes all enemies turn friendly (they still attack you though, lol)
The /events was quite a hassle.. but definitely worth it!

/teleport will be used to teleport to the dungeon, hell layer, golem temple etc. :)

New amount: 23 (up from 20)
Working: 21 (up from 17)

I will also make some headers for this thread in photoshop.

Aand.. just tagging some peeps whom might be interested
@bluemagic123 @Eldrazi @miniek

Please guys, leave suggestions for more commands :)
My favorite command so far is /vacuum
Looks like a neat tool for peeps that are modding and looking for a supportive tool, or when you feel like cheating to the part where Terraria starts getting fun (if that's your thing :p).
As for the rest of the 'Creatieve Mode' part, does that also include items (like tiles) not bring consumed on use?
 
Looks like a neat tool for peeps that are modding and looking for a supportive tool, or when you feel like cheating to the part where Terraria starts getting fun (if that's your thing :p).
As for the rest of the 'Creatieve Mode' part, does that also include items (like tiles) not bring consumed on use?
Yeah this is mainly focused for other modders so that they can test their mods more easily.
The no consuming will probably be part of /godmode or /creative but I will probably need Player support for that.
Although, it would probably be possible now using UpdateInventory
 
Wait, does this creative mod also work for modded items? If so, prepare for alot of positive comments. And I mean.. ALOT
 
Alright! Nice!
Alright I've made the command, it is pretty much 100% the same as /npcType

So:
/itemType 'mod' 'item' or /moditem 'mod' 'item'
For example your mod is TerrariaAvalon and the item.. idk SuperAwesomeSword
you type /moditem TerrariaAvalon SuperAwesomeSword
and the chat should give you the type :) For example the type is 15000
Then you should be able to do /giveItem 15000
 
It's finally here!
You had my support, from the beginning, from the development stage!

And the /event command was my idea! :D

Hope this gets many supporters!
 
Last edited:
I actually just tested it with the ExampleMod and it works fine @Mini Albert
I used /moditem ExampleMod ExampleItem and it gave me: 3604
Then I used /giveItem 3604 10 and I got 10 Example Item :D
 
Hey guys! Quick update:
I have made a nice fancy header for the thread which you can see in OP :)
Also I have fixed all broken commands to work now (/godmode /peace etc.)
The mod is almost ready for the first alpha release in my opinion ^^
The code is rather messy right now.. but improving that would take a lot of time.. so that'll be for the future
The amount of commands went up to 27 from 23 and the amount of working went up to 26 from 21!
To keep the code more organized I'd need Player support though, which tML doesn't have yet.
 
Back
Top Bottom