tModLoader Zocklukas Coding help Thread

Did these Thread helped you?


  • Total voters
    4

Lukas04

Official Terrarian
Hello!

These is an Thread for some Coding help
If you have any Questions for Codes or get Errors post them Here
With the Time i add more Help for Specific Items

Code:
author = YourNameHere                                     (Here you add Your Name)
version = 1.0.0                                                 (These is your Version Number)
displayName = YourModNameHere                        (Thats the Name,how that get shown in the Modbrowser)
homepage = LinkToYourModPageHere                    (Copy your link to your Mod Page in)
hideCode = true                                                (On true,if TModReader extracts your Mod, .dlls and .cs Files dont get Extracted)
hideResources = true                                          (On true,if TModReader etracts your Mod,  .png and .wav Files dont get Extracted)
includeSource = false                                          (On true, .cs Files Get Extracted trough TModreader ( hideCode needs to be on false for these))
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*      (Add these to build.txt,if you work with Visual Studio)

More Informations here https://github.com/bluemagic123/tModLoader/wiki/build.txt
item.name = " "; //add the Item Name Between " "
item.toolTip = " "; //add the Item Tooltip Between " "
item.toolTip2 = " "; //add the Second Tooltip Between " "

item.damage = 10; //Replace "10" with the Damage You want
item.crit = 0; //Replace 0 with the Amount of Crit chance you want (0 = 4% Crit Chance | 4 = 8% Crit Chance)
item.melee = true; //makes it Damage Goal as melee Damage
item.knockBack = 5; //Replace 5 with the Amount of Knockback you want to have
item.autoReuse = true; //Set it on true,to make it Auto Reusing
item.useTurn = true; //set to True,to make the Sword able to Switch Directions while using

item.width = 42; //The Hitbox of the Item
item.height = 40; //for swords,it should be the same size of the Sprite

item.useTime = 30; //the Cooldown of the item after Use 30 = 0.5 Seconds
item.useAnimation = 30; //the Animation length at Use, should be the same like useTime, for a Normal Sword
item.useStyle = 1; //how the item get Used (1 is for Swords)
item.useSound = 1; //what sound gets played on use (1 is the Vanilla Sound for Sword)

item.value = 1000; //the worth for the item (1000 = 1 Silver Coin)
item.rare = 1; //the Rarity of the item (pink, blue, green, etc)

If you want an Video Tutorial you can look in our Tutorial Playlist on Youtube
https://www.youtube.com/playlist?list=PLAATo7ZxsaYEB8Bkv6LQTzKTQXK3QfKqU
 
Hello!

These is an Thread for some Coding help
If you have any Questions for Codes or get Errors post them Here
With the Time i add more Help for Specific Items

Code:
author = YourNameHere                                     (Here you add Your Name)
version = 1.0.0                                                 (These is your Version Number)
displayName = YourModNameHere                        (Thats the Name,how that get shown in the Modbrowser)
homepage = LinkToYourModPageHere                    (Copy your link to your Mod Page in)
hideCode = true                                                (On true,if TModReader extracts your Mod, .dlls and .cs Files dont get Extracted)
hideResources = true                                          (On true,if TModReader etracts your Mod,  .png and .wav Files dont get Extracted)
includeSource = false                                          (On true, .cs Files Get Extracted trough TModreader ( hideCode needs to be on false for these))
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*      (Add these to build.txt,if you work with Visual Studio)

More Informations here https://github.com/bluemagic123/tModLoader/wiki/build.txt
item.name = " "; //add the Item Name Between " "
item.toolTip = " "; //add the Item Tooltip Between " "
item.toolTip2 = " "; //add the Second Tooltip Between " "

item.damage = 10; //Replace "10" with the Damage You want
item.crit = 0; //Replace 0 with the Amount of Crit chance you want (0 = 4% Crit Chance | 4 = 8% Crit Chance)
item.melee = true; //makes it Damage Goal as melee Damage
item.knockBack = 5; //Replace 5 with the Amount of Knockback you want to have
item.autoReuse = true; //Set it on true,to make it Auto Reusing
item.useTurn = true; //set to True,to make the Sword able to Switch Directions while using

item.width = 42; //The Hitbox of the Item
item.height = 40; //for swords,it should be the same size of the Sprite

item.useTime = 30; //the Cooldown of the item after Use 30 = 0.5 Seconds
item.useAnimation = 30; //the Animation length at Use, should be the same like useTime, for a Normal Sword
item.useStyle = 1; //how the item get Used (1 is for Swords)
item.useSound = 1; //what sound gets played on use (1 is the Vanilla Sound for Sword)

item.value = 1000; //the worth for the item (1000 = 1 Silver Coin)
item.rare = 1; //the Rarity of the item (pink, blue, green, etc)

If you want an Video Tutorial you can look in our Tutorial Playlist on Youtube
https://www.youtube.com/playlist?list=PLAATo7ZxsaYEB8Bkv6LQTzKTQXK3QfKqU
Idea: How to remove recipes from items tutorial?
 
so i'm trying to add an alternate recipe for endurance potions, but when i try to build my mod it says "no suitable method found to override". here's the code:

using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace plasma.Items
{
public class EndurancePotion : ModRecipe
{
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Obsidian, 20);
recipe.AddIngredient(ItemID.Granite, 15);
recipe.AddIngredient(ItemID.Blinkroot, 25);
recipe.AddIngredient(ItemID.Fireblossom, 1);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(ItemID.EndurancePotion, 1);
recipe.AddRecipe();
}
}
}
 
so i'm trying to add an alternate recipe for endurance potions, but when i try to build my mod it says "no suitable method found to override". here's the code:

using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace plasma.Items
{
public class EndurancePotion : ModRecipe
{
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.Obsidian, 20);
recipe.AddIngredient(ItemID.Granite, 15);
recipe.AddIngredient(ItemID.Blinkroot, 25);
recipe.AddIngredient(ItemID.Fireblossom, 1);
recipe.AddTile(TileID.Bottles);
recipe.SetResult(ItemID.EndurancePotion, 1);
recipe.AddRecipe();
}
}
}

hmmm
Never made much with Recipes
Possible that posts can help you
http://forums.terraria.org/index.php?threads/1-3-tmodloader-a-modding-api.23726/page-47
 
Back
Top Bottom