Feedback

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

Jemsterr
Inserter
Inserter
Posts: 30
Joined: Tue Jan 07, 2020 11:23 am
Contact:

Re: Feedback

Post by Jemsterr »

Next question. This one came up in the r/seablock discord.

Someone popped in there to report that character classes breaks early seablock, since you are unable to forage for cellulose fiber unless you are using a balanced character.

I dug into the code a bit, and found that it is because trainwreck added a crafting category crafting-handonly that gets given to the vanilla character, but gets (removed?) when the custom character gets their crafting_categories set in prototypes/character.lua.

The simple fix was to add "crafting-handonly" to the crafting_categories. For instance the miner's line becomes

Code: Select all

crafting_categories = {"crafting", "smelting", "crafting-handonly"},
Is there a fix that adds crafting_categories rather than setting them?

It's a bit of an edge case, since there are not many people who play seablock and then add in character classes.

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7287
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Feedback

Post by bobingabout »

Jemsterr wrote:
Sat Aug 01, 2020 1:35 am
Next question. This one came up in the r/seablock discord.

Someone popped in there to report that character classes breaks early seablock, since you are unable to forage for cellulose fiber unless you are using a balanced character.

I dug into the code a bit, and found that it is because trainwreck added a crafting category crafting-handonly that gets given to the vanilla character, but gets (removed?) when the custom character gets their crafting_categories set in prototypes/character.lua.

The simple fix was to add "crafting-handonly" to the crafting_categories. For instance the miner's line becomes

Code: Select all

crafting_categories = {"crafting", "smelting", "crafting-handonly"},
Is there a fix that adds crafting_categories rather than setting them?

It's a bit of an edge case, since there are not many people who play seablock and then add in character classes.
that's something I'd say he should do. I'd also say it's less of a "it gets removed" and more just that my mod's data phase that clones the character entity much be running before he adds the new crafting category (which is very likely if he does it in the data phase.)

To combat this in my own mod, I actually iterate through all character entities (I was doing this BEFORE I even made the character classes mod) and the god entity controller (Don't forget people who play it in that mode, it is an option from the new game menu) and add any new crafting categories.
Look at bob electronics and how it adds the electronics crafting categories them.

And the main reason why I do this, Imagine a time when I was just a newbie. People told me back when I was writing that that if I do something like that, I, as the one adding a new crafting category, have to be the one to make sure it gets applied to any other entities that might need it.

And for is there a method to add the category? Yes there is... use table.insert.
I will look at classes mod to make sure I simply add "smelting" to the miner, miner2 and engineer, rather than setting the line, but after that, it's up to the other mod to add crafting-handonly to any it doesn't get applied to.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Post Reply

Return to “Bob's mods”

Who is online

Users browsing this forum: No registered users