I Thought You Were Dead!?!?I made you some images for the example flail parts. They are yours if you want to use them.
View attachment 47923 View attachment 47924 View attachment 47925
Thanks, would've made my own but didn't really have time, I will upload these to the main post now.I made you some images for the example flail parts. They are yours if you want to use them.
View attachment 47923 View attachment 47924 View attachment 47925
Thank You for bestowing us with a flail tutorial!!!
Indeed, I just made the tutorial. (although I did fix the blue moon texture override)Funny, because I did the code for it... which I got help from... from @DivermanSam. So really... all the thanks should go to him.
The example mod has not been updated in awhile, thus some things inside are broken, I've never made a spear, but @Sin Costan has a tutorial for projectiles somewhere in his signature, in the bottom of that tutorial there is a spear tutorialHow would i make a spear? I used the example mod exactly, but no spear even shows up when i click.
Can you explain this to me, cuz i didnt really get what to do in your post?I uploaded a way to fix the blue moon chain texture into the tutorial.
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using TAPI;
using Terraria;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Mod
{
public class MPlayer : TAPI.ModPlayer
{
public override void PreUpdate()
{
int held_item = player.inventory[player.selectedItem].type;
if (held_item == 163)
{
Main.chain3Texture = Main.goreTexture[GoreDef.gores["Mod:Chain4"]];
}
}
}
}
hmm.. it still seems to use the blue chain..First, download the chain texture that is in the Op, then in your mod folder, create a new .cs file called MPlayer.cs, copy this code into that file
Save the file and it should be good!Code:using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using TAPI; using Terraria; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; namespace Mod { public class MPlayer : TAPI.ModPlayer { public override void PreUpdate() { int held_item = player.inventory[player.selectedItem].type; if (held_item == 163) { Main.chain3Texture = Main.goreTexture[GoreDef.gores["Mod:Chain4"]]; } } } }
Oh.. okay. I'm using r15your flail uses the blue chain texture? then you have a different problem entirely, if blue moon uses the blue chain texture, then that is good, that's what the code is for.
EDIT: also which version of Tapi are you using? this hasn't been updated for r16
So which flail was still using the blue moon chain texture?Oh.. okay. I'm using r15
The one that i just made using this tutorialSo which flail was still using the blue moon chain texture?
That's weird, that means something probably went wrong with the first part of the tutorial, would you mind posting the .cs .json for the flail?The one that i just made using this tutorial
sure.That's weird, that means something probably went wrong with the first part of the tutorial, would you mind posting the .cs .json for the flail?
The pretend type line may cause the problem, try removing it, and tell me if it doesn't work.sure.
cs
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using TAPI;
using Terraria;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace Mod
{
public class DarkFlail : ModItem
{
public override void HoldStyle(Player P)
{
Main.chain3Texture = Main.goreTexture[GoreDef.gores["Mod:ExampleChain"]];
}
}
}
json
{
"code": "DarkFlail",
"displayName": "The Mortician",
"size": [30,36],
"maxStack": 1,
"value": [0,0,0,0],
"rare": 5,
"pretendType": 163,
"useStyle": 5,
"useAnimation": 45,
"useTime": 30,
"damage": 200,
"knockback": 8,
"useSound": 1,
"noMelee": true,
"melee": true,
"shoot": "Modarkball",
"shootSpeed": 18,
"noUseGraphic": true,
"channel": true,
"recipes":
[{
"items": { "Dirt Block": 1 },
"tiles": [ "Work Bench" ],
"creates": 1
}]
}
It crashed when i tried to use it.The pretend type line may cause the problem, try removing it, and tell me if it doesn't work.
Well, thats unexpected, are you sure you have both chain textures, with the exact same names as the ones in your code? ExampleChain, also is your mods internal name actually Mod?It crashed when i tried to use it.