It's only C#So, in this API you can connect .json and .cs? Looks conveniently.
tell me what i did wrong
I ran the file in the download and got terraria and terraria backup (this was after i put in there vanilla terraria), then i put terraria in my folder where i got terraria. don't currently have any mods installed
And what is wrong with that?tell me what i did wrong
I ran the file in the download and got terraria and terraria backup (this was after i put in there vanilla terraria), then i put terraria in my folder where i got terraria. don't currently have any mods installed
Forgot to mention, when i did that it didn't work, steam didn't let me start it and i couldn't start it from the application
I managed to get the .dll files and it does actually build my mod now. But now there's some new errors, not my code:
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
Giving it a capital (Recipe) gives these errors:
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddTile'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddIngredient'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'SetResult'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddRecipe'
For the .dll files:
Goto: "C:\Windows\Microsoft.NET\assembly\GAC_32"
In there search for the following folders:
"Microsoft.Xna.Framework"
"Microsoft.Xna.Framework.Game"
"Microsoft.Xna.Framework.Graphics"
"Microsoft.Xna.Framework.Xact"
COPY (do not cut/delete it) the .dll file inside each folder to your Terraria folder (C:\Program Files (x86)\Steam\SteamApps\common\Terraria)
Post some source if you need help, but it seems like you didn´t use the Recipe method right.
ModRecipe recipe = new ModRecipe(this);
recipe.AddIngredient(ItemID.DirtBlock);
recipe.SetResult(ItemID.LifeCrystal, 15);
recipe.AddRecipe();
Do you have added an Textur.png for your item?
It must be named EXACTLY like the .cs
Do you have added an Textur.png for your item?
It must be named EXACTLY like the .cs
Sure, there isn't anything stopping you from making one.When the next update comes out, can i make a template mod for this?
For now, you can look at the documentation and see which methods are virtual or abstract. Abstract methods must be overridden, and virtual methods can be overridden if you want to.And what is wrong with that?
----------------------------------
Where can i see which methods i can override?
For the dll problem, I have it fixed so that it automatically finds the right directories for you in the next version.I managed to get the .dll files and it does actually build my mod now. But now there's some new errors, not my code:
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
error CS0103: The name 'recipe' does not exist in the current context
Giving it a capital (Recipe) gives these errors:
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddTile'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddIngredient'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'SetResult'
error CS0117: 'Terraria.Recipe' does not contain a definition for 'AddRecipe'
For the .dll files:
Goto: "C:\Windows\Microsoft.NET\assembly\GAC_32"
In there search for the following folders:
"Microsoft.Xna.Framework"
"Microsoft.Xna.Framework.Game"
"Microsoft.Xna.Framework.Graphics"
"Microsoft.Xna.Framework.Xact"
COPY (do not cut/delete it) the .dll file inside each folder to your Terraria folder (C:\Program Files (x86)\Steam\SteamApps\common\Terraria)
Woah everyone replied while I was sleeping
Sure, there isn't anything stopping you from making one.
For now, you can look at the documentation and see which methods are virtual or abstract. Abstract methods must be overridden, and virtual methods can be overridden if you want to.
For the dll problem, I have it fixed so that it automatically finds the right directories for you in the next version.
For the texture problem, it looks like you've already got it fixed but I'll say it here for everyone else: when you call GetTexture you're essentially passing in the path of the texture as a parameter, starting with the mod's directory and not including the extension. For example, the ExampleMod folder contained all the files in the temporary tutorial, and it also had a folder called Items, which contained ExampleSword.png. So I used "ExampleMod/Items/ExampleSword".
Whoops, I forgot, the GetTexture method isn't actually needed for assigning textures to items. You can give items a texture by passing in the texture name as the third parameter of AddItem, since I call GetTexture for you with that. The GetTexture method is mostly for if people want to do their own custom drawing (for example, skeletron's arms). Also, gif files currently aren't supported by this mod.So I'm trying to create my own 'soul' as an item.. but it gives me this error.
View attachment 61868
My code for GetTexture is valid.. I'm trying .gif it gave me an error.. I tried .png and it gives me an error still..
Now it is simply giving me this:
c:\Users\Daniel\Documents\My Games\Terraria\ModLoader\Mod Sources\ItemOverhaulOverpower\Items\SoulOfPower.cs(17,8) : error CS1061: 'Terraria.Item' does not contain a definition for 'GetTexture' and no extension method 'GetTexture' accepting a first argument of type 'Terraria.Item' could be found (are you missing a using directive or an assembly reference?)
My cs file is there.. I checked code and thats all ok.
'item.GetTexture = "ItemOverhaulOverpower/Items/SoulOfPower";'
(SoulOfPower.gif)
Whoops, I forgot, the GetTexture method isn't actually needed for assigning textures to items. You can give items a texture by passing in the texture name as the third parameter of AddItem, since I call GetTexture for you with that. The GetTexture method is mostly for if people want to do their own custom drawing (for example, skeletron's arms). Also, gif files currently aren't supported by this mod.
I haven't looked into how souls animate yet; I will do that before the next update though.
Woah everyone replied while I was sleeping
Sure, there isn't anything stopping you from making one.
For now, you can look at the documentation and see which methods are virtual or abstract. Abstract methods must be overridden, and virtual methods can be overridden if you want to.
For the dll problem, I have it fixed so that it automatically finds the right directories for you in the next version.
For the texture problem, it looks like you've already got it fixed but I'll say it here for everyone else: when you call GetTexture you're essentially passing in the path of the texture as a parameter, starting with the mod's directory and not including the extension. For example, the ExampleMod folder contained all the files in the temporary tutorial, and it also had a folder called Items, which contained ExampleSword.png. So I used "ExampleMod/Items/ExampleSword".