Shalashalska
Official Terrarian
I don't think there was that much changed. All I really noticed was that you need to delete all the constructors in your cs files.
Don't tell anyone, but I'm not sure how to do that!I don't think there was that much changed. All I really noticed was that you need to delete all the constructors in your cs files.
A few things modders porting over from 1.2.2 should know:
1. In ALL cases of constructors, you must remove them. They are no longer needed because, as shockah stated, it was very annoying to add them into the class when they did nothing. Anything your mod needs to set on load should be done in that hook, OnLoad().
2. Defs was split up into it's components, the common ones are:
Defs.npcs -> NPCDef.byName
Defs.projectiles -> ProjDef.byName
Defs.items -> ItemDef.byName
Defs.buffs -> BuffDef.type (This is temporary)
Defs.tiles -> TileDef.type (This is temporary)
The key (ie the string you put in) for the above are the same as before. (Defs.npcs["MyMod:MyNPC"] -> NPCDef.byName["MyMod:MyNPC"])
The only one that is the same is Defs.prefixes, which is still in Defs.
it ok bro i don't even no how to mod at all take your time and ill waitDon't tell anyone, but I'm not sure how to do that!
public classname(ModBase modBase, something) : base(modBase, something){ }
using System;
using System.Diagnostics;
using Microsoft.Xna.Framework;
using TAPI;
using Terraria;
namespace ThoriumMod.Items
{
public class AdamantiteStaff : ModItem
{
public AdamantiteStaff(ModBase modBase, Item I) : base(modBase, I){ }
public override bool PreShoot(Player player,Vector2 ShootPos,Vector2 ShootVelocity,int projType,int Damage,float knockback)
{
int ShotAmt = 4; // Amount of shots fired
int spread = 20; // Shot spread
float spreadMult = 0.05f; // Spread multiplier
for(int i = 0; i < ShotAmt; i++)
{
float vX = ShootVelocity.X+(float)Main.rand.Next(-spread,spread+1) * spreadMult;
float vY = ShootVelocity.Y+(float)Main.rand.Next(-spread,spread+1) * spreadMult;
Projectile.NewProjectile(ShootPos.X,ShootPos.Y,vX,vY,projType,Damage,knockback,Main.myPlayer);
}
return false;
}
}
}
public AdamantiteStaff(ModBase modBase, Item I) : base(modBase, I){ }
Fire Boots- Leaves a trail of fire that lasts 1 second.I might, but I cant think of what they would do. Any ideas?
Infact they do.This is a great mod! only 1 question, do the gold mobs drop gold bars/ores?
Seems easy enough, but the problem I'm having is with this line of code. I use it on a good bit of my items.Snip .
public override void DamageNPC(Player owner, NPC npc, int dir, ref int dmg, ref bool crit, ref float cMult)
{
}
old: public override void DamageNPC(Player owner, NPC npc, int dir, ref int dmg, ref bool crit, ref float cMult)
new: public override void DamageNPC(Player owner, NPC npc, int hitDir, ref int damage, ref float knockback, ref bool crit, ref float critMult)
Whata you know, it fixed it! Thank you guys so much.Code:old: public override void DamageNPC(Player owner, NPC npc, int dir, ref int dmg, ref bool crit, ref float cMult) new: public override void DamageNPC(Player owner, NPC npc, int hitDir, ref int damage, ref float knockback, ref bool crit, ref float critMult)
DamageNPC now has knockback in it.
I personally think daggers should be buffed, they only attack from left to right and are outclassed by spears/sword Im not saying to make it aimable (is that even a word?) but maybe a little more damage and speed
To add on to this, to make it so you can't just facetank everything while you charge it, make it so the charge "breaks" when you get hit.This might be an odd idea, and I'm speaking from ignorance, but what about a charge-up attack? See, in my mind, shortswords are kind of outclassed by everything, and daggers are basically just the shortswords of this mod. So, I think to myself, "What would make me use a weapon that's harder to hit with?" and oddly enough, the name gives me an idea.
In many RPGs, it's possible to use a dagger for a powerful backstab attack. However, that attack is usually difficult to pull off, due to having to sneak up on your target. Terraria doesn't really have the ability to do sneaking, but I think you could get a similar result. Make the shortswords/daggers quick, but weak. Then add a mechanic where if you hold down the attack button, they charge up, allowing you to deal one quick attack several times stronger than usual. Of course, since they still wouldn't have much range or knockback, you'd have to chose carefully when to use it, or you'll just end up getting yourself hit more. Basically, turn it into a "high risk, high reward" weapon, where dodging a lot more and hitting only when the time is right can potentially add up to higher DPS than other weapons, but also requires more skill to pull off.
Yes, that would probably be a good idea. Although, just the fact of getting hit when using another weapon could hold things off with knockback ought to be discouragement. I do think that's in keeping with my intent, though, and makes more sense with things you normally couldn't push back, like bosses.To add on to this, to make it so you can't just facetank everything while you charge it, make it so the charge "breaks" when you get hit.