CCommands 0.4 unstuck, fly, teleport console commands

CragrimCragrim REGISTERED Posts: 44
edited November 2014 in Code
EDIT 2015-02-02: Mod system is currently broken so installing requires some careful text file editing.

CCommands is a tiny tiny mod with some extra console commands for survival mode
Can be used as cheat codes, debugging, help get you out if you fall in a hole or get stuck in terrain while playing survival.

Y8KRIoI.png

List of available commands:
» /coords - Shows your player coordinates.
» /tpx x y z - Teleport to exact coordinates for example /tpx 50000 10050 51000 will teleport you 1000 blocks from spawn!
» /tpr x y z - Teleport to relative coordinates, you need to enter 3 values separated by a space
» /fly - Toggle flying / flight mode
» /sethome - Save home location (not saved in world, so you can only use one for all saves)
» /home - Teleport to home location

Read this first please:
- Nerd Kingdom added a /unstuck command in a recent update. Try it first.
- /coords is not really needed anymore as you can press F2 twice to show your coordinates in the debug menu.
- If you get lost and can't find your way back to spawn type /tpx 50000 10050 50000 to return somewhat close to spawn. (spawn is randomized aprox 100-200 blocks around this location)
- Use /fly before teleporting. Otherwise its very easy to fall to your death or get stuck!
- Teleporting too far from spawn will disable terrain collision and you keep falling indefinitely so try to avoid that.
- If you get stuck in terrain first try typing:
/unstuck
If that doesn't work type:
/tpr 10 10 10
If it still doesn't work type:
/tpr 20 20 20
And so fourth...

I wanted to implement so that only ops can use these commands in multiplayer however there is no op list functionality implemented yet. Hence all the commented out code. Also I'm not skilled enough to do implement something like that, sorry.

Install instructions

Quick way that only works for version 0.8.2 Jan 30
Only use this if you're not using any other mods.
1. Extract the complete zip file into your SteamAppscommonTUG folder
2. Start Tug!

The way that 'might' work for newer versions
1. ONLY extract the file CCommands.lua into the folder SteamAppscommonTUGGameCoreScriptsMods if it does not exist, create it.
2. Open the file SteamAppscommonTUGGameCoreScriptsModesTUGGameMode.lua in a text editor like notepad, notepad2 or notepad++ (not Microsoft Word! it will mess it up)
3. Copy and paste the following text into line 19, between end and TUGGameMode Do not add or delete anything else.
include("Scripts/Mods/CCommands.lua")
It should look something like this:
0I3nkjs.png

or like this depending on which program you are using

a8a3hUZ.png
4. Start Tug!

Uninstall instructions
1. Delete CCommands.lua
2. Remove the line that you copy and pasted into TUGGameMode.lua in the previous step.

Download
Version 0.41 for Tug V0.8.2 Jan 30 updated 2015-02-02
https://dl.dropboxusercontent.com/u/368 ... nds041.zip


Old version (for Tug Indev v0.7.1 Nov 7)
(This mod system is currently broken, so don't follow this guide)
Installation instructions:

Latest tested version: Tug Indev v0.7.1 Nov 7

1. Locate your Steam Tug folder and open the file "mods.txt" you can find it here:
SteamSteamAppscommonTUGConfig
(The path before depends on where you installed steam)

2. In this file you need to add the following line "Mods/CCommands" so that it looks like this:
Use notepad or any other simple text editor like notepad2 or notepad++. (Not MSWord)
Mods
{
	"Mods/TestModScript"
	"Mods/CCommands"
	"Game/Survival"
	"Game/Creative"
	"Game/Core"
}
3. Download the zip file: https://dl.dropboxusercontent.com/u/368 ... ands04.zip
Tug Indev v0.7.1 Nov 7

4. Extract the mod in the Mod folder so that everything is placed as follows:
TUGModsCCommandsScriptsCCommands.lua
TUGModsCCommandsmanifest.txt

0L4x7mY.gif

Background...
I got myself in a predicament and was unable to get out of the terrain in survival so I wrote this mod in an attempt to get out. viewtopic.php?f=14&t=1754 No nasty cheats intended, however they're very helpful for glitchy situations.

Please don't expect this to work perfectly, remain stable or work in the future, I'm a nub :P I just wanted to share!

Best Regards
Cragrim
Y8KRIoI.png Extra commands with CCommands!
Sign In or Register to comment.