Originally Posted by
HiImKyle
Takes the smallest amount of work and C# knowledge. They're just .cs files, and all he needed was 1 line of code to run on an update provided by TerrariaPatcher.
As of now you need to know how Terraria handles the values, for example if it's a float and how it's altered to perform what action or event. That means you need to decompile to see both the names of the vars and how they are used. I have made my own plugins for TerrariaPatcher and it's a pain.
EDIT: I've actually made a functional modded client using TerrariaPatcher, they use the exact var names Terraria uses.
And '1 line of code' is very exaggerated:
Code:
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using PluginLoader;
using Terraria;
namespace SeptorPlugins
{
public class NoClip : MarshalByRefObject, IPlugin********date, IPluginChatCommand
{
private bool noclip = false;
private Keys noclipKey;
private int immuneTime;
public NoClip()
{
if (!Keys.TryParse(IniAPI.ReadIni("NoClip", "NoclipKey", "Q", writeIt: true), out noclipKey))
noclipKey = Keys.Q;
Color red = Color.Red;
Loader.RegisterHotkey(() =>
{
noclip = !noclip;
Main.NewText("NoClip " + (noclip ? "Enabled" : "Disabled"), red.R, red.G, red.B, false);
}, noclipKey);
}
public void On********date(Player player)
{
player = Main.player[Main.myPlayer];
immuneTime = player.immuneTime;
if (noclip)
{
float magnitude = 3f;
if (player.controlUp || player.controlJump)
{
player.position = new Vector2(player.position.X, player.position.Y - magnitude);
}
if (player.controlDown)
{
player.position = new Vector2(player.position.X, player.position.Y + magnitude);
}
if (player.controlLeft)
{
player.position = new Vector2(player.position.X - magnitude, player.position.Y);
}
if (player.controlRight)
{
player.position = new Vector2(player.position.X + magnitude, player.position.Y);
}
player.fallStart = (int)player.position.Y;
player.immune = true;
player.immuneTime = 1000;
}
else
{
player.immuneTime = immuneTime;
}
}
public bool OnChatCommand(string command, string[] args)
{
if (command != "noclip") return false;
noclip = !noclip;
return true;
}
}
}