miniMAXIme: Character scaler and selector

by Pi-C

The player stands like a giant near the vehicles. Now you can adjust the size of your character -- and you can change your appearance at any time if you've other mods that provide extra characters!

Tweaks
a day ago
0.16 - 2.0
28.2K

b [Fixed?] Crash to main menu

4 years ago
(updated 4 years ago)
  • (Happens with minime and iRobot installed) Check other bug report, Unable to load, regarding only using minime

I have only done this in a brand new game with cheat mode active. I don't have a game for testing, but if I give myself a car it crashes and gives the error listed below:

Error MainLoop.cpp:1207: Exception at tick 2491: The mod More accurate player size compared to vehicles (0.0.14) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minime::on_player_main_inventory_changed (ID 32)
Index out of inventory bounds.
stack traceback:
minime/control.lua:68: in function 'transfer_inventory'
minime/control.lua:402: in function <minime/control.lua:397>
stack traceback:
[C]: in function 'index'
__minime
/control.lua:68: in function 'transfer_inventory'
minime/control.lua:402: in function <minime/control.lua:397>

4 years ago
(updated 4 years ago)
  • Happens while using both minime and iRobot and also happens with only minime installed.

Another crash to main menu I have found is when trying to load a saved game. The save is 100% vanilla from my "There is no spoon" achievement save.

Error AppManagerStates.cpp:1448: The mod More accurate player size compared to vehicles (0.0.14) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minime::on_init()
Index out of inventory bounds.
stack traceback:
minime/control.lua:68: in function 'transfer_inventory'
minime/control.lua:106: in function 'copy_character'
minime/control.lua:168: in function 'switch_characters'
minime/control.lua:321: in function 'init_player'
minime/control.lua:360: in function 'init'
minime/control.lua:429: in function <minime/control.lua:426>
stack traceback:
[C]: in function 'index'
__minime
/control.lua:68: in function 'transfer_inventory'
minime/control.lua:106: in function 'copy_character'
minime/control.lua:168: in function 'switch_characters'
minime/control.lua:321: in function 'init_player'
minime/control.lua:360: in function 'init'
minime/control.lua:429: in function <minime/control.lua:426>

4 years ago

"Index out of inventory bounds" means that the source inventory is bigger than the destination inventory. In vanilla Factorio, that should only happen with modular or power armors (which give you an inventory bonus). Did you change your armor before the crash happened, by any chance?

4 years ago

Please try version 0.0.15! :-)

4 years ago
(updated 4 years ago)

I apologize for never responding. Life has gotten in the way of anything computer related...

I just tried the changes and I am able to load my saved game now; however, I get an error when attempting to start a fresh new game. Is there anyway you can put all the changes made to support the other character changing mods behind a mod check? It seems to work fine only if I have iRobot installed, but I don't plan to play with either other the mods you're trying to support with these changes. I can't seem to use your mod on it's own as it stands.

I will continue to use 0.0.13 which works just fine for what I want to do.

219.471 Error MainLoop.cpp:1207: Exception at tick 0: The mod More accurate player size compared to vehicles (0.0.15) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event minime::on_player_main_inventory_changed (ID 32)
minime/control.lua:582: attempt to index field '?' (a nil value)
stack traceback:
minime/control.lua:582: in function <minime/control.lua:580>

4 years ago
(updated 4 years ago)

I apologize for never responding. Life has gotten in the way of anything computer related...

No problem.

I just tried the changes and I am able to load my saved game now; however, I get an error when attempting to start a fresh new game.

Sorry! I've tested with new games, with loading existing games that already included "minime" and existing games where it was added. I've also tried with different mods that may add new characters or other character selectors (because the GUI should be in sync with the really active character if another mod changes that). But I've completely forgotten to test this mod in stand-alone mode. So many gotchas!

Also, I gloriously messed up by trying to be clever and remove GUI-related event handlers if they aren't needed. Too bad that this also included on_player_joined_game! It's already past 5am, so I'm too tired to fix that now. As a quick workaround, please change lines 385-388 of control.lua to this:

-- Unregister handlers for GUI-related events if the game has no more than one character!
-- if table_size(global.minime_characters) < 2 then
--  detach_events()
-- end

That way, init_player() will be called, the tables will be initialized, and the game should be able to start.

Is there anyway you can put all the changes made to support the other character changing mods behind a mod check?

Not really. The main reason is that I want the mod to be universally usable, so that it would work even with mods I don't know about. But I can't add checks for mods I don't know about. :-)

I will continue to use 0.0.13 which works just fine for what I want to do.

Maybe a startup setting to disable the character selector part would do the trick? That way, I won't have to listen to any events regarding the GUI and inventories, which should improve performance if you want to play with just one character.

4 years ago

Awesome, thanks for all the info. I understand not adding a mod check, but think the option to enable/disable would be a good way to go. Would certainly mean one less mod using up any bit of performance.

4 years ago

Please try version 0.0.17!

New response