Standalone [1.3] tModLoader - A Modding API

Inb4 when your server is not the right version
mYFJsru.jpg
.
 

bropower125

Official Terrarian
How would i go about porting a non tmodloader character to tmodloader.

I would assume it would be something as simple as copying and pasting the character from one folder to the other, though you wouldn't be able to return him after (Considering that's how it was with tConfig and tapi)
 

bropower125

Official Terrarian
I don't see a folder entitled 'ModLoader' anywhere. Do you mean that I need to move folders around/create them to do this?
Whoever was helping you was talking about the wrong terraria folder, if you want to find your mods folders go look inside your "documents" then "my games" and then you should find the correct terraria folder (assuming your using windows like me)
 

Scooterboot9697

Official Terrarian
So, I finally decided to get off my lazy :red: and fiddle around with this.
It's been going smoothly(sarcasm), except for one rather annoying compiling error I cannot seem to fix or figure out.
Code:
Missing mod: MetroidMod/Items/PowerBeam
  at Terraria.ModLoader.ModLoader.GetTexture(String name)
  at Terraria.ModLoader.Mod.SetupContent()
  at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
Please tell me it's not something that's blatantly obvious and I'm just being stupid.

(Source linked, so you can take a look at it.)
 

Attachments

  • Metroid Mod -Test.zip
    3 KB · Views: 111

bropower125

Official Terrarian
So, I finally decided to get off my lazy :red: and fiddle around with this.
It's been going smoothly(sarcasm), except for one rather annoying compiling error I cannot seem to fix or figure out.
Code:
Missing mod: MetroidMod/Items/PowerBeam
  at Terraria.ModLoader.ModLoader.GetTexture(String name)
  at Terraria.ModLoader.Mod.SetupContent()
  at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
Please tell me it's not something that's blatantly obvious and I'm just being stupid.

(Source linked, so you can take a look at it.)

Did you put in an image named "PowerBeam"? (Otherwise you had the same problem I did and I had no clue what the heck was going on)
 

bropower125

Official Terrarian
I put in an image named "PowerBeam.png", yes, alongside the "PowerBeam.cs" file. Do I need to remove the ".png"?:confused:
No, you do not need to remove the .png, that is unless you cannot see any other files's extensions (which I highly recommend turning on extension viewing, it helps alot) but otherwise no, I had asked bluemagic and he never got back to me on what's wrong with the code for items, I would just recomend restarting the item and avoiding as much exampleitem code as possible because that's what seems to screw it up, I believe the problem is with the recipe code however

Edit: Yeah, it's the recipe code from the example item. I assume you made your item using modded items?

Edit3: Nevermind it's the recipegroup that's wrong with ExampleItem (I mean you dont even need a recipe group)

Edit2: Another thing wrong with ExampleItem, is that it's missing the thing at the top that say "Using Terraria;" That is most likely your problem
 
Last edited:

Scooterboot9697

Official Terrarian
No, you do not need to remove the .png, that is unless you cannot see any other files's extensions (which I highly recommend turning on extension viewing, it helps alot) but otherwise no, I had asked bluemagic and he never got back to me on what's wrong with the code for items, I would just recomend restarting the item and avoiding as much exampleitem code as possible because that's what seems to screw it up, I believe the problem is with the recipe code however
Well, alright. Thanks for the help, I suppose. I'll try a few things, and maybe I can get it to work.
 

bropower125

Official Terrarian
Well, alright. Thanks for the help, I suppose. I'll try a few things, and maybe I can get it to work.

Your problems either with the recipe or you might have forgot to put in "Using Terraria;"

Edit: That's as far as I can tell

Edit2: Yeah whatever it is I looked through it and everythings A-OK so I'm just gonna say to redo the code without using example item if possible

Edit3: Also I should mention that none of that green code will do anything, need to remove all //'s (and all of the speech that comes with it)

Edit4: Actually what is the name of your folder? Did it originally have the "test" part in it?
 
Last edited:

Scooterboot9697

Official Terrarian
Your problems either with the recipe or you might have forgot to put in "Using Terraria;"

Edit: That's as far as I can tell

Edit2: Yeah whatever it is I looked through it and everythings A-OK so I'm just gonna say to redo the code without using example item if possible

Edit3: Also I should mention that none of that green code will do anything, need to remove all //'s (and all of the speech that comes with it)

Edit4: Actually what is the name of your folder? Did it originally have the "test" part in it?
I appreciate how you're trying to help me, but I think it would be better if you explain things to me on a more advance level, as I'm a veteran tAPI modder.
Edit: And I have all of the above sorted out (Edit 2: except for rewriting it. bleh).
 

bropower125

Official Terrarian
I appreciate how you're trying to help me, but I think it would be better if you explain things to me on a more advance level, as I'm a veteran tAPI modder.
Edit: And I have all of the above sorted out.
Had no clue so I was trying to be as helpful as I could, also I don't know if you really need the XnaFrameworkGraphics thing though, since my throwing weapons don't need them.

Anyways since clearly there is something wrong with the code system, I would recommend just restarting the entire items code since I had the exact same problem and I simply redid the item and it fixed it sooooo

Edit: I should mention I'm somewhat noobish to tModloader though I do have prior HTML coding experience as well as other stuff that's somewhat similar (icluding java coding), I have no clue how to explain things in more depth just yet
 

Scooterboot9697

Official Terrarian
Anyways since clearly there is something wrong with the code system, I would recommend just restarting the entire items code since I had the exact same problem and I simply redid the item and it fixed it sooooo
Now that I think about it, I remember having a similar problem when I first started with tAPI, it was one of the "I don't know what I did, but it works now" moments.

Edit: Well...
I don't know what I did, but it works now.
Basically I made brand new files for everything then copied over the code that I needed and it works. Plus, I'm not sure if this has anything to do with it, but I renamed the folder from "Metroid Mod" to "MetroidMod" (removed the space) which may or may not have helped.
Thanks for all of your help, by the way.:happy:
 
Last edited:

jopojelly

Retinazer
tModLoader
I renamed the folder from "Metroid Mod" to "MetroidMod" (removed the space) which may or may not have helped.
That is exactly the problem. Looks like you fixed it, but it seems everyone messes up the autoloaded filenames, maybe I should make a post to easily help people with this problem.
 

Dan Yami

Empress of Light
how to i create multiple recipes for one item?? this one doesnt work:

Code:
public override void AddRecipes()
        {
            ModRecipe recipe = new ModRecipe(mod);
            recipe.AddIngredient(null, "MagicSnow", 5);
            recipe.AddIngredient(ItemID.DemoniteBar, 1);
            recipe.AddIngredient(ItemID.ShadowScale, 1);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
           
            recipe.AddIngredient(null, "MagicSnow", 5);
            recipe.AddIngredient(ItemID.CrimtaneBar, 1);
            recipe.AddIngredient(ItemID.TissueSample, 1);
            recipe.AddTile(TileID.Anvils);
            recipe.SetResult(this);
            recipe.AddRecipe();
        }
 
Top Bottom