Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Difficulty Settings - Extended Map Content option Deprecation #115

Open
alec-hs opened this issue Jul 17, 2020 · 2 comments
Open

Difficulty Settings - Extended Map Content option Deprecation #115

alec-hs opened this issue Jul 17, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@alec-hs
Copy link
Owner

alec-hs commented Jul 17, 2020

Raised by CableFerret

Good morning mighty mod makers of Flax!

I've been hosting an Arma3 server for a few years. We have been using your fantastic tool for some time now and I wanted to make a suggestion for a minor code update. As of Arma3 v1.68, the mapcontent option has been deprecated and replaced with three separate flags for showing different map-based information (see https://community.bistudio.com/wiki/Arma_3_Difficulty_Menu some notes on the flag changes).

A few of our missions have required a middle-of-the-line approach to these, though at present it appears to be all or nothing in the current live version of FAST2.

How feasible would it be to split this out into three separate options on the custom difficulty settings panel?

Excerpt from example config below;
// Misc
mapContent = 0; // Extended map content - (0 = disabled, 1 = enabled) // before Arma 3 v1.68
mapContentFriendly = 0; // Map friendlies. - (0 = disabled, 1 = enabled) // since Arma 3 v1.68
mapContentEnemy = 0; // Map Enemies - (0 = disabled, 1 = enabled) // since Arma 3 v1.68
mapContentMines = 0; // Map Mines - (0 = disabled, 1 = enabled) // since Arma 3 v1.68

@alec-hs alec-hs added the enhancement New feature or request label Jul 17, 2020
@alec-hs alec-hs added this to the 2.2 Release milestone Jul 17, 2020
@alec-hs
Copy link
Owner Author

alec-hs commented Jul 17, 2020

Comment from CableFerret

Looks fairly straight forward to implement the changes for MapContent.

ServerProfile.xmal
line 541
- <CheckBox Name="IExtendedMapContent" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="12" Style="{StaticResource MaterialDesignCheckBox}" Content="Extended Map Content" Margin="5" Foreground="{DynamicResource MaterialDesignBody}"/>
+ <CheckBox Name="IMapContentFriendly" Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="4" Style="{StaticResource MaterialDesignCheckBox}" Content="Extended Map Content" Margin="5" Foreground="{DynamicResource MaterialDesignBody}"/>
+ <CheckBox Name="IMapContentEnemy" Grid.Row="5" Grid.Column="4" Grid.ColumnSpan="4" Style="{StaticResource MaterialDesignCheckBox}" Content="Extended Map Content" Margin="5" Foreground="{DynamicResource MaterialDesignBody}"/>
+ <CheckBox Name="IMapContentMines" Grid.Row="5" Grid.Column="8" Grid.ColumnSpan="4" Style="{StaticResource MaterialDesignCheckBox}" Content="Extended Map Content" Margin="5,5,10,5" Foreground="{DynamicResource MaterialDesignBody}"/>

ServerProfile.xaml.vb
line 72.
- IExtendedMapContent.IsChecked = profile.ExtendedMapContent
+ IMapContentFriendly.IsChecked = profile.MapContentFriendly
+ IMapContentEnemy.IsChecked = profile.MapContentEnemy
+ IMapContentMines.IsChecked = profile.MapContentMines
line 849.
- vbTab & vbTab & vbTab & "mapContent = " & IExtendedMapContent.IsChecked & ";",
+ vbTab & vbTab & vbTab & "mapContentFriendly = " & IMapContentFriendly.IsChecked & ";",
+ vbTab & vbTab & vbTab & "mapContentEnemy = " & IMapContentEnemy.IsChecked & ";",
+ vbTab & vbTab & vbTab & "mapContentMines = " & IMapContentMines.IsChecked & ";",
line 961.
- profile.ExtendedMapContent = IExtendedMapContent.IsChecked
+ profile.IMapContentFriendly = IMapContentFriendly.IsChecked
+ profile.IMapContentEnemy = IMapContentEnemy.IsChecked
+ profile.IMapContentMines = IMapContentMines.IsChecked

ServerCollection.vb
line 164
- Public Property ExtendedMapContent As Boolean = False
+ Public Property IMapContentFriendly As Boolean = False
+ Public Property IMapContentEnemy As Boolean = False
+ Public Property IMapContentMines As Boolean = False

@CableFerret
Copy link

CableFerret commented Jul 20, 2020

Code changes have been successfully intigrated.

Changes to Custom Difficulty Settings Panel;

  • Replaced existing 'Extended Map Content' option with three separate checkboxes -
    ** Map Show Friendly
    ** Map Show Enemy
    ** Map Show Mines

Changes in Backend Code;

  • Replaced default line 'ExtendedMapContent' in server profile generation with new default options;
    ** mapContentFriendly
    ** mapContentEnemy
    ** mapContentMines

  • Options added to the 'Custom Difficulty Settings' pannel toggle associated flag on Server Profile when generated.

Tested 'Friendly' and 'Enemy' detection toggles on local server.

@alec-hs Please see fork https://github.com/CableFerret/Flaxs-Arma-Server-Tool-2

Let me know if there are any changes required to the conventions, bugs or format etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants