Results 1 to 7 of 7
  1. #1
    M-FeD's Avatar
    Join Date
    Jun 2018
    Gender
    male
    Location
    United Kingdom
    Posts
    5
    Reputation
    10
    Thanks
    1
    My Mood
    Scared

    100% Critical Hit Chance Plugin for Terraria Patcher?

    I was wondering if anyone could either give me code on how to do it or just upload the .cs file so I can have 100% crit chance.

  2. #2
    HiImKyle's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    England
    Posts
    233
    Reputation
    10
    Thanks
    206
    Look into the players fields that contain "crit" in them. Or even the current item's crit field. Change them on an update that I assume Terraria Patcher has.

  3. #3
    littlerinser's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    84
    Reputation
    10
    Thanks
    1,765
    My Mood
    Bored
    For this to work you would need to code your own plugin for TerrariaPatcher which takes a lot of work and C# knowledge, instead you can download one of my cheat tables that is able to edit item stats, you can change the crit chance that way.

  4. #4
    HiImKyle's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    England
    Posts
    233
    Reputation
    10
    Thanks
    206
    Quote Originally Posted by littlerinser View Post
    For this to work you would need to code your own plugin for TerrariaPatcher which takes a lot of work and C# knowledge, instead you can download one of my cheat tables that is able to edit item stats, you can change the crit chance that way.
    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.

  5. #5
    littlerinser's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    84
    Reputation
    10
    Thanks
    1,765
    My Mood
    Bored
    Quote Originally Posted by HiImKyle View Post


    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;
            }
        }
    }
    Last edited by littlerinser; 07-01-2018 at 07:54 AM.

  6. #6
    HiImKyle's Avatar
    Join Date
    Oct 2015
    Gender
    male
    Location
    England
    Posts
    233
    Reputation
    10
    Thanks
    206
    Quote Originally Posted by littlerinser View Post
    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;
            }
        }
    }
    Its not exaggerated at all, he just wanted 100% crit chance, which is just 1 line of code. And you don't even need to know how its used or whatever. As long as its been set every update it works just fine, I don't get what your reply was aiming to get across at all. I'm not saying it is easy to make a hacked client, I'm saying its easy to make a small plugin to give yourself 100% crit chance.
    Last edited by HiImKyle; 07-01-2018 at 10:36 AM. Reason: Spelling

  7. #7
    KoishiR's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    3
    I believe a 100% crit plugin is not short.

    Let's analyze how to do that first.

    Plan A: Change ALL items' default crit into 100.
    You'll need to know Hook to change the SetDefault code for items.

    Plan B: Change final crit chance of items in your inventory.
    You need to hook or start a new System.Threading.Thread to repeat this.

    Plan C: Change calculation code so that it always crit no matter what is the number.
    You'll need to know how the game works, find where enemy hurts, and know how to change them.

Similar Threads

  1. [Request] Critical hit chance?
    By Pony Christ in forum DragonFable (DF) Hacks / Cheats / Trainers
    Replies: 6
    Last Post: 03-04-2016, 10:49 AM
  2. [Release] [Patcher] Terraria Tweaker v1.1.1.4 for Terraria 1.3.0.8
    By TiberiumFusion in forum Terraria Hacks
    Replies: 16
    Last Post: 12-20-2015, 10:36 AM
  3. Looking for Critical Attack Chance formula
    By maddoggy00 in forum Vindictus Help
    Replies: 3
    Last Post: 01-14-2012, 01:58 PM
  4. i need help with the plugin for Photoshop
    By junny2233 in forum Combat Arms Mod Discussion
    Replies: 8
    Last Post: 08-05-2010, 04:39 AM
  5. ICO (Windows Icon) file format plugin for Photoshop
    By MrVader in forum Art & Graphic Design
    Replies: 7
    Last Post: 10-21-2008, 03:15 AM