Standalone [1.3] tModLoader - A Modding API

Disrespectful posts will not be tolerated
Could you update it to 1.3.4.3?
I am tired of people like you. He is working on it, likely very hard. 1.3.4 changed a lot of how sentry summons work, he probably needs to recode the whole thing. He is also probably adding new methods and fields so that we can do more with creating mods. Seriously, piss off. Be patient, and stop whining.
 
Disrespectful posts will not be tolerated
I am tired of people like you. He is working on it, likely very hard. 1.3.4 changed a lot of how sentry summons work, he probably needs to recode the whole thing. He is also probably adding new methods and fields so that we can do more with creating mods. Seriously, piss off. Be patient, and stop whining.
Stop being so toxic, jeez. Yes, of COURSE jopojelly and Bluemagic are working hard on it. The people that keep asking the same question probably go to the last page, and see if it's on it, then ask. And when there are 700+ pages of COMMENTS, can't blame them for not wanting to read. So, telling someone to piss off for asking an honest question, is just wrong. I want to know when it will be finished too. I won't begrudge jopo if it takes another week or two, I just want an ETA. Which he gave, about 6 days ago, saying a week. But 6 days ago we were only on like page 694. So don't expect people to go back and read EVERY SINGLE COMMENT to find an answer to a simple question. A good response would have been: "Jopojelly is currently working hard on it, and it should be finished sometime this week. Just check back every day to see if it's arrived ^_^". Seriously, people like you make me sick with your toxicity.

Just thought I'd mention as an aside, sorry that I am giving the credit solely to Jopo for the tModLoader. I just don't know who, if anybody, else is working with him on this. So keep up the good work tModLoader team @jopojelly @bluemagic123 ! I am extremely excited for the new update ^_^
 
Last edited:
I am tired of people like you.
Seriously, piss off. Be patient, and stop whining.

Stop being so toxic, jeez.
Seriously, people like you make me sick with your toxicity.
@solunareclipse1 and @Derpius The Reaper, none of this language is appropriate for the forums. Either post respectfully or don't post at all.

Also, @diekonradish , don't like an obviously toxic comment, as it helps nobody and just makes you look as bad.
@Derpius The Reaper, it's not up to you to tell other members what posts they can and can't "like".
 
Is it going to keep the current terraria version in the next tmodloader update? If not then when?
Yes. All tModLoader changes is the .exe and when the new one will be released, it will simply replace the old outdated one.

EDIT: unless I misunderstood the question?
 
As an attempt to head off any further inquiries into the update, I will note that tModLoader is open source, with development visible on GitHub.
Unfortunately, I think that people will ask regardless.
Still, I might just take a look-see at what's on the GitHub, even though it doesn't make a bit of sense to me.
 
Just a note: tModLoader v0.9.0.0 has been available for modders over on the discord channel since a day or so ago. It's not officially released yet because I wanted modders to have a chance to do some porting and testing.

If you aren't a modder, don't even think about installing it, you will be severely disappointed since there are 0 mods.


If you are on mac or linux please come and help test the new release. I haven't found a single Mac or Linux user to test the new executable to see if it works.
 
Just a note: tModLoader v0.9.0.0 has been available for modders over on the discord channel since a day or so ago. It's not officially released yet because I wanted modders to have a chance to do some porting and testing.

If you aren't a modder, don't even think about installing it, you will be severely disappointed since there are 0 mods.


If you are on mac or linux please come and help test the new release. I haven't found a single Mac or Linux user to test the new executable to see if it works.

That's a pretty big update on the status. Thanks Jopo, you never disappoint.
 
Just a note: tModLoader v0.9.0.0 has been available for modders over on the discord channel since a day or so ago. It's not officially released yet because I wanted modders to have a chance to do some porting and testing.

If you aren't a modder, don't even think about installing it, you will be severely disappointed since there are 0 mods.


If you are on mac or linux please come and help test the new release. I haven't found a single Mac or Linux user to test the new executable to see if it works.
Great to hear! Eager to finally try out all that 1.3.4 content. :p
 
Is it possible to make the summon minion cap per weapon?

I was thinking maybe an accessory item you could wear that subtracts from your max, but lets you summon each minion you want up to the cap.

Like say you have 8 minion cap -- the new accessory drops it to 6, but you can have 6 ufos, 6 tiki, 6 cell, etc...

With this API is that a big change, little change, or impossible?
 
Is your item sprite and cs file in the Weapons subfolder of your Items directory?
[doublepost=1480915002,1480914885][/doublepost]
You can have more than one class instance in one file, that's how to compact your code; You just can't have different namespaces in the same file afaik. For example, you could have all your non weapon, material items in one big class named "Materials.cs". The sprites of each item would just be the name of each class inside.
nope we have the same mods
 
Just a note: tModLoader v0.9.0.0 has been available for modders over on the discord channel since a day or so ago. It's not officially released yet because I wanted modders to have a chance to do some porting and testing.

If you aren't a modder, don't even think about installing it, you will be severely disappointed since there are 0 mods.


If you are on mac or linux please come and help test the new release. I haven't found a single Mac or Linux user to test the new executable to see if it works.

Have you asked on reddit for Mac and Linux users. I believe I've seen several users there who might be willing to help.
 
So, I've looked around for a while but couldn't find anything to do this; I need something that basically does:
Code:
If(Somewaytotellifplayerdoesdamagetosomething == true)
player.GetModPlayer<SpecialsPlayer>(mod).SagCD = true;
---
Code:
namespace Specials.Items
{
    class SagiCharm : ModItem
    {

        public override void SetDefaults()
        {
            item.name = "Charm of Sagittarius";
            item.width = 40;
            item.height = 40;
            item.toolTip = "Grants 45% bonus damage every 5 seconds when using a ranged weapon.";
            item.toolTip2 = "Bonus damage is used after 1 attack";
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
            item.waistSlot = 5;
        }

        int timer1 = 300;
        public override void UpdateAccessory(Player player, bool hideVisual = false)
        {
            base.UpdateAccessory(player, hideVisual);

            if (timer1 <= 0)
            {
                player.rangedDamage = 1.45f;
                player.GetModPlayer<SpecialsPlayer>(mod).SagDamage = true;
            }
            if (player.GetModPlayer<SpecialsPlayer>(mod).SagCD == true && player.GetModPlayer<SpecialsPlayer>(mod).SagDamage == true)
                {
                    timer1 = 300;
                    player.rangedDamage = 1 / 1.45f;
                }

            timer1--;
        }
    }
}
 
Last edited:
So, I've looked around for a while but couldn't find anything to do this; I need something that basically does:
Code:
If(Somewaytotellifplayerdoesdamagetosomething == true)
player.GetModPlayer<SpecialsPlayer>(mod).SagCD = true;
---
Code:
namespace Specials.Items
{
    class SagiCharm : ModItem
    {

        public override void SetDefaults()
        {
            item.name = "Charm of Sagittarius";
            item.width = 40;
            item.height = 40;
            item.toolTip = "Grants 45% bonus damage every 5 seconds when using a ranged weapon.";
            item.toolTip2 = "Bonus damage is used after 1 attack";
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
            item.waistSlot = 5;
        }

        int timer1 = 300;
        public override void UpdateAccessory(Player player, bool hideVisual = false)
        {
            base.UpdateAccessory(player, hideVisual);

            if (timer1 <= 0)
            {
                player.rangedDamage = 1.45f;
                player.GetModPlayer<SpecialsPlayer>(mod).SagDamage = true;
            }
            if (player.GetModPlayer<SpecialsPlayer>(mod).SagCD == true && player.GetModPlayer<SpecialsPlayer>(mod).SagDamage == true)
                {
                    timer1 = 300;
                    player.rangedDamage = 1 / 1.45f;
                }

            timer1--;
        }
    }
}
For that specific thing, you would not use an if statement, but instead, use would want to use this code in an entirely different hook. You would use this hook in the Global Player file instead of the item, since you are dealing with only ranged.

Code:
public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit)

With that in mind, you can also do the timer within Pre or Post Update in the Player file. I prefer to use a private integer to cover for as a timer. For readability's sake, I would recommend using two variables, one holding the constant value and one to act as the actual timer, but of course you can keep it as optimal as possible by using the least amount of code possible.

To make your code much better, it'd be better just to move the timer to player update. Here's how I would make your accessory.

In your SagiCharm.cs
Code:
namespace Specials.Items
{
    class SagiCharm : ModItem
    {
        public override void SetDefaults()
        {
            item.name = "Charm of Sagittarius";
            item.width = 40;
            item.height = 40;
            item.toolTip = "Grants 45% bonus damage every 5 seconds when using a ranged weapon.";
            item.toolTip2 = "Bonus damage is used after 1 attack";
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
            item.waistSlot = 5;
        }
        public override void UpdateAccessory(Player player, bool hideVisual = false)
        {
            base.UpdateAccessory(player, hideVisual);

            if (!player.GetModPlayer<SpecialsPlayer>(mod).SagCD)
            {
                player.rangedDamage += 0.45f;
                player.GetModPlayer<SpecialsPlayer>(mod).SagDamage = true;
            }
        }
    }

In your SpecialPlayers.cs
Code:
        private int cdTimer = 300;
        public override void OnHitNPCWithProj(Projectile proj, NPC target, int damage, float knockback, bool crit)
        {
            if(!SagCD)
            {
                SagCD = true;
                SagDamage = false;
            }
        }
        public override void PreUpdate()
        {
            //These are local calls to the player file so you won't necessarily need the direct mod player calls.
            if(SagCD)
            {
                cdTimer--;
                if(cdTimer < 1)
                {
                    SagCD = false;
                }
            }
        }
 
I have done scratch and it is a good way to get some basic experience for coding but u can't make a mod with it.

Well I didn't even know what Scratch was till today.

Ummm guys, I have a question, it may be embarrassing but, is legit programming like, like scratch???

Programming is, unfortunately, not like Scratch. This is mostly because instead of using coding blocks (the GUI interface for actions in Scratch), we have to actually type things and hope it works (ok, we don't actually type things at random, but sometimes it feels like it). There is of course the method I like to call, the "Copy, Paste, Edit" programming, where you copy and paste code and then edit it to your suiting. The advantage of this is that you don't need to type too much and makes programming much faster, but the disadvantage is the fact that sometimes you don't know why it works and or readability from your code sucks... a lot. So I mostly recommend reading code and go over what each part does, if you know what each part does, you can then proceed to do the "Copy, Paste, Edit" strategy, because learning is great!
 
Ummm guys, I have a question, it may be embarrassing but, is legit programming like, like scratch???
@Zekrom 2, it's best to keep these type of general questions elsewhere - either on your own profile or doing a google search. This is a thread about tModLoader, let's keep the posts on-topic and about tModLoader.
 
@Zekrom 2, it's best to keep these type of general questions elsewhere - either on your own profile or doing a google search. This is a thread about tModLoader, let's keep the posts on-topic and about tModLoader.
Yes daddy Moderator, not being disrespectful, just being dumb :p
[doublepost=1481036268,1481036158][/doublepost]
Well I didn't even know what Scratch was till today.



Programming is, unfortunately, not like Scratch. This is mostly because instead of using coding blocks (the GUI interface for actions in Scratch), we have to actually type things and hope it works (ok, we don't actually type things at random, but sometimes it feels like it). There is of course the method I like to call, the "Copy, Paste, Edit" programming, where you copy and paste code and then edit it to your suiting. The advantage of this is that you don't need to type too much and makes programming much faster, but the disadvantage is the fact that sometimes you don't know why it works and or readability from your code sucks... a lot. So I mostly recommend reading code and go over what each part does, if you know what each part does, you can then proceed to do the "Copy, Paste, Edit" strategy, because learning is great!
Welll, yeh, I can see that. But on an above post I saw
So, I've looked around for a while but couldn't find anything to do this; I need something that basically does:
Code:
If(Somewaytotellifplayerdoesdamagetosomething == true)
player.GetModPlayer<SpecialsPlayer>(mod).SagCD = true;
---
Code:
namespace Specials.Items
{
    class SagiCharm : ModItem
    {

        public override void SetDefaults()
        {
            item.name = "Charm of Sagittarius";
            item.width = 40;
            item.height = 40;
            item.toolTip = "Grants 45% bonus damage every 5 seconds when using a ranged weapon.";
            item.toolTip2 = "Bonus damage is used after 1 attack";
            item.value = 10000;
            item.rare = 3;
            item.accessory = true;
            item.waistSlot = 5;
        }

        int timer1 = 300;
        public override void UpdateAccessory(Player player, bool hideVisual = false)
        {
            base.UpdateAccessory(player, hideVisual);

            if (timer1 <= 0)
            {
                player.rangedDamage = 1.45f;
                player.GetModPlayer<SpecialsPlayer>(mod).SagDamage = true;
            }
            if (player.GetModPlayer<SpecialsPlayer>(mod).SagCD == true && player.GetModPlayer<SpecialsPlayer>(mod).SagDamage == true)
                {
                    timer1 = 300;
                    player.rangedDamage = 1 / 1.45f;
                }

            timer1--;
        }
    }
}
i saw that 'if' thing, like in scratch. But whatever, lets just drop it
 
Back
Top Bottom