Standalone [1.3] tModLoader - A Modding API

Hey uh... So, this is a strange error I'm getting since adding two Texture Packs to the TexturePacks folder with Experimental Features enabled.
From my understanding (and having looked at the source code) tModLoader is supposed to support running multiple texture packs at once, yes?
I assume this is because dictionaries probably don't accept duplicate values, and perpaps since both have an "Images" folder there's a problem?
I've checked, and they have no matching filenames aside from that one folder. Even the zips are named differently.
upload_2018-10-28_11-26-45.png
 
[QUOTE="I would love helping you but i can't sprite srry.[/QUOTE]
Ok, thank you for your response! If you would like to help modding or .wav files, I'd be fine with that, or just support it as it goes!
 
Help please
There's error:
Parameteris not valid
в System.Drawing.Bitmap..ctor(Stream stream)
в Terraria.ModLoader.IO.ImageIO.ToRaw(Stream src, Stream dst)
в Terraria.ModLoader.IO.ImageIO.ToRawBytes(Stream src)
в Terraria.ModLoader.ModCompile.AddResource(TmodFile modFile, String relPath, String filePath)
в Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
в Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
в Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__74_0(Object _)
Here's code of item:
using Terraria.ID;
using Terraria.ModLoader;
namespace TerrariaLegends.items
{
class BreadSword : ModItem
{
public override void SetDefaults()
{
item.melee = true;
item.width = 50;
item.height = 50;
item.useTime = 24;
item.useAnimation = 24;
item.useStyle = 1;
item.damage = 100;
item.knockBack = 5;
item.rare = 13;
item.autoReuse = true;
}
public override void SetStaticDefaults()
{
DisplayName.SetDefault("BreadSword");
Tooltip.SetDefault("Sword of heroes of bread town");
}
public override void AddRecipes()
{
ModRecipe mModRecipe = new ModRecipe(mod);
mModRecipe.AddIngredient(ItemID.DirtBlock, 1);
mModRecipe.AddTile(TileID.WorkBenches);
mModRecipe.SetResult(this);
mModRecipe.AddRecipe();
}
}
}
 
Yo guys. Do only I have probems with mods like ~ if you have a lot of mods, it crashes on *adding recipes* if it doesn't then on creating worlds. Just try to create world and it crashes
[doublepost=1540802355,1540801761][/doublepost]And now when I try to go in large world it crashes every time.
MY PC SPECS:
Gtx 1070
Ryzen 5 2600
16GB ram
 

Attachments

  • XuMBVMV.png
    XuMBVMV.png
    38.8 KB · Views: 220
When I try to host a server to play with friends it gets stuck on "receiving tile data: complete" and won't go farther than that so is there something I'm supposed to do to play with friends?
 
Yo guys. Do only I have probems with mods like ~ if you have a lot of mods, it crashes on *adding recipes* if it doesn't then on creating worlds. Just try to create world and it crashes
Terraria (and by extension, tModLoader), is a 32 bit program due to using Microsoft's 32 bit-only XNA framework.
As a 32 bit program, it can only use a maximum of 4 GB of RAM, so adding enough content to push it over that limit while loading (or while playing) will cause an out of memory crash like that one. It's unavoidable in the current scheme of things, unfortunately.
Your best bet is to remove some mods, I'm afraid.

There is someone working on a beta for a 64 bit tModLoader, but I'm unsure how stable it is as they're still in the testing phase.
Perhaps look them up. Their name is Draedonhunter or something if I recall. If you'd be willing to accept the risks associated with trying it, you could always try out the 64 bit beta from them and see if it works.
 
When I try to host a server to play with friends it gets stuck on "receiving tile data: complete" and won't go farther than that so is there something I'm supposed to do to play with friends?
If you have the Regen From Bosses mod active, disable it. Apparently I somehow made version 2.0 of it completely multiplayer-incompatible while trying to make it as multiplayer-compatible as possible. (No, I do not know how to fix that, unfortunately.)
 
Help please
There's error:
Parameteris not valid
в System.Drawing.Bitmap..ctor(Stream stream)
в Terraria.ModLoader.IO.ImageIO.ToRaw(Stream src, Stream dst)
в Terraria.ModLoader.IO.ImageIO.ToRawBytes(Stream src)
в Terraria.ModLoader.ModCompile.AddResource(TmodFile modFile, String relPath, String filePath)
в Terraria.ModLoader.ModCompile.Build(BuildingMod mod, IBuildStatus status)
в Terraria.ModLoader.ModCompile.Build(String modFolder, IBuildStatus status)
в Terraria.ModLoader.ModLoader.<>c.<BuildMod>b__74_0(Object _)
Here's code of item:
using Terraria.ID;
using Terraria.ModLoader;
namespace TerrariaLegends.items
{
class BreadSword : ModItem
{
public override void SetDefaults()
{
item.melee = true;
item.width = 50;
item.height = 50;
item.useTime = 24;
item.useAnimation = 24;
item.useStyle = 1;
item.damage = 100;
item.knockBack = 5;
item.rare = 13;
item.autoReuse = true;
}
public override void SetStaticDefaults()
{
DisplayName.SetDefault("BreadSword");
Tooltip.SetDefault("Sword of heroes of bread town");
}
public override void AddRecipes()
{
ModRecipe mModRecipe = new ModRecipe(mod);
mModRecipe.AddIngredient(ItemID.DirtBlock, 1);
mModRecipe.AddTile(TileID.WorkBenches);
mModRecipe.SetResult(this);
mModRecipe.AddRecipe();
}
}
}

Take a look at Example mod's Code for a sword, and use that as a base. If you still can't figure it out, then contact me!
 
is it okay if i extract terraria.exe then change the tmod extracting code so that it extracts it no matter what so that i can see other mods code for easier coding ?
PS: i am not expert at coding that's why it will take me a long time to figure out how but is it still allowed ?
 
I have a question: once, looooong ago when i first looked into modding, i received information that there is a limit to how many items/blocks/whatevers terraria can actually register, as the system used to index those things had an upper limit. I believe it was changed, but my questions are : does this limit still apply, what is it now, and is this limitation still meaningful for a modder? (google is failing me badly, but i found an implication that the new "tile limit" is "65536", which i assume to be beyond any meaningful limitation. Maybe?

** Also, as another part of my ongoing semi-project to rebuild Story of Red Cloud, can Plantera Bulbs be disabled? or can the spawn effect be disabled if not?
 
Last edited:
Hi when I try to play with some mods it crashes after like 10-15 mins of playing and this images shows, maybe its too many mods but Idk
 

Attachments

  • Skärmklipp.PNG
    Skärmklipp.PNG
    34.7 KB · Views: 148
When playing with a large number of mods, I get a message in which it says that I do not have enough memory. But there is a lot of memory on my computer. Is there any way to fix this?
 
Hey, I posted on the TModLoader help thread a while back and haven't gotten any help from it. Is that the wrong place to ask for help making mods? I ask because I see many questions on this thread that seem like they belong in the other one and the questions asked on here seem to get more attention than the ones on that other thread, too.
 
Hey, I posted on the TModLoader help thread a while back and haven't gotten any help from it. Is that the wrong place to ask for help making mods? I ask because I see many questions on this thread that seem like they belong in the other one and the questions asked on here seem to get more attention than the ones on that other thread, too.
The most active place for help is the discord chat: discord.me/tModLoader
 
Help, how would I add 10% lifesteal to an accessory?

edit: figured it out, but now there is an error

c:\Users\keega\Documents\My Games\Terraria\ModLoader\Mod Sources\NecroticIncantations\Items\NecroClass\Accessories\NecroticBone.cs(40,23) : error CS0266: Cannot implicitly convert type 'float' to 'int'. An explicit conversion exists (are you missing a cast?)

code:
using Terraria.ModLoader;
using NecroticIncantations.Items.NecroClass;

namespace NecroticIncantations.Items.NecroClass.Accessories
{
public class NecroticBone : ModItem
{
public float health;

public override void SetStaticDefaults()
{
Tooltip.SetDefault("10% increased necrotic damage" +
"\n1% lifesteal from enemies");
}

public override void SetDefaults()
{
item.Size = new Vector2(34);
item.rare = 2;
item.accessory = true;
}

public override void UpdateAccessory(Player player, bool hideVisual)
{
NecroticDamagePlayer modPlayer = NecroticDamagePlayer.ModPlayer(player);
modPlayer.NecroticDamage += 0.1f;
//add lifesteal effect
}

public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
{
health = damage * .1f;
player.statLife += health + 1.0f;
}
}
}
 
Last edited:
Back
Top Bottom