Bob's Character classes


Adds character classes to the game.

9 months ago
0.16 - 1.1
94.8K

b Changing class clears crafting queue (without refunding material)

2 years ago

As in title, changing class while crafting completely erases your crafting queue, and any resources invested into it.

2 years ago

I'm not sure this is something that can be fixed. The player character is a special case entity. When you pick a class, it replaces your current entity with a different one, using the Vanilla game engine entity replacer, that's supposed to copy all settings from the old to the new.

If it doesn't copy the queue, there's probably nothing I can do to do it manually in the mod.

Also, the only time you're supposed to actually do this is when you first spawn/respawn, the feature to do it any time was added to map settings, as a request.

1 year, 9 months ago

I've got a report about the same issue for miniMAXIme.

If it doesn't copy the queue, …

You can't copy LuaControl.crafting_queue, it's a read-only value.

… there's probably nothing I can do to do it manually in the mod.

I've found a way that seems to work in my WIP version. It may not be ideal (that's why I've posted about it on the forum), but yes, it can be done!

By the way: I've tested this when changing from one character to another as well as from character to god or editor mode and back. While crafting should be possible in character, god, and editor mode, the crafted items will end up in different inventories (defines.inventory.character_main, defines.inventory.god_main, and defines.inventory.editor_main), so I just store the final products and cancel crafting before detaching the player from a character, and I only resume crafting after I've attached the player to another character.

New response