-
-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set palworldsettings via envsubst and templating #207
Conversation
This is way cleaner, way easier to maintain long-term, and moves server settings directly to wherever the container image is declared. That's big. Some things to test,
|
I wanted to wait for some feedback before i continue working on it and building it further. There is still alot to test about e.g. i already saw that string arent properly parsed. Will continue work on this tomorrow |
@MSpreckels Keep doing that you are doing, this sounds like an awesome solution |
…eck for palworldsettings.ini if its created on startup anyways
… into palworld-settings
i've tested it, works for me. Some considerations:
Tagging you @Twinki14 @thijsvanloef because you were commenting |
@MSpreckels keep the naming as close to the PalWorldSettings.ini, except for the ones that introduce breaking changes. Tonight I'll test your PR as well, thanks for all your work |
Also some more things to test:
|
will check that tomorrow
These are the results when i put the values in the config map:
if you could test it using the docker command would be nice |
@MSpreckels As for the debug question (sorry missed it completely) I would like a DEBUG env var to switch them on. But disable them by default |
@MSpreckels Initial testing does not seem very succesfull, all PalWorldSettings.ini are set correctly, however it does not seem to work ingame: [/Script/Pal.PalGameWorldSettings]
OptionSettings=(
Difficulty=None,
DayTimeSpeedRate=1.000000,
NightTimeSpeedRate=1.000000,
ExpRate=1.000000,
PalCaptureRate=1.000000,
PalSpawnNumRate=1.000000,
PalDamageRateAttack=1.000000,
PalDamageRateDefense=1.000000,
PlayerDamageRateAttack=1.000000,
PlayerDamageRateDefense=1.000000,
PlayerStomachDecreaceRate=1.000000,
PlayerStaminaDecreaceRate=1.000000,
PlayerAutoHPRegeneRate=1.000000,
PlayerAutoHpRegeneRateInSleep=1.000000,
PalStomachDecreaceRate=1.000000,
PalStaminaDecreaceRate=1.000000,
PalAutoHPRegeneRate=1.000000,
PalAutoHpRegeneRateInSleep=1.000000,
BuildObjectDamageRate=1.000000,
BuildObjectDeteriorationDamageRate=1.000000,
CollectionDropRate=1.000000,
CollectionObjectHpRate=1.000000,
CollectionObjectRespawnSpeedRate=1.000000,
EnemyDropItemRate=1.000000,
DeathPenalty=All,
bEnablePlayerToPlayerDamage=False,
bEnableFriendlyFire=False,
bEnableInvaderEnemy=True,
bActiveUNKO=False,
bEnableAimAssistPad=True,
bEnableAimAssistKeyboard=False,
DropItemMaxNum=3000,
DropItemMaxNum_UNKO=100,
BaseCampMaxNum=128,
BaseCampWorkerMaxNum=15,
DropItemAliveMaxHours=1.000000,
bAutoResetGuildNoOnlinePlayers=False,
AutoResetGuildTimeNoOnlinePlayers=72.000000,
GuildPlayerMaxNum=20,
PalEggDefaultHatchingTime=72.000000,
WorkSpeedRate=1.000000,
bIsMultiplay=False,
bIsPvP=False,
bCanPickupOtherGuildDeathPenaltyDrop=False,
bEnableNonLoginPenalty=True,
bEnableFastTravel=True,
bIsStartLocationSelectByMap=True,
bExistPlayerAfterLogout=False,
bEnableDefenseOtherGuildPlayer=False,
CoopPlayerMaxNum=4,
ServerPlayerMaxNum=16,
ServerName="World of Pals",
ServerDescription="Dit is een Test",
AdminPassword="adminPasswordHere",
ServerPassword="Test 123 ofpals",
PublicPort=8211,
PublicIP="",
RCONEnabled=true,
RCONPort=25575,
Region="",
bUseAuth=True,
BanListURL="https://api.palworldgame.com/api/banlist.txt"
) Logs:
It also seems to accept any password as long as there is one set |
This is more likely a problem with the formatting of the ini file, all settings may need to be on one line. The values are reaching the ini file, which is a really good sign for this method. Now we just need to get the ini formatted correctly so that the server picks up the settings properly. |
In my opinion,
|
Hey thanks for testing! I wonder why it is not formatting correctly. I'm using
I'd maybe remove type identifiers like b :)
I don't like prefixing them. Some of those variables are already super long which would make it more unreadable.
I like that idea! |
As we talked about in discord: Ive now fixed the replacement of \n line ending to \n\r line ending. This still works on my end. I've also replaced some env vars that i set with some that already been set before. Please test this, thoroughly. |
I've done some initial testing and everything seems to work! Will test more thoroughly tomorrow. Thank you for all the work! |
Is this pushed to dev? @thijsvanloef |
I only included the modifier with the idea that eventually we'll have an automation script for the compilation script, identifying and dropping type identifiers might add to the logic complexity for such a script, but that is only an eventual idea. I'm not partial in any direction. |
@chkpwd no, but you can test it locally by checking out this branch and running: |
Some final thoughts on this, and these are just my opinions
|
Since we define the default values in the compile-settings if the game updates and changes one of the default values then no one running the image would have the updated default values until we update the compile-settings file and they update their image. If a value isn't defined the ini file then game seems to use the default value. |
Hence why an automation script would be very valuable. A scheduled GitHub Action can regularly run, start a Palworld server, copy the |
Why not create the compilation script at container start up instead? |
It needs a |
I really dont like that. We are in active early development, changes like that are to be expected. We should test the case when someone is using a save from previous versions and upgrades to a latest image where this change is implemented, so that we know what is going to happen. Maybe we can check for custom values in ini?
Thats a good point, somehow I've never tried that.
What do you mean by container start up? Do you mean in the init script? when the docker container is being build? |
In the start script read values in default ini to create the config script. Been trying to find a good tool that let's you modify ini but none seem to support arrays. |
Thats the thing. Pocket Pair's decision on making a giant array instead of separated values makes this so much harder. |
Have to agree with @MSpreckels on the new tag, jumping the tag to 0.50 will probably not make any difference to 0.20 The only thing I will add is a breaking change warning in the release. |
When do you plan to merge this? |
… into palworld-settings
@iamspido @MSpreckels Initial testing resulted in no errors, will resume testing tomorrow and probably release tomorrow :) |
Did some more testing today, was not able to find any errors, @MSpreckels once merge conflict has been resolved, ready to merge :) |
I don't know if that was planned, but the environment variable BASE_CAMP_WORKER_MAXNUM has been changed to BASE_CAMP_WORKER_MAX_NUM. |
After some research, I found out that this seems to be an issue with Palworld itself. |
set palworldsettings via envsubst and templating
Hi there!
I've got another idea for setting the PalWorldSettings.ini!
In my example I use a template file that has environment variables set for each parameter. Using envsubst I patch those env vars in while also setting a default value for each.
I have tested if the variables are set in file but not ingame, yet.