tModLoader Modding Inquiry

Not sure if this is a bug or not, but when I make the Martian Work Bench the required crafting station to craft items, the game no longer loads my UI, forcing me to Alt+F4. Changing it back to the regular Work Bench returns my UI to normal.
You probably did: recipe.addTile(ItemID.MartianWorkBench) instead of recipe.addTile(TileID.MartianWorkBench)

Also, I'm not sure if there actually is a tile for martian work bench, since it probably shares the TileID.Workbenches tileid. So it might not be possible.
 
You probably did: recipe.addTile(ItemID.MartianWorkBench) instead of recipe.addTile(TileID.MartianWorkBench)

Also, I'm not sure if there actually is a tile for martian work bench, since it probably shares the TileID.Workbenches tileid. So it might not be possible.

I tried the TileID for Martian Work Bench and just got "error CS0117: 'Terraria.ID.TileID' does not contain a definition for 'MartianWorkBench'". I also tried "recipe.AddTile(2826);" and still received the buggy UI. I will go about this a different way to accomplish what I was trying to do. Thanks for the help.
 
Am I able to make the world generate all the ores, instead of spawning 1 of 2, and be able to keep them at their respective spawn depths?
 
I have a few questions that anyone can feel free to offer information on.

1. How can I overwrite gold to eliminate the possibility of creating gold armor and weapons?
2. How can I force my custom ore to spawn in specific parts of the map? i.e. getting my Ice Crystals to spawn in winter biomes. I played around with some numbers in the ore generation code (I doubt this is the correct method) but I never noticed anything.
3. How can I get set bonuses to work correctly? I set it to a number but it doesn't seem to affect anything correctly. I am positive it is wrong, so here is my code:

public override void UpdateArmorSet(Player player)
{
player.setBonus = "4 defense";
player.statDefense += 4;
}
 
I have a few questions that anyone can feel free to offer information on.

1. How can I overwrite gold to eliminate the possibility of creating gold armor and weapons?
2. How can I force my custom ore to spawn in specific parts of the map? i.e. getting my Ice Crystals to spawn in winter biomes. I played around with some numbers in the ore generation code (I doubt this is the correct method) but I never noticed anything.
3. How can I get set bonuses to work correctly? I set it to a number but it doesn't seem to affect anything correctly. I am positive it is wrong, so here is my code:

public override void UpdateArmorSet(Player player)
{
player.setBonus = "4 defense";
player.statDefense += 4;
}
1. iterate through the Main.recipe, change the recipe you want. You can delete it if you don't screw things up.
2. If you are going off the Example ore spawn, you can check the start tile to see if it's a snow or ice block before you call the TileRunner.
3. That should work. If you aren't getting the tooltip text, then you likely aren't even doing IsArmorSet correctly.
 
Back
Top Bottom