Standalone [1.3] tModLoader - A Modding API

but man, this isn't happening only whith me. The another one too have this problem
More than one person can be unlucky
CTkSqIw.gif
 
To me too is decreased, in the blood moon normally 40-50 monsters spawn, but in my three last blood moons only 10
I doubt this is tmodloader, but for some reason the jungle has almost no hornets. I was down there for an hour and only got 3 stingers. Probably just bad rng.
 
Please, fix windows 10 lags. When i open inventory, lags disappear. IDK what is problem. The problem started after the API installation.

Sorry for bad English :3
 
You'll probably want to decompile Terraria...
Here is Solar, see what you can do with this:
Code:
if (this.head == 171 && this.body == 177 && this.legs == 112)
            {
                this.setSolar = true;
                this.setBonus = Lang.setBonus(43, false);
                this.solarCounter++;
                int num11 = 240;
                if (this.solarCounter >= num11)
                {
                    if (this.solarShields > 0 && this.solarShields < 3)
                    {
                        for (int num12 = 0; num12 < 22; num12++)
                        {
                            if (this.buffType[num12] >= 170 && this.buffType[num12] <= 171)
                            {
                                this.DelBuff(num12);
                            }
                        }
                    }
                    if (this.solarShields < 3)
                    {
                        this.AddBuff(170 + this.solarShields, 5, false);
                        for (int num13 = 0; num13 < 16; num13++)
                        {
                            Dust dust = Main.dust[Dust.NewDust(this.position, this.width, this.height, 6, 0f, 0f, 100, default(Color), 1f)];
                            dust.noGravity = true;
                            dust.scale = 1.7f;
                            dust.fadeIn = 0.5f;
                            dust.velocity *= 5f;
                            dust.shader = GameShaders.Armor.GetSecondaryShader(this.ArmorSetDye(), this);
                        }
                        this.solarCounter = 0;
                    }
                    else
                    {
                        this.solarCounter = num11;
                    }
                }
                for (int num14 = this.solarShields; num14 < 3; num14++)
                {
                    this.solarShieldPos[num14] = Vector2.Zero;
                }
                for (int num15 = 0; num15 < this.solarShields; num15++)
                {
                    this.solarShieldPos[num15] += this.solarShieldVel[num15];
                    Vector2 value = ((float)this.miscCounter / 100f * 6.28318548f + (float)num15 * (6.28318548f / (float)this.solarShields)).ToRotationVector2() * 6f;
                    value.X = (float)(this.direction * 20);
                    this.solarShieldVel[num15] = (value - this.solarShieldPos[num15]) * 0.2f;
                }
                if (this.dashDelay >= 0)
                {
                    this.solarDashing = false;
                    this.solarDashConsumedFlare = false;
                }
                bool flag = this.solarDashing && this.dashDelay < 0;
                if (this.solarShields > 0 || flag)
                {
                    this.dash = 3;
                }
            }
            else
            {
                this.solarCounter = 0;
            }
No I mean like the 22% melee bonus from the chestplate but the code for the shield is useful too.
Edit:programs like ILSpy are for decompilation right?
 
How do i do that? it would be so much easier learning how to use this if i could view terraria's actual code.

Download ILSpy, and give it the Terraria.exe file. It will take a while and will slow your computer to a crawl, but it will decompile it. The downside is that local variable names aren't preserved from the original, so you get tons of variables with names like "num1", "num2", "num3", etc. (as you can see in the snippet jopojelly posted).
 
Download ILSpy, and give it the Terraria.exe file. It will take a while and will slow your computer to a crawl, but it will decompile it. The downside is that local variable names aren't preserved from the original, so you get tons of variables with names like "num1", "num2", "num3", etc. (as you can see in the snippet jopojelly posted).
Lol you guys gotta stop beating me to it! ;)
 
Download ILSpy, and give it the Terraria.exe file. It will take a while and will slow your computer to a crawl, but it will decompile it. The downside is that local variable names aren't preserved from the original, so you get tons of variables with names like "num1", "num2", "num3", etc. (as you can see in the snippet jopojelly posted).
i am guessing this wont work for me because i am on a mac
 
I am making a sprite to a mod that will add a platinum shower, with better buff but I don't have idea of how i do this :/
You are just making the sprite then? You'll want to make the projectile and the dust sprites. You'll want to convert Projectile_280.xnb and Dust.xnb to .png (XNB to PNG Converter), then find the 170th dust (I think it's this one
ksPFNJC.png
), go into your image editing program and copy that into a 10x30 image, use the image adjustment commands to change the hue to silver, save it (in the mod soures folder). Do the same for the projectile.

If you need help with the programming of the buff, projectile, or item, let me know where you are stumped.

Is there any way to add possible drops for the extractinator? It looks to me like the code for extractinating is in Player.cs so I'm guessing it's won't be possible until ModPlayer is added.
It wouldn't be part of ModPlayer, but it's not that high a priority right now.

No I mean like the 22% melee bonus from the chestplate but the code for the shield is useful too.
Edit:programs like ILSpy are for decompilation right?
Oh, here are some snippets of things you can do, mix and match as you like, they should all be pretty self explanatory. Check the wiki for which ones go with what.
Code:
player.aggro += 300;
player.meleeCrit += 17;
player.meleeDamage += 0.22f;
player.meleeSpeed += 0.15f;
player.moveSpeed += 0.15f;
player.rangedCrit += 7;
player.rangedDamage += 0.16f;
player.maxMinions++;
player.minionDamage += 0.22f;
player.statManaMax2 += 60;
player.manaCost -= 0.15f;
player.magicCrit += 7;
player.magicDamage += 0.07f;
 
How can I make an NPC walk left\right (without falling the floor or something like that)? I have a sprite sheet that animates walking.
Thanks!
 
Back
Top Bottom