alec-hs / Flaxs-Arma-Server-Tool-2

Full rebuild of my tool for installing and updating Arma 3 server with built in features for managing Steam Workshop mods.
https://forums.bohemia.net/forums/topic/220433-fast2-arma-server-and-steam-workshop-tool/
GNU General Public License v3.0
35 stars 21 forks source link

Difficulty Settings - Extended Map Content option Deprecation #115

Open alec-hs opened 4 years ago

alec-hs commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Code changes have been successfully intigrated.

Changes to Custom Difficulty Settings Panel;

Changes in Backend Code;

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.