tModLoader Tutorial: [1] Getting started with tModLoader

Ok , got it sooooo far right i think, game starts, after build if i click start in Visual studio.
Break seems to work too, - i change some value, for examples the same as in the .Gif u showed.
i press contiunue, on the bottom Visual studio tells me " Code changes were applied successfully".
But nothing changed ingame , and yes i tried spawning the item again, dropping it, switching around , nothing.
 
Ok , got it sooooo far right i think, game starts, after build if i click start in Visual studio.
Break seems to work too, - i change some value, for examples the same as in the .Gif u showed.
i press contiunue, on the bottom Visual studio tells me " Code changes were applied successfully".
But nothing changed ingame , and yes i tried spawning the item again, dropping it, switching around , nothing.
Not sure. Could be a lot of things. If I were you I might delete my mod from the mods folder and make sure when I click debug the .tmod shows up again. Other than that, sometimes things are finicky but I don't have all the answers
 
oh Hey! That actually did the trick! Great!

Actually now another question, more specific to projectiles here.

Got with an own weapon, a selfmade projectile. All working.
The Example stuff also tested with second projectile etc.

What im trying now is using OnHitNPC in the Projectile class
to spawn 4 new Projectiles, but from a modified hit position towards the NPC,
thought i should be using
public static int NewProjectile(Vector2 position, Vector2 velocity, int Type, int Damage, float KnockBack, int Owner = 255, float ai0 = 0, float ai1 = 0);
instead of the other one.
Sadly that doesnt work as i thought. Maybe some experiance with it?
 
c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(6,28) : error CS1514: { expected

c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(6,34) : error CS1519: Invalid token ':' in class, struct, or interface member declaration

c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(7,5) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
help me plz UwU
 
c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(6,28) : error CS1514: { expected

c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(6,34) : error CS1519: Invalid token ':' in class, struct, or interface member declaration

c:\Users\ASUS\Documents\My Games\Terraria\ModLoader\Mod Sources\FairyTail\Items\Pentagram Sword.cs.cs(7,5) : error CS1519: Invalid token '{' in class, struct, or interface member declaration
help me plz UwU


Would be extremely helpfull if you would post the code of that file to see what characters are wrong.
 
Screen Shot 2018-08-21 at 4.15.32 PM.png
what do i do about this?
 
This is really helpful, Everything's done right until I opened my First Item Folder, My first item isn't a sword. Its an Ore, but that doesn't matter right now.
As i'm trying to change the item name, tooltip, etc. It wont let me type or erase. I installed an app called Text Reader to actually open the files, And that worked perfectly. But I just cant edit anything.
 
This is really helpful, Everything's done right until I opened my First Item Folder, My first item isn't a sword. Its an Ore, but that doesn't matter right now.
As i'm trying to change the item name, tooltip, etc. It wont let me type or erase. I installed an app called Text Reader to actually open the files, And that worked perfectly. But I just cant edit anything.
Use notepad++, or alternatively visual studio
 
Hey, I'm new to all this (coding and modding), and would like a little help understanding how to get my mod working.

Currently I'm stuck on the "Make sure you have exactly one class extending Mod" part. How should I go about this?
 
Can I use Visual Code for this?
You can use VS Code to program in C#, yes. You might be able to setup VS Code to have the same functionality as VS, but I don't think it's worth the effort.
In short: If you can, use VS (2017 Community Edition).
 
Oh
[doublepost=1539217633,1539217617][/doublepost]Can I make it public?
[doublepost=1539217666][/doublepost]Sry I'm new to this.
Hi @Garmadaddy05, please use the Edit button instead of double and triple posting. The Edit button is under your post. :)

You can’t make the conversation public. You can copy and paste whatever contents you want to share. Please don’t share other members’ comments from a private message though. You can certainly share your own comments though.
 
Back
Top Bottom