Standalone [1.3] tModLoader - A Modding API

Like that?

Code:
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace FenrisNostalgia.NPCs.Dredmor
{
    public class Diggle : ModNPC
    {
        public override void SetDefaults()
        {
            npc.frameCounter = 15;
            npc.width = 18;
            npc.height = 40;
            npc.value = 8000;
            npc.aiStyle = 3;
            npc.damage = 5;
            npc.defense = 0;
            npc.soundHit = 2;
            npc.soundKilled = 2;
            npc.lifeMax = 20;
            npc.scale = 1;
        }
    }
}
Theoretically that should work. Of course it will also depend on whether my NPC system actually works yet too.

Heya guys. Just a thought here since Blue was looking for stuff based on walls. Has anyone figured out how to make regular paint show up on a wall? I was looking for a way to make all colors of paint show up on a wall and I've been messing with the example Wall's values (after making it pure white) and it seems that no normal paint color will apply to them. All Deep will, but no regular paint at all. Any ideas?
The reason normal paint doesn't work on the example walls is that the example wall has no saturation (it's completely gray). Normal paint has always not worked for low saturations, which is probably one reason deep paint was made.
 
So I finally downloaded the latest modloader and im so happy :D :)
But ...
I thought i did everything right but then ...

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\ExampleWings.cs(9,26) : error CS0115: 'ExampleMod.Items.ExampleWings.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ChopsRobes.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ChopsRobes.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleBreastplate.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleBreastplate.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleHelmet.cs(8,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleHelmet.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleHood.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleHood.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleLeggings.cs(8,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleLeggings.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\WarsquilsRobes.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.WarsquilsRobes.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override



This happened and now im really pissed ... but i looked and everything is right :(
Please Help :)
 
So I finally downloaded the latest modloader and im so happy :D :)
But ...
I thought i did everything right but then ...

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\ExampleWings.cs(9,26) : error CS0115: 'ExampleMod.Items.ExampleWings.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ChopsRobes.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ChopsRobes.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleBreastplate.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleBreastplate.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleHelmet.cs(8,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleHelmet.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleHood.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleHood.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\ExampleLeggings.cs(8,26) : error CS0115: 'ExampleMod.Items.Armor.ExampleLeggings.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override

c:\Users\Zane McGinn\Documents\My Games\Terraria\ModLoader\Mod Sources\ExampleMod\Items\Armor\WarsquilsRobes.cs(9,26) : error CS0115: 'ExampleMod.Items.Armor.WarsquilsRobes.Autoload(ref string, ref string, ref Terraria.ModLoader.EquipType?)': no suitable method found to override



This happened and now im really pissed ... but i looked and everything is right :(
Please Help :)
Basically, what happened was that I added support for multiple EquipTypes per item, so you'll need to change the method signature. Try replacing this:

EquipType?

with this:

IList<EquipType>

You'll also have to call equips.Add instead of just assigning equip, and add "using System.Collections.Generic" to the top. The example mod is updated with this.
 
Hm, but if none of the normal colors at all will work? Like they just show a splash of paint and nothing changes at all on the map or canvas? Also I made it a pure white texture then tried a slightly yellow, slightly red, and slightly blue one. All provided the same "splash" of paint look but altered the color none. Is that by design? Or is there a hidden value. I only ask because on Terraria walls you can at least tell a small bit if a wall has been painted with a normal color. Sorry to be a pain in the butt, just making sure I understand.
 
Hm, but if none of the normal colors at all will work? Like they just show a splash of paint and nothing changes at all on the map or canvas? Also I made it a pure white texture then tried a slightly yellow, slightly red, and slightly blue one. All provided the same "splash" of paint look but altered the color none. Is that by design? Or is there a hidden value. I only ask because on Terraria walls you can at least tell a small bit if a wall has been painted with a normal color. Sorry to be a pain in the butt, just making sure I understand.
Hm, can you try to see what happens when you give the wall a solid color?
 
Hm, but if none of the normal colors at all will work? Like they just show a splash of paint and nothing changes at all on the map or canvas? Also I made it a pure white texture then tried a slightly yellow, slightly red, and slightly blue one. All provided the same "splash" of paint look but altered the color none. Is that by design? Or is there a hidden value. I only ask because on Terraria walls you can at least tell a small bit if a wall has been painted with a normal color. Sorry to be a pain in the butt, just making sure I understand.
This is working normally for mine:
Capture 2015-08-08 22_27_51.png

[DOUBLEPOST=1439055173,1439054883][/DOUBLEPOST]Also, non deep green and blue:
Capture 2015-08-08 22_32_33.png
 
Interesting [: solid color is working now. Don't think your stuff had anything to do with it, definitely something on my end if everyone else's was working! I was one update behind you guys and I made sure to restart my comp before screenshot. Working now!
 
If you wanted to turn into a werewolf at night and a merfolk in water like a celestial shell what code would you use
Please Help :)
 
If you wanted to turn into a werewolf at night and a merfolk in water like a celestial shell what code would you use
Please Help :)
First, let's look in the ItemID class to find the ID of CelestialShell. Looks like it's 3110.

Now let's go back to the UpdateEquips method and search for this ID. It uses the following code:
Code:
this.accMerman = true;
this.wolfAcc = true;
if (this.hideVisual[l])
{
    this.hideMerman = true;
    this.hideWolf = true;
}
Now the main problem here is that in the UpdateAccessory method you don't get "l" as a parameter. (I should add that in the next update.) So for now you'll have to loop through player.armor and find the item that is the same as the equipment you're updating, then use that index instead of l.
 
Ah okay :)
[DOUBLEPOST=1439059452,1439059281][/DOUBLEPOST]Hi @bluemagic123 ... i keep on asking questions but where do u find all of these codes or do u know them and is it possible to shoot a projectile thats not the vampire knives but like a terra blade but it still heals
Thanks in advance :)
 
Back
Top Bottom