spigot-gillesm / RPProfessions

Create Immersive RP Professions Focused on Crafting
0 stars 0 forks source link

Help needed. #6

Closed HeinrichLivingston closed 11 months ago

HeinrichLivingston commented 11 months ago

Bought this a while ago, tried to setup the Blacksmith hammer via MMOItems to be used for the Anvil. It shows that it's linked all fine n dandy, but I can't open the Anvi UI. Not sure if it's my lack on knowledge for coding or if I pooched something... Love some help.

Cheers,

Heinrich.

spigot-gillesm commented 11 months ago

Hi! Thank you for using RPProfessions! Could you send me the content of your workstations.yml file so I can see if something is missing/wrong?

HeinrichLivingston commented 11 months ago

Yes of course!

`# The workstation ID (to be used in the profession configuration file) ANVIL:

The actual in-game blocks that allow to open the crafting menu

materials:

HeinrichLivingston commented 11 months ago

This to my knowledge is the base file. I had created a blacksmith hammer already. Idk if I need to put "mi:" prior to the ID or not.

spigot-gillesm commented 11 months ago

Thanks for the information. I think the issue here is that you're directly using the MMOItem, and not the RPProfession item (that makes use of MMOItem). To be more precise, RPProfessions uses (hidden) IDs inside the items and when you click a station with an item, RPProfessions check the item id to decide whether or not you're using the right tool. So, when using the blacksmith hammer from MMOItems, RPProfessions cannot find said ID. To make it work, you have to get the BLACKSMITH_HAMMER item from RPProfessions. You can use the '/rpp item get BLACKSMITH_HAMMER' command to get it, use the drop tables, use villager trades or make the item craftable. Another way I like is by using custom villagers (you can check Shopkeepers for that) and give them a trade for your tool (that, again, must be retrieved using RPProfessions). You can also make tools craftable with the vanilla crafting table (there's info on that in the wiki).

So, to clarify: The tool must come from the RPProfessions plugin.

You can add the hammer in your 'items/' folder, in your 'blacksmith.yml' file for example:

# The anvil workstation's tool
BLACKSMITH_HAMMER:
  category: TOOL
  mmo-item: BLACKSMITH_HAMMER # You get the MMOItems named "BALCKSMITH_HAMMER"

And use the get command as given above.

Or, you can make it a craftable item in the crafting table:

# The anvil workstation's tool
BLACKSMITH_HAMMER:
  category: TOOL
  # Any blacksmith can craft the hammer in a vanilla crafting station. This will then allow them to use the anvil for the advanced recipes
  station: WORKBENCH
  mmo-item: BLACKSMITH_HAMMER # You get the MMOItems named "BALCKSMITH_HAMMER"
  # A hammer shaped craft
  recipe:
    0: IRON_INGOT
    1: IRON_INGOT
    2: IRON_INGOT
    3: IRON_INGOT
    4: STICK
    5: IRON_INGOT
    7: STICK

But these are just examples. As long as the tool comes from RPProfessions (i.e. RPProfessions is the plugin that generated the item) it should work!

I hoped this helped!

HeinrichLivingston commented 11 months ago

Yes, Thank you! I have another question pertaining crafting via my blacksmith.yml, If I may ask here

spigot-gillesm commented 11 months ago

Yes sure, ask away!

HeinrichLivingston commented 11 months ago

So, Everything I do regarding the anvil, including the crafting example of the bronze helmet doesn't work. I'll show the code here. I thought it was something to do with the categories, spelling, what not. But they're base example too. *I'll be changing the categories later, but yk one disaster at a time

IRON_HELMET: mmo-item: IRON_HELMET station: ANVIL category: PLATE recipe: 0: IRON_INGOT 1: IRON_INGOT 2: IRON_INGOT 3: IRON_INGOT 5: IRON_INGOT required-level: 1 level-gain: 1 level-cap: 5 default: false BRONZE_HELMET: mmo-item: BRONZE_HELMET station: ANVIL dynamic: true category: PLATE recipe: 0: BRONZE_INGOT 1: BRONZE_INGOT 2: BRONZE_INGOT 3: BRONZE_INGOT 5: BRONZE_INGOT required-level: 1 level-gain: 1 level-cap: 30

Players have to find the pattern in order to craft this item

default: false STEEL_PICKAXE: category: TOOLS station: ANVIL mmo-item: STEEL_PICKAXE recipe: 0: IRON_INGOT 1: IRON_INGOT 3: IRON_INGOT 4: IRON_NUGGET 5: STICK 6: IRON_NUGGET 7: STICK

spigot-gillesm commented 11 months ago

When you say it doesn't work, what happens or doesn't happen exactly? Are the recipes not loaded on server start/on plugin reload? They don't show up in the recipes menu? Can you show me your server console log? Use Pastebin (at https://pastebin.com/ ) to give me a link of the console log so I can see if there's any error when loading RPProfessions

HeinrichLivingston commented 11 months ago

The recipes don't load, either through reload of the plugin and in the plugin menu. All that shows is the materials(Bronze and Steel) and tools(Hammer and Tongs). Gimme a sec to restart my server & I'll post console!

HeinrichLivingston commented 11 months ago

Here you go, https://pastebin.com/HvJHzzMj

spigot-gillesm commented 11 months ago

I see this error message when loading items:

20.11 22:17:10 [Server] WARN An error occurred while trying to generate item 'BLACKSMITH_HAMMER' with stat 'TIER': Could not find item tier with ID 'COMMON'
20.11 22:17:10 [Server] WARN An error occurred while trying to generate item 'STEEL_PICKAXE' with stat 'TIER': Could not find item tier with ID 'COMMON'

It seems the item tier 'COMMON' does not exist within your MMOItems configuration. Check the spelling in your MMOItems configurations, reload MMOItems and try the /rpp reload command and make sure the errors disappear. The plugin loaded 7 items and recipes so there should be exactly 7 of them. If once the error messages are gone, the items are still not there then we'll see what we can do.

spigot-gillesm commented 11 months ago

And I've also noticed the plugin "LiteSleep-1.4.8" is throwing a big stacktrace in the console, this plugin might not be working

HeinrichLivingston commented 11 months ago

I thought, least to my knowledge, I didn't have to specify item tiers? Because Item tiers resulted in the deconstruction of items if so you chose to want this.. Aha, I'm beyond confused..

Also, with LiteSleep, ye ik of the issues, I've been working with the dev on fixing it.

spigot-gillesm commented 11 months ago

I don't think you have to specify them when configuring the MMOItem, but the 'BLACKSMITH_HAMMER' and 'STEEL_PICKAXE' seem to have both the 'COMMON' tier assigned in their configuration. RPProfessions tries to load them but fails as MMOItems cannot generate them, at least it seems so

HeinrichLivingston commented 11 months ago

Yeah, It seems MMOItems generates the 'BLACKSMITH_HAMMER' and 'STEEL_PICKAXE' as common tiered items, however when I look in the item-tier.yml there's nothing within its config..

Still doesn't, to me at least, explain why the Bronze Helmet is not able to be crafted... I took that config from the item configuration example. To what I see, anything pertaining the anvil doesn't use. Where-as anything with the workbench & forge does.

HeinrichLivingston commented 11 months ago

I just added the item-tier file, reloaded MMO-Items & RPP, still unable to craft anything.

spigot-gillesm commented 11 months ago

I'm assuming you can access the anvil interface: Make sure you get the Bronze Ingots (ID as BRONZE_INGOT) from RPProfessions. In the example you gave me, the recipe is not made out of "mi:BRONZE_INGOT" but just "BRONZE_INGOT", which means that these ingots must exist somewhere in RPProfessions. If that is the case, make sure you're using the Bronze Ingots from RPProfessions (you get them either by crafting or using the get command).

HeinrichLivingston commented 11 months ago

I can use the anvil interface, yes. I made the bronze ingot from the forge & in-turn tried to make the bronze helmet from it. Within the helmet, I didn't specify MI, so I'm assuming it's using RPP? but I have the item config example for bronze ingot? In the crafting recipe for the helmet do I need to specify MI?

HeinrichLivingston commented 11 months ago

Best to help you understand, I guess a bit better is if I send you the blacksmith.yml?

spigot-gillesm commented 11 months ago

Send me the blacksmith.yml file and the *.yml files of MMOItems containing the items you're using in your server, so I'm sure I get everything

HeinrichLivingston commented 11 months ago

I can't post yml files here, do you want me just to paste bin it?

spigot-gillesm commented 11 months ago

Yes sure, it should be clear enough

HeinrichLivingston commented 11 months ago

https://pastebin.com/2Ni8PAga https://pastebin.com/gN12HTjt https://pastebin.com/EFy0Y6LS https://pastebin.com/FPve62VP

I should say, there's no variables like durability or what not with these items yet, we just want to make the able to be crafted first. Hopefully that hasn't or won't break anything when we do.

spigot-gillesm commented 11 months ago

So, if I understand, here is what you do:

  1. /rpp item get BRONZE_INGOT 64
  2. /rpp item get BLACKSMITH_HAMMER
  3. Right click an anvil with the Blacksmith Hammer you just got
  4. Position the Bronze Ingots you got in a U shape to craft a Bronze Helmet
  5. Click on the "Craft" icon

Nothing shows up?

HeinrichLivingston commented 11 months ago

Yes, Whether it be by command or by the forge, the recipe does not load/show. Even if I try to view it via /recipes.

spigot-gillesm commented 11 months ago

And there are no messages/warnings when reloading RPProfessions? Do the displayed amount of loaded items and recipes match what you're expecting?

HeinrichLivingston commented 11 months ago

20.11 23:13:54 [Server] INFO HenrikLivingston issued server command: /rpp reload 20.11 23:13:54 [Server] INFO Loading category.ies... 20.11 23:13:54 [Server] INFO Loaded 14 category.ies 20.11 23:13:54 [Server] INFO Loading workstation.s... 20.11 23:13:54 [Server] INFO Loaded 3 workstation.s 20.11 23:13:54 [Server] INFO Loading profession.s... 20.11 23:13:54 [Server] INFO Loaded 1 profession.s 20.11 23:13:54 [Server] INFO Loading effect.s... 20.11 23:13:54 [Server] INFO Loaded 0 effect.s 20.11 23:13:54 [Server] INFO Loading item.s... 20.11 23:13:54 [Server] INFO Loaded 7 item.s 20.11 23:13:54 [Server] INFO Loading recipe.s... 20.11 23:13:54 [Server] INFO Loaded 7 recipe.s 20.11 23:13:54 [Server] INFO Loading pattern.s... 20.11 23:13:54 [Server] INFO Loaded 2 pattern.s 20.11 23:13:54 [Server] INFO Loading drop.s... 20.11 23:13:54 [Server] INFO Loaded 0 drop.s 20.11 23:13:54 [Server] INFO Loading villager trade set.s... 20.11 23:13:54 [Server] INFO Loaded 0 villager trade set.s

This is what happens when I reload it. And yes, there should be 7 recipes, 1 profession, so on n so forth.

HeinrichLivingston commented 11 months ago

Screenshot_74 Also here's this. So you don't think am more dumb than I already am..

HeinrichLivingston commented 11 months ago

That gold ingot is a bronze ingot, btw It's vanilla textures.

spigot-gillesm commented 11 months ago

Alright, I got it! Here the:

default: false

Remove this from the items you want the players to know by default. Setting this option to false forces player to learn the recipe through patterns, you can check the wiki if you want to know more about it

Tell me if it worked

HeinrichLivingston commented 11 months ago

I removed it from.. Whatever it was on, reloaded the plugin, still can't craft the bronze helmet... It seems I can't craft anything with the anvil..

Mate, I'm beyond confused here lol.

spigot-gillesm commented 11 months ago

Try using '/rpprofessions pattern get BRONZE_HELMET'? Tell me if you get something

HeinrichLivingston commented 11 months ago

Oh... I'm cheeky.. I forgot to remove default: false from the bronze helmet..

spigot-gillesm commented 11 months ago

Haha alright, I suppose the problem lies there

HeinrichLivingston commented 11 months ago

Oh my lord.. Bro an hour long and it was that. Well, welcome to my life and learning how to use plugins.

spigot-gillesm commented 11 months ago

Haha, that's how you learn. I wish I had seen it sooner tho! I let you close this issue if everything is resolved ;)

HeinrichLivingston commented 11 months ago

Cheers, mate. I appreciate all your help!

Have a great day/night.