Skip to content
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

read mission settings file every menu load #859

Merged
merged 4 commits into from
Dec 29, 2017

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Dec 27, 2017

When merged this pull request will:

  • in 3den, when opening the settings menu, read the settings file again and recreate the missionConfig
  • refresh all mission scope settings using the new missionConfig
  • clarified some logging akin to Pabst's PR
  • simplified a check and mute some excessive logging

@commy2 commy2 added this to the 3.6 milestone Dec 27, 2017
@commy2 commy2 removed the WIP label Dec 27, 2017
@commy2
Copy link
Contributor Author

commy2 commented Dec 27, 2017

Done and works with ACE.

@bux
Copy link
Contributor

bux commented Dec 27, 2017

Does it only read a mission's setting file or the one in userconfig too (e.g. when using/testing a local dedicated server)?

@commy2
Copy link
Contributor Author

commy2 commented Dec 27, 2017

Userconfig would need a server restart. You could load the file if one was present at the game start I think, but removing it or checking it when there wasn't one at game start makes it crash to the mission select screen.

@commy2
Copy link
Contributor Author

commy2 commented Dec 27, 2017

I like the idea though. Will look into it later this night.

@bux
Copy link
Contributor

bux commented Dec 27, 2017

Please, not the one from userconfig.

@jonpas
Copy link
Member

jonpas commented Dec 27, 2017

Why not?

@bux
Copy link
Contributor

bux commented Dec 27, 2017

(e.g. when testing a local dedicated server)?

One wouldn't want to double check each time that the userconfig file is removed when building missions.

@jonpas
Copy link
Member

jonpas commented Dec 27, 2017

I am confused, it's read anyways on first load.

@commy2
Copy link
Contributor Author

commy2 commented Dec 27, 2017

I'm confused too. It's not really needed, so I guess we should leave it until someone comes up with a good reason why one should have this. Servers are restarted fairly quickly.

@bux
Copy link
Contributor

bux commented Dec 28, 2017

I thought this PR is about the settings when editing a mission.

My concern is: If one is working with a local dedi server (be it for dev or testing purposes) one might choose to use a "cba_settings.sqf" file in the user config instead of saving settings in the profile. This file could hold the weirdest combinations of settings (for dev or testing purposes).
Now imagine this person is trying to build a mission and saving settings just for this mission. Without knowing in detail how cba settings are implemented, my concern is that those "weird" settings could be taken into account when opening the addon options menu and exporting them and making them wrongly persist in a mission settings file.

This of course might not be the case. If so I'd be happy 👍

@commy2
Copy link
Contributor Author

commy2 commented Dec 28, 2017

I don't think that's possible, bux.

@bux
Copy link
Contributor

bux commented Dec 28, 2017

what is not possible?

@commy2
Copy link
Contributor Author

commy2 commented Dec 28, 2017

That it exports or stores as preset garbage settings.

@bux
Copy link
Contributor

bux commented Dec 28, 2017

These are my assumptions:

  1. A "userconfig/cba_settings.sqf" file gets read when starting the game
  2. The values stored in the "userconfig/cba_settings.sqf" file get applied when opening the addon options
  3. The settings get merged with a "mission/cba_settings.sqf" file (if available)
  4. When exporting, the settings of the "userconfig/cba_settings.sqf" are ignored (based on your comment read mission settings file every menu load #859 (comment))

@commy2
Copy link
Contributor Author

commy2 commented Dec 28, 2017

Whatever gets exported depends on the selected source (SERVER, MISSION, CLIENT), and a "broken" (wrong setting values) server config will not change the mission settings export.

@bux
Copy link
Contributor

bux commented Dec 28, 2017

Aaah, this clarifies A LOT!
maybe add the source to the export title bar?

@commy2
Copy link
Contributor Author

commy2 commented Dec 28, 2017

Sure, that sounds helpful!

@commy2
Copy link
Contributor Author

commy2 commented Dec 29, 2017

Done. https://i.imgur.com/iT4xesz.png

@commy2 commy2 merged commit 5dd1540 into master Dec 29, 2017
@commy2 commy2 deleted the reload-mission-settings-file branch December 29, 2017 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants