Me and a friend are trying to install tModLoader on our computers. Mine runs fine and works right away, but for my friend it says it could not find a location to install to. So we tried to do his mainly exactly how so many guides told us to do, but now it keeps saying "Please run Terraria though the steam client" Even though that is exactly what he is doing. Can I get some help?
You see we tried that and it still is not working. We can get the non modded terraria to run fine but every time we try to run the modded terraria, it fails to work.
Came here to ask how to newline in the newer version but I tried on a whim and GOD BLESS YOU GUYS for allowing the \n character. I got so sick of the "1" + Environment.NewLine + "2" nonsense. 10/10.
How do i create a for loop that does something for each active player? For each active player in a specific party (like red, green, blue, ..) would be even better. Any help would be appreciated
You see we tried that and it still is not working. We can get the non modded terraria to run fine but every time we try to run the modded terraria, it fails to work.
Came here to ask how to newline in the newer version but I tried on a whim and GOD BLESS YOU GUYS for allowing the \n character. I got so sick of the "1" + Environment.NewLine + "2" nonsense. 10/10.
How do i create a for loop that does something for each active player? For each active player in a specific party (like red, green, blue, ..) would be even better. Any help would be appreciated
Something like the following can be used to loop through the player array, and I've included an if statement that checks if the player in the loop is friendly for free.
Code:
for (int i = 0; i < Main.player.Length; i++ )
{
Player loopPlayer = Main.player[i];
if (loopPlayer.active || loopPlayer.dead)
continue; //skip dead or inactive players
if (loopPlayer == player || !(loopPlayer.hostile && player.hostile) || (player.team == loopPlayer.team && (loopPlayer.team != 0 || player.team != 0))) //if both the player and myself aren't hostile, or not on an enemy team.
{
//this is a friendly player, or myself
}
}
The player's team is stored in player.team, though I forget which number relates to which colour.
Something like the following can be used to loop through the player array, and I've included an if statement that checks if the player in the loop is friendly for free.
Code:
for (int i = 0; i < Main.player.Length; i++ )
{
Player loopPlayer = Main.player[i];
if (loopPlayer.active || loopPlayer.dead)
continue; //skip dead or inactive players
if (loopPlayer == player || !(loopPlayer.hostile && player.hostile) || (player.team == loopPlayer.team && (loopPlayer.team != 0 || player.team != 0))) //if both the player and myself aren't hostile, or not on an enemy team.
{
//this is a friendly player, or myself
}
}
The player's team is stored in player.team, though I forget which number relates to which colour.
Reinstalling it was one of the first things we did- Multiple times. I don't understand it as much as the next guy but we are really trying to find a fix for this
Reinstalling it was one of the first things we did- Multiple times. I don't understand it as much as the next guy but we are really trying to find a fix for this
It's possible that something in the ModLoader folder within My Documents has become corrupt somehow. Try renaming/removing the ModLoader folder and see if it works. The folder I'm referring to is \My Documents\My Games\Terraria\ModLoader.
I do have a Mod class as seen in my GitHub: https://github.com/Psychoreality/MechParadise so I'm getting very confused. Can anyone help? If it helps out, I'm following the Mac mod building guide, and this error is a loading error, not a building error.
Help guys! I'm new to tModLoader, so i can't do even this simple thing!!
All i want to do is to make consumable item that gives you debuff "On fire", that's it!
(MY HORRIBLE CODE IN SPOILER.)
I just want to understand how this works, but my item isn't even usable in game. It does nothing.
Just explain me how this works.
And for example, how to interact with player health through item? So that item would hurt you or heal you upon usage?
How do i spawn projectiles with item? - I want to make consumable item that spawns 10 bullets around player and launches them in different dirrections?
If someone will help me and write code for this items, then i can understand how it works.
Oh and last question. Where do i find "commands"? Like "target.AddBuff(BuffID.x, x)"?
What can i put instead "AddBuff"? What else can i do with target?
Please, i hope someone will help.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace TerraAbilities.Items.Cards
{
public class c1 : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Test");
Tooltip.SetDefault("* * *");
}
Help guys! I'm new to tModLoader, so i can't do even this simple thing!!
All i want to do is to make consumable item that gives you debuff "On fire", that's it!
(MY HORRIBLE CODE IN SPOILER.)
I just want to understand how this works, but my item isn't even usable in game. It does nothing.
Just explain me how this works.
And for example, how to interact with player health through item? So that item would hurt you or heal you upon usage?
How do i spawn projectiles with item? - I want to make consumable item that spawns 10 bullets around player and launches them in different dirrections?
If someone will help me and write code for this items, then i can understand how it works.
Oh and last question. Where do i find "commands"? Like "target.AddBuff(BuffID.x, x)"?
What can i put instead "AddBuff"? What else can i do with target?
Please, i hope someone will help.
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace TerraAbilities.Items.Cards
{
public class c1 : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Test");
Tooltip.SetDefault("* * *");
}
My player changes the stats of an item from another player but these changes doesnt seem to arrive at the other players client automatically. How can I send those changes to his client?
error CS0246: The type or namespace name 'Minion' could not be found (are you missing a using directive or an assembly reference?), error CS0246: The type or namespace name 'HoverShooter' could not be found (are you missing a using directive or an assembly reference?)
im using minion.cs and hovershooter.cs in example mod to make my minion
and help?
c:\Users\Zylch\Documents\My Games\Terraria\ModLoader\Mod Sources\moreinvasions\Items\Slimeblaster.cs(6,15) : error CS0101: The namespace 'MoreInvasions.Items.Weapons' already contains a definition for 'Slimeblaster'
Object reference not set to an instance of an object.
at LegendsOfTerraria.Mounts.BrainMount.SetDefaults()
at Terraria.ModLoader.ModMountData.SetupMount(MountData mountData)
at Terraria.ModLoader.MountLoader.SetupMount(MountData mount)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.