Standalone [1.3] tModLoader - A Modding API

Nonsense.

Back in MC1.3 days, there was a mod browser as well, and that I enjoyed greatly. Now, Curse exists and is becoming essentially a great addition. I've had my hands in the FTB realm for a while, as I'm also a mod on their help chat. I've dabbled in making mod packs before, and the process took days, if not weeks to make a pack I felt worthy of playing.

Now, I get where you're coming from with seeing if others think a mod is good, but the mod browser does that as well, because you can check the 'more info' tab and be taken directly to the webpage where the mod description and thread is. For all of the 20~ mods I have downloaded, that's exactly what I did. I checked to see if it interested me, and then opened the thread page to see if it was good, then downloaded if it was and ignored if it wasn't. I wish there was a similar system for Minecraft in it's entirety, but as of right now it's barebones and lacking a lot of the mods. Curse is a good start, but it doesn't host everything just yet, and it doesn't have a simple forum/comment setup either.

And yes, I know that the browser doesn't have all the mods, but that doesn't bother me much, because it's extremely simple to use, and I don't have to search for mods for hours to days to find everything I want to play.
 
hey guys, yesterday my mod was working just fine, but today i keep getting this error
c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(26,36) : error CS1002: ; expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,34) : error CS1026: ) expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1002: ; expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1525: Invalid expression term ')'









here is the code for the weapon:
using System;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace DinoMod.Items.Weapons
{
public class DeathShot : ModItem
{
public override void SetDefaults()
{
item.name = "DeathShot";
item.damage = 40;
item.ranged = true;
item.width = 40;
item.height = 20;
item.toolTip = "Why can't i hold all these guns?";
item.useTime = 38;
item.useAnimation = 38;
item.useStyle = 5;
item.noMelee = true; //so the item's animation doesn't do damage
item.knockBack = 7;
item.value = 10000;
item.rare = 2;
item.UseSound = SoundId.36;
item.autoReuse = false;
item.shoot = 10; //idk why but all the guns in the vanilla source have this
item.shootSpeed = 14f;
item.useAmmo = AmmoID.Bullet;
}

public override void AddRecipes() //How to craft this gun
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ItemID.TacticalShotgun, 1); //you need 1 DirtBlock
recipe.AddTile(TileID.134); //at work bench
recipe.SetResult(this);
recipe.AddRecipe();

}

public static Vector2[] randomSpread(float speedX, float speedY, int angle, int num)
{
var posArray = new Vector2[num];
float spread = (float)(angle * 0.0174532925);
float baseSpeed = (float)System.Math.Sqrt(speedX * speedX + speedY * speedY);
double baseAngle = System.Math.Atan2(speedX, speedY);
double randomAngle;
for (int i = 0; i < num; ++i)
{
randomAngle = baseAngle + (Main.rand.NextFloat() - 0.5f) * spread;
posArray = new Vector2(baseSpeed * (float)System.Math.Sin(randomAngle), baseSpeed * (float)System.Math.Cos(randomAngle));
}
return (Vector2[])posArray;
}

public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
{
Vector2[] speeds = randomSpread(speedX, speedY, 8, 6);
for (int i = 0; i < 5; ++i)
{
Projectile.NewProjectile(position.X, position.Y, speeds.X, speeds.Y, type, damage, knockBack, player.whoAmI);
}
return false;
}
}
}
 
I fixed that and now its showing me these errors
c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,34) : error CS1026: ) expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1002: ; expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1525: Invalid expression term ')'

which is one less than before so thanks
 
I fixed that and now its showing me these errors
c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,34) : error CS1026: ) expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1002: ; expected

c:\Users\Dave\Documents\My Games\Terraria\ModLoader\Mod Sources\DinoMod\Items\Weapons\DeathShot.cs(37,38) : error CS1525: Invalid expression term ')'

which is one less than before so thanks
look up ExampleMod usages of TileID

and the other thing is you are setting a Vector2 to a Vector2[]
fix:
Code:
            for (int i = 0; i < num; ++i)
            {
                randomAngle = baseAngle + (Main.rand.NextFloat() - 0.5f) * spread;
                posArray[i] = new Vector2(baseSpeed * (float)System.Math.Sin(randomAngle), baseSpeed * (float)System.Math.Cos(randomAngle));
            }

Also, I highly recommend downloading Visual Studio, these kind of errors are easy to identify and fix in it.
 
I downloaded visual studios and took a look at the example mod tiles and I still don't know how to fix the error and your fix didn't remove one of the errors
 
Nonsense.

Back in MC1.3 days, there was a mod browser as well, and that I enjoyed greatly. Now, Curse exists and is becoming essentially a great addition. I've had my hands in the FTB realm for a while, as I'm also a mod on their help chat. I've dabbled in making mod packs before, and the process took days, if not weeks to make a pack I felt worthy of playing.

Now, I get where you're coming from with seeing if others think a mod is good, but the mod browser does that as well, because you can check the 'more info' tab and be taken directly to the webpage where the mod description and thread is. For all of the 20~ mods I have downloaded, that's exactly what I did. I checked to see if it interested me, and then opened the thread page to see if it was good, then downloaded if it was and ignored if it wasn't. I wish there was a similar system for Minecraft in it's entirety, but as of right now it's barebones and lacking a lot of the mods. Curse is a good start, but it doesn't host everything just yet, and it doesn't have a simple forum/comment setup either.

And yes, I know that the browser doesn't have all the mods, but that doesn't bother me much, because it's extremely simple to use, and I don't have to search for mods for hours to days to find everything I want to play.
:red:, forgot about Curse.
It shows as Much Info as you need.
and it hosts Most of the Mods that are actually Worth it. I Rarly found a Mod that is not on it. (Like Optifine or Mekanism, which i still don't understand why it isn't on there).
and I have been on the side of MMC since β 1.8, and i didn't found out about Mod Browsers until like 1.5.1 - 1.6.4.
And i still mostly Download Things manually, either when they are not on Curse, or just out of Habit.
Or just wanna Look up how the Mod is going.
Freaking Thaumcraft 1.10/1.11 where are you...
 
I downloaded visual studios and took a look at the example mod tiles and I still don't know how to fix the error and your fix didn't remove one of the errors
ok, well you have "recipe.AddTile(TileID.134); //at work bench", but TileID.MythrilAnvil is 134, and TileID.number is not how you would do this. Either TileID.WorkBenches or 18, not some combination of them.
 
Someone please help me solve this...
 

Attachments

  • Screenshot 2017-02-28 12.10.24.png
    Screenshot 2017-02-28 12.10.24.png
    57.1 KB · Views: 203
Last edited:
I found out how to add an image properly :)
Ah, it appears you are not logged into Steam. Make sure Steam is running and you're logged into an account that owns Terraria. tModLoader requires this just like vanilla.
[doublepost=1488285638,1488285575][/doublepost]
I downloaded visual studios and took a look at the example mod tiles and I still don't know how to fix the error and your fix didn't remove one of the errors
Can you tell us the error and in which file? If you're trying to use the latest ExampleMod coming from Github, it will require the latest development release as well, which you'll need to build yourself until we release the new version.
 
It seems to be github. so I am trying to see if there is some other place we can download it from in the meantime. Maybe someone could upload it to some other site and share the link until the github link is fixed?
 
Back
Top Bottom