redstonecreeper8
Terrarian
Thanks! I reinstalled it and everything is working fine. Enjoying the Calamity mod!
32-bit programs can't use more than 4 gigabytes of RAM. However, there is an unofficial 64-bit Windows version of tModLoader (which can use much more RAM) available here: https://forums.terraria.org/index.php?threads/1-3-tmodloader-64bit-branch-of-tml.75644/Can you expand Tmodloader's memory to be more than just 4GB of space?
Fair warning, that version had to have massive changes to allow for 64 bit compatability, and as such has numerous issues with many mods at the moment. Be careful what you install, and don't expect a lot of help for any bugs you encounter from mod authors while using it.Thank you so much!i!
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace Suspicious Looking Electric Cube.Items // Changed from my mod name to this due to bug, stopped getting the bug
{
public class ItemName : ModItem
{
public override void SetDefaults()
{
item.name = "Suspicious Looking Cube";
item.width = 100;
item.height = 100;
item.maxStack = 10;
AddTooltip("Summons Cube Bunk");
item.value = 5000;
item.rare = 1;
}
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.DirtBlock, 10);
recipe.AddTile(TileID.WorkBenches);
recipe.SetResult(this);
recipe.AddRecipe()
}
}
}
I have these bugs:
c:\Users\I decided to hide my irl name here.\Documents\My Games\Terraria\ModLoader\Mod Sources\testingmod\Items\Suspicious Looking Electric Cube.cs(5,22) : error CS1514: { expected!
Code is this:
Code:using Terraria; using Terraria.ID; using Terraria.ModLoader; namespace Suspicious Looking Electric Cube.Items // Changed from my mod name to this due to bug, stopped getting the bug { public class ItemName : ModItem { public override void SetDefaults() { item.name = "Suspicious Looking Cube"; item.width = 100; item.height = 100; item.maxStack = 10; AddTooltip("Summons Cube Bunk"); item.value = 5000; item.rare = 1; } public override void AddRecipes() { ModRecipe recipe = new ModRecipe(mod); recipe.AddIngredient(ItemID.DirtBlock, 10); recipe.AddTile(TileID.WorkBenches); recipe.SetResult(this); recipe.AddRecipe() } } }
I think that the code is invalid,I realised that there cant be spaces due to where it expected {
[doublepost=1549904078,1549903553][/doublepost]c:\Users\[SENSITIVE INFORMATION]\Documents\My Games\Terraria\ModLoader\Mod Sources\testingmod\Items\Suspicious Looking Electric Cube.cs(10,18) : error CS1061: 'Terraria.Item' does not contain a definition for 'name' and no extension method 'name' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
[doublepost=1549904138][/doublepost]i have that bug for no apparent reason.
i used a modding tutorial for help, same exact code style, and i have an error.
public class NAME: ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("NAME");
Tooltip.SetDefault("ITEMTOOLTIP");
}
public override void SetDefaults()
{
item.whatever
}
You would probably need to create a ModWorld class (if you don't have one already) and create a bool there that stores whether or not your boss has been killed. You can check against that bool before spawning your NPC. You'll need to use override void save and override void load to save this bool between sessions.Is there a way to make an enemy spawn after a boss from my mod is killed? For example a line reading "if(downedKingSlime = true; ) ..." but instead checks if a boss from my mod has been downed instead. Thanks in advance.
I believe that you need to add using System.Collections.Generic to the other using statements. That way, the class will know what a list is.using Terraria;
using Terraria.ModLoader;
using System;
namespace Hypaxi
{
public abstract class InsanityItem : ModItem
{
public static bool insanity = true;
public override void SetDefaults()
{
item.melee = false;
item.ranged = false;
item.thrown = false;
item.magic = false;
item.summon = false;
}
public override void ModifyTooltips(List<TooltipLine> tooltips)
{
var tt = tooltips.FirstOrDefault(x => x.Name == "Damage" && x.mod == "Terraria");
if (tt != null)
{
string[] split = tt.text.Split(' ');
tt.text = split.First() + " insanity " + split.Last();
}
}
public override void GetWeaponDamage(Player player, ref int damage)
{
HypaxiPlayer modPlayer = player.GetModPlayer<HypaxiPlayer>(mod);
int originalDamage = damage;
damage = (int)(damage * modPlayer.insanityDamage);
float globalDmg = 1f;
globalDmg = player.meleeDamage - 1;
if (player.magicDamage - 1 < globalDmg)
globalDmg = player.magicDamage - 1;
if (player.rangedDamage - 1 < globalDmg)
globalDmg = player.rangedDamage - 1;
if (player.thrownDamage - 1 < globalDmg)
globalDmg = player.thrownDamage - 1;
if (player.minionDamage - 1 < globalDmg)
globalDmg = player.minionDamage - 1;
if (globalDmg > 1)
damage = damage + (int)(originalDamage * globalDmg);
}
}
}
(18,37) : error CS0246: The type or namespace name 'List' could not be found (are you missing a using directive or an assembly reference?)
Can someone help me I am making a new damage type and I do not know how to fix this?
There are a lot of errors that come from a few things. On the shortsword code, uncomment theHi,I have problem when compiling a mod.
Here the .cs files and compile log.Sorry for my english because i'm a russian.
public override void AddRecipes()
recipe.AddRecipe();
Also, the majority of errors are coming from a file called "ExamplePerson.cs" but you upload the file and i cant read the russian compile errors so i cant really help you out there.Hi,I have problem when compiling a mod.
Here the .cs files and compile log.Sorry for my english because i'm a russian.