legoduded / palworld-worldoptions

A tool for creating WorldOption.sav and applying the PalWorldSettings.ini for dedicated servers
136 stars 14 forks source link

ValueError: too many values to unpack (expected 2) #1

Closed shiftybitshiftr closed 10 months ago

shiftybitshiftr commented 10 months ago

Hello, I get the following output:

Found game files Found uesave Converting C:\Pal\SaveGames\0\136B7A9F4503F186A8D8129A93131916\LevelMeta.sav to JSON (using C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\uesave\uesave.exe)

Loading JSON Writing JSON to C:\Pal\SaveGames\0\136B7A9F4503F186A8D8129A93131916\LevelMeta.sav.json Traceback (most recent call last): File "C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\main.py", line 92, in main() File "C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\main.py", line 88, in main convert_to_worldoptions(args.uesave, args.save_path) File "C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\main.py", line 69, in convert_to_worldoptions optionworlddata = create_palworldsettings(save_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\lib\palworldsettings.py", line 164, in create_palworldsettings "Struct": generate_json_config(parsed_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\User\Downloads\palworld-worldoptions-1.0\palworld-worldoptions-1.0\lib\palworldsettings.py", line 125, in generate_json_config key, value = config_option.split('=') ^^^^^^^^^^ ValueError: too many values to unpack (expected 2)

Here's how my path looks, for reference: image

legoduded commented 10 months ago

hey, It looks like one of the values in your PalWorldSettings.ini contains an '=' in the value. something like AdminPassword="pass=secure"

If so, I can make a change to support that.

If that's not the case, can you post your PalWorldSettings.ini?

shiftybitshiftr commented 10 months ago

[/Script/Pal.PalGameWorldSettings] OptionSettings=(ServerName="Free Brain Collective",AdminPassword="1337",GuildPlayerMaxNum=32,BuildObjectDeteriorationDamageRate=0,BaseCampWorkerMaxNum=200)

legoduded commented 10 months ago

I just updated the script. Try 1.1 out and see if your issue is resolved. Also, I believe BaseCampWorkerMaxNum only goes up to 20 but feel free to try higher. I'm curious if the game will accept it