sparkeeperoid
Terrarian
hi anyone know what this means? my terraria has been weird lately too. sometimes when i talk to NPCs, there's no dialogue boxes or cant use any items.
View attachment 272674Every time I try to open up terraria 1.4 with Tmodloader this shows up. Idk what I did wrong, and I am new to the forums. Any help would be appreciated, thanks!
Edit: I am an idiot, NVM
You need to download tModLoader 0.11.7 + version, that's the only one that will work with 1.4 terraria installation.View attachment 272674Every time I try to open up terraria 1.4 with Tmodloader this shows up. Idk what I did wrong, and I am new to the forums. Any help would be appreciated, thanks!
There is no MyProjectile.png texture file alongside the .cs fileDoes anyone know why I'm getting the following error when I try to build my project?
"Silently Caught Exception:
Terraria.ModLoader.Exceptions.MissingResourceException: Expected resource not found:
Projectiles/MyProjectile
Closest guess: (Is there a spelling or folder placement error?)
Items/FirstSword"
I DO have Projectiles/MyProjectile, autocompleted and verified by VS. Here's the source:
![]()
GitHub - TheMysticalBard/FirstMod: A simple Terraria mod where I follow the basic tModLoader tutorials.
A simple Terraria mod where I follow the basic tModLoader tutorials. - GitHub - TheMysticalBard/FirstMod: A simple Terraria mod where I follow the basic tModLoader tutorials.github.com
Any help would be appreciated, thanks!
using System;
using System.Collections.Generic;
using System.ComponentModel.Design;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Mod.Projectiles //Change it to the corect folder
{
public class heartproj: ModProjectile
{
public override void SetDefaults()
{
//projectile.name = "Heartprojectile"; //Name of the projectile, only shows this if you get killed by it
projectile.width = 12; //Set the hitbox width
projectile.height = 12; //Set the hitbox height
projectile.hostile = true; //Tells the game whether it is friendly to players/friendly npcs or not
projectile.ignoreWater = true; //Tells the game whether or not projectile will be affected by water
projectile.ranged = true; //Tells the game whether it is a ranged projectile or not
projectile.penetrate = 1; //Tells the game how many enemies it can hit before being destroyed, -1 infinity
projectile.timeLeft = 600; //The amount of time the projectile is alive for
}
public override void Kill(int timeLeft) {
Item.NewItem(projectile.position,ItemID.Heart,1);
}
public override bool OnTileCollide(Vector2 oldVelocity)
{
projectile.Kill();
return false;
}
}
}
item.shoot = mod.ProjectileType("heartproj");
You need a .png to show tmodloader how the projectile looks like.Does anyone know why I'm getting the following error when I try to build my project?
"Silently Caught Exception:
Terraria.ModLoader.Exceptions.MissingResourceException: Expected resource not found:
Projectiles/MyProjectile
Closest guess: (Is there a spelling or folder placement error?)
Items/FirstSword"
I DO have Projectiles/MyProjectile, autocompleted and verified by VS. Here's the source:
![]()
GitHub - TheMysticalBard/FirstMod: A simple Terraria mod where I follow the basic tModLoader tutorials.
A simple Terraria mod where I follow the basic tModLoader tutorials. - GitHub - TheMysticalBard/FirstMod: A simple Terraria mod where I follow the basic tModLoader tutorials.github.com
Any help would be appreciated, thanks!
There is no MyProjectile.png texture file alongside the .cs file
You need a .png to show tmodloader how the projectile looks like.
This might seem silly, but i'm having serious trouble trying to organize my curly brackets. Like I'm using Visual Studio Code and it normally shows the colors for the text, but it won't and when i build + reload my mod, it says error: cs1519: invalid token '{' in class, struct, or interface member declaration
internal class UISoulOrb : UIState
private UIImage soulOrbFillerImage;
public override void OnInitialize()
{
area = new UIElement(); //base UIElement for this whole thing
area.Left.Set(-area.Width.Pixels - 600, 1f);
area.Top.Set(30, 0f);
area.Width.Set(190, 0f);
area.Height.Set(140, 0f);
...
soulOrbFillerImage = new UIImage(GetTexture("TestMod/UI/SoulOrbFiller"));
soulOrbFillerImage.Left.Set(10f, 0f);
soulOrbFillerImage.Top.Set(26f, 0f);
soulOrbFillerImage.Width.Set(100, 0f);
//height is (supposed to be) set dynamically later
soulOrbFillerImage.Height.Set(0f, 0f);
...
area.Append(soulOrbFillerImage);
Append(area);
}
public override void Update(GameTime gameTime)
{
var modPlayer = Main.LocalPlayer.GetModPlayer<SoulPlayer>();
//this is supposed to dynamically change height parameter in-game:
var soulPercentage = modPlayer.soulCurrent / modPlayer.soulMax2;
soulOrbFillerImage.Height.Set((float)soulPercentage, 0f);
base.Update(gameTime);
}