TheAquaBear
Golem
can anyone please help me?
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace ThoriumMod.Projectiles
{
public class SevenSeasBall : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Seven Seas Ball";
projectile.width = 26;
projectile.height = 26;
projectile.scale = 1;
projectile.friendly = true;
projectile.penetrate = -1;
projectile.melee = true;
projectile.aiStyle = 13;
aiType = ProjectileID.GolemFist;
}
public override void AI()
{
projectile.ai[1]++;
if (projectile.ai[1] >= 0)
{
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.Next((int)-6f, (int)6f), Main.rand.Next((int)-6f, (int)6f), mod.ProjectileType("Bubble"), 190, 2, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.Next((int)-6f, (int)6f), Main.rand.Next((int)-6f, (int)6f), mod.ProjectileType("Bubble"), 190, 2, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.Next((int)-6f, (int)6f), Main.rand.Next((int)-6f, (int)6f), mod.ProjectileType("Bubble"), 190, 2, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.Next((int)-6f, (int)6f), Main.rand.Next((int)-6f, (int)6f), mod.ProjectileType("Bubble"), 190, 2, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, Main.rand.Next((int)-6f, (int)6f), Main.rand.Next((int)-6f, (int)6f), mod.ProjectileType("Bubble"), 190, 2, projectile.owner, 0f, 0f);
projectile.ai[1] = -40;
}
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 109);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("AquaBoomDamage"), 200, 5, projectile.owner, 0f, 0f);
Projectile.NewProjectile(projectile.Center.X, projectile.Center.Y, 0f, 0f, mod.ProjectileType("AquaBoom"), 0, 5, projectile.owner, 0f, 0f);
}
public override void PostDraw(Microsoft.Xna.Framework.Graphics.SpriteBatch spriteBatch, Color lightColor)
{
Texture2D texture = ModLoader.GetTexture("ThoriumMod/Projectiles/SevenSeasChain");
Vector2 position = projectile.Center;
Vector2 mountedCenter = Main.player[projectile.owner].MountedCenter;
Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?();
Vector2 origin = new Vector2((float)texture.Width * 0.5f, (float)texture.Height * 0.5f);
float num1 = (float)texture.Height;
Vector2 vector2_4 = mountedCenter - position;
float rotation = (float)Math.Atan2((double)vector2_4.Y, (double)vector2_4.X) - 1.57f;
bool flag = true;
if (float.IsNaN(position.X) && float.IsNaN(position.Y))
flag = false;
if (float.IsNaN(vector2_4.X) && float.IsNaN(vector2_4.Y))
flag = false;
while (flag)
{
if ((double)vector2_4.Length() < (double)num1 + 1.0)
{
flag = false;
}
else
{
Vector2 vector2_1 = vector2_4;
vector2_1.Normalize();
position += vector2_1 * num1;
vector2_4 = mountedCenter - position;
Microsoft.Xna.Framework.Color color2 = Lighting.GetColor((int)position.X / 16, (int)((double)position.Y / 16.0));
color2 = projectile.GetAlpha(color2);
Main.spriteBatch.Draw(texture, position - Main.screenPosition, sourceRectangle, color2, rotation, origin, 1f, SpriteEffects.None, 0.0f);
}
}
}
}
}
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ModLoader;
namespace ThoriumMod.Projectiles
{
public class Bubble : ModProjectile
{
public override void SetDefaults()
{
projectile.name = "Bubble";
projectile.width = 14;
projectile.height = 14;
projectile.alpha = 100;
projectile.friendly = true;
projectile.melee = true;
projectile.light = 0.4f;
projectile.penetrate = 1;
projectile.timeLeft = 180;
projectile.tileCollide = false;
projectile.aiStyle = 70;
Main.projFrames[projectile.type] = 8;
}
public override void OnHitNPC(NPC target, int damage, float knockback, bool crit)
{
if (Main.rand.Next(2) == 0)
{
target.AddBuff(mod.BuffType("GraniteSurge"), 300, true);
}
}
public override void Kill(int timeLeft)
{
Main.PlaySound(2, (int)projectile.position.X, (int)projectile.position.Y, 56);
for (int k = 0; k < 20; k++)
{
int DustID = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y), projectile.width + 8, projectile.height + 8, 29, projectile.velocity.X * 0.2f, projectile.velocity.Y * 0.2f, 100, default(Color), 1f);
Main.dust[DustID].noGravity = true;
}
}
public override void PostAI()
{
projectile.frameCounter++;
if (projectile.frameCounter > 2)
{
projectile.frame++;
projectile.frameCounter = 0;
}
if (projectile.frame >= 8)
{
projectile.frame = 0;
return;
}
}
}
}
I see, I forgot that my frame is zero-indexed, while npcFrameCount isn't. To get rid of the blank frame, change the second if statement to "(myFrame >= Main.npcFrameCount[npc.type])".now it disapears each time it switches to the beginning of the sprite sheet and then reapears 1 frame time later
in set defaults I have
Code:npc.aiStyle = 3; animationType = NPCID.Zombie; Main.npcFrameCount[npc.type] = 3; aiType = NPCID.Skeleton;
and the other code is
Code:public override void FindFrame(int frameHeight) { npc.frameCounter++; if (npc.frameCounter % 6 == 0) { myFrame++; if (myFrame > Main.npcFrameCount[npc.type]) myFrame = 0; } npc.frame.Y = myFrame * frameHeight; npc.spriteDirection = npc.direction; }
Hello bluemagic123! I have a problem...
I ask only one simple question: WHAT THE HECK IS ON SCREENSHOT???!!!
Seriously, why i have only one quickslot? and i have no inventory! Interface is absolutely corrupted.
FIX IT OR SAY "DEAL WITH WITH!"
View attachment 116133
You make spoilers with [ spoiler ] [ /spoiler ] tags. If you replace the first tag with [ spoiler=someText ], then the spoiler title changes to someText. (Don't use the spaces when making actual tags!)6/8/2016 11:19:43 PM
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)
6/8/2016 11:20:12 PM
System.DllNotFoundException: Unable to load DLL 'CSteamworks': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at Steamworks.NativeMethods.SteamAPI_RestartAppIfNecessary(AppId_t unOwnAppID)
at Terraria.Social.Steam.CoreSocialModule.Initialize()
at Terraria.Social.SocialAPI.Initialize(Nullable`1 mode)
at Terraria.Program.LaunchGame(String[] args)
Tmodloader crash first time launching after install, please help and I just joined so I don't know how to use a spoiler
I see, I forgot that my frame is zero-indexed, while npcFrameCount isn't. To get rid of the blank frame, change the second if statement to "(myFrame >= Main.npcFrameCount[npc.type])".
Ok, first find your Terraria.exe. Being the GoG version, this might be in Program Files/Terraria, or somewhere else.How do I Install Tmodloader for Terraria 1.3.1.1 GOG Version? I dont understand :C
Make sure you unblock all of the files in this folder before you start installation.
To install, find your vanilla Terraria.exe and TerrariaServer.exe files then copy them into the Vanilla folder (inside the Patcher folder). Run the Patch.bat file, then the modded Terraria.exe and tModLoaderServer.exe should appear in the tModLoader folder. Copy these modded files back to where you found your vanilla Terraria.exe.
Also copy everything in the Files folder to where you found your vanilla Terraria.exe.
If you ever want to switch back to vanilla, the vanilla Terraria.exe file will still be in the Vanilla folder.
I understand that stuff But I dont knw how to install it i tried one time i got an error :/ I dont knw how to install tmodloader correctly do u have skype or something pm me if u do.Ok, first find your Terraria.exe. Being the GoG version, this might be in Program Files/Terraria, or somewhere else.
One of the easier ways to find it is to look at the destination of your desktop shortcut if you have one (right-click and click 'properties' or something).
@Mineblaze Go to Steam\steamapps\common\Terraria and it will be in therePLEASE ANSWER! How to delete mp3sharp DLL?
PLEASE ANSWER! How to delete mp3sharp DLL?
And yes, I have reainstalled Windows, so I think if I try to publish this mod, it'll be uploaded as another one, won't it?I just wanted to update my old mod from 1.3.0.8 and add new items, but now, on 1.3.1 it crashes. :c
Here's the log
Couldn't find the part of path "C:\Users\chief\Documents\My Games\Terraria\ModLoader\Logs\Network Error.txt".
в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
в System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
в System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
в System.IO.StreamWriter..ctor(String path, Boolean append)
в System.IO.File.CreateText(String path)
в Terraria.ModLoader.ErrorLogger.LogModPublish(String message)
в Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
в Terraria.UI.UIElement.Click(UIMouseEvent evt)
в Terraria.UI.UserInterface.Update(GameTime time)
в Terraria.Main.do_Update(GameTime gameTime)
в Terraria.Main.Update(GameTime gameTime)
Ah, well. I just didn't change the version. It has been replaced with the new version. Now everything is fine.I just wanted to update my old mod from 1.3.0.8 and add new items, but now, on 1.3.1 it crashes. :c
Here's the log
Couldn't find the part of path "C:\Users\chief\Documents\My Games\Terraria\ModLoader\Logs\Network Error.txt".
в System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
в System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
в System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
в System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
в System.IO.StreamWriter..ctor(String path, Boolean append)
в System.IO.File.CreateText(String path)
в Terraria.ModLoader.ErrorLogger.LogModPublish(String message)
в Terraria.ModLoader.UI.UIModSourceItem.Publish(UIMouseEvent evt, UIElement listeningElement)
в Terraria.UI.UIElement.Click(UIMouseEvent evt)
в Terraria.UI.UserInterface.Update(GameTime time)
в Terraria.Main.do_Update(GameTime gameTime)
в Terraria.Main.Update(GameTime gameTime)
[doublepost=1465401544,1465401347][/doublepost]
And yes, I have reainstalled Windows, so I think if I try to publish this mod, it'll be uploaded as another one, won't it?
Here's the steps broken down:I understand that stuff But I dont knw how to install it i tried one time i got an error :/ I dont knw how to install tmodloader correctly do u have skype or something pm me if u do.