Standalone [1.3] tModLoader - A Modding API

What.

Item Antibiotics uses an old UpdateAccessory hook
at Terraria.ModLoader.Mod.AddItem(String name, ModItem item, String texture)
at Terraria.ModLoader.Mod.AutoloadItem(Type type)
at Terraria.ModLoader.Mod.Autoload()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
 
What.

Item Antibiotics uses an old UpdateAccessory hook
at Terraria.ModLoader.Mod.AddItem(String name, ModItem item, String texture)
at Terraria.ModLoader.Mod.AutoloadItem(Type type)
at Terraria.ModLoader.Mod.Autoload()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
The Update accessory hook has been changed. First it was:
Code:
public override void UpdateAccessory(Player player)
Now it is:
Code:
public override void UpdateAccessory(Player player, bool hideVisual)
 
Okay this is my only problem now at the moment

its say that the Addmapentry doesnt exsist

using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
using Microsoft.Xna.Framework;

namespace DarkArmorReforged.Tiles
{
public class CobaltAnvil : ModTile
{
public override void SetDefaults()
{
Main.tileSolidTop[Type] = false;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1);
TileObjectData.newTile.CoordinateHeights = new int[] { 16, 16, 16 };
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.CoordinatePadding = 2;
TileObjectData.addTile(Type);
adjTiles = new int[] { TileID.Anvils };
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch);
AddMapEntry(new Color(255, 255, 255), "CobaltAnvil");
}

public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 48, 48, mod.ItemType("CobaltAnvil"));
}
}
}
 
I wouldn't have any issue actually editing the file(s) once I find them, I just can't find them :p. I don't think it's the mod file itself because it's in some sort of language that Notepad++ can't work with.
You can't change it from the tmod file itself, instead, you should probably pursuit what mod npc it is, then report it on here so the developer of the mod can see it.
 
You can't change it from the tmod file itself, instead, you should probably pursuit what mod npc it is, then report it on here so the developer of the mod can see it.
He stated something that vaguely sounded like he was editing a file somewhere and found a way to fix it/work around it. The NPC's are the wolves and undead enemies in the Tremor Mod.
 
What is the difference between Terraria.Player.statLifeMax and Terraria.Player.statLifeMax2
statLifeMax is the player's actual max health while statLifeMax2 is the extra health gained from effects. Usually these two are set at the same amount, however when you want to change the players health only when a certain equipment is on for example, you use statLifeMax2, otherwise you change both of these.
 
statLifeMax is the player's actual max health while statLifeMax2 is the extra health gained from effects. Usually these two are set at the same amount, however when you want to change the players health only when a certain equipment is on for example, you use statLifeMax2, otherwise you change both of these.
Thanks.
What is a static object reference thingy an error message talks about?
 
What is a static object reference thingy an error message talks about?
Usually it means that a certain thing isn't "static". What the term "static" means usually refers to things like a static variable where you can use it anywhere, sometimes it gets really confusing on what the problem is, maybe show us the error message?
 
Usually it means that a certain thing isn't "static". What the term "static" means usually refers to things like a static variable where you can use it anywhere, sometimes it gets really confusing on what the problem is, maybe show us the error message?
upload_2016-3-3_22-0-44.png
 
public override void Load()
{
RegisterHotKey("________", "R");
}
public override void HotKeyPressed(string name)
{
if (name == "________")
{
Player.statLife = Player.statLifeMax;
}
}
 
This means you are trying to change Player.statLife, which is an instance variable and not a static variable, so you'd need to reference the variable from an instance of the class, not the class name itself. Usually in the hooks an instance of the Player class is passed in and named player.

Edit: in your case, replace Player with Main.player[Main.myPlayer]
 
This means you are trying to change Player.statLife, which is an instance variable and not a static variable, so you'd need to reference the variable from an instance of the class, not the class name itself. Usually in the hooks an instance of the Player class is passed in and named player.
How do I do that?
 
Back
Top Bottom