Standalone [1.3] tModLoader - A Modding API

eldrazi i dont know what they men by "manully" im trying to find if anyone can help me with that question. plz no hate
[DOUBLEPOST=1457831251,1457830680][/DOUBLEPOST]thank you but just to let you know i have to: search-steamapps>common>terraria>and all the files were already there. my freinds on steam told me to look it up, but i tried again. i didnt have TModloader installed , so i dicided to do that but then it says can not find place to install to.
[DOUBLEPOST=1457831302][/DOUBLEPOST]and im really sorry for spamming the emojis.....
 
@Endershot355, @Dommy5716 The Creeper : both of you need to exercise some patience with your questions. This isn't a 24/7 chat thread or help desk - please WAIT for someone to answer your questions, and don't spam them repeatedly.

OH OK YOU DONT HAVE TO BE RUDE
DAYM SON, GET SOME MANNERS
YOU need to not be rude and have some manners. There's no need to reply like that. Please be civil and respectful.
 
hey @bluemagic123 or @jopojelly, quick question if you have time, do you know anything about increasing the memory allocated to Terraria?
My mod loads about 100mb of wav sounds, and I've got plenty more to come, not to mention more textures etc. They are already compressed (there are over 1200 of them) so it's not that, and I have plenty more system memory available, but on loading my mod I get a OutofMemory Exception.
 
c:\Users\Devin\Documents\My Games\Terraria\ModLoader\Mod Sources\Enderuim\NPCs\HealthSiphon.cs(28,5) : error CS1502: The best overloaded method match for 'Enderuim.NPCs.MyModNPCAIExtras.FighterAI(int, float, float, Enderuim.NPCs.MyModNPCAIExtras.MyModExtraAction)' has some invalid arguments

c:\Users\Devin\Documents\My Games\Terraria\ModLoader\Mod Sources\Enderuim\NPCs\HealthSiphon.cs(28,44) : error CS1503: Argument 2: cannot convert from 'double' to 'float'

using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
using System;

namespace Enderuim.NPCs
{
public class HealthSiphon : ModNPC
{
public override void SetDefaults()
{
npc.name = "Health Siphoneer";
npc.displayName = "Health Siphoneer";
npc.width = 40;
npc.height = 54;
npc.damage = 220;
npc.defense = 30;
npc.lifeMax = 6000;
npc.soundHit = 1;
npc.soundKilled = 1;
npc.value = 60f;
npc.knockBackResist = 0.5f;
Main.npcFrameCount[npc.type] = 14;
}
public override bool PreAI()
{
MyModNPCAIExtras.FighterAI(npc.whoAmI, 2.1, 0.23F, null);
return false;
}
public override float CanSpawn(NPCSpawnInfo spawnInfo)
{
if(((myModPlayer)spawnInfo.player.GetModPlayer(mod, "myModPlayer")).accessoryOn== true) // That last ; here is not supposed to be there!
{
return spawnInfo.spawnTileY < Main.rockLayer ? 1.0f : 0f;
}
return 0f;
}
public override void FindFrame(int frameHeight)
{
npc.frameCounter += 0.1F; // Determines the animation speed. Higher value = faster animation.
npc.frameCounter %= Main.npcFrameCount[npc.type];
int frame = (int)npc.frameCounter;
npc.frame.Y = frame * frameHeight;

npc.spriteDirection = npc.direction;
}
public override void OnHitPlayer(Player target, int damage, bool crit)
{
// Here we can calculate the amount we want to leech using the damage value. I'm just 'leeching' half of the damage done.
int leechAmount = damage / 2;
if( (leechAmount + npc.life) > npc.lifeMax) // If the amount we leech exceeds the max life of the player, we'll want to cut it down to the max value possible.
{
leechAmount = npc.lifeMax - npc.life;
}
npc.life += leechAmount; // HEAL!
}
}
}
 
c:\Users\Devin\Documents\My Games\Terraria\ModLoader\Mod Sources\Enderuim\NPCs\HealthSiphon.cs(28,5) : error CS1502: The best overloaded method match for 'Enderuim.NPCs.MyModNPCAIExtras.FighterAI(int, float, float, Enderuim.NPCs.MyModNPCAIExtras.MyModExtraAction)' has some invalid arguments

c:\Users\Devin\Documents\My Games\Terraria\ModLoader\Mod Sources\Enderuim\NPCs\HealthSiphon.cs(28,44) : error CS1503: Argument 2: cannot convert from 'double' to 'float'

Exactly like it says, it is expecting a float and you passed it a double for the 2nd argument of:
MyModNPCAIExtras.FighterAI(npc.whoAmI, 2.1, 0.23F, null);
https://www.google.com.au/search?q=cannot+convert+from+'double'+to+'float
 
Temporarily disable your antivirus, it's illegal to distribute the source, and I don't think you are having much luck asking people to give you the answers.
 
where would I look on it anyway?
[DOUBLEPOST=1457857772,1457857185][/DOUBLEPOST]got it to work, where do i look for the worm AI? I looked around the NPC thingy and saw nothing on ai
 
where would I look on it anyway?
[DOUBLEPOST=1457857772,1457857185][/DOUBLEPOST]got it to work, where do i look for the worm AI? I looked around the NPC thingy and saw nothing on ai

The method VanillaAI in the NPC class contains all the AIs. You need aiStyle == 6.
 
hey @bluemagic123 or @jopojelly, quick question if you have time, do you know anything about increasing the memory allocated to Terraria?
My mod loads about 100mb of wav sounds, and I've got plenty more to come, not to mention more textures etc. They are already compressed (there are over 1200 of them) so it's not that, and I have plenty more system memory available, but on loading my mod I get a OutofMemory Exception.
Yup I know of this issue too. They might need to completely overhaul the way sounds are handled.
I said before, that stuff doesnt work on my computer since my antivirus is a strict :red:
No need to curse. You can also pull the src from git and run the instructions found in the README file. This will get you all files as well.
 
If I was to allow any type of wood used for a certain recipe, what would I write in AddRecipes? Should I add multiple recipes, like that:
Code:
public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, 9, 60);
            recipe.AddTile(304);
            recipe.SetResult(this);
            recipe.AddRecipe();
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, 619, 60);
            recipe.AddTile(304);
            recipe.SetResult(this);
            recipe.AddRecipe();
            ...
            ...
            ...
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, 2504, 60);
            recipe.AddTile(304);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
or just add multiple IDs via OR, like that?
Code:
ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, 9 || 619 || 620 || 621 || 911 || 1729 || 2503 || 2504, 60);
            recipe.AddTile(304);
            recipe.SetResult(this);
            recipe.AddRecipe();
 
Back
Top Bottom