brandontsk
Terrarian
How do I make a weapon which shoots three projectiles at once like the Subsuming Vortex from calamity mod? Pls reply, I have no idea to Code this kind of stuff.
You can get all the vanilla files back from within Steam. From your library, right click the game > Properties > Local Files, then click Verify Integrity of Game Files to get the Vanilla game back.Hi! I wanted to go back to vanilla from modded, and put the old vanilla terraria.exe file into the terraria files folder (with the modded terraria.exe file taken out but the rest of the modded stuff in it). However the file must have then made into a second modded file so now I have no vanilla terraria.exe file? Is there any way to restore files in the folder or turn the modded one back into a vanilla one or a download to the vanilla terraria.exe? If you can help, please do. Thanks!
Sounds like either you are trying to join a vanilla server, or a tModLoader server that hasn't been updated yet. You can't join a vanilla server with tModLoader, but if it's a tModLoader server, you'll have to find out which version of tModLoader (not Terraria) it's running first.When I create a server with tModLoaderServer I can't join because it says ''you are not using the same version as this server'', i've tried to join with the newest 1.3.5.3 update and also the 1.3..5.2 version, neither of them work. help?
Well, I haven't tested this, but I'd be surprised if this didn't work.Hey guys, what would be the easiest way to check if an item is currently in a player's inventory from the player class itself every frame? I see that there's a whole bunch of methods for frame updates in existence but I would specifically be looking for UpdateInventory which doesn't seem to exist in the player class. Would I simply use the UpdatePlayer method instead? Additionally, when checking to see if a player has a modded item, do you use the mod item's DisplayName when checking?
EDIT: I suppose I should clarify what I'm trying to do. I'm seeing if I can update the CompressedPotions mod to combine the buffs of the complex compressed potions so they don't take up the entire buff bar. My thought to do this was to use a ModPlayer to check if the item is in the inventory, and if it is, then manually apply the buffs. If the item is removed, the buffs would then be removed. What would be the best way of going about this?
for (int i = 0; i < player.inventory.Length; i++)//for every item in my inventory
{
if (player.inventory[1].type == mod.ItemType("nameOfItemsClass"))//if this item is the one I'm looking for
{
player.AddBuff(1234, 2); //apply the buff for one frame -- replace 1234 with the buff you want to apply
break;
}
}
Well, I haven't tested this, but I'd be surprised if this didn't work.
I don't think that the player has an UpdatePlayer hook, but PerUpdate or PostUpdate should do the trick. Also, if the item is from a different mod, then you can't use mod.ItemType, you instead need to create a reference to the other mod. I'm not sure exactly how this is done, but I'm sure someone on here does.Code:for (int i = 0; i < player.inventory.Length; i++)//for every item in my inventory { if (player.inventory[1].type == mod.ItemType("nameOfItemsClass"))//if this item is the one I'm looking for { player.AddBuff(1234, 2); //apply the buff for one frame -- replace 1234 with the buff you want to apply break; } }
Go to steam, right click terraria in the library, go to properties, and find "integrity of local files" or whatever it's called.Would it be possible to make it automatically update the modloader? I'm afraid of messing up my modded world files cuz I have no idea how to update it. :/
Any time.Thanks for that! I think that should work.
As of this point, I was only going to use my own mod's items, so that won't be a problem at all.
I was actually looking at the player class itself and it appears as if the player's attributes are all reset every single frame, and then buffs are re-applied as the player class updates (wtf?). If that's true, then I assume I have to re-apply the buffs at every frame?
The safest way is to create a manual backup of your players and worlds before you update.Would it be possible to make it automatically update the modloader? I'm afraid of messing up my modded world files cuz I have no idea how to update it. :/
Rename the exe to Terraia.exeFailed to resolve assembly: 'Terraria, Version=1.3.5.1, Culture=neutral, PublicKeyToken=null'
at Mono.Cecil.BaseAssemblyResolver.Resolve(AssemblyNameReference name, ReaderParameters parameters)
at Mono.Cecil.DefaultAssemblyResolver.Resolve(AssemblyNameReference name)
at Mono.Cecil.MetadataResolver.Resolve(TypeReference type)
at Mono.Cecil.TypeReference.Resolve()
at Mono.Cecil.Mixin.CheckedResolve(TypeReference self)
at Mono.Cecil.SignatureReader.ReadCustomAttributeEnum(TypeReference enum_type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElementValue(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeElement(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArrayArgument(ArrayType type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeFixedArgument(TypeReference type)
at Mono.Cecil.SignatureReader.ReadCustomAttributeConstructorArguments(CustomAttribute attribute, Collection`1 parameters)
at Mono.Cecil.MetadataReader.ReadCustomAttributeSignature(CustomAttribute attribute)
at Mono.Cecil.CustomAttribute.<Resolve>b__34_0(CustomAttribute attribute, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.CustomAttribute.Resolve()
at Mono.Cecil.CustomAttribute.get_ConstructorArguments()
at Mono.Cecil.ImmediateModuleReader.ReadCustomAttributes(ICustomAttributeProvider provider)
at Mono.Cecil.ImmediateModuleReader.ReadType(TypeDefinition type)
at Mono.Cecil.ImmediateModuleReader.ReadTypes(Collection`1 types)
at Mono.Cecil.ImmediateModuleReader.ReadModule(ModuleDefinition module)
at Mono.Cecil.ModuleWriter.WriteModuleTo(ModuleDefinition module, Stream stream, WriterParameters parameters)
at Mono.Cecil.ModuleDefinition.Write(Stream stream, WriterParameters parameters)
at Terraria.ModLoader.AssemblyManager.LoadedMod.EncapsulateReferences(Byte[] code)
at Terraria.ModLoader.AssemblyManager.LoadedMod.LoadAssemblies()
at Terraria.ModLoader.AssemblyManager.InstantiateMods(List`1 modsToLoad)
It may be important to note that I've tried to reload multiple mods, and none of them work. (I just got the new TModLoader update as well so it could be a bug)
Any time.
The players attributes are reset and so are the effects from the buffs, but the buffs themselves don't need to be reapplied. The effects of a buff are automatically reapplied each frame. It may seem weird, but it's that way so that if you have multiple buffs that affect one stat, a buff can be removed and that stat will revert to how it should be.
Main is in the Terraria namespace, so I think you'll need "using Terraria;" up top.Hi everyone. so i`m trying to make a custom block in the game and heres the code i have so far:
using Terraria.ModLoader;
using Terraria.ID;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace novahand.Tiles
{
public class starshard : ModTile
{
public override void SetDefaults()
{
Main.tileSolid[Type] = true;
Main.tileMergeDirt[Type] = true;
Main.tileLighted[Type] = true;
Main.tileBlockLight[Type] = true;
drop = mod.ItemType("starshard");
ModTranslation name = CreateMapEntryName();
name.SetDefault("starshard");
AddMapEntry(new Color(255, 255, 255));
minPick = 59;
}
public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b)
{
r = 0.75f;
g = 0.25f;
b = 0.5f;
}
}
}
its pretty much an identical copy of the code from this tutorial: https://github.com/FoolsLynx/tutorial-mod/blob/master/Tiles/TutorialOreTile.cs
but whenever i build and reload, i get an error that says this:
c:\Users\danny\Documents\My Games\Terraria\ModLoader\Mod Sources\novahand\Tiles\starshard.cs(12,13)(13,13)(14,13)(15,13) : error CS0103: The name 'Main' does not exist in the current context
i know where the problem is, but i cant find what the problem is. there should be nothing wrong with the main part, because its exactly the same as the part in the tutorial. maybe the tutorial is outdated. maybe i need to set something else up or download something.
either way i don`t know what to do so please send help.
Thanks in advance to anyone that helps.
Updating tML does not mess with your player and world saves.Would it be possible to make it automatically update the modloader? I'm afraid of messing up my modded world files cuz I have no idea how to update it. :/
Good idea and suggested multiple times.I feel like they should make it so that like how they have the mod browser, they should make it so there is a modPACK browser
There is a mod with load issues that crashes the game. Hold left shift while loading to skip the mod loading, then load mods one by one to see which is causing issues.What can I do if terraria crashes on my pc when I have mods in the folder, but when I delete them, It loads perfectly fine. Anyway to fix this problem?
Yeah, I'd say that you'd need to copy all of the effects from the individual buffs to the combined buff. It would probably be worth having the combined buff dispel all of the separate buffs on application so that you can't get twice the effect.What if it's a manual buff? For example, in the case of the compressed potions mod, you may have an item that adds wrath, rage, endurance, etc. It's simple enough to just say AddBuff(whatever), but that would create an individual buff that takes up a buff slot for each effect. What I'm looking to do is combine the effects, so I imagine I would need to manually apply each effect that I want the buff to include.
It's possible that I'm just not really understanding how the mod buff system works. If you have any further insights into it, that would be helpful.
Main is in the Terraria namespace, so I think you'll need "using Terraria;" up top.