[Pending] Crafting Menu/Recipe Issues

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sun Mar 13, 2016 9:48 am

[Pending] Crafting Menu/Recipe Issues

Post by DRY411S » Thu Jun 02, 2016 5:55 pm

I have a mod which creates a 'reverse' recipe for all the in-game recipes. These are all set to not be craftable. They are assigned to their own category.

Even though every single one is not craftable in hand, the category tab appears on the 'player' crafting menu.

Now, this may be working as intended, but it's ugly and confusing for the user.

That's the first bug. It's 100% repeatable and in v0.12.33

2nd bug. I've tried to make this problem go away by making every recipe hidden. This indeed does stop the tab from appearing in the player's crafting menu.

But when I go to my mod's machine (based on an assembling machine) none of my recipes appear, but EVERY default game recipe appears instead, all red and all unselectable.

This again is 100% repeatable and in v0.12.33

Again, this may be 'working as intended' but I'd like to propose that some way is introduced to hide categories from a players crafting menu, maybe by having a nil icon, because if there's no icon, you don't have a picture for the tab.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 3255
Joined: Sun Jan 11, 2015 2:09 pm

Re: Crafting Menu/Recipe Issues

Post by Klonan » Tue Jun 07, 2016 11:30 am

Thanks for the report,

Can you upload the mod so we can diagnose what is going on in the code?

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sun Mar 13, 2016 9:48 am

Re: [Pending] Crafting Menu/Recipe Issues

Post by DRY411S » Tue Jun 07, 2016 7:45 pm

Upload attached.

Test script for bug #1
  1. Start up Factorio with mod installed and test mode mod
  2. Generate a map
  3. Enable test mode
  4. Check the player's crafting menu by pressing 'E' (no recycling icon)
  5. Research automation
  6. Check the player's crafting menu by pressing 'E' .Now there are duplicate icons for the recycling menus. (I plan to change the icons so that the recycling ones are obvious)
  7. Note all recycling items are red. They cannot be hand crafted. (This is my bug #1, I'd prefer if nothing can be hand crafted, that these icons do not appear in the 'hand crafting' menu
  8. Use test mode to unlock all tech
  9. Check the player's crafting menu by pressing 'E' . See how all items that are recyclable (nothing from chemical plants apart from batteries) I'd really those big icons not to be there at all when user can do nothing with them.
  10. In test mode, add recycling machines 1 2 and 3
  11. Open each by left clicking.
  12. Note items that can be recycled in machines are now 'bright' and not red.
  13. Note also that there are only recycling 'tabs' (4 tabs, not 8 like in player crafting screen)
  14. Quit game
Test script #2 for bug #2
  1. Edit data-final-fixes.lua.
  2. Edit line 259 Change from 'hidden = false,' to 'hidden = true,' (all my reverse recipes will now be hidden. This is my attempt to hide the items from the player's crafting 'E' screen but display them in the Recycling machines.
  3. Repeat test script above to the end of step 5
  4. On step 6 above, note that none of the extra tabs now appear. All recipes are hidden from the player and no tabs appear. (Mod success for me so far)
  5. Continue tests above to end of step 10
  6. Open each recycling machine by left-clicking. Note the really odd menus. No tabs, every item in the game, all red. Hover over the items to see that they are not my reversed recipes created by my mod. Note that fluid recipes are now included. Note that the raw ingredients in the menus are bonkers.
  7. Close down game
  8. Go and fix bug :D
Attachments
ZRecycling_0.0.1.zip
(2.34 MiB) Downloaded 36 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 7937
Joined: Wed Jun 11, 2014 5:23 am

Re: [Pending] Crafting Menu/Recipe Issues

Post by Rseding91 » Wed Jun 08, 2016 7:32 am

#1 is not a bug - recipe have an optional property "category" that defines the "recipe-category" they belong to. If you don't define one the category defaults to "crafting". The player character crafting GUI shows any recipe that's in any "recipe-category" the player is setup to use even if the player can't actually craft that recipe. If you want some recipe to not show up in the player crafting GUI you need to give it a "category" (recipe-category) that the player character can't use.

#2 is fixed for 0.13 - nothing shows up in the assembling machine GUIs when all the recipes are hidden. Hidden makes the recipe not show up anywhere - player crafting and machine crafting - it can only be used if a mod specifically sets the machine's recipe to that hidden recipe.
If you want to get ahold of me I'm almost always on IRC and Discord.

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sun Mar 13, 2016 9:48 am

Re: [Pending] Crafting Menu/Recipe Issues

Post by DRY411S » Wed Jun 08, 2016 7:49 am

Thank you for looking at this.

Regarding #1 are you saying that I could put my recipes in a category that would not appear in the players crafting menu, but would appear in an assembling machine? If so, could you tell me the category type please.

Rseding91
Factorio Staff
Factorio Staff
Posts: 7937
Joined: Wed Jun 11, 2014 5:23 am

Re: [Pending] Crafting Menu/Recipe Issues

Post by Rseding91 » Wed Jun 08, 2016 7:57 am

DRY411S wrote:Thank you for looking at this.

Regarding #1 are you saying that I could put my recipes in a category that would not appear in the players crafting menu, but would appear in an assembling machine? If so, could you tell me the category type please.
Categories are mod defined. You just make a new one and make the machine able to craft that category but not the player.
If you want to get ahold of me I'm almost always on IRC and Discord.

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sun Mar 13, 2016 9:48 am

Re: [Pending] Crafting Menu/Recipe Issues

Post by DRY411S » Wed Jun 08, 2016 6:52 pm

I'm sorry to ask for clarification about coding in my bug report, but I don't understand your explanation.

My mod creates some
  • recipe-categories
  • Some recycling machine entities
  • Some item-groups
  • Some item-subgroups
  • Some recipes
The entities that I create include a definition of which recipe-categories the machine will acceopt.

The recipes that I create include:
  • The recipe-category so the game knows that it can be crafted in the recycling machine
  • the item-group so that the tab will appear in the recycling-machine crafting menu
  • the item-subgroup, so that the recipes will be ordered in the item-group
Those item-groups and sub-groups that I create appear in the players crafting menu, with all the recipes 'red' because they can only be crafted by a recipe-category linked to my recycling machine.

These item-groups appear in the player's crafting menu even though none of the recipes in those item-groups can be crafted by a player.

That's my bug #1 which you are rejecting as a bug. So what do I need to do to stop my item-group tabs from appearing in the player's crafting menu please?

Post Reply

Return to “Resolved Problems and Bugs”