berberborscing
Skeletron Prime
Try "modInternalName:ZirconiumOre"I dunno
Try "modInternalName:ZirconiumOre"I dunno
in where?Try "modInternalName:ZirconiumOre"
where displayname is?Try "modInternalName:ZirconiumOre"
In Zirconium Bar's recipein where?
[DOUBLEPOST=1422236092][/DOUBLEPOST]
where displayname is?
where do i put it though? make a new code line?In Zirconium Bar's recipe
Replace "Zirconium Ore" with "modInternalName:ZirconiumOre"where do i put it though? make a new code line?
This piece of code should get to the main post.Code:using Terraria; using TAPI; namespace Internalmodname { public class Internalmodname : ModWorld { public override void WorldGenPostGen() { ModifyWorld(); } public void ModifyWorld() { Main.statusText = "Inserttexthere"; //This is what displays as your ore is being generated. feel free to tweak int Amount_Of_Spawns = 100+(int)(Main.maxTilesY/5); //feel free to tweak for(int i=0;i<Amount_Of_Spawns;i++) AddMyOres(); } public void AddMyOres() { int LowX = 200; //after ocean on left edge of map int HighX = Main.maxTilesX-200; //before ocean on right edge of map int LowY = (int)Main.worldSurface; //where the brown background and the sky background meets int HighY = Main.maxTilesY-200; //where hell and the grey background meets int X = WorldGen.genRand.Next(LowX,HighX); //don't touch int Y = WorldGen.genRand.Next(LowY,HighY); //don't touch int OreMinimumSpread = 8; //minimum amount of ore in a vein. feel free to tweak int OreMaximumSpread = 18; //Maximum amount of ore in a vein. feel free to tweak int OreMinimumFrequency = 1; //feel free to tweak, this and the next line mean how frequent your ore spawns. int OreMaximumFrequency = 15; //feel free to tweak int OreSpread = WorldGen.genRand.Next(OreMinimumSpread,OreMaximumSpread+1); //don't touch int OreFrequency = WorldGen.genRand.Next(OreMinimumFrequency,OreMaximumFrequency+1); //don't touch WorldGen.OreRunner(X, Y, (double)OreSpread, OreFrequency, TileDef.byName["Internalmodname:nameoforeintilesfolder"]); } } }
Um no. That's the bad way of adding worldgen stuff. You should be using a custom WorldGenTask instead.This piece of code should get to the main post.
I kind of have a tutorial here: http://forums.terraria.org/index.php?threads/tutorial-custom-bosses-npc-ai-and-server-syncing.10474/Berb, do you know how to create a custom AI? (Even just a simple one like make them move and perform tasks) I am tired of using vanilla AI so I just wanted to start my own AI.
or even know someone who knows someone who knows someone......... who knows how?
Doesn't my NPC tutorial provide an example? The Night Owl drops Night Vision Goggles in itHey @berberborscing do you know how make an npc drop an custom item?
There are 5 use styles. 1 swings the item. 2 drinks it like a potion. 4 holds up the item like a life crystal. 5 holds it out like a gun.Can somebody explain to me the different use/hold styles? Y'know, referring to the lines of code in any item's .json file that say "useStyle" and "holdStyle".
Doesn't my NPC tutorial provide an example? The Night Owl drops Night Vision Goggles in it
There are 5 use styles. 1 swings the item. 2 drinks it like a potion. 4 holds up the item like a life crystal. 5 holds it out like a gun.
If you want to add drops to a vanilla NPC, you'll have to work with loot rules. Here's an example that you can insert into your ModBase class's OnLoad method:but like an exemple i want WoF drop a new item but this tutorial not show this :/
LootRule.settingUp = true;
LootRule[] rules = new LootRule[1];
rules[0] = new LootRule().Item("ModName:ItemName").Stack(5, 10).Chance(0.5);
LootRule.AddFor("Wall of Flesh", rules[0]);
LootRule.settingUp = false;
You need to delete those things from the .json files. However, it's fine to leave them in the .cs files.So, I copied and pasted it over. Does it matter if I am lazy and don't delete the //(text)?
God, no. Don't change the value of LootRule.settingUp. Use proper hooks for adding loot instead, where settingUp is already true.If you want to add drops to a vanilla NPC, you'll have to work with loot rules. Here's an example that you can insert into your ModBase class's OnLoad method:
What that code will do basically is make the WoF drop 5 to 10 of ItemName with a 50% chance.Code:LootRule.settingUp = true; LootRule[] rules = new LootRule[1]; rules[0] = new LootRule().Item("ModName:ItemName").Stack(5, 10).Chance(0.5); LootRule.AddFor("Wall of Flesh", rules[0]); LootRule.settingUp = false;
Which hooks are you talking about? I couldn't find any for editing vanilla monster drops yet.God, no. Don't change the value of LootRule.settingUp. Use proper hooks for adding loot instead, where settingUp is already true.