├── .gitattributes ├── .gitignore ├── App.config ├── CopyPlugins.Designer.cs ├── CopyPlugins.cs ├── CopyPlugins.resx ├── IL.cs ├── LICENSE ├── Main.Designer.cs ├── Main.cs ├── Main.resx ├── MyAssemblyResolver.cs ├── PluginLoader.FNA ├── PluginLoader.FNA.csproj └── Properties │ └── AssemblyInfo.cs ├── PluginLoader.XNA ├── Hotkey.cs ├── IPlugin.cs ├── IniAPI.cs ├── Loader.cs ├── PluginLoader.XNA.csproj ├── Properties │ └── AssemblyInfo.cs └── Utils.cs ├── Program.cs ├── Properties ├── AssemblyInfo.cs ├── Resources.Designer.cs ├── Resources.resx ├── Settings.Designer.cs └── Settings.settings ├── README.md ├── ReferenceAssemblies ├── Terraria.Libraries.ReLogic.ReLogic.dll └── Terraria.exe ├── Terraria.cs ├── Terraria.ico ├── TerrariaPatcher.csproj ├── TerrariaPatcher.public.zip ├── TerrariaPatcher.sln ├── TerrariaPatcher.zip ├── TranscendPlugins ├── Bind.cs ├── BuffImmunity.cs ├── BuffRates.cs ├── CoinGun.cs ├── DropRates.cs ├── EnhancedCellPhone.cs ├── Events.cs ├── FastSplash.cs ├── Flashlight.cs ├── FullBright.cs ├── GodMode.cs ├── HomingBullets.cs ├── InfiniteFlight.cs ├── InfiniteLifeSteal.cs ├── InfiniteSundial.cs ├── ItemConfig.cs ├── ItemPrefix.cs ├── ItemReplication.cs ├── ItemSpawner.cs ├── LoadoutSwap.cs ├── Minions.cs ├── MoreAccessorySlots.cs ├── NPC.cs ├── PortableCraftingGuide.cs ├── Properties │ └── AssemblyInfo.cs ├── Respawn.cs ├── Reveal.cs ├── SavePosition.cs ├── Season.cs ├── Shared │ ├── Extensions │ │ └── ItemTooltipExtensions.cs │ └── UI │ │ └── Button.cs ├── ShopSellsScalingPotions.cs ├── Teleport.cs ├── Time.cs ├── TranscendPlugins.csproj ├── TranscendPlugins.csproj.DotSettings ├── Turrets.cs ├── UseTime.cs ├── Weather.cs └── app.config ├── app.manifest ├── changelog.tmp.txt ├── changelog.txt └── sed.exe /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | InventoryManager/ 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.sln.docstates 10 | 11 | # Build results 12 | [Dd]ebug/ 13 | [Dd]ebugPublic/ 14 | [Rr]elease/ 15 | x64/ 16 | build/ 17 | bld/ 18 | [Bb]in/ 19 | [Oo]bj/ 20 | 21 | # Visual Studio cache/options directory 22 | .vs/ 23 | 24 | # Roslyn cache directories 25 | *.ide/ 26 | 27 | # MSTest test Results 28 | [Tt]est[Rr]esult*/ 29 | [Bb]uild[Ll]og.* 30 | 31 | #NUNIT 32 | *.VisualState.xml 33 | TestResult.xml 34 | 35 | # Build Results of an ATL Project 36 | [Dd]ebugPS/ 37 | [Rr]eleasePS/ 38 | dlldata.c 39 | 40 | *_i.c 41 | *_p.c 42 | *_i.h 43 | *.ilk 44 | *.meta 45 | *.obj 46 | *.pch 47 | *.pdb 48 | *.pgc 49 | *.pgd 50 | *.rsp 51 | *.sbr 52 | *.tlb 53 | *.tli 54 | *.tlh 55 | *.tmp 56 | *.tmp_proj 57 | *.log 58 | *.vspscc 59 | *.vssscc 60 | .builds 61 | *.pidb 62 | *.svclog 63 | *.scc 64 | 65 | # Chutzpah Test files 66 | _Chutzpah* 67 | 68 | # Visual C++ cache files 69 | ipch/ 70 | *.aps 71 | *.ncb 72 | *.opensdf 73 | *.sdf 74 | *.cachefile 75 | 76 | # Visual Studio profiler 77 | *.psess 78 | *.vsp 79 | *.vspx 80 | 81 | # TFS 2012 Local Workspace 82 | $tf/ 83 | 84 | # Guidance Automation Toolkit 85 | *.gpState 86 | 87 | # ReSharper is a .NET coding add-in 88 | _ReSharper*/ 89 | *.[Rr]e[Ss]harper 90 | *.DotSettings.user 91 | 92 | # JustCode is a .NET coding addin-in 93 | .JustCode 94 | 95 | # TeamCity is a build add-in 96 | _TeamCity* 97 | 98 | # DotCover is a Code Coverage Tool 99 | *.dotCover 100 | 101 | # NCrunch 102 | _NCrunch_* 103 | .*crunch*.local.xml 104 | 105 | # MightyMoose 106 | *.mm.* 107 | AutoTest.Net/ 108 | 109 | # Web workbench (sass) 110 | .sass-cache/ 111 | 112 | # Installshield output folder 113 | [Ee]xpress/ 114 | 115 | # DocProject is a documentation generator add-in 116 | DocProject/buildhelp/ 117 | DocProject/Help/*.HxT 118 | DocProject/Help/*.HxC 119 | DocProject/Help/*.hhc 120 | DocProject/Help/*.hhk 121 | DocProject/Help/*.hhp 122 | DocProject/Help/Html2 123 | DocProject/Help/html 124 | 125 | # Click-Once directory 126 | publish/ 127 | 128 | # Publish Web Output 129 | *.[Pp]ublish.xml 130 | *.azurePubxml 131 | ## TODO: Comment the next line if you want to checkin your 132 | ## web deploy settings but do note that will include unencrypted 133 | ## passwords 134 | #*.pubxml 135 | 136 | # NuGet Packages Directory 137 | packages/* 138 | ## TODO: If the tool you use requires repositories.config 139 | ## uncomment the next line 140 | #!packages/repositories.config 141 | 142 | # Enable "build/" folder in the NuGet Packages folder since 143 | # NuGet packages use it for MSBuild targets. 144 | # This line needs to be after the ignore of the build folder 145 | # (and the packages folder if the line above has been uncommented) 146 | !packages/build/ 147 | 148 | # Windows Azure Build Output 149 | csx/ 150 | *.build.csdef 151 | 152 | # Windows Store app package directory 153 | AppPackages/ 154 | 155 | # Others 156 | sql/ 157 | *.Cache 158 | ClientBin/ 159 | [Ss]tyle[Cc]op.* 160 | ~$* 161 | *~ 162 | *.dbmdl 163 | *.dbproj.schemaview 164 | *.pfx 165 | *.publishsettings 166 | node_modules/ 167 | 168 | # RIA/Silverlight projects 169 | Generated_Code/ 170 | 171 | # Backup & report files from converting an old project file 172 | # to a newer Visual Studio version. Backup files are not needed, 173 | # because we have git ;-) 174 | _UpgradeReport_Files/ 175 | Backup*/ 176 | UpgradeLog*.XML 177 | UpgradeLog*.htm 178 | 179 | # SQL Server files 180 | *.mdf 181 | *.ldf 182 | 183 | # Business Intelligence projects 184 | *.rdl.data 185 | *.bim.layout 186 | *.bim_*.settings 187 | 188 | # Microsoft Fakes 189 | FakesAssemblies/ 190 | 191 | # LightSwitch generated files 192 | GeneratedArtifacts/ 193 | _Pvt_Extensions/ 194 | ModelManifest.xml 195 | /InventoryEnhancements Source 196 | /Extras 197 | -------------------------------------------------------------------------------- /App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /CopyPlugins.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace TerrariaPatcher 2 | { 3 | partial class CopyPlugins 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.checkedListBox = new System.Windows.Forms.CheckedListBox(); 32 | this.copyButton = new System.Windows.Forms.Button(); 33 | this.clearExisting = new System.Windows.Forms.CheckBox(); 34 | this.SuspendLayout(); 35 | // 36 | // checkedListBox 37 | // 38 | this.checkedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 39 | | System.Windows.Forms.AnchorStyles.Left) 40 | | System.Windows.Forms.AnchorStyles.Right))); 41 | this.checkedListBox.CheckOnClick = true; 42 | this.checkedListBox.FormattingEnabled = true; 43 | this.checkedListBox.Location = new System.Drawing.Point(0, 30); 44 | this.checkedListBox.Name = "checkedListBox"; 45 | this.checkedListBox.Size = new System.Drawing.Size(284, 199); 46 | this.checkedListBox.TabIndex = 0; 47 | this.checkedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.checkedListBox_ItemCheck); 48 | // 49 | // copyButton 50 | // 51 | this.copyButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) 52 | | System.Windows.Forms.AnchorStyles.Right))); 53 | this.copyButton.Location = new System.Drawing.Point(0, 229); 54 | this.copyButton.Name = "copyButton"; 55 | this.copyButton.Size = new System.Drawing.Size(284, 23); 56 | this.copyButton.TabIndex = 1; 57 | this.copyButton.Text = "Sync"; 58 | this.copyButton.UseVisualStyleBackColor = true; 59 | this.copyButton.Click += new System.EventHandler(this.copyButton_Click); 60 | // 61 | // clearExisting 62 | // 63 | this.clearExisting.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 64 | | System.Windows.Forms.AnchorStyles.Right))); 65 | this.clearExisting.AutoSize = true; 66 | this.clearExisting.Checked = true; 67 | this.clearExisting.CheckState = System.Windows.Forms.CheckState.Checked; 68 | this.clearExisting.Location = new System.Drawing.Point(3, 7); 69 | this.clearExisting.Name = "clearExisting"; 70 | this.clearExisting.Size = new System.Drawing.Size(238, 17); 71 | this.clearExisting.TabIndex = 2; 72 | this.clearExisting.Text = "Remove Unchecked Plugins (recommended)"; 73 | this.clearExisting.UseVisualStyleBackColor = true; 74 | this.clearExisting.CheckedChanged += new System.EventHandler(this.clearExisting_CheckedChanged); 75 | // 76 | // CopyPlugins 77 | // 78 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 79 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 80 | this.ClientSize = new System.Drawing.Size(284, 252); 81 | this.Controls.Add(this.clearExisting); 82 | this.Controls.Add(this.copyButton); 83 | this.Controls.Add(this.checkedListBox); 84 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.SizableToolWindow; 85 | this.Name = "CopyPlugins"; 86 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 87 | this.Text = "Plugins"; 88 | this.Shown += new System.EventHandler(this.CopyPlugins_Shown); 89 | this.ResumeLayout(false); 90 | this.PerformLayout(); 91 | 92 | } 93 | 94 | #endregion 95 | 96 | private System.Windows.Forms.CheckedListBox checkedListBox; 97 | private System.Windows.Forms.Button copyButton; 98 | private System.Windows.Forms.CheckBox clearExisting; 99 | } 100 | } -------------------------------------------------------------------------------- /CopyPlugins.cs: -------------------------------------------------------------------------------- 1 | extern alias PluginLoaderXNA; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Linq; 6 | using System.Windows.Forms; 7 | using PluginLoaderXNA::PluginLoader; 8 | 9 | namespace TerrariaPatcher 10 | { 11 | public partial class CopyPlugins : Form 12 | { 13 | private readonly string sourceFolder; 14 | private string sourceSharedFolder => Path.Combine(sourceFolder, "Shared"); 15 | private readonly string targetFolder; 16 | private string targetSharedFolder => Path.Combine(targetFolder, "Shared"); 17 | 18 | public CopyPlugins(string targetFolder) 19 | { 20 | this.sourceFolder = @".\Plugins"; 21 | this.targetFolder = targetFolder + @"\Plugins"; 22 | 23 | InitializeComponent(); 24 | 25 | clearExisting.Checked = bool.Parse(IniAPI.ReadIni("ActivePlugins", "ClearExisting", "true", 255, Main.ConfigPath, true)); 26 | 27 | foreach (var folder in Directory.EnumerateDirectories(sourceFolder).Where(s => s != sourceSharedFolder)) 28 | { 29 | var name = Path.GetFileName(folder); 30 | checkedListBox.Items.Add(name); 31 | checkedListBox.SetItemChecked(checkedListBox.Items.Count - 1, bool.Parse(IniAPI.ReadIni("ActivePlugins", name, "true", 255, Main.ConfigPath, true))); 32 | } 33 | foreach (var filename in Directory.EnumerateFiles(sourceFolder, "*.cs")) 34 | { 35 | var name = Path.GetFileNameWithoutExtension(filename); 36 | checkedListBox.Items.Add(name); 37 | checkedListBox.SetItemChecked(checkedListBox.Items.Count - 1, bool.Parse(IniAPI.ReadIni("ActivePlugins", name, "true", 255, Main.ConfigPath, true))); 38 | } 39 | } 40 | 41 | private void copyButton_Click(object sender, EventArgs e) 42 | { 43 | var toCopy = new List(); 44 | foreach (string pluginName in checkedListBox.CheckedItems) 45 | { 46 | if (Directory.Exists(Path.Combine(sourceFolder, pluginName))) 47 | toCopy.Add(pluginName + '\\'); 48 | else 49 | toCopy.Add(pluginName + ".cs"); 50 | } 51 | 52 | if (!Directory.Exists(targetFolder)) 53 | Directory.CreateDirectory(targetFolder); 54 | 55 | if (clearExisting.Checked) 56 | { 57 | foreach (var folder in Directory.EnumerateDirectories(targetFolder).Where(s => s != targetSharedFolder)) 58 | { 59 | var name = Path.GetFileName(folder); 60 | if (toCopy.Contains(name + '\\')) continue; 61 | 62 | if (MessageBox.Show("Delete " + folder + "?", Program.AssemblyName, MessageBoxButtons.YesNo) == DialogResult.Yes) 63 | Directory.Delete(folder, true); 64 | } 65 | foreach (var file in Directory.EnumerateFiles(targetFolder, "*.cs")) 66 | { 67 | var name = Path.GetFileName(file); 68 | if (toCopy.Contains(name)) continue; 69 | 70 | if (MessageBox.Show("Delete " + file + "?", Program.AssemblyName, MessageBoxButtons.YesNo) == DialogResult.Yes) 71 | File.Delete(file); 72 | } 73 | } 74 | 75 | CopyFolder(sourceSharedFolder, targetSharedFolder); 76 | 77 | foreach (string pluginName in toCopy) 78 | { 79 | var sourcePath = Path.Combine(sourceFolder, pluginName); 80 | var destinationPath = Path.Combine(targetFolder, pluginName); 81 | if (Directory.Exists(sourcePath)) 82 | CopyFolder(sourcePath, destinationPath); 83 | else 84 | File.Copy(sourcePath, destinationPath, true); 85 | } 86 | 87 | this.Close(); 88 | } 89 | 90 | private static void CopyFolder(string source, string destination) 91 | { 92 | foreach (string dirPath in Directory.GetDirectories(source, "*", SearchOption.AllDirectories)) 93 | Directory.CreateDirectory(dirPath.Replace(source, destination)); 94 | 95 | foreach (string newPath in Directory.GetFiles(source, "*.*", SearchOption.AllDirectories)) 96 | File.Copy(newPath, newPath.Replace(source, destination), true); 97 | } 98 | 99 | private void checkedListBox_ItemCheck(object sender, ItemCheckEventArgs e) 100 | { 101 | IniAPI.WriteIni("ActivePlugins", checkedListBox.Items[e.Index] as string, (e.NewValue == CheckState.Checked).ToString(), Main.ConfigPath); 102 | } 103 | 104 | private void CopyPlugins_Shown(object sender, EventArgs e) 105 | { 106 | copyButton.Focus(); 107 | } 108 | 109 | private void clearExisting_CheckedChanged(object sender, EventArgs e) 110 | { 111 | copyButton.Text = clearExisting.Checked ? "Sync" : "Copy"; 112 | IniAPI.WriteIni("ActivePlugins", "ClearExisting", (clearExisting.Checked).ToString(), Main.ConfigPath); 113 | } 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /CopyPlugins.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Doug 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /Main.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | 124 | 125 | 126 | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO 127 | vAAADrwBlbxySQAAARlJREFUOE+VkjFqwzAUhn2D9iShRyi+QhYbWujg3dATZPKYZC6BQhvw1AMkg3dP 128 | XQyl7WIyJIEW5CbS0/jKE5GwpCghgg9s6/8/y5Kj6DA45zcAwAAAezB6rjNnB4XX244NHt8wGs7wblop 129 | yRGxwZQBYKIfbn477EvqusY4jj2MgMpPiwav7l9UyYXmdrs9duzP4ApUmd72sfrxVsD33JQISyClvFUX 130 | w9nJssvJFei9CJUtgQ7394Du3YKLJaCbLMuwqips21ZNuDve/35X8J7nuRcMsVwsbYEQYlSWpRcMMR5P 131 | bAH9fU3TeMEQSZLYgsMpsDRNvXCIr89vWyCEeC6KwguGmL/ObYGU8oFOwA2ewwgYY9f6f7iUf3DGkTcu 132 | khP7AAAAAElFTkSuQmCC 133 | 134 | 135 | 136 | 146, 17 137 | 138 | -------------------------------------------------------------------------------- /MyAssemblyResolver.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using Mono.Cecil; 4 | 5 | namespace TerrariaPatcher 6 | { 7 | class MyAssemblyResolver : BaseAssemblyResolver 8 | { 9 | private readonly string _extraDirectory; 10 | 11 | public MyAssemblyResolver(string extraDirectory) 12 | { 13 | this._extraDirectory = extraDirectory; 14 | } 15 | 16 | protected override AssemblyDefinition SearchDirectory(AssemblyNameReference name, IEnumerable directories, ReaderParameters parameters) 17 | { 18 | return base.SearchDirectory(name, directories.Concat(new[] {_extraDirectory}), parameters); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /PluginLoader.FNA/PluginLoader.FNA.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290} 8 | Library 9 | Properties 10 | PluginLoader.FNA 11 | PluginLoader.FNA 12 | v4.5 13 | 512 14 | true 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;FNA 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;FNA 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | ..\ReferenceAssemblies\Terraria.exe 45 | 46 | 47 | 48 | 49 | Hotkey.cs 50 | 51 | 52 | IniAPI.cs 53 | 54 | 55 | IPlugin.cs 56 | 57 | 58 | Loader.cs 59 | 60 | 61 | Utils.cs 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /PluginLoader.FNA/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PluginLoader.FNA")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PluginLoader.FNA")] 13 | [assembly: AssemblyCopyright("Copyright © 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("ef1e81a7-812f-4ec5-b8bb-4ff5264a3290")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PluginLoader.XNA/Hotkey.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework.Input; 3 | 4 | namespace PluginLoader 5 | { 6 | public class Hotkey : IEquatable 7 | { 8 | public bool Control { get; set; } 9 | public bool Shift { get; set; } 10 | public bool Alt { get; set; } 11 | 12 | private bool _ignoreModifierKeys; 13 | public bool IgnoreModifierKeys 14 | { 15 | get 16 | { 17 | if (Key == Keys.LeftControl || Key == Keys.RightControl || 18 | Key == Keys.LeftAlt || Key == Keys.RightAlt || 19 | Key == Keys.LeftShift || Key == Keys.RightShift) 20 | return true; 21 | return _ignoreModifierKeys; 22 | } 23 | set { _ignoreModifierKeys = value; } 24 | } 25 | 26 | public Keys Key { get; set; } 27 | 28 | public Action Action { get; set; } 29 | 30 | /// 31 | /// If non-null, it stores the chat command associated with this hotkey. 32 | /// 33 | public string Tag { get; set; } 34 | 35 | public override string ToString() 36 | { 37 | return (Control ? "Control," : "") + (Shift ? "Shift," : "") + (Alt ? "Alt," : "") + Key + " " + Tag; 38 | } 39 | 40 | public bool Equals(Hotkey other) 41 | { 42 | if (other == null) return false; 43 | 44 | return this.Key == other.Key && 45 | this.Control == other.Control && 46 | this.Shift == other.Shift && 47 | this.Alt == other.Alt && 48 | this.IgnoreModifierKeys == other.IgnoreModifierKeys; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /PluginLoader.XNA/IPlugin.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Microsoft.Xna.Framework; 3 | using Terraria; 4 | using Terraria.DataStructures; 5 | using Terraria.IO; 6 | using Terraria.Utilities; 7 | 8 | namespace PluginLoader 9 | { 10 | 11 | #region General 12 | 13 | public interface IPlugin 14 | { 15 | } 16 | 17 | #endregion 18 | 19 | #region Main 20 | 21 | public interface IPluginInitialize : IPlugin 22 | { 23 | void OnInitialize(); 24 | } 25 | public interface IPluginDrawSplash : IPlugin 26 | { 27 | void OnDrawSplash(); 28 | } 29 | public interface IPluginDrawInterface : IPlugin 30 | { 31 | void OnDrawInterface(); 32 | } 33 | public interface IPluginDrawInventory : IPlugin 34 | { 35 | void OnDrawInventory(); 36 | } 37 | public interface IPluginPreUpdate : IPlugin 38 | { 39 | void OnPreUpdate(); 40 | } 41 | public interface IPluginUpdate : IPlugin 42 | { 43 | void OnUpdate(); 44 | } 45 | public interface IPluginUpdateTime : IPlugin 46 | { 47 | void OnUpdateTime(); 48 | } 49 | public interface IPluginCheckSeason : IPlugin 50 | { 51 | bool OnCheckXmas(); 52 | bool OnCheckHalloween(); 53 | } 54 | public interface IPluginPlaySound : IPlugin 55 | { 56 | bool OnPlaySound(int type, int x, int y, int style); 57 | } 58 | 59 | #endregion 60 | 61 | #region Player 62 | 63 | public interface IPluginPlayerPreSpawn : IPlugin 64 | { 65 | void OnPlayerPreSpawn(Player player); 66 | } 67 | public interface IPluginPlayerSpawn : IPlugin 68 | { 69 | void OnPlayerSpawn(Player player); 70 | } 71 | public interface IPluginPlayerLoad : IPlugin 72 | { 73 | void OnPlayerLoad(PlayerFileData playerFileData, Player player, BinaryReader binaryReader); 74 | } 75 | public interface IPluginPlayerSave : IPlugin 76 | { 77 | void OnPlayerSave(PlayerFileData playerFileData, Player player, BinaryWriter binaryWriter); 78 | } 79 | public interface IPluginPlayerUpdate : IPlugin 80 | { 81 | void OnPlayerUpdate(Player player); 82 | } 83 | public interface IPluginPlayerPreUpdate : IPlugin 84 | { 85 | void OnPlayerPreUpdate(Player player); 86 | } 87 | public interface IPluginPlayerUpdateBuffs : IPlugin 88 | { 89 | void OnPlayerUpdateBuffs(Player player); 90 | } 91 | public interface IPluginPlayerUpdateEquips : IPlugin 92 | { 93 | void OnPlayerUpdateEquips(Player player); 94 | } 95 | public interface IPluginPlayerUpdateArmorSets : IPlugin 96 | { 97 | void OnPlayerUpdateArmorSets(Player player); 98 | } 99 | public interface IPluginPlayerHurt : IPlugin 100 | { 101 | bool OnPlayerHurt(Player player, PlayerDeathReason damageSource, int damage, int hitDirection, bool pvp, bool quiet, bool crit, int cooldownCounter, bool dodgeable, out double result); 102 | } 103 | public interface IPluginPlayerKillMe : IPlugin 104 | { 105 | bool OnPlayerKillMe(Player player, PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp); 106 | } 107 | public interface IPluginPlayerPickAmmo : IPlugin 108 | { 109 | void OnPlayerPickAmmo(Player player, Item weapon, ref int shoot, ref float speed, ref bool canShoot, ref int damage, ref float knockback, ref int usedAmmoItemId, bool dontConsume); 110 | } 111 | public interface IPluginPlayerGetItem : IPlugin 112 | { 113 | bool OnPlayerGetItem(Player player, Item newItem, out Item resultItem); 114 | } 115 | public interface IPluginPlayerQuickBuff : IPlugin 116 | { 117 | bool OnPlayerQuickBuff(Player player); 118 | } 119 | 120 | #endregion 121 | 122 | #region Item 123 | 124 | public interface IPluginItemSetDefaults : IPlugin 125 | { 126 | void OnItemSetDefaults(Item item); 127 | } 128 | public interface IPluginItemSlotRightClick : IPlugin 129 | { 130 | bool OnItemSlotRightClick(Item[] invObj, int context, int slot); 131 | } 132 | 133 | public interface IPluginItemRollAPrefix : IPlugin 134 | { 135 | bool OnItemRollAPrefix(Item item, UnifiedRandom random, ref int rolledPrefix, out bool result); 136 | } 137 | 138 | #endregion 139 | 140 | #region Projectile 141 | 142 | public interface IPluginProjectileAI : IPlugin 143 | { 144 | void OnProjectileAI001(Projectile projectile); 145 | } 146 | 147 | #endregion 148 | 149 | #region NetMessage 150 | 151 | public interface IPluginChatCommand : IPlugin 152 | { 153 | bool OnChatCommand(string command, string[] args); 154 | } 155 | 156 | #endregion 157 | 158 | #region Lighting 159 | 160 | public interface IPluginLightingGetColor : IPlugin 161 | { 162 | bool OnLightingGetColor(int x, int y, out Color color); 163 | } 164 | 165 | #endregion 166 | 167 | #region Chest 168 | 169 | public interface IPluginChestSetupShop : IPlugin 170 | { 171 | void OnChestSetupShop(Chest chest, int type); 172 | } 173 | 174 | #endregion 175 | 176 | #region NPC 177 | 178 | public interface IPluginNPCLoot : IPlugin 179 | { 180 | bool OnNPCLoot(NPC npc); 181 | } 182 | 183 | #endregion 184 | 185 | } 186 | -------------------------------------------------------------------------------- /PluginLoader.XNA/IniAPI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Runtime.InteropServices; 5 | using System.Text; 6 | 7 | namespace PluginLoader 8 | { 9 | public static class IniAPI 10 | { 11 | private static readonly string iniPath = Environment.CurrentDirectory + "\\Plugins.ini"; 12 | 13 | [DllImport("kernel32", EntryPoint = "WritePrivateProfileString")] 14 | public static extern long WriteIni(string section, string key, string val, string path); 15 | [DllImport("kernel32.dll")] 16 | private static extern int GetPrivateProfileSection(string section, byte[] retVal, int size, string filePath); 17 | [DllImport("kernel32")] 18 | private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath); 19 | [DllImport("kernel32")] 20 | private static extern int GetPrivateProfileString(string section, string key, string def, [In, Out] char[] retVal, int size, string filePath); 21 | 22 | public static long WriteIni(string section, string key, string val) 23 | { 24 | return WriteIni(section, key, val, iniPath); 25 | } 26 | 27 | public static string ReadIni(string section, string key, string def, int size = 255, string path = null, bool writeIt = false) 28 | { 29 | if (path == null) 30 | path = iniPath; 31 | 32 | var temp = new StringBuilder(size); 33 | GetPrivateProfileString(section, key, writeIt ? "" : def, temp, size, path); 34 | string ret = temp.ToString(); 35 | 36 | if (writeIt && string.IsNullOrEmpty(ret)) 37 | { 38 | ret = def; 39 | WriteIni(section, key, ret, path); 40 | } 41 | 42 | return ret; 43 | } 44 | 45 | public static IEnumerable GetIniKeys(string section, string path = null) 46 | { 47 | if (path == null) 48 | path = iniPath; 49 | 50 | var temp = new byte[2048]; 51 | GetPrivateProfileSection(section, temp, temp.Length, path); 52 | string[] ret = Encoding.ASCII.GetString(temp).Trim('\0').Split('\0'); 53 | 54 | return (from entry in ret let @equals = entry.IndexOf('=') select @equals >= 0 ? entry.Substring(0, @equals) : entry).Where(s => !string.IsNullOrEmpty(s)); 55 | } 56 | 57 | /// 58 | /// Retrieves the .ini file's sections. 59 | /// 60 | public static IEnumerable GetIniSections(string path) 61 | { 62 | char[] ret = new char[ushort.MaxValue]; 63 | GetPrivateProfileString(null, null, null, ret, ushort.MaxValue, path); 64 | return new List(new string(ret).Split(new char[] { '\0' }, StringSplitOptions.RemoveEmptyEntries)); 65 | } 66 | } 67 | } -------------------------------------------------------------------------------- /PluginLoader.XNA/PluginLoader.XNA.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {A2185DCD-C7E8-4578-881C-B797D901A263} 8 | Library 9 | Properties 10 | PluginLoader.XNA 11 | PluginLoader.XNA 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | TRACE;DEBUG;XNA 23 | prompt 24 | 4 25 | x86 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE;XNA 32 | prompt 33 | 4 34 | x86 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ..\ReferenceAssemblies\Terraria.exe 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /PluginLoader.XNA/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("PluginLoader.XNA")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("PluginLoader.XNA")] 13 | [assembly: AssemblyCopyright("Copyright © 2021")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a2185dcd-c7e8-4578-881c-b797d901a263")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /PluginLoader.XNA/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using System.IO; 4 | using System.Runtime.InteropServices; 5 | using System.Security.Principal; 6 | using Microsoft.Win32; 7 | 8 | namespace PluginLoader 9 | { 10 | public static class Utils 11 | { 12 | #region UAC / Admin / Elevated 13 | 14 | private const string uacRegistryKey = "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"; 15 | private const string uacRegistryValue = "EnableLUA"; 16 | 17 | private static uint STANDARD_RIGHTS_READ = 0x00020000; 18 | private static uint TOKEN_QUERY = 0x0008; 19 | private static uint TOKEN_READ = (STANDARD_RIGHTS_READ | TOKEN_QUERY); 20 | 21 | [DllImport("advapi32.dll", SetLastError = true)] 22 | [return: MarshalAs(UnmanagedType.Bool)] 23 | private static extern bool OpenProcessToken(IntPtr ProcessHandle, UInt32 DesiredAccess, out IntPtr TokenHandle); 24 | 25 | [DllImport("advapi32.dll", SetLastError = true)] 26 | public static extern bool GetTokenInformation(IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, IntPtr TokenInformation, uint TokenInformationLength, out uint ReturnLength); 27 | 28 | public enum TOKEN_INFORMATION_CLASS 29 | { 30 | TokenUser = 1, 31 | TokenGroups, 32 | TokenPrivileges, 33 | TokenOwner, 34 | TokenPrimaryGroup, 35 | TokenDefaultDacl, 36 | TokenSource, 37 | TokenType, 38 | TokenImpersonationLevel, 39 | TokenStatistics, 40 | TokenRestrictedSids, 41 | TokenSessionId, 42 | TokenGroupsAndPrivileges, 43 | TokenSessionReference, 44 | TokenSandBoxInert, 45 | TokenAuditPolicy, 46 | TokenOrigin, 47 | TokenElevationType, 48 | TokenLinkedToken, 49 | TokenElevation, 50 | TokenHasRestrictions, 51 | TokenAccessInformation, 52 | TokenVirtualizationAllowed, 53 | TokenVirtualizationEnabled, 54 | TokenIntegrityLevel, 55 | TokenUIAccess, 56 | TokenMandatoryPolicy, 57 | TokenLogonSid, 58 | MaxTokenInfoClass 59 | } 60 | 61 | public enum TOKEN_ELEVATION_TYPE 62 | { 63 | TokenElevationTypeDefault = 1, 64 | TokenElevationTypeFull, 65 | TokenElevationTypeLimited 66 | } 67 | 68 | public static bool IsUacEnabled 69 | { 70 | get 71 | { 72 | RegistryKey uacKey = Registry.LocalMachine.OpenSubKey(uacRegistryKey, false); 73 | if (uacKey == null) return false; 74 | bool result = uacKey.GetValue(uacRegistryValue).Equals(1); 75 | return result; 76 | } 77 | } 78 | 79 | public static bool IsProcessElevated 80 | { 81 | get 82 | { 83 | if (IsUacEnabled) 84 | { 85 | IntPtr tokenHandle; 86 | if (!OpenProcessToken(Process.GetCurrentProcess().Handle, TOKEN_READ, out tokenHandle)) 87 | { 88 | throw new ApplicationException("Could not get process token. Win32 Error Code: " + Marshal.GetLastWin32Error()); 89 | } 90 | 91 | TOKEN_ELEVATION_TYPE elevationResult = TOKEN_ELEVATION_TYPE.TokenElevationTypeDefault; 92 | 93 | int elevationResultSize = Marshal.SizeOf((int) elevationResult); 94 | uint returnedSize = 0; 95 | IntPtr elevationTypePtr = Marshal.AllocHGlobal(elevationResultSize); 96 | 97 | bool success = GetTokenInformation(tokenHandle, TOKEN_INFORMATION_CLASS.TokenElevationType, elevationTypePtr, (uint) elevationResultSize, out returnedSize); 98 | if (success) 99 | { 100 | elevationResult = (TOKEN_ELEVATION_TYPE) Marshal.ReadInt32(elevationTypePtr); 101 | bool isProcessAdmin = elevationResult == TOKEN_ELEVATION_TYPE.TokenElevationTypeFull; 102 | return isProcessAdmin; 103 | } 104 | else 105 | { 106 | throw new ApplicationException("Unable to determine the current elevation."); 107 | } 108 | } 109 | else 110 | { 111 | try 112 | { 113 | WindowsIdentity identity = WindowsIdentity.GetCurrent(); 114 | WindowsPrincipal principal = new WindowsPrincipal(identity); 115 | bool result = principal.IsInRole(WindowsBuiltInRole.Administrator); 116 | return result; 117 | } 118 | catch 119 | { 120 | return false; 121 | } 122 | } 123 | } 124 | } 125 | 126 | #endregion 127 | 128 | public static bool IsFileLocked(FileInfo file) 129 | { 130 | if (file == null || 131 | !file.Exists) return false; 132 | 133 | FileStream stream = null; 134 | 135 | try 136 | { 137 | stream = file.Open(FileMode.Open, FileAccess.ReadWrite, FileShare.None); 138 | } 139 | catch (IOException) 140 | { 141 | //the file is unavailable because it is: 142 | //still being written to 143 | //or being processed by another thread 144 | //or does not exist (has already been processed) 145 | return true; 146 | } 147 | finally 148 | { 149 | if (stream != null) 150 | stream.Close(); 151 | } 152 | 153 | //file is not locked 154 | return false; 155 | } 156 | 157 | public static bool IstModLoaderInstalled() 158 | { 159 | return System.Reflection.Assembly.GetEntryAssembly().GetType("Terraria.ModLoader.Mod") != null; 160 | } 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | extern alias PluginLoaderXNA; 2 | using System; 3 | using System.Reflection; 4 | using System.Windows.Forms; 5 | using PluginLoaderXNA::PluginLoader; 6 | 7 | namespace TerrariaPatcher 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | AssemblyName = Assembly.GetExecutingAssembly().GetName().Name; 18 | 19 | if (!Utils.IsProcessElevated) 20 | MessageBox.Show("Elevated administrator privileges not detected, you could run into issues!", AssemblyName, MessageBoxButtons.OK, MessageBoxIcon.Warning); 21 | 22 | Application.EnableVisualStyles(); 23 | Application.SetCompatibleTextRenderingDefault(false); 24 | Application.Run(new Main()); 25 | } 26 | 27 | internal static string AssemblyName; 28 | 29 | /// 30 | /// Displays an error message. 31 | /// 32 | public static void ShowErrorMessage(string err) 33 | { 34 | MessageBox.Show(err, AssemblyName + " :: Error!", MessageBoxButtons.OK, MessageBoxIcon.Error); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("TerrariaPatcher")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("TerrariaPatcher")] 12 | [assembly: AssemblyCopyright("Copyright © Transcend 2025")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("d9657d60-e2cb-4d68-acbc-cd6401b9f634")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.3.0.4")] 35 | [assembly: AssemblyFileVersion("1.3.0.4")] 36 | -------------------------------------------------------------------------------- /Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TerrariaPatcher.Properties { 12 | using System; 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources { 26 | 27 | private static global::System.Resources.ResourceManager resourceMan; 28 | 29 | private static global::System.Globalization.CultureInfo resourceCulture; 30 | 31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 32 | internal Resources() { 33 | } 34 | 35 | /// 36 | /// Returns the cached ResourceManager instance used by this class. 37 | /// 38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 39 | internal static global::System.Resources.ResourceManager ResourceManager { 40 | get { 41 | if (object.ReferenceEquals(resourceMan, null)) { 42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("TerrariaPatcher.Properties.Resources", typeof(Resources).Assembly); 43 | resourceMan = temp; 44 | } 45 | return resourceMan; 46 | } 47 | } 48 | 49 | /// 50 | /// Overrides the current thread's CurrentUICulture property for all 51 | /// resource lookups using this strongly typed resource class. 52 | /// 53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 54 | internal static global::System.Globalization.CultureInfo Culture { 55 | get { 56 | return resourceCulture; 57 | } 58 | set { 59 | resourceCulture = value; 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace TerrariaPatcher.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.7.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # TerrariaPatcher 2 | 3 | The project details are published in the following threads: 4 | - http://www.terrariaonline.com/threads/116592/ 5 | - http://forums.terraria.org/index.php?threads/24615/ 6 | 7 | The following repos contain plugins for TerrariaPatcher (once the plugins are validated, I will add them to my main distribution list of plugins): 8 | - https://github.com/septor/TerrariaPatcherPlugins 9 | - https://github.com/blahblahbal/TerrariaPatcherPlugins 10 | -------------------------------------------------------------------------------- /ReferenceAssemblies/Terraria.Libraries.ReLogic.ReLogic.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/ReferenceAssemblies/Terraria.Libraries.ReLogic.ReLogic.dll -------------------------------------------------------------------------------- /ReferenceAssemblies/Terraria.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/ReferenceAssemblies/Terraria.exe -------------------------------------------------------------------------------- /Terraria.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/Terraria.ico -------------------------------------------------------------------------------- /TerrariaPatcher.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {80C7B8DD-7764-40BA-911A-EB83216F93DF} 8 | WinExe 9 | Properties 10 | TerrariaPatcher 11 | TerrariaPatcher 12 | v4.5.2 13 | 512 14 | 15 | SAK 16 | SAK 17 | SAK 18 | SAK 19 | 20 | 21 | x86 22 | true 23 | full 24 | false 25 | bin\Debug\ 26 | DEBUG;TRACE 27 | prompt 28 | 4 29 | false 30 | 31 | 32 | x86 33 | pdbonly 34 | true 35 | bin\Release\ 36 | TRACE 37 | prompt 38 | 4 39 | false 40 | false 41 | 42 | 43 | Terraria.ico 44 | 45 | 46 | app.manifest 47 | 48 | 49 | bin\Release %28Public%29\ 50 | TRACE;PUBLIC 51 | true 52 | pdbonly 53 | x86 54 | false 55 | prompt 56 | MinimumRecommendedRules.ruleset 57 | false 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | Form 76 | 77 | 78 | CopyPlugins.cs 79 | 80 | 81 | 82 | Form 83 | 84 | 85 | Main.cs 86 | 87 | 88 | 89 | 90 | 91 | 92 | CopyPlugins.cs 93 | 94 | 95 | Main.cs 96 | 97 | 98 | ResXFileCodeGenerator 99 | Resources.Designer.cs 100 | Designer 101 | 102 | 103 | True 104 | Resources.resx 105 | True 106 | 107 | 108 | 109 | SettingsSingleFileGenerator 110 | Settings.Designer.cs 111 | 112 | 113 | True 114 | Settings.settings 115 | True 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | {a2185dcd-c7e8-4578-881c-b797d901a263} 127 | PluginLoader.XNA 128 | PluginLoaderXNA 129 | 130 | 131 | 132 | 133 | 0.11.2 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | IF "$(ConfigurationName)" == "Debug" EXIT 144 | if "$(ConfigurationName)" == "Release" SET zip=$(ProjectDir)TerrariaPatcher.zip 145 | if "$(ConfigurationName)" == "Release (Public)" SET zip=$(ProjectDir)TerrariaPatcher.public.zip 146 | IF EXIST "%25zip%25" DEL "%25zip%25" 147 | "C:\Program Files\WinRAR\WINRAR.exe" a -ep1 "%25zip%25" "$(TargetDir)TerrariaPatcher.exe" "$(TargetDir)PluginLoader.XNA.dll" "$(TargetDir)Mono.Cecil.dll" "$(TargetDir)Mono.Cecil.Rocks.dll" "$(TargetDir)TerrariaPatcher.exe.config" "$(ProjectDir)changelog.txt" 148 | "C:\Program Files\WinRAR\WINRAR.exe" a -ep1 -apPlugins "%25zip%25" "$(ProjectDir)\TranscendPlugins\*.cs" 149 | "C:\Program Files\WinRAR\WINRAR.exe" a -ep1 -r -apPlugins\Shared "%25zip%25" "$(ProjectDir)\TranscendPlugins\Shared\*.cs" 150 | 151 | 152 | 153 | 154 | 155 | 162 | -------------------------------------------------------------------------------- /TerrariaPatcher.public.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/TerrariaPatcher.public.zip -------------------------------------------------------------------------------- /TerrariaPatcher.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29123.88 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TerrariaPatcher", "TerrariaPatcher.csproj", "{80C7B8DD-7764-40BA-911A-EB83216F93DF}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TranscendPlugins", "TranscendPlugins\TranscendPlugins.csproj", "{55C89F3A-2F84-4513-8D4C-905B8513C91C}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginLoader.FNA", "PluginLoader.FNA\PluginLoader.FNA.csproj", "{EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PluginLoader.XNA", "PluginLoader.XNA\PluginLoader.XNA.csproj", "{A2185DCD-C7E8-4578-881C-B797D901A263}" 13 | EndProject 14 | Global 15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 16 | Debug|Any CPU = Debug|Any CPU 17 | Release (Public)|Any CPU = Release (Public)|Any CPU 18 | Release|Any CPU = Release|Any CPU 19 | EndGlobalSection 20 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 21 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 22 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Debug|Any CPU.Build.0 = Debug|Any CPU 23 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Release (Public)|Any CPU.ActiveCfg = Release (Public)|Any CPU 24 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Release (Public)|Any CPU.Build.0 = Release (Public)|Any CPU 25 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Release|Any CPU.ActiveCfg = Release|Any CPU 26 | {80C7B8DD-7764-40BA-911A-EB83216F93DF}.Release|Any CPU.Build.0 = Release|Any CPU 27 | {55C89F3A-2F84-4513-8D4C-905B8513C91C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 28 | {55C89F3A-2F84-4513-8D4C-905B8513C91C}.Debug|Any CPU.Build.0 = Debug|Any CPU 29 | {55C89F3A-2F84-4513-8D4C-905B8513C91C}.Release (Public)|Any CPU.ActiveCfg = Release|Any CPU 30 | {55C89F3A-2F84-4513-8D4C-905B8513C91C}.Release|Any CPU.ActiveCfg = Release|Any CPU 31 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Release (Public)|Any CPU.ActiveCfg = Release|Any CPU 34 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Release (Public)|Any CPU.Build.0 = Release|Any CPU 35 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Release|Any CPU.ActiveCfg = Release|Any CPU 36 | {EF1E81A7-812F-4EC5-B8BB-4FF5264A3290}.Release|Any CPU.Build.0 = Release|Any CPU 37 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 38 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Debug|Any CPU.Build.0 = Debug|Any CPU 39 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Release (Public)|Any CPU.ActiveCfg = Release|Any CPU 40 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Release (Public)|Any CPU.Build.0 = Release|Any CPU 41 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Release|Any CPU.ActiveCfg = Release|Any CPU 42 | {A2185DCD-C7E8-4578-881C-B797D901A263}.Release|Any CPU.Build.0 = Release|Any CPU 43 | EndGlobalSection 44 | GlobalSection(SolutionProperties) = preSolution 45 | HideSolutionNode = FALSE 46 | EndGlobalSection 47 | GlobalSection(ExtensibilityGlobals) = postSolution 48 | SolutionGuid = {B7E8E7C3-022B-4BF7-8EE9-06714C24F7A3} 49 | EndGlobalSection 50 | EndGlobal 51 | -------------------------------------------------------------------------------- /TerrariaPatcher.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/TerrariaPatcher.zip -------------------------------------------------------------------------------- /TranscendPlugins/Bind.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using PluginLoader; 4 | using Terraria; 5 | 6 | namespace MrBlueSLPlugins 7 | { 8 | public class Bind : MarshalByRefObject, IPluginChatCommand 9 | { 10 | public bool OnChatCommand(string command, string[] args) 11 | { 12 | if (command != "bind" && command != "unbind" && command != "listbinds") return false; 13 | 14 | if ((command == "bind" && (args.Length <= 1 || args[0] == "help")) || 15 | (command == "unbind" && (args.Length <= 0 || args[0] == "help")) || 16 | (command == "listbinds" && args.Length > 0 && args[0] == "help")) 17 | { 18 | Main.NewText("Usage:"); 19 | Main.NewText(" /bind modifiers,hotkey command"); 20 | Main.NewText(" /unbind modifiers,hotkey"); 21 | Main.NewText(" /listbinds"); 22 | Main.NewText("Example:"); 23 | Main.NewText(" /bind Control,T /time dusk"); 24 | Main.NewText(" /unbind Control,T"); 25 | Main.NewText(" /bind Control,Shift,K /usetime"); 26 | return true; 27 | } 28 | 29 | if (command == "bind") 30 | BindHotkey(args[0], string.Join(" ", args.Skip(1))); 31 | else if (command == "unbind") 32 | UnbindHotkey(args[0]); 33 | else if (command == "listbinds") 34 | { 35 | foreach (var hotkey in Loader.GetHotkeys().Where(hotkey => !string.IsNullOrEmpty(hotkey.Tag))) 36 | Main.NewText(hotkey.ToString()); 37 | } 38 | return true; 39 | } 40 | 41 | private void BindHotkey(string hotkey, string cmd) 42 | { 43 | var key = Loader.ParseHotkey(hotkey); 44 | 45 | if (string.IsNullOrEmpty(cmd) || !cmd.StartsWith("/") || key == null) 46 | Main.NewText("Invalid hotkey binding"); 47 | else 48 | { 49 | IniAPI.WriteIni("HotkeyBinds", hotkey, cmd); 50 | Loader.RegisterHotkey(cmd, key); 51 | Main.NewText(hotkey + " set to " + cmd); 52 | } 53 | } 54 | 55 | private void UnbindHotkey(string hotkey) 56 | { 57 | var key = Loader.ParseHotkey(hotkey); 58 | 59 | if (key == null) 60 | Main.NewText("Invalid hotkey binding"); 61 | else 62 | { 63 | IniAPI.WriteIni("HotkeyBinds", hotkey, null); 64 | Loader.UnregisterHotkey(key); 65 | Main.NewText("Unbound " + hotkey); 66 | } 67 | } 68 | } 69 | } -------------------------------------------------------------------------------- /TranscendPlugins/BuffImmunity.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.ID; 7 | 8 | namespace TranscendPlugins 9 | { 10 | public class BuffImmunity : MarshalByRefObject, IPluginPlayerUpdateBuffs 11 | { 12 | private List buffs; 13 | 14 | public BuffImmunity() 15 | { 16 | buffs = new List(); 17 | IniAPI.ReadIni("BuffImmunity", "Buffs", "PotionSickness, ManaSickness, Blackout, Darkness, Webbed", writeIt: true).Split(new [] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList().ForEach(buff => 18 | { 19 | buff = buff.Trim().ToLower(); 20 | 21 | int buffId; 22 | if (!int.TryParse(buff, out buffId)) 23 | { 24 | var field = typeof(BuffID).GetFields().FirstOrDefault(info => info.Name.ToLower() == buff); 25 | if (field == null) 26 | { 27 | Main.NewText("Invalid BuffID (" + buff + ")."); 28 | return; 29 | } 30 | buffId = Convert.ToInt32(field.GetValue(null)); 31 | } 32 | 33 | buffs.Add(buffId); 34 | }); 35 | } 36 | 37 | public void OnPlayerUpdateBuffs(Player player) 38 | { 39 | foreach (var type in buffs) 40 | { 41 | for (int j = 0; j < 22; j++) 42 | { 43 | if (player.buffType[j] == type) 44 | player.DelBuff(j); 45 | } 46 | player.buffImmune[type] = true; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /TranscendPlugins/BuffRates.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Terraria.ID; 5 | using TranscendPlugins.Shared.Extensions; 6 | 7 | namespace TranscendPlugins 8 | { 9 | public class BuffRates : MarshalByRefObject, IPluginInitialize, IPluginPlayerUpdateBuffs, IPluginPlayerPickAmmo 10 | { 11 | private static class Indices 12 | { 13 | public const int Magic = 7; 14 | public const int Archery = 16; 15 | public const int IceBarrier = 62; 16 | public const int Endurance = 114; 17 | public const int Rage = 115; 18 | public const int Wrath = 117; 19 | } 20 | private float wrath, rage, magic, archery, endurance, iceBarrier; 21 | 22 | public BuffRates() 23 | { 24 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "Wrath", (0.1f).ToString(), writeIt: true), out wrath)) 25 | wrath = 0.1f; 26 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "Rage", (0.1f).ToString(), writeIt: true), out rage)) 27 | rage = 0.1f; 28 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "Endurance", (0.1f).ToString(), writeIt: true), out endurance)) 29 | endurance = 0.1f; 30 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "IceBarrier", (0.25f).ToString(), writeIt: true), out iceBarrier)) 31 | iceBarrier = 0.25f; 32 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "Archery", (0.2f).ToString(), writeIt: true), out archery)) 33 | archery = 0.2f; 34 | if (!float.TryParse(IniAPI.ReadIni("Buffs", "Magic", (0.2f).ToString(), writeIt: true), out magic)) 35 | magic = 0.2f; 36 | } 37 | 38 | public void OnInitialize() 39 | { 40 | Lang._buffDescriptionCache[Indices.Magic].SetValue((magic * 100) + "% increased magic damage"); 41 | Lang._buffDescriptionCache[Indices.Archery].SetValue((archery * 100) + "% increased arrow damage and speed"); 42 | Lang._buffDescriptionCache[Indices.Endurance].SetValue((endurance * 100) + "% reduced damage"); 43 | Lang._buffDescriptionCache[Indices.IceBarrier].SetValue("Damage taken is reduced by " + (iceBarrier * 100) + "%"); 44 | Lang._buffDescriptionCache[Indices.Rage].SetValue((rage * 100) + "% increased critical chance"); 45 | Lang._buffDescriptionCache[Indices.Wrath].SetValue((wrath * 100) + "% increased damage"); 46 | Lang._itemTooltipCache[ItemID.MagicPowerPotion].SetValue((magic * 100) + "% increased magic damage"); 47 | Lang._itemTooltipCache[ItemID.ArcheryPotion].SetValue((archery * 100) + "% increased arrow speed and damage"); 48 | Lang._itemTooltipCache[ItemID.EndurancePotion].SetValue("Reduces damage taken by " + (endurance * 100) + "%"); 49 | Lang._itemTooltipCache[ItemID.RagePotion].SetValue("Increases critical chance by " + (rage * 100) + "%"); 50 | Lang._itemTooltipCache[ItemID.WrathPotion].SetValue("Increases damage by " + (wrath * 100) + "%"); 51 | } 52 | 53 | public void OnPlayerUpdateBuffs(Player player) 54 | { 55 | for (int k = 0; k < 22; k++) 56 | { 57 | if (player.buffType[k] > 0 && player.buffTime[k] > 0) 58 | { 59 | switch (player.buffType[k]) 60 | { 61 | case Indices.Magic: 62 | player.magicDamage += magic - 0.2f; 63 | break; 64 | case Indices.IceBarrier: 65 | if (player.statLife <= player.statLifeMax2 * 0.5) 66 | { 67 | this.endurance += iceBarrier - 0.25f; 68 | } 69 | break; 70 | case Indices.Endurance: 71 | player.endurance += endurance - 0.1f; 72 | break; 73 | case Indices.Rage: 74 | var r = (int) (rage * 100) - 10; 75 | player.meleeCrit += r; 76 | player.rangedCrit += r; 77 | player.magicCrit += r; 78 | break; 79 | case Indices.Wrath: 80 | var w = wrath - 0.1f; 81 | player.meleeDamage += w; 82 | player.rangedDamage += w; 83 | player.magicDamage += w; 84 | player.minionDamage += w; 85 | break; 86 | } 87 | } 88 | } 89 | } 90 | 91 | public void OnPlayerPickAmmo(Player player, Item item, ref int shoot, ref float speed, ref bool canShoot, ref int damage, ref float knockback, ref int usedAmmoItemId, bool dontConsume) 92 | { 93 | if (item.useAmmo == 1 && player.archery) 94 | { 95 | speed *= (1f + archery) / 1.2f; 96 | if (speed > 20f) 97 | speed = 20f; 98 | damage = (int) (damage * (1f + archery) / 1.2f); 99 | } 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /TranscendPlugins/CoinGun.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Terraria.ID; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class CoinGun : MarshalByRefObject, IPluginItemSetDefaults 9 | { 10 | private bool copperCoinEnemyTracking, silverCoinEnemyTracking, goldCoinEnemyTracking, platinumCoinEnemyTracking; 11 | private int copperCoinDamage, silverCoinDamage, goldCoinDamage, platinumCoinDamage; 12 | 13 | public CoinGun() 14 | { 15 | copperCoinEnemyTracking = bool.Parse(IniAPI.ReadIni("CoinGunModifications", "CopperCoinEnemyTracking", "true", writeIt: true)); 16 | copperCoinDamage = int.Parse(IniAPI.ReadIni("CoinGunModifications", "CopperCoinDamage", "200", writeIt: true)); 17 | silverCoinEnemyTracking = bool.Parse(IniAPI.ReadIni("CoinGunModifications", "SilverCoinEnemyTracking", "true", writeIt: true)); 18 | silverCoinDamage = int.Parse(IniAPI.ReadIni("CoinGunModifications", "SilverCoinDamage", "200", writeIt: true)); 19 | goldCoinEnemyTracking = bool.Parse(IniAPI.ReadIni("CoinGunModifications", "GoldCoinEnemyTracking", "true", writeIt: true)); 20 | goldCoinDamage = int.Parse(IniAPI.ReadIni("CoinGunModifications", "GoldCoinDamage", "200", writeIt: true)); 21 | platinumCoinEnemyTracking = bool.Parse(IniAPI.ReadIni("CoinGunModifications", "PlatinumCoinEnemyTracking", "true", writeIt: true)); 22 | platinumCoinDamage = int.Parse(IniAPI.ReadIni("CoinGunModifications", "PlatinumCoinDamage", "200", writeIt: true)); 23 | } 24 | 25 | public void OnItemSetDefaults(Item item) 26 | { 27 | switch (item.type) 28 | { 29 | case ItemID.CopperCoin: 30 | if (copperCoinEnemyTracking) item.shoot = ProjectileID.ChlorophyteBullet; 31 | item.damage = copperCoinDamage; 32 | break; 33 | case ItemID.SilverCoin: 34 | if (silverCoinEnemyTracking) item.shoot = ProjectileID.ChlorophyteBullet; 35 | item.damage = silverCoinDamage; 36 | break; 37 | case ItemID.GoldCoin: 38 | if (goldCoinEnemyTracking) item.shoot = ProjectileID.ChlorophyteBullet; 39 | item.damage = goldCoinDamage; 40 | break; 41 | case ItemID.PlatinumCoin: 42 | if (platinumCoinEnemyTracking) item.shoot = ProjectileID.ChlorophyteBullet; 43 | item.damage = platinumCoinDamage; 44 | break; 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /TranscendPlugins/EnhancedCellPhone.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Microsoft.Xna.Framework; 4 | using Terraria; 5 | using Terraria.ID; 6 | 7 | namespace BlahPlugins 8 | { 9 | public class EnhancedCellPhone : MarshalByRefObject, IPluginPlayerPreUpdate, IPluginDrawInterface 10 | { 11 | private Mode mode = Mode.Home; 12 | enum Mode 13 | { 14 | Home = 0, 15 | LeftOcean = 1, 16 | RightOcean = 2, 17 | Hell = 3, 18 | Random = 4 19 | } 20 | 21 | public EnhancedCellPhone() 22 | { 23 | if (!Mode.TryParse(IniAPI.ReadIni("EnhancedCellPhone", "Mode", "Home", writeIt: true), out mode)) mode = Mode.Home; 24 | } 25 | 26 | public void OnPlayerPreUpdate(Player player) 27 | { 28 | if (player.whoAmI != Main.myPlayer) return; 29 | 30 | if (player.inventory[player.selectedItem].type == ItemID.CellPhone) 31 | { 32 | if (Main.mouseItem.type == ItemID.CellPhone) return; // don't allow it to be on your cursor 33 | 34 | if (Main.mouseLeft && Main.mouseLeftRelease) 35 | { 36 | if (mode == Mode.Home) return; 37 | 38 | player.mouseInterface = true; 39 | Main.mouseLeftRelease = false; 40 | if (mode == Mode.LeftOcean) 41 | { 42 | // left ocean 43 | player.Teleport(new Vector2(200 * 16, (float)(Main.worldSurface / 2f) * 16f), 3); 44 | if (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 3].active()) 45 | { 46 | while (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 47 | { 48 | player.position.Y += 16f; 49 | } 50 | } 51 | else 52 | { 53 | while (Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 54 | { 55 | player.position.Y -= 16f; 56 | } 57 | } 58 | player.fallStart = (int)(player.position.Y / 16f); 59 | if (Main.netMode == 1) NetMessage.SendTileSquare(player.whoAmI, 200, (int)Main.worldSurface / 2, 10); 60 | } 61 | else if (mode == Mode.RightOcean) 62 | { 63 | // right ocean 64 | player.Teleport(new Vector2((Main.maxTilesX - 200) * 16, (float)(Main.worldSurface / 2f) * 16f), 3); 65 | if (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 3].active()) 66 | { 67 | while (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 68 | { 69 | player.position.Y += 16f; 70 | } 71 | } 72 | else 73 | { 74 | while (Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 75 | { 76 | player.position.Y -= 16f; 77 | } 78 | } 79 | player.fallStart = (int)(player.position.Y / 16f); 80 | if (Main.netMode == 1) NetMessage.SendTileSquare(player.whoAmI, Main.maxTilesX - 200, (int)Main.worldSurface / 2, 10); 81 | } 82 | else if (mode == Mode.Hell) 83 | { 84 | // hell 85 | player.Teleport(new Vector2((Main.maxTilesX / 2) * 16, (float)(Main.maxTilesY - 180) * 16f), 3); 86 | if (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 3].active()) 87 | { 88 | while (!Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 89 | { 90 | player.position.Y += 16f; 91 | if ((int)(player.position.Y / 16f) > Main.maxTilesY) 92 | { 93 | player.position.Y = (float)(Main.maxTilesY * 16) - 130f; 94 | break; 95 | } 96 | } 97 | } 98 | else 99 | { 100 | while (Main.tile[(int)(player.position.X / 16f), (int)(player.position.Y / 16f) + 4].active()) 101 | { 102 | player.position.Y -= 16f; 103 | } 104 | } 105 | player.fallStart = (int)(player.position.Y / 16f); 106 | if (Main.netMode == 1) NetMessage.SendTileSquare(player.whoAmI, Main.maxTilesX / 2, (int)Main.maxTilesY - 180, 10); 107 | } 108 | else if (mode == Mode.Random) 109 | { 110 | if (Main.netMode == 0) 111 | { 112 | player.TeleportationPotion(); 113 | } 114 | else if (Main.netMode == 1 && player.whoAmI == Main.myPlayer) 115 | { 116 | NetMessage.SendData(73); 117 | } 118 | } 119 | for (int num91 = 0; num91 < 70; num91++) 120 | { 121 | Dust.NewDust(player.position, player.width, player.height, 15, 0f, 0f, 150, default(Color), 1.5f); 122 | } 123 | } 124 | } 125 | } 126 | 127 | public void OnDrawInterface() 128 | { 129 | var player = Main.player[Main.myPlayer]; 130 | if (player.inventory[player.selectedItem].type == ItemID.CellPhone) 131 | { 132 | if (Main.mouseItem.type == ItemID.CellPhone) return; // don't allow it to be on your cursor 133 | 134 | if (Main.mouseRight && Main.mouseRightRelease) 135 | { 136 | player.mouseInterface = true; 137 | Main.mouseRightRelease = false; 138 | 139 | if (mode == Mode.Random) mode = Mode.Home; 140 | else mode++; 141 | IniAPI.WriteIni("EnhancedCellPhone", "Mode", mode.ToString()); 142 | Main.NewText("Enhanced CellPhone: " + mode, 255, 235, 150); 143 | } 144 | } 145 | } 146 | } 147 | } -------------------------------------------------------------------------------- /TranscendPlugins/Events.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using PluginLoader; 4 | using Terraria; 5 | using Terraria.Chat; 6 | using Terraria.GameContent.Achievements; 7 | using Keys = Microsoft.Xna.Framework.Input.Keys; 8 | 9 | namespace TranscendPlugins 10 | { 11 | public class Events : MarshalByRefObject, IPlugin 12 | { 13 | private Keys bloodMoon, goblin, meteor, frost, pirates, martians, pumpkinMoon, frostMoon, lunarApocalypse, eclipse, moonLord; 14 | private MethodInfo triggerLunarApocalypse; 15 | private FieldInfo spawnMeteor; 16 | private MethodInfo dropMeteor; 17 | private bool SpawnMeteor 18 | { 19 | get { return (bool)spawnMeteor.GetValue(null); } 20 | set { spawnMeteor.SetValue(null, value); } 21 | } 22 | 23 | public Events() 24 | { 25 | var worldGen = Assembly.GetEntryAssembly().GetType("Terraria.WorldGen"); 26 | triggerLunarApocalypse = worldGen.GetMethod("TriggerLunarApocalypse"); 27 | spawnMeteor = worldGen.GetField("spawnMeteor"); 28 | dropMeteor = worldGen.GetMethod("dropMeteor"); 29 | 30 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "Meteor", "NumPad0", writeIt: true), out meteor)) 31 | meteor = Keys.NumPad0; 32 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "BloodMoon", "NumPad1", writeIt: true), out bloodMoon)) 33 | bloodMoon = Keys.NumPad1; 34 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "GoblinArmy", "NumPad2", writeIt: true), out goblin)) 35 | goblin = Keys.NumPad2; 36 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "FrostLegion", "NumPad3", writeIt: true), out frost)) 37 | frost = Keys.NumPad3; 38 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "PirateInvasion", "NumPad4", writeIt: true), out pirates)) 39 | pirates = Keys.NumPad4; 40 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "SolarEclipse", "NumPad5", writeIt: true), out eclipse)) 41 | eclipse = Keys.NumPad5; 42 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "PumpkinMoon", "NumPad6", writeIt: true), out pumpkinMoon)) 43 | pumpkinMoon = Keys.NumPad6; 44 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "FrostMoon", "NumPad7", writeIt: true), out frostMoon)) 45 | frostMoon = Keys.NumPad7; 46 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "MartianMadness", "NumPad8", writeIt: true), out martians)) 47 | martians = Keys.NumPad8; 48 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "LunarApocalypse", "NumPad9", writeIt: true), out lunarApocalypse)) 49 | lunarApocalypse = Keys.NumPad9; 50 | if (!Keys.TryParse(IniAPI.ReadIni("Events", "Moon Lord", "Add", writeIt: true), out moonLord)) 51 | moonLord = Keys.Add; 52 | 53 | Loader.RegisterHotkey(() => 54 | { 55 | if (Main.invasionType > 0) 56 | Main.invasionSize = 0; 57 | else 58 | Main.StartInvasion(1); 59 | }, goblin); 60 | Loader.RegisterHotkey(() => 61 | { 62 | if (Main.invasionType > 0) 63 | Main.invasionSize = 0; 64 | else 65 | Main.StartInvasion(2); 66 | }, frost); 67 | Loader.RegisterHotkey(() => 68 | { 69 | if (Main.invasionType > 0) 70 | Main.invasionSize = 0; 71 | else 72 | Main.StartInvasion(3); 73 | }, pirates); 74 | Loader.RegisterHotkey(() => 75 | { 76 | if (Main.invasionType > 0) 77 | Main.invasionSize = 0; 78 | else 79 | Main.StartInvasion(4); 80 | }, martians); 81 | Loader.RegisterHotkey(() => 82 | { 83 | if (Main.pumpkinMoon) 84 | Main.stopMoonEvent(); 85 | else 86 | Main.startPumpkinMoon(); 87 | }, pumpkinMoon); 88 | Loader.RegisterHotkey(() => 89 | { 90 | if (Main.snowMoon) 91 | Main.stopMoonEvent(); 92 | else 93 | Main.startSnowMoon(); 94 | }, frostMoon); 95 | Loader.RegisterHotkey(() => 96 | { 97 | if (Terraria.NPC.LunarApocalypseIsUp || Terraria.NPC.AnyNPCs(398)) 98 | StopLunarEvent(); 99 | else 100 | TriggerLunarApocalypse(); 101 | }, lunarApocalypse); 102 | Loader.RegisterHotkey(() => 103 | { 104 | if (Terraria.NPC.LunarApocalypseIsUp || Terraria.NPC.AnyNPCs(398)) 105 | StopLunarEvent(); 106 | else 107 | SpawnMoonLord(); 108 | }, moonLord); 109 | Loader.RegisterHotkey(() => 110 | { 111 | if (Main.bloodMoon) 112 | Main.bloodMoon = false; 113 | else 114 | TriggerBloodMoon(); 115 | }, bloodMoon); 116 | Loader.RegisterHotkey(() => 117 | { 118 | if (Main.eclipse) 119 | Main.eclipse = false; 120 | else 121 | TriggerEclipse(); 122 | }, eclipse); 123 | Loader.RegisterHotkey(() => 124 | { 125 | SpawnMeteor = false; 126 | DropMeteor(); 127 | }, meteor); 128 | } 129 | 130 | private void DropMeteor() 131 | { 132 | dropMeteor.Invoke(null, null); 133 | } 134 | 135 | private void TriggerLunarApocalypse() 136 | { 137 | triggerLunarApocalypse.Invoke(null, null); 138 | } 139 | 140 | private void TriggerEclipse() 141 | { 142 | if (Main.netMode == 0) 143 | { 144 | Main.eclipse = true; 145 | Main.NewText(Lang.misc[20].Value, 50, 255, 130); 146 | } 147 | else 148 | { 149 | NetMessage.SendData(61, -1, -1, null, Main.myPlayer, -6f, 0f, 0f, 0, 0, 0); 150 | } 151 | } 152 | 153 | private void TriggerBloodMoon() 154 | { 155 | Main.bloodMoon = true; 156 | AchievementsHelper.NotifyProgressionEvent(4); 157 | if (Main.netMode == 0) 158 | { 159 | Main.NewText(Lang.misc[8].Value, 50, byte.MaxValue, 130); 160 | } 161 | else if (Main.netMode == 2) 162 | { 163 | ChatHelper.BroadcastChatMessage(Lang.misc[8].ToNetworkText(), new Microsoft.Xna.Framework.Color(50, 255, 130), -1); 164 | } 165 | } 166 | 167 | private void SpawnMoonLord() 168 | { 169 | if (Main.netMode == 0) 170 | { 171 | WorldGen.StartImpendingDoom(720); 172 | } 173 | else 174 | { 175 | NetMessage.SendData(61, -1, -1, null, Main.myPlayer, -8f, 0f, 0f, 0, 0, 0); 176 | } 177 | } 178 | 179 | private void StopLunarEvent() 180 | { 181 | Main.NewText("Stopped lunar event!", 50, 255, 130); 182 | Terraria.NPC.LunarApocalypseIsUp = false; 183 | for (int i = 0; i < 200; i++) 184 | { 185 | if (Main.npc[i].active) 186 | { 187 | switch (Main.npc[i].type) 188 | { 189 | case 398: // Moon Lord 190 | case 517: // Tower 191 | case 422: // Tower 192 | case 507: // Tower 193 | case 493: // Tower 194 | Main.npc[i].life = 0; 195 | break; 196 | } 197 | } 198 | } 199 | } 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /TranscendPlugins/FastSplash.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Utils = PluginLoader.Utils; 5 | 6 | namespace TranscendPlugins 7 | { 8 | // can't fully skip because async loading was added to Terraria 9 | public class FastSplash : MarshalByRefObject, IPluginDrawSplash 10 | { 11 | /// 12 | public void OnDrawSplash() 13 | { 14 | if (!Utils.IstModLoaderInstalled() && !Main.instance.quickSplash) 15 | { 16 | Main.instance.quickSplash = true; 17 | Main.instance.splashCounter = 199; 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /TranscendPlugins/Flashlight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework.Input; 3 | using PluginLoader; 4 | using Terraria; 5 | 6 | namespace MrBlueSLPlugins 7 | { 8 | public class Flashlight : MarshalByRefObject, IPluginPlayerUpdate 9 | { 10 | private bool flashlight = false; 11 | private Keys flashlightKey; 12 | 13 | public Flashlight() 14 | { 15 | if (!Keys.TryParse(IniAPI.ReadIni("Flashlight", "ToggleKey", "U", writeIt: true), out flashlightKey)) 16 | flashlightKey = Keys.U; 17 | 18 | Loader.RegisterHotkey(() => 19 | { 20 | flashlight = !flashlight; 21 | Main.NewText("Flashlight " + (flashlight ? "Enabled" : "Disabled"), 150, 150, 150); 22 | }, flashlightKey); 23 | } 24 | 25 | public void OnPlayerUpdate(Player player) 26 | { 27 | if (flashlight) 28 | { 29 | Lighting.AddLight((int)(Main.mouseX + Main.screenPosition.X + (double)(Player.defaultWidth / 2)) / 16, (int)(Main.mouseY + Main.screenPosition.Y + (double)(Player.defaultHeight / 2)) / 16, 1f, 1f, 1f); 30 | } 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /TranscendPlugins/FullBright.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | 7 | namespace TranscendPlugins 8 | { 9 | public class FullBright : MarshalByRefObject, IPluginLightingGetColor 10 | { 11 | private bool fullbright = false; 12 | private Keys fullbrightKey; 13 | 14 | public FullBright() 15 | { 16 | if (!Keys.TryParse(IniAPI.ReadIni("FullBright", "FullBrightKey", "Y", writeIt: true), out fullbrightKey)) 17 | fullbrightKey = Keys.Y; 18 | if (!bool.TryParse(IniAPI.ReadIni("FullBright", "FullBrightDefault", "false", writeIt: true), out fullbright)) 19 | fullbright = false; 20 | 21 | Color green = Color.Green; 22 | Loader.RegisterHotkey(() => 23 | { 24 | fullbright = !fullbright; 25 | IniAPI.WriteIni("FullBright", "FullBrightDefault", fullbright.ToString()); 26 | Main.NewText("Full Bright " + (fullbright ? "Enabled" : "Disabled"), green.R, green.G, green.B); 27 | }, fullbrightKey); 28 | } 29 | 30 | public bool OnLightingGetColor(int x, int y, out Color color) 31 | { 32 | color = Color.White; 33 | return fullbright; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /TranscendPlugins/GodMode.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.DataStructures; 7 | 8 | namespace ZeromaruPlugins 9 | { 10 | public class GodMode : MarshalByRefObject, IPluginUpdate, IPluginPlayerHurt, IPluginPlayerKillMe 11 | { 12 | enum Mode 13 | { 14 | Off = 0, 15 | DemiGod = 1, 16 | God = 2 17 | } 18 | private Mode mode = Mode.Off; 19 | private Keys key; 20 | 21 | public GodMode() 22 | { 23 | if (!Keys.TryParse(IniAPI.ReadIni("GodMode", "Key", "G", writeIt: true), out key)) key = Keys.G; 24 | if (!Mode.TryParse(IniAPI.ReadIni("GodMode", "Mode", "Off", writeIt: true), out mode)) mode = Mode.Off; 25 | 26 | Color green = Color.Green; 27 | Action update = () => 28 | { 29 | IniAPI.WriteIni("GodMode", "Mode", mode.ToString()); 30 | Main.NewText("God Mode: " + mode, green.R, green.G, green.B); 31 | }; 32 | 33 | Loader.RegisterHotkey(() => 34 | { 35 | if (mode == Mode.God) mode = Mode.Off; 36 | else mode++; 37 | update(); 38 | }, key); 39 | 40 | Loader.RegisterHotkey(() => 41 | { 42 | if (mode == Mode.Off) mode = Mode.God; 43 | else mode--; 44 | update(); 45 | }, key, shift: true); 46 | } 47 | 48 | public void OnUpdate() 49 | { 50 | if (mode == Mode.God) 51 | { 52 | var player = Main.player[Main.myPlayer]; 53 | player.statLife = player.statLifeMax2; 54 | player.statMana = player.statManaMax2; 55 | player.breath = player.breathMax + 1; 56 | player.noFallDmg = true; 57 | player.immune = true; 58 | player.immuneTime = 10; 59 | player.immuneAlpha = 0; 60 | } 61 | } 62 | 63 | public bool OnPlayerHurt(Player player, PlayerDeathReason damageSource, int damage, int hitDirection, bool pvp, bool quiet, bool crit, int cooldownCounter, bool dodgeable, out double result) 64 | { 65 | result = 0.0; 66 | return mode == Mode.God; 67 | } 68 | 69 | public bool OnPlayerKillMe(Player player, PlayerDeathReason damageSource, double dmg, int hitDirection, bool pvp) 70 | { 71 | return mode == Mode.God || mode == Mode.DemiGod; 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /TranscendPlugins/HomingBullets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using PluginLoader; 4 | using Terraria; 5 | using Terraria.ID; 6 | 7 | namespace TranscendPlugins 8 | { 9 | public class HomingBullets : MarshalByRefObject, IPluginProjectileAI 10 | { 11 | public void OnProjectileAI001(Projectile pProjectile) 12 | { 13 | if (pProjectile.owner != Main.myPlayer) return; 14 | if (pProjectile.type == ProjectileID.LunarFlare) return; 15 | if (pProjectile.type == ProjectileID.NebulaBlaze1) return; 16 | if (pProjectile.type == ProjectileID.NebulaBlaze2) return; 17 | if (pProjectile.type == ProjectileID.ChlorophyteBullet) return; // don't want to do tracking x2 18 | if (pProjectile.type == ProjectileID.VortexBeaterRocket) return; // don't want to do tracking x2 19 | if (pProjectile.type == ProjectileID.PygmySpear) return; 20 | if (pProjectile.type == ProjectileID.MiniRetinaLaser) return; 21 | if (pProjectile.type == ProjectileID.ElectrosphereMissile) return; 22 | if (pProjectile.type == ProjectileID.Meteor1) return; 23 | if (pProjectile.type == ProjectileID.Meteor2) return; 24 | if (pProjectile.type == ProjectileID.Meteor3) return; 25 | if (pProjectile.type == ProjectileID.MoonlordArrow) return; 26 | if (pProjectile.type == ProjectileID.MoonlordArrowTrail) return; 27 | if (pProjectile.type == ProjectileID.MiniSharkron) return; 28 | 29 | float num138 = (float)Math.Sqrt((double)(pProjectile.velocity.X * pProjectile.velocity.X + pProjectile.velocity.Y * pProjectile.velocity.Y)); 30 | float num139 = pProjectile.localAI[0]; 31 | if (num139 == 0f) 32 | { 33 | pProjectile.localAI[0] = num138; 34 | num139 = num138; 35 | } 36 | if (pProjectile.alpha > 0) 37 | { 38 | pProjectile.alpha -= 25; 39 | } 40 | if (pProjectile.alpha < 0) 41 | { 42 | pProjectile.alpha = 0; 43 | } 44 | float num140 = pProjectile.position.X; 45 | float num141 = pProjectile.position.Y; 46 | float num142 = 300f; 47 | bool flag4 = false; 48 | int num143 = 0; 49 | if (pProjectile.ai[1] == 0f) 50 | { 51 | for (int num144 = 0; num144 < 200; num144++) 52 | { 53 | if (Main.npc[num144].CanBeChasedBy(pProjectile, false) && (pProjectile.ai[1] == 0f || pProjectile.ai[1] == (float)(num144 + 1))) 54 | { 55 | float num145 = Main.npc[num144].position.X + (float)(Main.npc[num144].width / 2); 56 | float num146 = Main.npc[num144].position.Y + (float)(Main.npc[num144].height / 2); 57 | float num147 = Math.Abs(pProjectile.position.X + (float)(pProjectile.width / 2) - num145) + Math.Abs(pProjectile.position.Y + (float)(pProjectile.height / 2) - num146); 58 | if (num147 < num142 && Collision.CanHit(new Vector2(pProjectile.position.X + (float)(pProjectile.width / 2), pProjectile.position.Y + (float)(pProjectile.height / 2)), 1, 1, Main.npc[num144].position, Main.npc[num144].width, Main.npc[num144].height)) 59 | { 60 | num142 = num147; 61 | num140 = num145; 62 | num141 = num146; 63 | flag4 = true; 64 | num143 = num144; 65 | } 66 | } 67 | } 68 | if (flag4) 69 | { 70 | pProjectile.ai[1] = (float)(num143 + 1); 71 | } 72 | flag4 = false; 73 | } 74 | if (pProjectile.ai[1] > 0f) 75 | { 76 | int num148 = (int)(pProjectile.ai[1] - 1f); 77 | if (Main.npc[num148].active && Main.npc[num148].CanBeChasedBy(pProjectile, true) && !Main.npc[num148].dontTakeDamage) 78 | { 79 | float num149 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); 80 | float num150 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); 81 | float num151 = Math.Abs(pProjectile.position.X + (float)(pProjectile.width / 2) - num149) + Math.Abs(pProjectile.position.Y + (float)(pProjectile.height / 2) - num150); 82 | if (num151 < 1000f) 83 | { 84 | flag4 = true; 85 | num140 = Main.npc[num148].position.X + (float)(Main.npc[num148].width / 2); 86 | num141 = Main.npc[num148].position.Y + (float)(Main.npc[num148].height / 2); 87 | } 88 | } 89 | else 90 | { 91 | pProjectile.ai[1] = 0f; 92 | } 93 | } 94 | if (!pProjectile.friendly) 95 | { 96 | flag4 = false; 97 | } 98 | if (flag4) 99 | { 100 | float num152 = num139; 101 | Vector2 vector13 = new Vector2(pProjectile.position.X + (float)pProjectile.width * 0.5f, pProjectile.position.Y + (float)pProjectile.height * 0.5f); 102 | float num153 = num140 - vector13.X; 103 | float num154 = num141 - vector13.Y; 104 | float num155 = (float)Math.Sqrt((double)(num153 * num153 + num154 * num154)); 105 | num155 = num152 / num155; 106 | num153 *= num155; 107 | num154 *= num155; 108 | int num156 = 8; 109 | pProjectile.velocity.X = (pProjectile.velocity.X * (float)(num156 - 1) + num153) / (float)num156; 110 | pProjectile.velocity.Y = (pProjectile.velocity.Y * (float)(num156 - 1) + num154) / (float)num156; 111 | } 112 | } 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /TranscendPlugins/InfiniteFlight.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | 7 | namespace ZeromaruPlugins 8 | { 9 | public class InfiniteFlight : MarshalByRefObject, IPluginUpdate 10 | { 11 | private bool flight = false; 12 | private Keys flightKey; 13 | 14 | public InfiniteFlight() 15 | { 16 | if (!Keys.TryParse(IniAPI.ReadIni("InfiniteFlight", "FlightKey", "I", writeIt: true), out flightKey)) 17 | flightKey = Keys.I; 18 | 19 | Color green = Color.Green; 20 | Loader.RegisterHotkey(() => 21 | { 22 | flight = !flight; 23 | Main.NewText("Infinite Flight " + (flight ? "Enabled" : "Disabled"), green.R, green.G, green.B); 24 | }, flightKey); 25 | } 26 | 27 | public void OnUpdate() 28 | { 29 | if (flight) 30 | { 31 | var player = Main.player[Main.myPlayer]; 32 | player.rocketTime = 1; 33 | player.carpetTime = 1; 34 | player.wingTime = 1f; 35 | } 36 | } 37 | } 38 | } -------------------------------------------------------------------------------- /TranscendPlugins/InfiniteLifeSteal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace TranscendPlugins 6 | { 7 | public class InfiniteLifeSteal : MarshalByRefObject, IPluginPlayerUpdate 8 | { 9 | public void OnPlayerUpdate(Player player) 10 | { 11 | if (player.whoAmI == Main.myPlayer) 12 | player.lifeSteal = 10000; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /TranscendPlugins/InfiniteSundial.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace TranscendPlugins 6 | { 7 | public class InfiniteSundial : MarshalByRefObject, IPluginUpdate 8 | { 9 | public void OnUpdate() 10 | { 11 | Main.sundialCooldown = 0; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /TranscendPlugins/ItemConfig.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using PluginLoader; 4 | using Terraria; 5 | using Terraria.ID; 6 | using TranscendPlugins.Shared.Extensions; 7 | 8 | /// Original taken from: https://gist.github.com/YellowAfterlife/1edaa4060191823ee366 9 | namespace YellowAfterlifePlugins 10 | { 11 | /// Item modification rules are defined as following: 12 | /// [item3507] 13 | /// name=Copper Sword Plus 14 | /// damage=20 15 | /// A list of possible fields can be seen below. 16 | /// "string" is text 17 | /// "float" is any number 18 | /// "int" is "rounded" number (1,2,3,...) 19 | /// "bool" is toggle ("true"/"false") 20 | /// 21 | /// string name; 22 | /// bool? autoReuse; // aka "auto-swing" for weapons 23 | /// int? damage; 24 | /// float? knockback; 25 | /// int? crit; 26 | /// int? defense; 27 | /// int? useTime; // item "use time"/cooldown, in frames 28 | /// int? useAnimation; 29 | /// int? holdStyle; 30 | /// int? useStyle; 31 | /// int? maxStack; 32 | /// float? scale; // size (1.0 is normal) 33 | /// string toolTip; 34 | /// string toolTip2; 35 | public class ItemConfig : IPluginItemSetDefaults 36 | { 37 | #region Read INI 38 | 39 | private string confPath = Environment.CurrentDirectory + "\\ItemConfig.ini"; 40 | private readonly HashSet _sections; 41 | 42 | private string LoadString(string section, string field) 43 | { 44 | string s = IniAPI.ReadIni(section, field, "", path: confPath); 45 | return s != "" ? s : null; 46 | } 47 | 48 | private int? LoadInt(string section, string field) 49 | { 50 | string s = IniAPI.ReadIni(section, field, "", path: confPath); 51 | if (s != "") 52 | { 53 | return int.Parse(s); 54 | } 55 | else return null; 56 | } 57 | 58 | private float? LoadFloat(string section, string field) 59 | { 60 | string s = IniAPI.ReadIni(section, field, "", path: confPath); 61 | if (s != "") 62 | { 63 | return float.Parse(s); 64 | } 65 | else return null; 66 | } 67 | 68 | private bool? LoadBool(string section, string field) 69 | { 70 | string s = IniAPI.ReadIni(section, field, "", path: confPath); 71 | if (s != "") 72 | { 73 | s = s.ToLower(); 74 | return (s == "1" || s == "true" || s == "yes"); 75 | } 76 | else return null; 77 | } 78 | 79 | #endregion 80 | 81 | public ItemConfig() 82 | { 83 | IniAPI.WriteIni("header", "hint", "Add rules below; See ItemConfig.cs for instructions.", confPath); 84 | _sections = new HashSet(IniAPI.GetIniSections(confPath)); 85 | } 86 | 87 | public void OnItemSetDefaults(Item item) 88 | { 89 | var section = "item" + item.type; 90 | if (!_sections.Contains(section)) 91 | return; 92 | 93 | var name = LoadString(section, "name"); 94 | var autoReuse = LoadBool(section, "autoReuse"); 95 | var damage = LoadInt(section, "damage"); 96 | var knockback = LoadFloat(section, "knockback"); 97 | var crit = LoadInt(section, "crit"); 98 | var defense = LoadInt(section, "defense"); 99 | var useTime = LoadInt(section, "useTime"); 100 | var useAnimation = LoadInt(section, "useAnimation"); 101 | var holdStyle = LoadInt(section, "holdStyle"); 102 | var useStyle = LoadInt(section, "useStyle"); 103 | var maxStack = LoadInt(section, "maxStack"); 104 | var scale = LoadFloat(section, "scale"); 105 | var toolTip = LoadString(section, "toolTip"); 106 | 107 | if (name != null) Lang._itemNameCache[ItemID.FromNetId((short) item.type)].SetValue(name); 108 | if (autoReuse != null) item.autoReuse = (bool) autoReuse; 109 | if (damage != null) item.damage = (int) damage; 110 | if (knockback != null) item.knockBack = (float) knockback; 111 | if (crit != null) item.crit = (int) crit; 112 | if (defense != null) item.defense = (int) defense; 113 | if (useTime != null) item.useTime = (int) useTime; 114 | if (useAnimation != null) item.useAnimation = (int) useAnimation; 115 | if (holdStyle != null) item.holdStyle = (int) holdStyle; 116 | if (useStyle != null) item.useStyle = (int) useStyle; 117 | if (maxStack != null) item.maxStack = (int) maxStack; 118 | if (scale != null) item.scale = (float) scale; 119 | if (toolTip != null) item.ToolTip.SetValue(toolTip); 120 | } 121 | } 122 | } -------------------------------------------------------------------------------- /TranscendPlugins/ItemPrefix.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Windows.Forms; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.ID; 7 | using Terraria.Utilities; 8 | 9 | namespace TranscendPlugins 10 | { 11 | public class ItemPrefix : MarshalByRefObject, IPluginChatCommand, IPluginItemRollAPrefix 12 | { 13 | private bool keepStats = false; 14 | private bool enableFixedPrefixes; 15 | private int fixedAccessoryPrefix; 16 | 17 | public ItemPrefix() 18 | { 19 | if (!bool.TryParse(IniAPI.ReadIni("ItemPrefix", "EnableFixedPrefixes", "True", writeIt: true), out enableFixedPrefixes)) 20 | enableFixedPrefixes = true; 21 | var temp = IniAPI.ReadIni("ItemPrefix", "FixedAccessoryPrefix", "Warding", writeIt: true); 22 | if (!int.TryParse(temp, out fixedAccessoryPrefix)) 23 | { 24 | var field = typeof(PrefixID).GetField(temp, BindingFlags.Static | BindingFlags.Public); 25 | var fieldValue = field == null ? null : field.GetValue(null) as int?; 26 | if (!fieldValue.HasValue) 27 | { 28 | MessageBox.Show(string.Format("[ItemPrefix] FixedAccessoryPrefix of '{0}' is invalid. Use a number or a valid prefix name.", temp), string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error); 29 | fixedAccessoryPrefix = PrefixID.Warding; 30 | } 31 | else 32 | fixedAccessoryPrefix = fieldValue.Value; 33 | } 34 | } 35 | 36 | private bool Correct(Item item, ref int rolledPrefix) 37 | { 38 | float num = 1f; 39 | float num2 = 1f; 40 | float num3 = 1f; 41 | float num4 = 1f; 42 | float num5 = 1f; 43 | float num6 = 1f; 44 | int num7 = 0; 45 | if (!item.TryGetPrefixStatMultipliersForItem(rolledPrefix, out num, out num2, out num3, out num4, out num5, out num6, out num7)) 46 | { 47 | if (item.knockBack == 0) 48 | rolledPrefix = PrefixID.Demonic; 49 | else if (item.damage == 0) 50 | rolledPrefix = PrefixID.Rapid; 51 | else if (item.useAnimation == 0) 52 | rolledPrefix = PrefixID.Godly; 53 | else if (item.mana == 0) 54 | rolledPrefix = PrefixID.Godly; 55 | else 56 | return false; 57 | } 58 | return true; 59 | } 60 | 61 | public bool OnItemRollAPrefix(Item item, UnifiedRandom random, ref int rolledPrefix, out bool result) 62 | { 63 | result = false; 64 | if (!enableFixedPrefixes) 65 | return false; 66 | 67 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.SwordsHammersAxesPicks[item.type]) 68 | { 69 | rolledPrefix = PrefixID.Legendary; 70 | if (!Correct(item, ref rolledPrefix)) return false; 71 | result = true; 72 | return true; 73 | } 74 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.SpearsMacesChainsawsDrillsPunchCannon[item.type]) 75 | { 76 | rolledPrefix = PrefixID.Godly; 77 | if (!Correct(item, ref rolledPrefix)) return false; 78 | result = true; 79 | return true; 80 | } 81 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.GunsBows[item.type]) 82 | { 83 | rolledPrefix = PrefixID.Unreal; 84 | if (!Correct(item, ref rolledPrefix)) return false; 85 | result = true; 86 | return true; 87 | } 88 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.MagicAndSummon[item.type]) 89 | { 90 | rolledPrefix = PrefixID.Mythical; 91 | if (!Correct(item, ref rolledPrefix)) return false; 92 | result = true; 93 | return true; 94 | } 95 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.BoomerangsChakrams[item.type]) 96 | { 97 | rolledPrefix = PrefixID.Godly; 98 | if (!Correct(item, ref rolledPrefix)) return false; 99 | result = true; 100 | return true; 101 | } 102 | if (Terraria.GameContent.Prefixes.PrefixLegacy.ItemSets.ItemsThatCanHaveLegendary2[item.type]) 103 | { 104 | rolledPrefix = PrefixID.Legendary2; 105 | if (!Correct(item, ref rolledPrefix)) return false; 106 | result = true; 107 | return true; 108 | } 109 | if (item.IsAPrefixableAccessory()) 110 | { 111 | rolledPrefix = fixedAccessoryPrefix; 112 | result = true; 113 | return true; 114 | } 115 | 116 | return false; 117 | } 118 | 119 | public bool OnChatCommand(string command, string[] args) 120 | { 121 | if (command != "prefix") return false; 122 | 123 | if (args.Length < 1 || args.Length > 1 || args[0] == "help") 124 | { 125 | Main.NewText("Usage:"); 126 | Main.NewText(" /prefix name"); 127 | Main.NewText(" /prefix id"); 128 | Main.NewText(" /prefix keep"); 129 | Main.NewText(" /prefix help"); 130 | Main.NewText("Example:"); 131 | Main.NewText(" /prefix mythical"); 132 | return true; 133 | } 134 | 135 | if (args[0] == "keep") 136 | { 137 | keepStats = !keepStats; 138 | Main.NewText("Using /prefix will now " + (keepStats ? "keep" : "reset") + " existing stats."); 139 | return true; 140 | } 141 | 142 | // get item on cursor, if nothing there, get hotbar item 143 | var item = Main.mouseItem; 144 | if (item.type == 0) 145 | { 146 | var player = Main.player[Main.myPlayer]; 147 | item = player.inventory[player.selectedItem]; 148 | if (item.type == 0) 149 | { 150 | Main.NewText("No item selected."); 151 | return true; 152 | } 153 | } 154 | 155 | 156 | int prefixId; 157 | if (!int.TryParse(args[0], out prefixId)) 158 | { 159 | for (int i = 0; i < Lang.prefix.Length; i++) 160 | { 161 | if (Lang.prefix[i].Value.ToLower() == args[0].ToLower()) 162 | { 163 | prefixId = i; 164 | break; 165 | } 166 | } 167 | if (prefixId == 0) 168 | { 169 | Main.NewText("Invalid prefix ID."); 170 | return true; 171 | } 172 | } 173 | 174 | if (!keepStats) 175 | { 176 | // Clone item (preserve stack/favorited) 177 | var stack = item.stack; 178 | bool favorited = item.favorited; 179 | item.netDefaults(item.netID); 180 | item.stack = stack; 181 | item.favorited = favorited; 182 | } 183 | 184 | if (prefixId != 0 && !item.Prefix(prefixId)) 185 | Main.NewText("Invalid prefix ID for this item type."); 186 | else 187 | Main.NewText("Item reset (including usetime / autoreuse)."); 188 | 189 | return true; 190 | } 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /TranscendPlugins/ItemReplication.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.Audio; 7 | 8 | namespace RyanPlugins 9 | { 10 | public class ItemReplication : MarshalByRefObject, IPluginItemSlotRightClick 11 | { 12 | private Keys replicateKey; 13 | 14 | public ItemReplication() 15 | { 16 | if (!Keys.TryParse(IniAPI.ReadIni("ItemReplication", "ReplicateKey", "R", writeIt: true), out replicateKey)) 17 | replicateKey = Keys.R; 18 | } 19 | 20 | public bool OnItemSlotRightClick(Item[] inv, int context, int slot) 21 | { 22 | int[] contexts = new int[]{ 23 | 0, //InventoryItem 24 | 1, //InventoryCoin 25 | 2, //InventoryAmmo 26 | 3, //ChestItem 27 | 4, //BankItem 28 | 6, //TrashItem 29 | 8, //EquipArmor 30 | 9, //EquipArmorVanity 31 | 10, //EquipAccessory 32 | 11, //EquipAccessoryVanity 33 | 12, //EquipDye 34 | 16, //EquipGrapple 35 | 17, //EquipMount 36 | 18, //EquipMinecart 37 | 19, //EquipPet 38 | 20 //EquipLight 39 | }; 40 | var invItem = inv[slot]; 41 | invItem.newAndShiny = false; 42 | 43 | if (Main.stackSplit <= 1 && Main.mouseRight && Main.keyState.IsKeyDown(replicateKey) && contexts.Contains(context)) 44 | { 45 | if ((Main.mouseItem.IsTheSameAs(invItem) && Main.mouseItem.stack < Main.mouseItem.maxStack) || Main.mouseItem.type == 0) 46 | { 47 | if (Main.mouseItem.type == 0) 48 | { 49 | Main.mouseItem = invItem.Clone(); 50 | Main.mouseItem.stack = 0; 51 | 52 | if (invItem.favorited && invItem.maxStack == 1) 53 | { 54 | Main.mouseItem.favorited = true; 55 | } 56 | else 57 | { 58 | Main.mouseItem.favorited = false; 59 | } 60 | } 61 | 62 | Main.mouseItem.stack++; 63 | Recipe.FindRecipes(); 64 | SoundEngine.PlaySound(12, -1, -1, 1); 65 | 66 | if (Main.stackSplit == 0) 67 | { 68 | Main.stackSplit = 15; 69 | } 70 | else 71 | { 72 | Main.stackSplit = Main.stackDelay; 73 | } 74 | 75 | if (context == 3 && Main.netMode == 1) 76 | { 77 | NetMessage.SendData(32, -1, -1, null, Main.player[Main.myPlayer].chest, (float)slot, 0f, 0f, 0, 0, 0); 78 | } 79 | } 80 | return true; 81 | } 82 | return false; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /TranscendPlugins/ItemSpawner.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.ID; 7 | 8 | namespace Ruffi123456789Plugins 9 | { 10 | public class ItemSpawner : MarshalByRefObject, IPluginUpdate, IPluginChatCommand 11 | { 12 | private string toSpawn = ""; 13 | 14 | public ItemSpawner() 15 | { 16 | for (int i = 0; i < 10; i++) 17 | { 18 | int j = i; 19 | Keys key; 20 | if (Keys.TryParse("NumPad" + j, out key)) 21 | { 22 | Loader.RegisterHotkey(() => 23 | { 24 | toSpawn = toSpawn + j; 25 | }, key, control: true); 26 | } 27 | } 28 | } 29 | 30 | public void OnUpdate() 31 | { 32 | if (toSpawn != "" && !Loader.IsControlModifierKeyDown()) 33 | { 34 | int id; 35 | if (int.TryParse(toSpawn, out id)) 36 | Main.player[Main.myPlayer].QuickSpawnItem(null, id); 37 | toSpawn = ""; 38 | } 39 | } 40 | 41 | public bool OnChatCommand(string command, string[] args) 42 | { 43 | if (command != "item") return false; 44 | 45 | if (args.Length < 1 || args.Length > 2 || args[0] == "help") 46 | { 47 | Main.NewText("Usage:"); 48 | Main.NewText(" /item id [count]"); 49 | Main.NewText(" /item name [count]"); 50 | Main.NewText("Example:"); 51 | Main.NewText(" /item 123"); 52 | Main.NewText(" /item 85 5"); 53 | Main.NewText(" /item ChlorophyteBullet 200"); 54 | return true; 55 | } 56 | 57 | int itemId; 58 | if (!int.TryParse(args[0], out itemId)) 59 | { 60 | var field = typeof(ItemID).GetFields().FirstOrDefault(info => info.Name.ToLower() == args[0].ToLower()); 61 | if (field == null) 62 | { 63 | Main.NewText("Invalid ItemID."); 64 | return true; 65 | } 66 | itemId = Convert.ToInt32(field.GetValue(null)); 67 | } 68 | 69 | int count = 1; 70 | if (args.Length == 2) 71 | { 72 | if (!int.TryParse(args[1], out count)) 73 | { 74 | Main.NewText("Invalid count."); 75 | return true; 76 | } 77 | } 78 | 79 | Main.player[Main.myPlayer].QuickSpawnItem(null, itemId, count); 80 | return true; 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /TranscendPlugins/LoadoutSwap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using GTRPlugins.UI; 3 | using Microsoft.Xna.Framework; 4 | using PluginLoader; 5 | using Terraria; 6 | 7 | namespace GTRPlugins 8 | { 9 | public class LoadoutSwap : IPluginDrawInventory 10 | { 11 | private Button btnLoadoutSwap; 12 | 13 | public LoadoutSwap() 14 | { 15 | btnLoadoutSwap = new Button("Swap Loadout", new Vector2(502f, 298f), BtnLoadoutSwapClick); 16 | btnLoadoutSwap.Scale = 0.9f; 17 | } 18 | 19 | private void BtnLoadoutSwapClick(object sender, EventArgs e) 20 | { 21 | Player player = Main.player[Main.myPlayer]; 22 | for (int i = 0; i < 10; i++) 23 | { 24 | Item item = player.armor[i].Clone(); 25 | player.armor[i] = player.armor[i + 10]; 26 | player.armor[i + 10] = item; 27 | } 28 | } 29 | 30 | public void OnDrawInventory() 31 | { 32 | if (Main.player[Main.myPlayer].chest == -1 && Main.npcShop == 0) 33 | { 34 | btnLoadoutSwap.Draw(); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /TranscendPlugins/Minions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace TranscendPlugins 6 | { 7 | public class Minions : MarshalByRefObject, IPluginPlayerUpdateArmorSets 8 | { 9 | private int minions; 10 | 11 | public Minions() 12 | { 13 | if (!int.TryParse(IniAPI.ReadIni("Minions", "Max", "100", writeIt: true), out minions)) 14 | minions = 100; 15 | } 16 | public void OnPlayerUpdateArmorSets(Player player) 17 | { 18 | if (player.whoAmI == Main.myPlayer) 19 | player.maxMinions = minions; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /TranscendPlugins/MoreAccessorySlots.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace Ruffi123456789Plugins 6 | { 7 | public class MoreAccessorySlots : MarshalByRefObject, IPluginPlayerUpdateBuffs 8 | { 9 | private bool force; 10 | private int slots; 11 | 12 | public MoreAccessorySlots() 13 | { 14 | if (!bool.TryParse(IniAPI.ReadIni("MoreAccessorySlots", "Force", "False", writeIt: true), out force)) 15 | force = false; 16 | if (!int.TryParse(IniAPI.ReadIni("MoreAccessorySlots", "Count", "2", writeIt: true), out slots)) 17 | slots = 2; 18 | 19 | if (slots > 2) slots = 2; // above 2 crashes Terraria 20 | if (slots < 0) slots = 0; 21 | } 22 | 23 | public void OnPlayerUpdateBuffs(Player player) 24 | { 25 | if (player.whoAmI != Main.myPlayer) return; 26 | 27 | if (force) 28 | player.extraAccessory = true; 29 | 30 | if (player.extraAccessory) 31 | player.extraAccessorySlots = slots; 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /TranscendPlugins/NPC.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using Microsoft.Xna.Framework; 5 | using PluginLoader; 6 | using Terraria; 7 | using Terraria.ID; 8 | using Keys = Microsoft.Xna.Framework.Input.Keys; 9 | 10 | namespace TranscendPlugins 11 | { 12 | public class NPC : MarshalByRefObject, IPluginChatCommand 13 | { 14 | private bool cnpc; 15 | private Keys toggleKey, increaseKey, decreaseKey; 16 | private int previousMaxSpawns; 17 | private int previousSpawnRate; 18 | 19 | private FieldInfo defaultMaxSpawns; 20 | private int DefaultMaxSpawns 21 | { 22 | get { return (int)defaultMaxSpawns.GetValue(null); } 23 | set { defaultMaxSpawns.SetValue(null, value); } 24 | } 25 | 26 | private int internalSpawnRatePercent; 27 | private FieldInfo defaultSpawnRate; 28 | private int DefaultSpawnRate 29 | { 30 | get 31 | { 32 | return internalSpawnRatePercent; 33 | /*var val = (int) defaultSpawnRate.GetValue(null); 34 | if (val == 0) return int.MaxValue; 35 | return 60000 / val;*/ 36 | } 37 | set 38 | { 39 | internalSpawnRatePercent = value; 40 | if (value == 0) 41 | defaultSpawnRate.SetValue(null, int.MaxValue); 42 | else 43 | defaultSpawnRate.SetValue(null, 60000 / value); 44 | } 45 | } 46 | 47 | public NPC() 48 | { 49 | var npc = Assembly.GetEntryAssembly().GetType("Terraria.NPC"); 50 | defaultMaxSpawns = npc.GetField("defaultMaxSpawns", BindingFlags.Static | BindingFlags.NonPublic); 51 | defaultSpawnRate = npc.GetField("defaultSpawnRate", BindingFlags.Static | BindingFlags.NonPublic); 52 | 53 | DefaultMaxSpawns = int.Parse(IniAPI.ReadIni("Spawning", "SpawnLimit", "5", writeIt: true)); 54 | DefaultSpawnRate = int.Parse(IniAPI.ReadIni("Spawning", "SpawnRate", "100", writeIt: true)); 55 | 56 | if (!Keys.TryParse(IniAPI.ReadIni("NPC", "Toggle", "N", writeIt: true), out toggleKey)) 57 | toggleKey = Keys.N; 58 | if (!Keys.TryParse(IniAPI.ReadIni("NPC", "Increase", "OemPlus", writeIt: true), out increaseKey)) 59 | increaseKey = Keys.OemPlus; 60 | if (!Keys.TryParse(IniAPI.ReadIni("NPC", "Decrease", "OemMinus", writeIt: true), out decreaseKey)) 61 | decreaseKey = Keys.OemMinus; 62 | 63 | Color purple = Color.Purple; 64 | Loader.RegisterHotkey(() => 65 | { 66 | ModifySpawnLimit(-1); 67 | Main.NewText("Spawn limit: " + DefaultMaxSpawns, purple.R, purple.G, purple.B); 68 | }, decreaseKey, control: true); 69 | 70 | Loader.RegisterHotkey(() => 71 | { 72 | ModifySpawnRate(-20); 73 | Main.NewText("Spawn rate: " + DefaultSpawnRate + "%", purple.R, purple.G, purple.B); 74 | }, decreaseKey, control: false); 75 | 76 | Loader.RegisterHotkey(() => 77 | { 78 | ModifySpawnLimit(1); 79 | Main.NewText("Spawn limit: " + DefaultMaxSpawns, purple.R, purple.G, purple.B); 80 | }, increaseKey, control: true); 81 | 82 | Loader.RegisterHotkey(() => 83 | { 84 | ModifySpawnRate(20); 85 | Main.NewText("Spawn rate: " + DefaultSpawnRate + "%", purple.R, purple.G, purple.B); 86 | }, increaseKey, control: false); 87 | 88 | Loader.RegisterHotkey(() => 89 | { 90 | if (DefaultMaxSpawns > 0) 91 | { 92 | previousMaxSpawns = DefaultMaxSpawns; 93 | previousSpawnRate = DefaultSpawnRate; 94 | DefaultMaxSpawns = 0; 95 | DefaultSpawnRate = 0; 96 | KillAllNPCs(); 97 | } 98 | else 99 | { 100 | DefaultMaxSpawns = previousMaxSpawns; 101 | DefaultSpawnRate = previousSpawnRate; 102 | } 103 | Main.NewText("Spawn rate: " + DefaultSpawnRate + "%", purple.R, purple.G, purple.B); 104 | Main.NewText("Spawn limit: " + DefaultMaxSpawns, purple.R, purple.G, purple.B); 105 | }, toggleKey); 106 | } 107 | 108 | private void ModifySpawnRate(int rate) 109 | { 110 | DefaultSpawnRate += rate; 111 | if (DefaultSpawnRate < 0) DefaultSpawnRate = 0; 112 | if (DefaultSpawnRate > 1000) DefaultSpawnRate = 1000; 113 | 114 | IniAPI.WriteIni("Spawning", "SpawnRate", DefaultSpawnRate.ToString()); 115 | } 116 | 117 | private void ModifySpawnLimit(int rate) 118 | { 119 | DefaultMaxSpawns += rate; 120 | if (DefaultMaxSpawns < 0) DefaultMaxSpawns = 0; 121 | if (DefaultMaxSpawns > 150) DefaultMaxSpawns = 150; 122 | if (DefaultMaxSpawns == 0) KillAllNPCs(); 123 | 124 | IniAPI.WriteIni("Spawning", "SpawnLimit", DefaultMaxSpawns.ToString()); 125 | } 126 | 127 | private void KillAllNPCs() 128 | { 129 | for (int i = 0; i < Main.npc.Length; i++) 130 | { 131 | var npc = Main.npc[i]; 132 | if (npc != null && !npc.townNPC) 133 | { 134 | npc.life = 0; 135 | npc.checkDead(); 136 | if (Main.netMode == 2) 137 | NetMessage.SendData(23, -1, -1, null, i); 138 | } 139 | } 140 | } 141 | 142 | public bool OnChatCommand(string command, string[] args) 143 | { 144 | if (command != "npc") return false; 145 | 146 | if (args.Length < 1 || args.Length > 2 || args[0] == "help") 147 | { 148 | Main.NewText("Usage:"); 149 | Main.NewText(" /npc id [count]"); 150 | Main.NewText(" /npc name [count]"); 151 | Main.NewText(" /npc cnpc (Toggles NPC spawn at cursor position)"); 152 | Main.NewText(" /npc help"); 153 | Main.NewText("Example:"); 154 | Main.NewText(" /npc 21"); 155 | Main.NewText(" /npc 21 20"); 156 | Main.NewText(" /npc Skeleton 20"); 157 | return true; 158 | } 159 | 160 | if (args[0] == "cnpc") 161 | { 162 | cnpc = !cnpc; 163 | Main.NewText("NPC spawn at cursor " + (cnpc ? "enabled" : "disabled")); 164 | return true; 165 | } 166 | 167 | int npcId; 168 | if (!int.TryParse(args[0], out npcId)) 169 | { 170 | var field = typeof(NPCID).GetFields().FirstOrDefault(info => info.Name.ToLower() == args[0].ToLower()); 171 | if (field != null) 172 | npcId = Convert.ToInt32(field.GetValue(null)); 173 | } 174 | if (npcId == 0) 175 | { 176 | Main.NewText("Invalid NPCID."); 177 | return true; 178 | } 179 | 180 | int count = 1; 181 | if (args.Length == 2) 182 | { 183 | if (!int.TryParse(args[1], out count)) 184 | { 185 | Main.NewText("Invalid count."); 186 | return true; 187 | } 188 | } 189 | 190 | int x, y; 191 | if (cnpc) 192 | { 193 | x = (int)(Main.mouseX + Main.screenPosition.X); 194 | y = (int)(Main.mouseY + Main.screenPosition.Y); 195 | } 196 | else 197 | { 198 | var player = Main.player[Main.myPlayer]; 199 | x = (int)player.Center.X; 200 | y = (int)player.Center.Y - 150; 201 | } 202 | for (int i = 0; i < count; i++) 203 | { 204 | Terraria.NPC.NewNPC(Terraria.NPC.GetSpawnSourceForNaturalSpawn(), x, y, npcId); 205 | } 206 | return true; 207 | } 208 | } 209 | } -------------------------------------------------------------------------------- /TranscendPlugins/PortableCraftingGuide.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Keys = Microsoft.Xna.Framework.Input.Keys; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class PortableCraftingGuide : MarshalByRefObject, IPluginPreUpdate, IPluginUpdate, IPluginPlaySound, IPluginInitialize 9 | { 10 | private bool pcg; 11 | private Keys pcgKey; 12 | 13 | public void OnInitialize() 14 | { 15 | if (!Keys.TryParse(IniAPI.ReadIni("PortableCraftingGuide", "ToggleKey", "C", writeIt: true), out pcgKey)) 16 | pcgKey = Keys.C; 17 | 18 | Loader.RegisterHotkey(() => 19 | { 20 | pcg = !pcg; 21 | if (!pcg) 22 | { 23 | Main.InGuideCraftMenu = false; 24 | Main.player[Main.myPlayer].SetTalkNPC(-1); 25 | } 26 | }, pcgKey); 27 | 28 | Keys invKey; 29 | Keys.TryParse(Main.cInv, out invKey); 30 | Loader.RegisterHotkey(() => 31 | { 32 | pcg = false; 33 | }, invKey); 34 | } 35 | 36 | public void OnPreUpdate() 37 | { 38 | Set(); 39 | } 40 | 41 | public void OnUpdate() 42 | { 43 | Set(); 44 | } 45 | 46 | private void Set() 47 | { 48 | if (pcg) 49 | { 50 | Main.npcChatText = ""; 51 | Main.player[Main.myPlayer].chest = -1; 52 | Main.player[Main.myPlayer].SetTalkNPC(22); 53 | Main.InGuideCraftMenu = true; 54 | Main.playerInventory = true; 55 | } 56 | } 57 | 58 | public bool OnPlaySound(int type, int x, int y, int style) 59 | { 60 | return (pcg && type == 11); // skip menu close sound 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /TranscendPlugins/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("TranscendPlugins")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("TranscendPlugins")] 12 | [assembly: AssemblyCopyright("Copyright © 2021")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("dc21be3a-b3c3-476d-a6b3-500e5d7c3340")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /TranscendPlugins/Respawn.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace Ruffi123456789Plugins 6 | { 7 | public class Respawn : MarshalByRefObject, IPluginUpdate 8 | { 9 | private int maxTime; 10 | 11 | private int RespawnTimerInSeconds 12 | { 13 | get 14 | { 15 | if (Main.frameRate == 0) return 0; 16 | return Main.player[Main.myPlayer].respawnTimer / Main.frameRate; 17 | } 18 | set { Main.player[Main.myPlayer].respawnTimer = value * Main.frameRate; } 19 | } 20 | 21 | public Respawn() 22 | { 23 | if (!int.TryParse(IniAPI.ReadIni("Respawn", "Time", "0", writeIt: true), out maxTime)) maxTime = 0; 24 | } 25 | 26 | public void OnUpdate() 27 | { 28 | if (RespawnTimerInSeconds > maxTime) 29 | RespawnTimerInSeconds = maxTime; 30 | } 31 | } 32 | } -------------------------------------------------------------------------------- /TranscendPlugins/Reveal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework.Input; 3 | using PluginLoader; 4 | using Terraria; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class Reveal : MarshalByRefObject, IPlugin 9 | { 10 | private bool revealed = false; 11 | private byte[,] mapLight; 12 | private Keys revealKey; 13 | 14 | public Reveal() 15 | { 16 | if (!Keys.TryParse(IniAPI.ReadIni("Reveal", "RevealKey", "L", writeIt: true), out revealKey)) 17 | revealKey = Keys.L; 18 | 19 | Loader.RegisterHotkey(() => 20 | { 21 | if (Main.mapFullscreen && Main.Map != null) 22 | { 23 | if (!revealed) 24 | { 25 | revealed = true; 26 | 27 | if (mapLight == null) 28 | mapLight = new byte[Main.Map.MaxWidth, Main.Map.MaxHeight]; 29 | 30 | for (int i = 0; i < Main.Map.MaxWidth; i++) 31 | { 32 | for (int j = 0; j < Main.Map.MaxHeight; j++) 33 | { 34 | mapLight[i, j] = Main.Map[i, j].Light; 35 | //if (Main.tile[i, j] == null || (!Main.tile[i, j].active() && Main.tile[i, j].type == 0) || !Main.tileBlockLight[Main.tile[i, j].type]) 36 | Main.Map.Update(i, j, 255); 37 | } 38 | } 39 | } 40 | else 41 | { 42 | revealed = false; 43 | 44 | for (int i = 0; i < Main.Map.MaxWidth; i++) 45 | { 46 | for (int j = 0; j < Main.Map.MaxHeight; j++) 47 | { 48 | Main.Map.Update(i, j, mapLight[i, j]); 49 | } 50 | } 51 | } 52 | 53 | Main.updateMap = true; 54 | Main.refreshMap = true; 55 | } 56 | }, revealKey); 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /TranscendPlugins/SavePosition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using Terraria; 4 | using PluginLoader; 5 | using Terraria.IO; 6 | 7 | namespace TranscendPlugins 8 | { 9 | public class SavePosition : MarshalByRefObject, IPluginPlayerLoad, IPluginPlayerSave, IPluginPlayerSpawn 10 | { 11 | private bool justLoadedIn = false; 12 | 13 | public void OnPlayerSave(PlayerFileData playerFileData, Player player, BinaryWriter binaryWriter) 14 | { 15 | IniAPI.WriteIni("SavePosition", Main.worldID + "," + player.name, player.position.ToString()); 16 | } 17 | 18 | public void OnPlayerLoad(PlayerFileData playerFileData, Player player, BinaryReader binaryReader) 19 | { 20 | justLoadedIn = true; 21 | } 22 | 23 | public void OnPlayerSpawn(Player player) 24 | { 25 | if (player.whoAmI != Main.myPlayer || !justLoadedIn) return; 26 | 27 | var vector = IniAPI.ReadIni("SavePosition", Main.worldID + "," + Main.player[Main.myPlayer].name, null); 28 | if (!string.IsNullOrEmpty(vector)) 29 | { 30 | int startIndX = vector.IndexOf("X:") + 2; 31 | int startIndY = vector.IndexOf("Y:") + 2; 32 | var x = float.Parse(vector.Substring(startIndX, vector.IndexOf(" Y") - startIndX)); 33 | var y = float.Parse(vector.Substring(startIndY, vector.IndexOf("}") - startIndY)); 34 | 35 | player.position.X = x; 36 | player.position.Y = y; 37 | player.fallStart = (int)(player.position.Y / 16f); 38 | player.fallStart2 = player.fallStart; 39 | player.oldPosition = player.position; 40 | Main.screenPosition.X = player.position.X + player.width / 2 - Main.screenWidth / 2; 41 | Main.screenPosition.Y = player.position.Y + player.height / 2 - Main.screenHeight / 2; 42 | } 43 | 44 | justLoadedIn = false; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /TranscendPlugins/Season.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace TranscendPlugins 6 | { 7 | public class Season : MarshalByRefObject, IPluginCheckSeason, IPluginChatCommand 8 | { 9 | private bool xmas, halloween; 10 | 11 | public Season() 12 | { 13 | if (!bool.TryParse(IniAPI.ReadIni("Season", "Xmas", "false", writeIt: true), out xmas)) 14 | xmas = false; 15 | if (!bool.TryParse(IniAPI.ReadIni("Season", "Halloween", "false", writeIt: true), out halloween)) 16 | halloween = false; 17 | } 18 | 19 | public bool OnCheckXmas() 20 | { 21 | Main.xMas = xmas; 22 | return true; 23 | } 24 | 25 | public bool OnCheckHalloween() 26 | { 27 | Main.halloween = halloween; 28 | return true; 29 | } 30 | 31 | public bool OnChatCommand(string command, string[] args) 32 | { 33 | if (command != "season") return false; 34 | 35 | Action usage = () => 36 | { 37 | Main.NewText("Usage:"); 38 | Main.NewText(" /season none"); 39 | Main.NewText(" /season xmas"); 40 | Main.NewText(" /season halloween"); 41 | Main.NewText(" /season help"); 42 | }; 43 | 44 | if (args.Length < 1 || args.Length > 1 || args[0] == "help") 45 | { 46 | usage(); 47 | return true; 48 | } 49 | 50 | switch (args[0]) 51 | { 52 | case "none": 53 | IniAPI.WriteIni("Season", "Xmas", (xmas = false).ToString()); 54 | IniAPI.WriteIni("Season", "Halloween", (halloween = false).ToString()); 55 | Main.NewText("Christmas & Halloween disabled!"); 56 | return true; 57 | case "xmas": 58 | IniAPI.WriteIni("Season", "Xmas", (xmas = !xmas).ToString()); 59 | IniAPI.WriteIni("Season", "Halloween", (halloween = false).ToString()); 60 | Main.NewText("Christmas " + (xmas ? "enabled" : "disabled") + "!"); 61 | return true; 62 | case "halloween": 63 | IniAPI.WriteIni("Season", "Xmas", (xmas = false).ToString()); 64 | IniAPI.WriteIni("Season", "Halloween", (halloween = !halloween).ToString()); 65 | Main.NewText("Halloween " + (halloween ? "enabled" : "disabled") + "!"); 66 | return true; 67 | default: 68 | usage(); 69 | return true; 70 | } 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /TranscendPlugins/Shared/Extensions/ItemTooltipExtensions.cs: -------------------------------------------------------------------------------- 1 | using Terraria.UI; 2 | 3 | namespace TranscendPlugins.Shared.Extensions 4 | { 5 | public static class ItemTooltipExtensions 6 | { 7 | public static void SetValue(this ItemTooltip tooltip, string text) 8 | { 9 | tooltip._text.SetValue(text); 10 | tooltip._validatorKey = 0; 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /TranscendPlugins/Shared/UI/Button.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using Microsoft.Xna.Framework.Graphics; 4 | using Terraria; 5 | using ReLogic.Graphics; 6 | using Terraria.Audio; 7 | using Terraria.GameContent; 8 | 9 | namespace GTRPlugins.UI 10 | { 11 | public class Button 12 | { 13 | public enum ButtonPosX { Left, Right, Center }; 14 | public enum ButtonPosY { Top, Bottom, Center }; 15 | 16 | public string Label; 17 | public ButtonPosX AnchorX = ButtonPosX.Left; 18 | public ButtonPosY AnchorY = ButtonPosY.Top; 19 | public ButtonPosX RelateX = ButtonPosX.Left; 20 | public ButtonPosY RelateY = ButtonPosY.Top; 21 | public Vector2 Position; 22 | public float Scale = 1; 23 | public Color Color = Color.Silver; 24 | public Color HoverColor = Color.White; 25 | public Color StrokeColor = Color.Black; 26 | public int StrokeWidth = 2; 27 | public event EventHandler MouseDown; 28 | private bool _hover = false; 29 | 30 | public Button(string label, Vector2 position, EventHandler mouseDown) 31 | { 32 | Label = label; 33 | Position = position; 34 | MouseDown += mouseDown; 35 | } 36 | 37 | public void Draw() 38 | { 39 | Vector2 size = FontAssets.MouseText.Value.MeasureString(Label) * Scale; 40 | float x = Position.X; 41 | float y = Position.Y; 42 | switch (RelateX) 43 | { 44 | case ButtonPosX.Right: 45 | x = Main.screenWidth - Position.X; 46 | break; 47 | 48 | case ButtonPosX.Center: 49 | x = Main.screenWidth / 2 + Position.X; 50 | break; 51 | } 52 | switch (RelateY) 53 | { 54 | case ButtonPosY.Bottom: 55 | y = Main.screenHeight - Position.Y; 56 | break; 57 | 58 | case ButtonPosY.Center: 59 | y = Main.screenHeight / 2 + Position.Y; 60 | break; 61 | } 62 | float anchorX = 0; 63 | float anchorY = 0; 64 | switch (AnchorX) 65 | { 66 | case ButtonPosX.Right: 67 | anchorX = size.X; 68 | break; 69 | 70 | case ButtonPosX.Center: 71 | anchorX = size.X / 2; 72 | break; 73 | } 74 | switch (AnchorY) 75 | { 76 | case ButtonPosY.Bottom: 77 | anchorY = size.Y; 78 | break; 79 | 80 | case ButtonPosY.Center: 81 | anchorY = size.Y / 2; 82 | break; 83 | } 84 | Vector2 origin = new Vector2(anchorX, anchorY); 85 | for (int i = 0; i < 5; i++) 86 | { 87 | int strokeX = 0; 88 | int strokeY = 0; 89 | Color color = StrokeColor; 90 | switch (i) 91 | { 92 | case 0: 93 | strokeX = -StrokeWidth; 94 | break; 95 | 96 | case 1: 97 | strokeX = StrokeWidth; 98 | break; 99 | 100 | case 2: 101 | strokeY = -StrokeWidth; 102 | break; 103 | 104 | case 3: 105 | strokeY = StrokeWidth; 106 | break; 107 | 108 | case 4: 109 | float pulse = (float)Main.mouseTextColor / 255; 110 | color = _hover ? new Color((int)(HoverColor.R * pulse), (int)(HoverColor.G * pulse), (int)(HoverColor.B * pulse)) : new Color((int)(Color.R * pulse), (int)(Color.G * pulse), (int)(Color.B * pulse)); 111 | break; 112 | } 113 | Main.spriteBatch.DrawString(FontAssets.MouseText.Value, Label, new Vector2((float)(x + strokeX), (float)(y + strokeY)), color, 0f, origin, Scale, SpriteEffects.None, 0f); 114 | } 115 | if ((Main.mouseX > (x - anchorX - 3 * Scale)) && (Main.mouseX < (x + size.X - anchorX + 3 * Scale)) && (Main.mouseY > (y - anchorY) - 2 * Scale) && (Main.mouseY < (y + size.Y - anchorY - 7 * Scale))) 116 | { 117 | if (!_hover) 118 | { 119 | SoundEngine.PlaySound(12, -1, -1, 1); 120 | } 121 | _hover = true; 122 | Main.player[Main.myPlayer].mouseInterface = true; 123 | if (Main.mouseLeftRelease && Main.mouseLeft) 124 | { 125 | SoundEngine.PlaySound(12, -1, -1, 1); 126 | Main.mouseLeftRelease = false; 127 | if (MouseDown != null) 128 | { 129 | MouseDown(this, EventArgs.Empty); 130 | } 131 | } 132 | } 133 | else 134 | { 135 | _hover = false; 136 | } 137 | } 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /TranscendPlugins/ShopSellsScalingPotions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Terraria.ID; 5 | 6 | namespace EraselsPlugins 7 | { 8 | public class ShopSellsScalingPotions : MarshalByRefObject, IPluginChestSetupShop 9 | { 10 | public void OnChestSetupShop(Chest chest, int type) 11 | { 12 | if (type == 1) 13 | { 14 | var player = Main.player[Main.myPlayer]; 15 | 16 | if (player.statLifeMax >= 200 && player.statLifeMax <= 299) 17 | { 18 | chest.item[7].SetDefaults(ItemID.HealingPotion); 19 | } 20 | else if (player.statLifeMax >= 300 && player.statLifeMax <= 499) 21 | { 22 | chest.item[7].SetDefaults(ItemID.GreaterHealingPotion); 23 | } 24 | else if (player.statLifeMax >= 500) 25 | { 26 | chest.item[7].SetDefaults(ItemID.SuperHealingPotion); 27 | } 28 | 29 | if (player.statManaMax >= 160 && player.statManaMax <= 200) 30 | { 31 | chest.item[8].SetDefaults(ItemID.ManaPotion); 32 | } 33 | else if (player.statManaMax >= 201 && player.statManaMax <= 399) 34 | { 35 | chest.item[8].SetDefaults(ItemID.GreaterManaPotion); 36 | } 37 | else if (player.statManaMax >= 400) 38 | { 39 | chest.item[8].SetDefaults(ItemID.SuperManaPotion); 40 | } 41 | } 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /TranscendPlugins/Teleport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework; 3 | using Microsoft.Xna.Framework.Input; 4 | using PluginLoader; 5 | using Terraria; 6 | using Terraria.ID; 7 | 8 | namespace TranscendPlugins 9 | { 10 | public class Teleport : MarshalByRefObject, IPluginInitialize, IPluginUpdate, IPluginChatCommand 11 | { 12 | private int planteraBulbTileLookup, plant1Lookup, plant2Lookup, plant3Lookup, plant4Lookup; 13 | private Keys teleportKey; 14 | 15 | public Teleport() 16 | { 17 | if (!Keys.TryParse(IniAPI.ReadIni("Teleport", "TeleportKey", "F", writeIt: true), out teleportKey)) 18 | teleportKey = Keys.F; 19 | 20 | Loader.RegisterHotkey(() => 21 | { 22 | var player = Main.player[Main.myPlayer]; 23 | var vector = new Vector2(Main.mouseX + Main.screenPosition.X, Main.mouseY + Main.screenPosition.Y); 24 | player.Teleport(vector, 1, 0); 25 | player.velocity = Vector2.Zero; 26 | NetMessage.SendData(65, -1, -1, null, 0, player.whoAmI, vector.X, vector.Y, 1, 0, 0); 27 | }, teleportKey); 28 | } 29 | 30 | public void OnInitialize() 31 | { 32 | planteraBulbTileLookup = Terraria.Map.MapHelper.TileToLookup(TileID.PlanteraBulb, 0); 33 | plant1Lookup = Terraria.Map.MapHelper.TileToLookup(TileID.DyePlants, 8); 34 | plant2Lookup = Terraria.Map.MapHelper.TileToLookup(TileID.DyePlants, 9); 35 | plant3Lookup = Terraria.Map.MapHelper.TileToLookup(TileID.DyePlants, 10); 36 | plant4Lookup = Terraria.Map.MapHelper.TileToLookup(TileID.DyePlants, 11); 37 | } 38 | 39 | public void OnUpdate() 40 | { 41 | if (Main.mapFullscreen && Main.mouseRight && Main.keyState.IsKeyUp(Keys.LeftControl)) 42 | { 43 | int num = Main.maxTilesX * 16; 44 | int num2 = Main.maxTilesY * 16; 45 | Vector2 vector = new Vector2((float)Main.mouseX, (float)Main.mouseY); 46 | vector.X -= (float)(Main.screenWidth / 2); 47 | vector.Y -= (float)(Main.screenHeight / 2); 48 | Vector2 mapFullscreenPos = Main.mapFullscreenPos; 49 | Vector2 vector2 = mapFullscreenPos; 50 | vector /= 16f; 51 | vector *= 16f / Main.mapFullscreenScale; 52 | vector2 += vector; 53 | vector2 *= 16f; 54 | Player player = Main.player[Main.myPlayer]; 55 | vector2.Y -= (float)player.height; 56 | if (vector2.X < 0f) 57 | { 58 | vector2.X = 0f; 59 | } 60 | else if (vector2.X + (float)player.width > (float)num) 61 | { 62 | vector2.X = (float)(num - player.width); 63 | } 64 | if (vector2.Y < 0f) 65 | { 66 | vector2.Y = 0f; 67 | } 68 | else if (vector2.Y + (float)player.height > (float)num2) 69 | { 70 | vector2.Y = (float)(num2 - player.height); 71 | } 72 | player.position = vector2; 73 | player.velocity = Vector2.Zero; 74 | player.fallStart = (int)(player.position.Y / 16f); 75 | NetMessage.SendData(13, -1, -1, null, Main.myPlayer, 0f, 0f, 0f, 0, 0, 0); 76 | } 77 | } 78 | 79 | public bool OnChatCommand(string command, string[] args) 80 | { 81 | if (command != "teleport") return false; 82 | 83 | Action usage = () => 84 | { 85 | Main.NewText("Usage:"); 86 | Main.NewText(" /teleport plantera"); 87 | Main.NewText(" /teleport strangeplant"); 88 | }; 89 | 90 | if (args.Length < 1 || args.Length > 1 || args[0] == "help") 91 | { 92 | usage(); 93 | return true; 94 | } 95 | 96 | switch (args[0]) 97 | { 98 | case "plantera": 99 | for (int i = 0; i < Main.Map.MaxWidth; i++) 100 | { 101 | for (int j = 0; j < Main.Map.MaxHeight; j++) 102 | { 103 | if (Main.Map[i, j].Type == planteraBulbTileLookup) 104 | { 105 | Player player = Main.player[Main.myPlayer]; 106 | player.position = new Vector2(i * 16, j * 16); 107 | player.velocity = Vector2.Zero; 108 | player.fallStart = (int)(player.position.Y / 16f); 109 | NetMessage.SendData(13, -1, -1, null, Main.myPlayer, 0f, 0f, 0f, 0, 0, 0); 110 | return true; 111 | } 112 | } 113 | } 114 | return true; 115 | case "strangeplant": 116 | for (int i = 0; i < Main.Map.MaxWidth; i++) 117 | { 118 | for (int j = 0; j < Main.Map.MaxHeight; j++) 119 | { 120 | var type = Main.Map[i, j].Type; 121 | if (type == plant1Lookup || 122 | type == plant2Lookup || 123 | type == plant3Lookup || 124 | type == plant4Lookup) 125 | { 126 | Player player = Main.player[Main.myPlayer]; 127 | player.position = new Vector2(i * 16, j * 16); 128 | player.velocity = Vector2.Zero; 129 | player.fallStart = (int)(player.position.Y / 16f); 130 | NetMessage.SendData(13, -1, -1, null, Main.myPlayer, 0f, 0f, 0f, 0, 0, 0); 131 | return true; 132 | } 133 | } 134 | } 135 | return true; 136 | default: 137 | usage(); 138 | return true; 139 | } 140 | } 141 | } 142 | } 143 | -------------------------------------------------------------------------------- /TranscendPlugins/Time.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework.Input; 3 | using PluginLoader; 4 | using Terraria; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class Time : MarshalByRefObject, IPluginChatCommand 9 | { 10 | private Keys nightKey, dayKey; 11 | public Time() 12 | { 13 | if (!Keys.TryParse(IniAPI.ReadIni("Time", "Night", "OemComma", writeIt: true), out nightKey)) 14 | nightKey = Keys.OemComma; 15 | if (!Keys.TryParse(IniAPI.ReadIni("Time", "Day", "OemPeriod", writeIt: true), out dayKey)) 16 | dayKey = Keys.OemPeriod; 17 | 18 | Loader.RegisterHotkey(() => ChangeTime(Loader.IsControlModifierKeyDown() ? "dusk" : "midnight"), nightKey, ignoreModifierKeys: true); 19 | Loader.RegisterHotkey(() => ChangeTime(Loader.IsControlModifierKeyDown() ? "dawn" : "noon"), dayKey, ignoreModifierKeys: true); 20 | } 21 | 22 | private void ChangeTime(string time) 23 | { 24 | switch (time.ToLower()) 25 | { 26 | case "dusk": 27 | Main.dayTime = true; 28 | Main.time = 54001.0; // 7:30 PM (dusk), triggers all night time events 29 | Main.NewText("Time changed to dusk."); 30 | break; 31 | case "midnight": 32 | Main.dayTime = false; 33 | Main.time = 16200.0; // 12:00 AM (midnight) 34 | Main.NewText("Time changed to midnight."); 35 | break; 36 | case "dawn": 37 | Main.dayTime = false; 38 | Main.time = 32401.0; // 4:30 AM (dawn), triggers all day time events 39 | Main.NewText("Time changed to dawn."); 40 | break; 41 | case "noon": 42 | Main.dayTime = true; 43 | Main.time = 27000.0; // 12:00 PM (noon) 44 | Main.NewText("Time changed to noon."); 45 | break; 46 | } 47 | } 48 | 49 | public bool OnChatCommand(string command, string[] args) 50 | { 51 | if (command != "time") return false; 52 | 53 | if (args.Length < 1 || args.Length > 1 || args[0] == "help") 54 | { 55 | Main.NewText("Usage:"); 56 | Main.NewText(" /time dawn"); 57 | Main.NewText(" /time noon"); 58 | Main.NewText(" /time midnight"); 59 | Main.NewText(" /time dusk"); 60 | Main.NewText(" /time help"); 61 | return true; 62 | } 63 | 64 | ChangeTime(args[0]); 65 | return true; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /TranscendPlugins/TranscendPlugins.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {55C89F3A-2F84-4513-8D4C-905B8513C91C} 8 | Library 9 | Properties 10 | TranscendPlugins 11 | TranscendPlugins 12 | v4.5.2 13 | 512 14 | SAK 15 | SAK 16 | SAK 17 | SAK 18 | 19 | 20 | 21 | true 22 | full 23 | false 24 | bin\Debug\ 25 | DEBUG;TRACE 26 | prompt 27 | 4 28 | 29 | 30 | pdbonly 31 | true 32 | bin\Release\ 33 | TRACE 34 | prompt 35 | 4 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | ..\ReferenceAssemblies\Terraria.exe 51 | 52 | 53 | ..\ReferenceAssemblies\Terraria.Libraries.ReLogic.ReLogic.dll 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | {a2185dcd-c7e8-4578-881c-b797d901a263} 98 | PluginLoader.XNA 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 7.0.1 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 121 | -------------------------------------------------------------------------------- /TranscendPlugins/TranscendPlugins.csproj.DotSettings: -------------------------------------------------------------------------------- 1 |  2 | CSharp50 -------------------------------------------------------------------------------- /TranscendPlugins/Turrets.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | 5 | namespace TranscendPlugins 6 | { 7 | public class Turrets : MarshalByRefObject, IPluginPlayerUpdateArmorSets 8 | { 9 | private int turrets; 10 | 11 | public Turrets() 12 | { 13 | if (!int.TryParse(IniAPI.ReadIni("Turrets", "Max", "100", writeIt: true), out turrets)) 14 | turrets = 100; 15 | } 16 | public void OnPlayerUpdateArmorSets(Player player) 17 | { 18 | if (player.whoAmI == Main.myPlayer) 19 | player.maxTurrets = turrets; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /TranscendPlugins/UseTime.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using PluginLoader; 3 | using Terraria; 4 | using Terraria.ID; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class UseTime : MarshalByRefObject, IPluginItemSetDefaults, IPluginPlayerUpdateBuffs, IPluginPlayerUpdateArmorSets, IPluginChatCommand 9 | { 10 | private string confPath = Environment.CurrentDirectory + "\\ItemConfig.ini"; 11 | private int initialTileRangeX, initialTileRangeY, initialDefaultItemGrabRange; 12 | private bool maxTileSpeed, maxWallSpeed, maxPickSpeed, maxReachRange, maxItemPickupRange; 13 | private bool resetUseTime = false; 14 | 15 | public UseTime() 16 | { 17 | initialTileRangeX = Player.tileRangeX; 18 | initialTileRangeY = Player.tileRangeY; 19 | initialDefaultItemGrabRange = Player.defaultItemGrabRange; 20 | 21 | maxPickSpeed = bool.Parse(IniAPI.ReadIni("UseTime", "MaxPickSpeed", "true", writeIt: true)); // Pick / Hammer / Axe 22 | maxTileSpeed = bool.Parse(IniAPI.ReadIni("UseTime", "MaxTileSpeed", "true", writeIt: true)); // Placing blocks / wire 23 | maxWallSpeed = bool.Parse(IniAPI.ReadIni("UseTime", "MaxWallSpeed", "true", writeIt: true)); // Placing wall 24 | maxReachRange = bool.Parse(IniAPI.ReadIni("UseTime", "MaxReachRange", "true", writeIt: true)); // Block reach 25 | maxItemPickupRange = bool.Parse(IniAPI.ReadIni("UseTime", "MaxItemPickupRange", "true", writeIt: true)); // Item pickup range 26 | } 27 | 28 | public void OnItemSetDefaults(Item item) 29 | { 30 | if (resetUseTime) return; 31 | 32 | if (maxPickSpeed && (item.axe > 0 || 33 | item.pick > 0 || 34 | item.hammer > 0)) 35 | item.useTime = 0; 36 | 37 | if (maxTileSpeed && 38 | (item.createTile >= 0 || 39 | item.type == ItemID.Wrench || 40 | item.type == ItemID.BlueWrench || 41 | item.type == ItemID.GreenWrench || 42 | item.type == ItemID.WireCutter || 43 | item.type == ItemID.Actuator)) 44 | item.useTime = 1; 45 | 46 | if (maxWallSpeed && item.createWall > 0) 47 | item.useTime = 1; 48 | } 49 | 50 | public void OnPlayerUpdateBuffs(Player player) 51 | { 52 | if (player.whoAmI == Main.myPlayer) 53 | { 54 | if (maxReachRange) 55 | { 56 | Player.tileRangeX = 100; 57 | Player.tileRangeY = 100; 58 | } 59 | else 60 | { 61 | Player.tileRangeX = initialTileRangeX; 62 | Player.tileRangeY = initialTileRangeY; 63 | } 64 | 65 | Player.defaultItemGrabRange = maxItemPickupRange ? 700 : initialDefaultItemGrabRange; 66 | } 67 | } 68 | 69 | public void OnPlayerUpdateArmorSets(Player player) 70 | { 71 | if (player.whoAmI == Main.myPlayer) 72 | { 73 | // Disables effects of Builder Buff and the following items: Architect Gizmo Pack, Brick Layer, Portable Cement Mixer 74 | player.tileSpeed = 1; 75 | player.wallSpeed = 1; 76 | } 77 | } 78 | 79 | public bool OnChatCommand(string command, string[] args) 80 | { 81 | if (command != "usetime" && command != "autoreuse" && command != "range") return false; 82 | 83 | if (!(command == "usetime" && args.Length <= 1) && 84 | !(command == "autoreuse" && args.Length == 0) && 85 | !(command == "range" && args.Length == 0)) 86 | { 87 | Main.NewText("Usage:"); 88 | Main.NewText(" /autoreuse"); 89 | Main.NewText(" /usetime [num]"); 90 | Main.NewText(" /range"); 91 | Main.NewText("Example:"); 92 | Main.NewText(" /usetime 0"); 93 | return true; 94 | } 95 | 96 | // get item on cursor, if nothing there, get hotbar item 97 | var item = Main.mouseItem; 98 | if (item.type == 0) 99 | { 100 | var player = Main.player[Main.myPlayer]; 101 | item = player.inventory[player.selectedItem]; 102 | if (item.type == 0) 103 | { 104 | Main.NewText("No item selected."); 105 | return true; 106 | } 107 | } 108 | 109 | switch (command) 110 | { 111 | case "usetime": 112 | if (args.Length == 1) 113 | { 114 | int num; 115 | if (!int.TryParse(args[0], out num)) 116 | { 117 | Main.NewText("Invalid num."); 118 | break; 119 | } 120 | 121 | item.useTime = num; 122 | 123 | IniAPI.WriteIni("item" + item.type, "useTime", num.ToString(), confPath); 124 | } 125 | else 126 | { 127 | IniAPI.WriteIni("item" + item.type, "useTime", null, confPath); 128 | 129 | // Clone item (preserve stack/favorited/prefix/auto-reuse) 130 | var stack = item.stack; 131 | bool favorited = item.favorited; 132 | var prefix = item.prefix; 133 | var autoreuse = item.autoReuse; 134 | resetUseTime = true; 135 | item.netDefaults(item.netID); 136 | resetUseTime = false; 137 | item.Prefix(prefix); 138 | item.autoReuse = autoreuse; 139 | item.stack = stack; 140 | item.favorited = favorited; 141 | } 142 | 143 | Main.NewText("UseTime = " + item.useTime); 144 | break; 145 | case "autoreuse": 146 | item.autoReuse = !item.autoReuse; 147 | Main.NewText("AutoReuse = " + item.autoReuse); 148 | 149 | IniAPI.WriteIni("item" + item.type, "autoReuse", item.autoReuse.ToString(), confPath); 150 | break; 151 | case "range": 152 | IniAPI.WriteIni("UseTime", "MaxReachRange", (maxReachRange = !maxReachRange).ToString()); 153 | IniAPI.WriteIni("UseTime", "MaxItemPickupRange", (maxItemPickupRange = maxReachRange /* this is not a typo */).ToString()); 154 | Main.NewText("Block reach and item pickup range is " + (maxReachRange ? "enhanced" : "back to normal") + "."); 155 | break; 156 | } 157 | return true; 158 | } 159 | } 160 | } 161 | -------------------------------------------------------------------------------- /TranscendPlugins/Weather.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Microsoft.Xna.Framework.Input; 3 | using PluginLoader; 4 | using Terraria; 5 | 6 | namespace TranscendPlugins 7 | { 8 | public class Weather : MarshalByRefObject, IPlugin 9 | { 10 | private Keys toggleKey; 11 | private Keys toggleSlimeKey; 12 | 13 | public Weather() 14 | { 15 | if (!Keys.TryParse(IniAPI.ReadIni("Weather", "ToggleRain", "OemSemicolon", writeIt: true), out toggleKey)) 16 | toggleKey = Keys.OemSemicolon; 17 | 18 | if (!Keys.TryParse(IniAPI.ReadIni("Weather", "ToggleSlimeRain", "OemQuotes", writeIt: true), out toggleSlimeKey)) 19 | toggleSlimeKey = Keys.OemQuotes; 20 | 21 | Loader.RegisterHotkey(() => 22 | { 23 | if (Main.raining) 24 | { 25 | Main.StopRain(); 26 | Main.NewText("Rain stopped."); 27 | } 28 | else 29 | { 30 | Main.StartRain(); 31 | Main.NewText("Rain started."); 32 | } 33 | }, toggleKey); 34 | 35 | Loader.RegisterHotkey(() => 36 | { 37 | if (Main.slimeRain) 38 | { 39 | Main.StopSlimeRain(); 40 | Main.NewText("Slime rain stopped."); 41 | } 42 | else 43 | { 44 | Main.StartSlimeRain(); 45 | Main.NewText("Slime rain started."); 46 | } 47 | }, toggleSlimeKey); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /TranscendPlugins/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /changelog.tmp.txt: -------------------------------------------------------------------------------- 1 | v1.3.0.3: Fixed "Remove Mana Costs" feature and "Full Bright" plugin. 2 | v1.3.0.2: Updated for Terraria v1.4.4.9. Converted Fixed Prefixes to plugin. 3 | v1.3.0.1: More 1.4 compatibility updates. 4 | v1.3.0.0: Updated for Terraria v1.4.2.3. 5 | v1.2.0.41: Startup fix and fixed FNA. 6 | v1.2.0.40: Fixed auto-updater to use TLS 1.2 with Github. 7 | v1.2.0.39: Added support for tModLoader 64-bit. 8 | v1.2.0.38: Updated to work with tModLoader v0.11.3.0. 9 | v1.2.0.37: Fixed compatibility. 10 | v1.2.0.36: Updated to work with tModLoader v0.10.0.1. 11 | v1.2.0.35: Updated for Terraria v1.3.5.3. 12 | v1.2.0.34: Updated for Terraria v1.3.5.1. 13 | v1.2.0.33: Added Large Address Aware patch. 14 | v1.2.0.32: Improved plugin loader. 15 | v1.2.0.31: Added Functional Social Slots patch. 16 | v1.2.0.30: Fixed visual bug. 17 | v1.2.0.29: Updated to work with tModLoader v0.9.0.0. 18 | v1.2.0.28: Fixed item prefix patch for real! 19 | v1.2.0.27: Fixed item prefix patch. 20 | Added Turrets plugin. 21 | v1.2.0.26: Updated for Terraria v1.3.4.3. 22 | v1.2.0.25: Added InventoryEnhancements to distribution. 23 | v1.2.0.24: Added code to bypass github caching for updates. 24 | v1.2.0.23: Updated for Terraria v1.3.4.1. 25 | v1.2.0.22: Updated for Terraria v1.3.3. 26 | v1.2.0.21: Updated for Terraria v1.3.1. 27 | v1.2.0.20: Changed admin checks to warnings instead of halting. 28 | v1.2.0.19: Attempt to fix administrator warning. 29 | v1.2.0.18: Fixed bug with checking when files are locked. 30 | v1.2.0.17: Added many different warnings about running as admin, files being in use, and files missing. 31 | Added Terraria.exe.config to help people who don't have .NET Framework 4.5 installed. 32 | Fixed infamous tile/wall issue when using UseTime plugin with Builder potion or items like Architect Gizmo Pack. 33 | Fixed ItemConfig & UseTime plugin to work better together. 34 | v1.2.0.16: Added autoupdate. 35 | Fixed using hotkeys while game is paused (PortableCraftingGuide, ChestSearch, etc). 36 | Fixed Season plugin, works on load now. 37 | Added minisharkron to HomingBullets plugin exclusions. 38 | v1.2.0.15: Added SavePosition plugin. 39 | Added ItemConfig plugin. 40 | Updated /usetime and /autoreuse commands to persist changes if you have ItemConfig plugin installed. 41 | v1.2.0.14: Added '/prefix keep' command to ItemPrefix plugin. 42 | Fixed '/usetime' command to preserve autoreuse/favorite status when resetting item. 43 | Fixed modifier hotkey issue. 44 | Fixed PortableCraftingGuide plugin to properly read inventory key. 45 | Fixed EnhancedCellPhone plugin with better right-click interception. 46 | v1.2.0.13: Added Bind plugin. 47 | Added 2nd proc of Luminite Arrows to HomingBullets plugin exclusions. 48 | Fixed PortableCraftingGuide to use inventory key set in Terraria config. 49 | Fixed /usetime command to preserve item prefix when reseting usetime. 50 | v1.2.0.12: Added filter for persistent buffs on UI. 51 | Sorted persistent buffs alphabetically. 52 | Added sync feature to Copy Plugins window, to help delete plugins you deselected. 53 | Added ItemPrefix plugin. 54 | Added customizable timer to Respawn plugin. 55 | Moved Demi-God mod to the GodMode plugin. 56 | Renamed EnhancedPDA plugin to EnhancedCellPhone. 57 | Added meteors to HomingBullets plugin exclusions. 58 | v1.2.0.11: Added command '/usetime' to reset to original value. 59 | Fixed hotkey-support for using just CTRL / ALT / SHIFT as a hotkey. 60 | v1.2.0.10: Added BuffImmunity plugin. 61 | Added Flashlight plugin. 62 | Added PortableCraftingGuide plugin. 63 | Added EnhancedPDA plugin. 64 | Added Electrosphere Launcher to HomingBullets plugin exclusions. 65 | Updated DropRates plugin with Rare-only drop rate toggle. 66 | Added plugin support for IPluginPlaySound. 67 | v1.2.0.9: Fixed Newtonsoft.Json.dll extraction issue with Terraria 1.3.0.7. 68 | v1.2.0.8: Added DropRates plugin. 69 | v1.2.0.7: Added Season plugin. 70 | Added ShopSellsScalingPotions plugin. 71 | Added InfiniteSundial plugin. 72 | Added ChestSearch plugin. 73 | Added LoadoutSwap plugin. 74 | Added administrator privileges warning when patching. 75 | Added new 'spawn at cursor' command for NPC plugin. 76 | Added /range command to UseTime plugin. 77 | Added /plugins command to loader. 78 | Added new hotkey-command bindings. Check plugin notes. 79 | Added new Shared folder for shared plugin source code. 80 | Added plugin support for IPluginInitialize, IPluginDrawInventory, IPluginUpdateTime. 81 | Fixed bug with plugin support for Newtonsoft.Json.dll. 82 | v1.2.0.6: Added plugin support for IPluginNPCLoot. 83 | Fixed NPC plugin to work when spawning negative IDs (special slimes). 84 | v1.2.0.5: Added plugin support for IPluginPlayerQuickBuff. 85 | v1.2.0.4: Changed blocks/walls/wires to use usetime 1 instead of 0. 86 | Added plugin support for Newtonsoft.Json.dll. 87 | v1.2.0.3: Added plugin support for IPluginChestSetupShop. 88 | v1.2.0.2: Moved Full Bright to a plugin with toggleable key. 89 | Added '/teleport plantera' and '/teleport strangeplant' commands to teleport plugin. Removed teleport plantera hotkey. 90 | Changed Teleport plugin method. 91 | Changed UseTime plugin to use 0 instead of 1 for picks/drills/axes/blocks/walls/wires. 92 | Added Builder buff / UseTime plugin warning. 93 | Reverted Reveal plugin changes.. Causing memory issues. 94 | Added ability to load plugins from subfolders with group compilation (allows for larger plugins). 95 | Added plugin support for IPluginPlayerGetItem. 96 | v1.2.0.1: Added SkipSplash plugin. 97 | Fixed UseTime (autoreuse) command bug. 98 | Fixed Respawn plugin. 99 | Fixed GodMode plugin to use statLifeMax2 instead of statLifeMax. 100 | Fixed Reveal plugin to use UpdateLighting instead of Update method. 101 | Changed Teleport plugin to use friendly teleport method. 102 | v1.2.0.0: Updated for Terraria 1.3.0.5. 103 | Added IPluginChatCommand. 104 | Added command functionality to ItemSpawner, NPC, Time, and UseTime plugins. 105 | Various bug fixes. 106 | v1.1.0.12: Changed UseTime to use [UseTime] category in Plugins.ini. 107 | Added Actuators to UseTime plugin. 108 | Added many warnings to patcher. 109 | Added dialog to copy plugins over to Terraria folder after done patching. 110 | v1.1.0.11: Added GodMode plugin. 111 | Added InfiniteFlight. 112 | Moved Coin Gun to a plugin. 113 | Moved Max Tile Speed, Max Wall Speed, Max Pick Speed, Max Reach Range and Max Item Pickup Range to UseTime plugin. 114 | Updated UseTime plugin to work for Wrench, Green Wrench, Blue Wrench, and Wire Cutter. 115 | Fixed HomingBullets plugin for when you have Pygmy or Twin minions. 116 | Fixed NPC plugin, specifically spawn rate modification. 117 | Fixed BuffRates plugin, specifically rage. 118 | Various performance improvements. 119 | v1.1.0.10: Fixed another plugin hotkey bug. 120 | v1.1.0.9: Added thread link & update warning on main UI of patcher. 121 | Fixed plugin hotkey bug. 122 | v1.1.0.8: Fixed ItemSpawner to spawn items on yourself instead of player 1. 123 | Fixed MoreAccessorySlots plugin. 124 | Fixed Weather plugin. 125 | Moved spawn rate/limit to NPC plugin and allows dynamic adjustment of the values. 126 | Added endurance buff and ice barrier (from Frozen Turtle Shell) to BuffRates plugin. 127 | Added Minions plugin. 128 | Added Respawn plugin. 129 | v1.1.0.7: Converted Item Replication to a plugin. 130 | Updated IPluginPlayerUpdate signature. 131 | Added IPluginUpdate. 132 | v1.1.0.6: Added MoreAccessorySlots plugin. 133 | Added ItemSpawner plugin. 134 | Updated plugin hotkeys to only work when chat/chest edit/sign edit windows are closed. 135 | Updated Events plugin Moon Lord to use separate hotkey instead of CTRL modifier so that ItemSpawner doesn't conflict. 136 | Fixed bugs in HomingBullets plugin. 137 | Fixed typo in BuffRates plugin. 138 | Fixed permanent buffs mod to only give the user the buffs instead of all players. 139 | v1.1.0.5: Added BuffRates plugin (archery, magic, wrath, rage). 140 | Converted 'Infinite Healing' into a plugin called InfiniteLifeSteal. 141 | Added teleport to cursor functionality to Teleport plugin. 142 | v1.1.0.4: Added Weather plugin. 143 | Added Events plugin. 144 | Added HomingBullets plugin. 145 | Updated plugin-functionality with better hotkey support. 146 | v1.1.0.3: Fixed bug with angler quest limit mod. 147 | v1.1.0.2: Added NPC plugin. 148 | v1.1.0.1: Fix for languages that use commas instead of periods in their decimal format. 149 | v1.1.0.0: Added config save/load functionality (all UI changes are persistent now). 150 | Added plugin functionality. 151 | Added Reveal plugin. 152 | Added Teleport plugin. 153 | Added UseTime plugin. 154 | Added Time plugin. 155 | v1.0.4.2: Fixed 'Remove Mana Costs' for channeled items. 156 | v1.0.4.1: Added 'Full Bright'. 157 | Updated 'Inventory Item Replication' by Ryan. 158 | Changed UI to be more horizontal and is now resizable. 159 | Fixed mutual exclusivity of wings/cloud jump checkboxes. 160 | v1.0.4.0: Updated to work with Terraria v1.3.0.2. 161 | Removed tUnlocker since dev items are allowed now. 162 | Added 'Max Tile Placement Speed'. 163 | Added 'Max Wall Placement Speed'. 164 | Added 'Max Pick Speed'. 165 | Added 'Max Reach Range'. 166 | Added 'Max Item Pickup Range'. 167 | Added 'Max Crafting Range'. 168 | v1.0.3.6: Changed 'Infinite Split Stacks' to 'Inventory Item Replication (R + Right-click)'. 169 | v1.0.3.5: Added 'Infinite Cloud Jumps', 'Remove 2 hearts/second healing limit', 'Vampiric Knives Healing Rate', and 'Spectre Armor Healing Rate'. 170 | v1.0.3.4: Added accessory preference for 'Always Roll Best Prefixes'. 171 | v1.0.3.3: Added 'Always Roll Best Prefixes'. 172 | v1.0.3.2: Added 'Infinite Ammo' by Ryan S. 173 | v1.0.3.1: Added 'Infinite Split Stacks' by Ryan S. 174 | v1.0.3.0: Added 'Remove Drowning', 'Demigod Mode', 'One Hit Kill'. 175 | Set defaults to my personal preferences. 176 | v1.0.2.2: Disabled 'Thorns Buff' since it was causing issues. 177 | Increased the 'Persistent Buffs' limit to 22 since that is the actual limit in Terraria now. 178 | Added 'Remove Angler Quest Limit Per Day'. 179 | Fixed some other small issues as well. 180 | v1.0.2.1: Updated to match the 1.2.4 buffs. 181 | v1.0.2.0: Updated to work with Terraria v1.2.4. 182 | Added 'Display Time', 'Remove Potion Sickness Debuff', 'Remove Mana Costs', 'Permanent Red Wings', 'Coin Gun Modifications'. 183 | v1.0.1.3: Updated to work with Terraria v1.2.3.1 and its new buffs (Ammo Box, etc). 184 | Removed InventoryManager since you can use the Gameiki Mod to add this functionality. 185 | v1.0.1.2: Updated InventoryManager to 2.0.4 186 | Added 'Magic Power Buff' damage rate modification. 187 | Added 'Thorns Buff' damage rate modification. 188 | v1.0.1.1: Small fix to detect newer InventoryManager.dll and copy it over for the user. 189 | v1.0.1.0: Updated 'Spawn rate for Demon Voodoo' to work with 1.2.1.2. 190 | Updated InventoryManager to 2.0.2. 191 | Added 'Remove Rod of Discord Buff'. 192 | v1.0.0.0: Initial release. -------------------------------------------------------------------------------- /changelog.txt: -------------------------------------------------------------------------------- 1 | v1.3.0.4: Added additional buffs and added "Add All" buffs button, click once to add all "good" buffs, click again to add all buffs. 2 | v1.3.0.3: Fixed "Remove Mana Costs" feature and "Full Bright" plugin. 3 | v1.3.0.2: Updated for Terraria v1.4.4.9. Converted Fixed Prefixes to plugin. 4 | v1.3.0.1: More 1.4 compatibility updates. 5 | v1.3.0.0: Updated for Terraria v1.4.2.3. 6 | v1.2.0.41: Startup fix and fixed FNA. 7 | v1.2.0.40: Fixed auto-updater to use TLS 1.2 with Github. 8 | v1.2.0.39: Added support for tModLoader 64-bit. 9 | v1.2.0.38: Updated to work with tModLoader v0.11.3.0. 10 | v1.2.0.37: Fixed compatibility. 11 | v1.2.0.36: Updated to work with tModLoader v0.10.0.1. 12 | v1.2.0.35: Updated for Terraria v1.3.5.3. 13 | v1.2.0.34: Updated for Terraria v1.3.5.1. 14 | v1.2.0.33: Added Large Address Aware patch. 15 | v1.2.0.32: Improved plugin loader. 16 | v1.2.0.31: Added Functional Social Slots patch. 17 | v1.2.0.30: Fixed visual bug. 18 | v1.2.0.29: Updated to work with tModLoader v0.9.0.0. 19 | v1.2.0.28: Fixed item prefix patch for real! 20 | v1.2.0.27: Fixed item prefix patch. 21 | Added Turrets plugin. 22 | v1.2.0.26: Updated for Terraria v1.3.4.3. 23 | v1.2.0.25: Added InventoryEnhancements to distribution. 24 | v1.2.0.24: Added code to bypass github caching for updates. 25 | v1.2.0.23: Updated for Terraria v1.3.4.1. 26 | v1.2.0.22: Updated for Terraria v1.3.3. 27 | v1.2.0.21: Updated for Terraria v1.3.1. 28 | v1.2.0.20: Changed admin checks to warnings instead of halting. 29 | v1.2.0.19: Attempt to fix administrator warning. 30 | v1.2.0.18: Fixed bug with checking when files are locked. 31 | v1.2.0.17: Added many different warnings about running as admin, files being in use, and files missing. 32 | Added Terraria.exe.config to help people who don't have .NET Framework 4.5 installed. 33 | Fixed infamous tile/wall issue when using UseTime plugin with Builder potion or items like Architect Gizmo Pack. 34 | Fixed ItemConfig & UseTime plugin to work better together. 35 | v1.2.0.16: Added autoupdate. 36 | Fixed using hotkeys while game is paused (PortableCraftingGuide, ChestSearch, etc). 37 | Fixed Season plugin, works on load now. 38 | Added minisharkron to HomingBullets plugin exclusions. 39 | v1.2.0.15: Added SavePosition plugin. 40 | Added ItemConfig plugin. 41 | Updated /usetime and /autoreuse commands to persist changes if you have ItemConfig plugin installed. 42 | v1.2.0.14: Added '/prefix keep' command to ItemPrefix plugin. 43 | Fixed '/usetime' command to preserve autoreuse/favorite status when resetting item. 44 | Fixed modifier hotkey issue. 45 | Fixed PortableCraftingGuide plugin to properly read inventory key. 46 | Fixed EnhancedCellPhone plugin with better right-click interception. 47 | v1.2.0.13: Added Bind plugin. 48 | Added 2nd proc of Luminite Arrows to HomingBullets plugin exclusions. 49 | Fixed PortableCraftingGuide to use inventory key set in Terraria config. 50 | Fixed /usetime command to preserve item prefix when reseting usetime. 51 | v1.2.0.12: Added filter for persistent buffs on UI. 52 | Sorted persistent buffs alphabetically. 53 | Added sync feature to Copy Plugins window, to help delete plugins you deselected. 54 | Added ItemPrefix plugin. 55 | Added customizable timer to Respawn plugin. 56 | Moved Demi-God mod to the GodMode plugin. 57 | Renamed EnhancedPDA plugin to EnhancedCellPhone. 58 | Added meteors to HomingBullets plugin exclusions. 59 | v1.2.0.11: Added command '/usetime' to reset to original value. 60 | Fixed hotkey-support for using just CTRL / ALT / SHIFT as a hotkey. 61 | v1.2.0.10: Added BuffImmunity plugin. 62 | Added Flashlight plugin. 63 | Added PortableCraftingGuide plugin. 64 | Added EnhancedPDA plugin. 65 | Added Electrosphere Launcher to HomingBullets plugin exclusions. 66 | Updated DropRates plugin with Rare-only drop rate toggle. 67 | Added plugin support for IPluginPlaySound. 68 | v1.2.0.9: Fixed Newtonsoft.Json.dll extraction issue with Terraria 1.3.0.7. 69 | v1.2.0.8: Added DropRates plugin. 70 | v1.2.0.7: Added Season plugin. 71 | Added ShopSellsScalingPotions plugin. 72 | Added InfiniteSundial plugin. 73 | Added ChestSearch plugin. 74 | Added LoadoutSwap plugin. 75 | Added administrator privileges warning when patching. 76 | Added new 'spawn at cursor' command for NPC plugin. 77 | Added /range command to UseTime plugin. 78 | Added /plugins command to loader. 79 | Added new hotkey-command bindings. Check plugin notes. 80 | Added new Shared folder for shared plugin source code. 81 | Added plugin support for IPluginInitialize, IPluginDrawInventory, IPluginUpdateTime. 82 | Fixed bug with plugin support for Newtonsoft.Json.dll. 83 | v1.2.0.6: Added plugin support for IPluginNPCLoot. 84 | Fixed NPC plugin to work when spawning negative IDs (special slimes). 85 | v1.2.0.5: Added plugin support for IPluginPlayerQuickBuff. 86 | v1.2.0.4: Changed blocks/walls/wires to use usetime 1 instead of 0. 87 | Added plugin support for Newtonsoft.Json.dll. 88 | v1.2.0.3: Added plugin support for IPluginChestSetupShop. 89 | v1.2.0.2: Moved Full Bright to a plugin with toggleable key. 90 | Added '/teleport plantera' and '/teleport strangeplant' commands to teleport plugin. Removed teleport plantera hotkey. 91 | Changed Teleport plugin method. 92 | Changed UseTime plugin to use 0 instead of 1 for picks/drills/axes/blocks/walls/wires. 93 | Added Builder buff / UseTime plugin warning. 94 | Reverted Reveal plugin changes.. Causing memory issues. 95 | Added ability to load plugins from subfolders with group compilation (allows for larger plugins). 96 | Added plugin support for IPluginPlayerGetItem. 97 | v1.2.0.1: Added SkipSplash plugin. 98 | Fixed UseTime (autoreuse) command bug. 99 | Fixed Respawn plugin. 100 | Fixed GodMode plugin to use statLifeMax2 instead of statLifeMax. 101 | Fixed Reveal plugin to use UpdateLighting instead of Update method. 102 | Changed Teleport plugin to use friendly teleport method. 103 | v1.2.0.0: Updated for Terraria 1.3.0.5. 104 | Added IPluginChatCommand. 105 | Added command functionality to ItemSpawner, NPC, Time, and UseTime plugins. 106 | Various bug fixes. 107 | v1.1.0.12: Changed UseTime to use [UseTime] category in Plugins.ini. 108 | Added Actuators to UseTime plugin. 109 | Added many warnings to patcher. 110 | Added dialog to copy plugins over to Terraria folder after done patching. 111 | v1.1.0.11: Added GodMode plugin. 112 | Added InfiniteFlight. 113 | Moved Coin Gun to a plugin. 114 | Moved Max Tile Speed, Max Wall Speed, Max Pick Speed, Max Reach Range and Max Item Pickup Range to UseTime plugin. 115 | Updated UseTime plugin to work for Wrench, Green Wrench, Blue Wrench, and Wire Cutter. 116 | Fixed HomingBullets plugin for when you have Pygmy or Twin minions. 117 | Fixed NPC plugin, specifically spawn rate modification. 118 | Fixed BuffRates plugin, specifically rage. 119 | Various performance improvements. 120 | v1.1.0.10: Fixed another plugin hotkey bug. 121 | v1.1.0.9: Added thread link & update warning on main UI of patcher. 122 | Fixed plugin hotkey bug. 123 | v1.1.0.8: Fixed ItemSpawner to spawn items on yourself instead of player 1. 124 | Fixed MoreAccessorySlots plugin. 125 | Fixed Weather plugin. 126 | Moved spawn rate/limit to NPC plugin and allows dynamic adjustment of the values. 127 | Added endurance buff and ice barrier (from Frozen Turtle Shell) to BuffRates plugin. 128 | Added Minions plugin. 129 | Added Respawn plugin. 130 | v1.1.0.7: Converted Item Replication to a plugin. 131 | Updated IPluginPlayerUpdate signature. 132 | Added IPluginUpdate. 133 | v1.1.0.6: Added MoreAccessorySlots plugin. 134 | Added ItemSpawner plugin. 135 | Updated plugin hotkeys to only work when chat/chest edit/sign edit windows are closed. 136 | Updated Events plugin Moon Lord to use separate hotkey instead of CTRL modifier so that ItemSpawner doesn't conflict. 137 | Fixed bugs in HomingBullets plugin. 138 | Fixed typo in BuffRates plugin. 139 | Fixed permanent buffs mod to only give the user the buffs instead of all players. 140 | v1.1.0.5: Added BuffRates plugin (archery, magic, wrath, rage). 141 | Converted 'Infinite Healing' into a plugin called InfiniteLifeSteal. 142 | Added teleport to cursor functionality to Teleport plugin. 143 | v1.1.0.4: Added Weather plugin. 144 | Added Events plugin. 145 | Added HomingBullets plugin. 146 | Updated plugin-functionality with better hotkey support. 147 | v1.1.0.3: Fixed bug with angler quest limit mod. 148 | v1.1.0.2: Added NPC plugin. 149 | v1.1.0.1: Fix for languages that use commas instead of periods in their decimal format. 150 | v1.1.0.0: Added config save/load functionality (all UI changes are persistent now). 151 | Added plugin functionality. 152 | Added Reveal plugin. 153 | Added Teleport plugin. 154 | Added UseTime plugin. 155 | Added Time plugin. 156 | v1.0.4.2: Fixed 'Remove Mana Costs' for channeled items. 157 | v1.0.4.1: Added 'Full Bright'. 158 | Updated 'Inventory Item Replication' by Ryan. 159 | Changed UI to be more horizontal and is now resizable. 160 | Fixed mutual exclusivity of wings/cloud jump checkboxes. 161 | v1.0.4.0: Updated to work with Terraria v1.3.0.2. 162 | Removed tUnlocker since dev items are allowed now. 163 | Added 'Max Tile Placement Speed'. 164 | Added 'Max Wall Placement Speed'. 165 | Added 'Max Pick Speed'. 166 | Added 'Max Reach Range'. 167 | Added 'Max Item Pickup Range'. 168 | Added 'Max Crafting Range'. 169 | v1.0.3.6: Changed 'Infinite Split Stacks' to 'Inventory Item Replication (R + Right-click)'. 170 | v1.0.3.5: Added 'Infinite Cloud Jumps', 'Remove 2 hearts/second healing limit', 'Vampiric Knives Healing Rate', and 'Spectre Armor Healing Rate'. 171 | v1.0.3.4: Added accessory preference for 'Always Roll Best Prefixes'. 172 | v1.0.3.3: Added 'Always Roll Best Prefixes'. 173 | v1.0.3.2: Added 'Infinite Ammo' by Ryan S. 174 | v1.0.3.1: Added 'Infinite Split Stacks' by Ryan S. 175 | v1.0.3.0: Added 'Remove Drowning', 'Demigod Mode', 'One Hit Kill'. 176 | Set defaults to my personal preferences. 177 | v1.0.2.2: Disabled 'Thorns Buff' since it was causing issues. 178 | Increased the 'Persistent Buffs' limit to 22 since that is the actual limit in Terraria now. 179 | Added 'Remove Angler Quest Limit Per Day'. 180 | Fixed some other small issues as well. 181 | v1.0.2.1: Updated to match the 1.2.4 buffs. 182 | v1.0.2.0: Updated to work with Terraria v1.2.4. 183 | Added 'Display Time', 'Remove Potion Sickness Debuff', 'Remove Mana Costs', 'Permanent Red Wings', 'Coin Gun Modifications'. 184 | v1.0.1.3: Updated to work with Terraria v1.2.3.1 and its new buffs (Ammo Box, etc). 185 | Removed InventoryManager since you can use the Gameiki Mod to add this functionality. 186 | v1.0.1.2: Updated InventoryManager to 2.0.4 187 | Added 'Magic Power Buff' damage rate modification. 188 | Added 'Thorns Buff' damage rate modification. 189 | v1.0.1.1: Small fix to detect newer InventoryManager.dll and copy it over for the user. 190 | v1.0.1.0: Updated 'Spawn rate for Demon Voodoo' to work with 1.2.1.2. 191 | Updated InventoryManager to 2.0.2. 192 | Added 'Remove Rod of Discord Buff'. 193 | v1.0.0.0: Initial release. -------------------------------------------------------------------------------- /sed.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dougbenham/TerrariaPatcher/3a334298ab5520263aca2019d0f9f390d983f7a5/sed.exe --------------------------------------------------------------------------------