Standalone [1.3] tModLoader - A Modding API

you wouldnt happen to have add or plan to add the ability to add mobs and events would you?
I do plan to add mobs sometime in the future.
I won't add anything specifically for events, but I will add enough hooks for world-related things so that it will be possible to program events.
 
Yeah, just like that. Now does the chat spam two large numbers, or does it spawn 0s?


It actually looks like I'll have to add a hook to a ModPlayer class to make that possible.


The easiest way would be to use a ModPlayer class, which tModLoader does not have yet. At the moment as a workaround, in the OnHit hook for the GlobalItem, you can iterate through the player's armor field from 3 to 9 and if the accessory is present then apply your debuff.


If you mean actually adding light, you can just use Lighting.AddLight in the UpdateArmorSet hook.
If you mean changing the light color the player renders in, you'll need to wait for a ModPlayer class.
It won't even compile, getting errors.
 
Did I mess up during install somehow, or did 1.3.0.7 break this for the moment?

Oops, now I'm "that guy" who didn't read the OP before posting. Please forgive me! :p
 
I do plan to add mobs sometime in the future.
I won't add anything specifically for events, but I will add enough hooks for world-related things so that it will be possible to program events.
can you add a "player.noGravity" bool? when its true the player won't fall down so its possible to create hoverboard-like wings

or is there something similar already? setting player.velocity.Y to 0 doesn't work very well, the player still falls down slightly...
 
Found a bug (Or is it only for me?):
Mannequins with custom armors are not breaking even if you break blocks under them. Also if you break block under them you gain mannequins.
 
can you add a "player.noGravity" bool? when its true the player won't fall down so its possible to create hoverboard-like wings

or is there something similar already? setting player.velocity.Y to 0 doesn't work very well, the player still falls down slightly...
I found this funny code in the Player class:
Code:
this.velocity.Y = this.velocity.Y * 0.9f;
if (this.velocity.Y > -2f && this.velocity.Y < 1f)
{
    this.velocity.Y = 1E-05f;
}


Found a bug (Or is it only for me?):
Mannequins with custom armors are not breaking even if you break blocks under them. Also if you break block under them you gain mannequins.
Huh, I completely forgot that mannequins existed. I'll look into that; thanks for reporting!
 
Hmm, is there a way that I can save data instead of losing time making my own to save just something small ?
 
Hmm, is there a way that I can save data instead of losing time making my own to save just something small ?

What do you mean? Save what data? You mean players and worlds? You can copy over your vanilla player and world files. What else do you mean?
 
Alright, so I made a mod which lets gear have their own Levels and Experience, upon hitting an NPC or killing it (didn't try killing part yet) the specific gear will get experience into it. When reaching >= the max experience the specific gear will level and a few stats will increase.
Now I need to save the Stats data so it won't reset everything I leave the world.

1- Is there any way I can save this data along with the player data ? Or would I need to make a separated saving data for this ?
 
Alright, so I made a mod which lets gear have their own Levels and Experience, upon hitting an NPC or killing it (didn't try killing part yet) the specific gear will get experience into it. When reaching >= the max experience the specific gear will level and a few stats will increase.
Now I need to save the Stats data so it won't reset everything I leave the world.

1- Is there any way I can save this data along with the player data ? Or would I need to make a separated saving data for this ?

I don't know if that would be possible atm.
 
Back
Top Bottom