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

Add: Setting to toggle chemical side mission and chemical weapon cache probability #1674

Merged
merged 11 commits into from
Dec 19, 2024

Conversation

TomDraal
Copy link

@TomDraal TomDraal commented Dec 1, 2024

Hi,
I've made some changes in order to add some more advanced settings on the Chemical Warfare in H&M.
The idea is to enable chemical warfare and choose if the chemical side missions will spawn or not and also set a chance probability of having a chemical weapons cache or not.

  • Add: Setting to toggle chemical side mission (@TomDraal).
  • Add: Setting to change chemical weapon cache probability (@TomDraal).

When merged this pull request will:

  • Allow the user to choose if he/she wants to have chemical side missions while chemical warfare is enabled
  • Tweak the chance probability (%age) of having a chemical weapons cache

Final test:

  • local
  • server

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 1, 2024

Hello,

Thank you for your contribution
We need to be consistent between setting
Before: btc_p_chem ON, side mission and chemical were enabled
Now, if btc_p_chem ON but btc_p_chem_sides and btc_p_chem_cache_probability are OFF, nothing will happen

Despite, I don't really see the point of having a setting for side mission as they can be skipped by the Officer I would recommend to

  • add the existing setting btc_p_chem: Off, On without weapon cache, On without side mission, On with both
  • create a btc_p_chem_cache_probability as you did without the 0%

Cheers

@Vdauphin Vdauphin added this to the 1.25 milestone Dec 1, 2024
@TomDraal
Copy link
Author

TomDraal commented Dec 3, 2024

Hello,
We want to be able to deactivate the chemical side missions because sometimes while using the skip feature some contaminated elements remains. At least we had some bad surprises in the past, so deactivating the chemical side missions is the safest way.
If you want full consistency then the best way is to completely remove btc_p_chem which I saw like a general switch on / off.
So I wanted to keep it just in case someone would want to add other chemical warfare related tasks.
By only keeping btc_p_chem_sides and btc_p_chem_cache_probability with a 0-100% range, we will have the behaviour you described :

  • sides ON and cache OFF (0%)
  • sides OFF and cache ON (>0%)
  • sides OFF and cache OFF (0%) => equivalent to btc_p_chem OFF
  • sides ON and cache ON (>0%) => equivalent to btc_p_chem ON

Would that suits you ?
Cheers

@Vdauphin
Copy link
Owner

Vdauphin commented Dec 5, 2024

If you want full consistency then the best way is to completely remove btc_p_chem which I saw like a general switch on / off.

I thought about it but I think it would be simpler to use number instead of bool for btc_p_chem (just do btc_p_chem > 0 where needed)
It is up to you to make a choice on this!

btc_p_chem becomes useless with the introduction of btc_p_sides and btc_p_chem_cache_probability.
@TomDraal
Copy link
Author

Hi, I've made the changes to remove btc_p_chem in my last commit.

Copy link
Owner

@Vdauphin Vdauphin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the update, some suggestion her

=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load.sqf Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/load_old.sqf Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/player.sqf Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/eh/server.sqf Outdated Show resolved Hide resolved
@Vdauphin Vdauphin changed the title Tom draal adv chem Add: Setting to toggle chemical side mission and chemical weapon cache probability Dec 15, 2024
TomDraal and others added 6 commits December 16, 2024 00:28
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
@TomDraal TomDraal requested a review from Vdauphin December 15, 2024 23:41
Copy link
Owner

@Vdauphin Vdauphin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tiny change!

=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml Outdated Show resolved Hide resolved
=BTC=co@30_Hearts_and_Minds.Altis/stringtable.xml Outdated Show resolved Hide resolved
TomDraal and others added 2 commits December 18, 2024 20:36
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
Co-authored-by: Vdauphin <vdauphin@outlook.fr>
@Vdauphin Vdauphin merged commit a8b975e into Vdauphin:master_daily Dec 19, 2024
2 checks passed
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.

2 participants