Stringtable Zeus and View Distance

* Stringtabled ACE Zeus module
* Stringtabled ACE View Distance
* Lowered default view distance to 1500 because default value (10000)
makes enormous FPS drop at start for low end machines
This commit is contained in:
gienkov 2015-05-17 00:53:55 +02:00
parent 9e8283ebab
commit 4bebedf73e
8 changed files with 219 additions and 43 deletions

View File

@ -2,47 +2,45 @@ class ACE_Settings {
class GVAR(enabled) { class GVAR(enabled) {
typeName = "BOOL"; typeName = "BOOL";
value = 1; value = 1;
displayName = "Enable ACE viewdistance"; displayName = "$STR_ACE_ViewDistance_enabled_DisplayName";
description = "Enables ACE viewdistance module."; description = "$STR_ACE_ViewDistance_enabled_Description";
}; };
class GVAR(viewDistanceOnFoot) { class GVAR(viewDistanceOnFoot) {
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
value = 11; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever). value = 0; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever).
values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf
displayName = "Client View Distance (On Foot)"; displayName = "$STR_ACE_ViewDistance_onFoot_DisplayName";
description = "Changes in game view distance when the player is on foot."; description = "$STR_ACE_ViewDistance_onFoot_Description";
}; };
class GVAR(viewDistanceLandVehicle) { class GVAR(viewDistanceLandVehicle) {
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
value = 11; // index, NOT value value = 0; // index, NOT value
values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf
displayName = "Client View Distance (Land Vehicle)"; displayName = "$STR_ACE_ViewDistance_landVehicle_DisplayName";
description = "Changes in game view distance when the player is in a land vehicle."; description = "$STR_ACE_ViewDistance_landVehicle_Description";
}; };
class GVAR(viewDistanceAirVehicle) { class GVAR(viewDistanceAirVehicle) {
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
value = 11; // index, NOT value value = 0; // index, NOT value
values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf values[] = {"1500","2000","2500","3000","3500","4000","5000","6000","7000","8000","9000","10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf
displayName = "Client View Distance (Air Vehicle)"; displayName = "$STR_ACE_ViewDistance_airVehicle_DisplayName";
description = "Changes in game view distance when the player is in an air vehicle."; description = "$STR_ACE_ViewDistance_airVehicle_Description";
}; };
class GVAR(limitViewDistance) { class GVAR(limitViewDistance) {
typeName = "SCALAR"; typeName = "SCALAR";
value = 10000; // Value, NOT index. 10000 is the maximum in A3 value = 10000; // Value, NOT index. 10000 is the maximum in A3
displayName = "View Distance Limit"; displayName = "$STR_ACE_ViewDistance_limit_DisplayName";
description = "Limit for client's view distance set here and can overridden by module"; description = "$STR_ACE_ViewDistance_limit_setting";
}; };
class GVAR(objectViewDistanceCoeff) { class GVAR(objectViewDistanceCoeff) {
typeName = "SCALAR"; typeName = "SCALAR";
isClientSettable = 1; isClientSettable = 1;
value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf
values[] = {"Off","Very Low","Low","Medium","High","Very High"}; values[] = {"$STR_ACE_ViewDistance_object_off","$STR_ACE_ViewDistance_object_verylow","$STR_ACE_ViewDistance_object_low","$STR_ACE_ViewDistance_object_medium","$STR_ACE_ViewDistance_object_high","$STR_ACE_ViewDistance_object_veryhigh"};
displayName = "Dynamic Object View Distance"; displayName = "$STR_ACE_ViewDistance_object_DisplayName";
description = "Sets the object view distance as a coefficient of the view distance."; description = "$STR_ACE_ViewDistance_object_Description";
}; };
}; };
// To do: include string table style displayName & description.

View File

@ -4,23 +4,27 @@ class CfgVehicles {
author = "$STR_ACE_Common_ACETeam"; author = "$STR_ACE_Common_ACETeam";
category = "ACE"; category = "ACE";
function = QUOTE(DFUNC(initModule)); function = QUOTE(DFUNC(initModule));
displayName = "View Distance Limiter"; displayName = "$STR_ACE_ViewDistance_Module_DisplayName";
scope = 2; scope = 2;
isGlobal = 1; isGlobal = 1;
//icon = ""; // needs an icon //icon = ""; // needs an icon
class Arguments { class Arguments {
class moduleViewDistanceEnabled { class moduleViewDistanceEnabled {
displayName = "Enable ACE viewdistance"; displayName = "$STR_ACE_ViewDistance_enabled_DisplayName";
description = "Enables ACE viewdistance"; description = "$STR_ACE_ViewDistance_enabled_Description";
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 1; defaultValue = 1;
}; };
class moduleViewDistanceLimit { class moduleViewDistanceLimit {
displayName = "View Distance Limit"; displayName = "$STR_ACE_ViewDistance_limit_DisplayName";
description = "Sets the limit for how high clients can raise their view distance (<= 10000)"; description = "$STR_ACE_ViewDistance_limit_Description";
typeName = "NUMBER"; typeName = "NUMBER";
defaultValue = 10000; defaultValue = 10000;
}; };
};
class ModuleDescription {
description = "$STR_ACE_ViewDistance_Module_Description";
sync[] = {};
}; };
}; };
}; };

View File

@ -28,13 +28,13 @@ _view_distance_limit = GVAR(limitViewDistance); // Grab the limit
if (_show_prompt) then { if (_show_prompt) then {
_text = if (_new_view_distance <= _view_distance_limit) then { _text = if (_new_view_distance <= _view_distance_limit) then {
format ["<t align='center'>View Distance: %1m",str(_new_view_distance)]; format ["<t align='center'>%1 %2m", (localize "STR_ACE_ViewDistance_infotext"), str(_new_view_distance)];
} else { } else {
format ["<t align='center'>That option is invalid! The limit is %1m",str(_view_distance_limit)]; format ["<t align='center'>%1 %2m", (localize "STR_ACE_ViewDistance_invalid"), str(_view_distance_limit)];
}; };
if (GVAR(objectViewDistanceCoeff) > 0) then { if (GVAR(objectViewDistanceCoeff) > 0) then {
_text = _text + format ["<br/><t align='center'>Object View Distance is %1%2</t>",str(_object_view_distance_coeff * 100),"%"]; _text = _text + format ["<br/><t align='center'>%1 %2%3</t>", (localize "STR_ACE_ViewDistance_objectinfotext"), str(_object_view_distance_coeff * 100),"%"];
}; };
[parseText _text,2] call EFUNC(common,displayTextStructured); [parseText _text,2] call EFUNC(common,displayTextStructured);
}; };

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Zeus">
<Container ID="ZeusModule">
<Key ID="STR_ACE_ViewDistance_Module_DisplayName">
<English>View Distance Limiter</English>
<Polish>Ogranicznik zasięgu widzenia</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_Module_Description">
<English>Allows limiting maximum view distance that can be set by players.</English>
<Polish>Pozwala ustawić maksymalny limit zasięgu widzenia.</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_enabled_DisplayName">
<English>Enable ACE viewdistance</English>
<Polish>Wł. zasięg widzenia ACE</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_enabled_Description">
<English>Enables ACE viewdistance</English>
<Polish>Aktywuje możliwość zmiany zasięgu widzenia w menu ustawień ACE</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_limit_DisplayName">
<English>View Distance Limit</English>
<Polish>Limit zas. widzenia</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_limit_Description">
<English>Sets the limit for how high clients can raise their view distance (up to 10000)</English>
<Polish>Ustawia maksymalny limit zasięgu widzenia jaki mogą ustawić gracze (do 10000)</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_limit_setting">
<English>Limit for client's view distance set here and can overridden by module</English>
<Polish>Limit zasięgu widzenia jest ustawiany tutaj i może zostać nadpisany poprzez moduł</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_onFoot_DisplayName">
<English>Client View Distance (On Foot)</English>
<Polish>Zasięg widzenia (piechota)</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_onFoot_Description">
<English>Changes in game view distance when the player is on foot.</English>
<Polish>Zmienia zasięg widzenia kiedy gracz porusza się na piechotę.</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_landVehicle_DisplayName">
<English>Client View Distance (Land Vehicle)</English>
<Polish>Zasięg widzenia (pojazdy naziemne)</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_landVehicle_Description">
<English>Changes in game view distance when the player is in a land vehicle.</English>
<Polish>Zmienia zasięg widzenia kiedy gracz porusza się pojazdami naziemnymi.</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_airVehicle_DisplayName">
<English>Client View Distance (Air Vehicle)</English>
<Polish>Zasięg widzenia (pojazdy lotnicze)</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_airVehicle_Description">
<English>Changes in game view distance when the player is in an air vehicle.</English>
<Polish>Zmienia zasięg widzenia kiedy gracz porusza się pojazdami lotniczymi.</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_DisplayName">
<English>Dynamic Object View Distance</English>
<Polish>Dynamiczny zasięg rysowania obiektów</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_Description">
<English>Sets the object view distance as a coefficient of the view distance.</English>
<Polish>Zmienia zasięg rysowania obiektów jako mnożnik zasięgu widzenia.</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_off">
<English>Off</English>
<Polish>Wyłącz</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_verylow">
<English>Very Low</English>
<Polish>Bardzo niski</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_low">
<English>Low</English>
<Polish>Niski</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_medium">
<English>Medium</English>
<Polish>Średni</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_high">
<English>High</English>
<Polish>Wysoki</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_object_veryhigh">
<English>Very High</English>
<Polish>Bardzo wysoki</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_infotext">
<English>View Distance:</English>
<Polish>Zasięg widzenia:</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_objectinfotext">
<English>Object View Distance is</English>
<Polish>Zasięg widzenia obiektów wynosi</Polish>
</Key>
<Key ID="STR_ACE_ViewDistance_invalid">
<English>That option is invalid! The limit is</English>
<Polish>Ta opcja jest nieprawidłowa! Limit wynosi</Polish>
</Key>
</Container>
</Package>
</Project>

View File

@ -18,6 +18,6 @@ class ACE_Settings {
class GVAR(revealMines) { class GVAR(revealMines) {
typeName = "SCALAR"; typeName = "SCALAR";
value = 0; value = 0;
values[] = {"Disabled", "Partially", "Fully"}; values[] = {"$STR_ACE_Zeus_revealMines_disable", "$STR_ACE_Zeus_revealMines_partial", "$STR_ACE_Zeus_revealMines_full"};
}; };
}; };

View File

@ -1,6 +1,6 @@
class CfgFactionClasses { class CfgFactionClasses {
class NO_CATEGORY; class NO_CATEGORY;
class ADDON: NO_CATEGORY { class ADDON: NO_CATEGORY {
displayName = "ACE Zeus"; displayName = "$STR_ACE_Zeus_category";
}; };
}; };

View File

@ -5,7 +5,7 @@ class CfgVehicles {
class GVAR(moduleZeusSettings): ACE_Module { class GVAR(moduleZeusSettings): ACE_Module {
scope = 2; scope = 2;
displayName = "Zeus Settings [ACE]"; displayName = "$STR_ACE_Zeus_Module_DisplayName";
//icon = QUOTE(PATHTOF(iconGoesHere)); //icon = QUOTE(PATHTOF(iconGoesHere));
category = "ACE_zeus"; category = "ACE_zeus";
function = QUOTE(DFUNC(moduleZeusSettings)); function = QUOTE(DFUNC(moduleZeusSettings));
@ -15,52 +15,52 @@ class CfgVehicles {
author = "SilentSpike"; author = "SilentSpike";
class Arguments { class Arguments {
class zeusAscension { class zeusAscension {
displayName = "Ascension Messages"; displayName = "$STR_ACE_Zeus_ascension_DisplayName";
description = "Display global popup messages when a player is assigned as Zeus."; description = "$STR_ACE_Zeus_ascension_Description";
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 0; defaultValue = 0;
}; };
class zeusBird { class zeusBird {
displayName = "Zeus Eagle"; displayName = "$STR_ACE_Zeus_bird_DisplayName";
description = "Spawn an eagle that follows the Zeus camera."; description = "$STR_ACE_Zeus_bird_Description";
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 0; defaultValue = 0;
}; };
class remoteWind { class remoteWind {
displayName = "Wind Sounds"; displayName = "$STR_ACE_Zeus_remoteWind_DisplayName";
description = "Play wind sounds when Zeus remote controls a unit."; description = "$STR_ACE_Zeus_remoteWind_Description";
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 0; defaultValue = 0;
}; };
class radioOrdnance { class radioOrdnance {
displayName = "Ordnance Warning"; displayName = "$STR_ACE_Zeus_radioOrdnance_DisplayName";
description = "Play a radio warning when Zeus uses ordnance."; description = "$STR_ACE_Zeus_radioOrdnance_Description";
typeName = "BOOL"; typeName = "BOOL";
defaultValue = 0; defaultValue = 0;
}; };
class revealMines { class revealMines {
displayName = "Reveal Mines"; displayName = "$STR_ACE_Zeus_revealMines_DisplayName";
description = "Reveal mines to allies and/or place map markers."; description = "$STR_ACE_Zeus_revealMines_Description";
typeName = "NUMBER"; typeName = "NUMBER";
class values { class values {
class disable { class disable {
name = "Disabled"; name = "$STR_ACE_Zeus_revealMines_disable";
value = 0; value = 0;
default = 1; default = 1;
}; };
class partial { class partial {
name = "Reveal to Allies"; name = "$STR_ACE_Zeus_revealMines_partial";
value = 1; value = 1;
}; };
class full { class full {
name = "Allies + Map Markers"; name = "$STR_ACE_Zeus_revealMines_full";
value = 2; value = 2;
}; };
}; };
}; };
}; };
class ModuleDescription { class ModuleDescription {
description = "Provides control over various aspects of Zeus."; description = "$STR_ACE_Zeus_Module_Description";
sync[] = {}; sync[] = {};
}; };
}; };

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Zeus">
<Container ID="ZeusModule">
<Key ID="STR_ACE_Zeus_Module_DisplayName">
<English>Zeus Settings [ACE]</English>
<Polish>Ustawienia Zeusa [ACE]</Polish>
</Key>
<Key ID="STR_ACE_Zeus_Module_Description">
<English>Provides control over various aspects of Zeus.</English>
<Polish>Pozwala kontrolować różne aspekty Zeusa.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_ascension_DisplayName">
<English>Ascension Messages</English>
<Polish>Wiad. o nowym Zeusie</Polish>
</Key>
<Key ID="STR_ACE_Zeus_ascension_Description">
<English>Display global popup messages when a player is assigned as Zeus.</English>
<Polish>Wyświetlaj globalną wiadomość kiedy gracz zostanie przydzielony jako Zeus</Polish>
</Key>
<Key ID="STR_ACE_Zeus_bird_DisplayName">
<English>Zeus Eagle</English>
<Polish>Orzeł Zeusa</Polish>
</Key>
<Key ID="STR_ACE_Zeus_bird_Description">
<English>Spawn an eagle that follows the Zeus camera.</English>
<Polish>Spawnuj orła, który podąrza za kamerą Zeusa.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_remoteWind_DisplayName">
<English>Wind Sounds</English>
<Polish>Dźwięki wiatru</Polish>
</Key>
<Key ID="STR_ACE_Zeus_remoteWind_Description">
<English>Play wind sounds when Zeus remote controls a unit.</English>
<Polish>Odtwarzaj dźwięki wiatru kiedy Zeus zdalnie kontroluje jednostkę.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_radioOrdnance_DisplayName">
<English>Ordnance Warning</English>
<Polish>Ostrz. o ostrzale arty.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_radioOrdnance_Description">
<English>Play a radio warning when Zeus uses ordnance.</English>
<Polish>Odtwarzaj wiadomość radiową kiedy Zeus używa artylerii.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_revealMines_DisplayName">
<English>Reveal Mines</English>
<Polish>Pokazuj miny</Polish>
</Key>
<Key ID="STR_ACE_Zeus_revealMines_Description">
<English>Reveal mines to allies and/or place map markers.</English>
<Polish>Pokazuj znaczniki min dla sojuszników i/lub twórz markery na mapie w miejscu min.</Polish>
</Key>
<Key ID="STR_ACE_Zeus_revealMines_disable">
<English>Disabled</English>
<Polish>Wyłączone</Polish>
</Key>
<Key ID="STR_ACE_Zeus_revealMines_partial">
<English>Reveal to Allies</English>
<Polish>Pokaż dla sojuszników</Polish>
</Key>
<Key ID="STR_ACE_Zeus_revealMines_full">
<English>Allies + Map Markers</English>
<Polish>Sojusznicy + markery na mapie</Polish>
</Key>
<Key ID="STR_ACE_Zeus_category">
<English>ACE Zeus</English>
<Polish>ACE Zeus</Polish>
</Key>
</Container>
</Package>
</Project>