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

Nametags - Add Nation Ranks #7094

Merged
merged 8 commits into from
Oct 9, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions addons/nametags/CfgFactionClasses.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
class CfgFactionClasses {
class OPF_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_russia\private_gs.paa), QPATHTOF(UI\icons_russia\corporal_gs.paa), QPATHTOF(UI\icons_russia\sergeant_gs.paa), QPATHTOF(UI\icons_russia\lieutenant_gs.paa), QPATHTOF(UI\icons_russia\captain_gs.paa), QPATHTOF(UI\icons_russia\major_gs.paa), QPATHTOF(UI\icons_russia\colonel_gs.paa)};
Neciota marked this conversation as resolved.
Show resolved Hide resolved
};
class OPF_G_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_spain\private_gs.paa), QPATHTOF(UI\icons_spain\corporal_gs.paa), QPATHTOF(UI\icons_spain\sergeant_gs.paa), QPATHTOF(UI\icons_spain\lieutenant_gs.paa), QPATHTOF(UI\icons_spain\captain_gs.paa), QPATHTOF(UI\icons_spain\major_gs.paa), QPATHTOF(UI\icons_spain\colonel_gs.paa)};
};
class OPF_T_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_russia\private_gs.paa), QPATHTOF(UI\icons_russia\corporal_gs.paa), QPATHTOF(UI\icons_russia\sergeant_gs.paa), QPATHTOF(UI\icons_russia\lieutenant_gs.paa), QPATHTOF(UI\icons_russia\captain_gs.paa), QPATHTOF(UI\icons_russia\major_gs.paa), QPATHTOF(UI\icons_russia\colonel_gs.paa)};
};
class OPF_V_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_russia\private_gs.paa), QPATHTOF(UI\icons_russia\corporal_gs.paa), QPATHTOF(UI\icons_russia\sergeant_gs.paa), QPATHTOF(UI\icons_russia\lieutenant_gs.paa), QPATHTOF(UI\icons_russia\captain_gs.paa), QPATHTOF(UI\icons_russia\major_gs.paa), QPATHTOF(UI\icons_russia\colonel_gs.paa)};
};
class IND_C_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_russia\private_gs.paa), QPATHTOF(UI\icons_russia\corporal_gs.paa), QPATHTOF(UI\icons_russia\sergeant_gs.paa), QPATHTOF(UI\icons_russia\lieutenant_gs.paa), QPATHTOF(UI\icons_russia\captain_gs.paa), QPATHTOF(UI\icons_russia\major_gs.paa), QPATHTOF(UI\icons_russia\colonel_gs.paa)};
};
class IND_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_germany\private_gs.paa), QPATHTOF(UI\icons_germany\corporal_gs.paa), QPATHTOF(UI\icons_germany\sergeant_gs.paa), QPATHTOF(UI\icons_germany\lieutenant_gs.paa), QPATHTOF(UI\icons_germany\captain_gs.paa), QPATHTOF(UI\icons_germany\major_gs.paa), QPATHTOF(UI\icons_germany\colonel_gs.paa)};
};
class IND_G_F {
GVAR(rankIcons)[] = {QPATHTOF(UI\icons_spain\private_gs.paa), QPATHTOF(UI\icons_spain\corporal_gs.paa), QPATHTOF(UI\icons_spain\sergeant_gs.paa), QPATHTOF(UI\icons_spain\lieutenant_gs.paa), QPATHTOF(UI\icons_spain\captain_gs.paa), QPATHTOF(UI\icons_spain\major_gs.paa), QPATHTOF(UI\icons_spain\colonel_gs.paa)};
};
};
Neciota marked this conversation as resolved.
Show resolved Hide resolved
Binary file added addons/nametags/UI/icons_france/captain_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/colonel_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/corporal_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/lieutenant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/major_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/private_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_france/sergeant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/captain_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/colonel_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/corporal_gs.paa
Binary file not shown.
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/major_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/private_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_germany/sergeant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/captain_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/colonel_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/corporal_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/lieutenant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/major_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/private_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_spain/sergeant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/captain_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/colonel_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/corporal_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/lieutenant_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/major_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/private_gs.paa
Binary file not shown.
Binary file added addons/nametags/UI/icons_uk/sergeant_gs.paa
Binary file not shown.
9 changes: 9 additions & 0 deletions addons/nametags/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@ GVAR(showNamesTime) = -10;

// civilians don't use military ranks
["CIV_F", ["","","","","","",""]] call FUNC(setFactionRankIcons);

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a way to disable, don't think it needs a setting.
We tend to use base vanilla units and just change the uniforms, so this doesn't really make sense for us, and would probably just be confusing
Does CSAT = russian and greek = german make sense?

Suggested change
if (missionNamespace getVariable [QGVAR(skipCustomRankIcons), false]) exitWith {};

Copy link
Contributor

Choose a reason for hiding this comment

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

Couldn't you just overwrite the civs with whatever icons you want instead by using the same function?

Copy link
Contributor

Choose a reason for hiding this comment

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

civs are fine, I just want to skip the for loop

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Russian ranks and Iranian ranks are somewhat similar, the Chinese stand out somewhat in that they used downward point chevrons mostly. I don't know exactly how to reconcile in-game lore and geopolitics with the ranks, but if NATO gets all the American ranks, then maybe CSAT should get the Chinese ones? It's a little problematic that these nationally diverse alliances (CSAT/NATO) are one faction in game.

As for the AAF getting the German ranks; the AAF is mostly NATO-built force, and they have a bunch of equipment from all over NATO, so maybe they should just get NATO ranks.

When it comes to the new ranks, I'm not fussed as to who gets what. Just tell me what you need. If need be I'll happily add in more ranks for different nations and/or create some separate ranks for the AAF, FIA. The incoming Livonians should probably use the NATO ranks.

Copy link
Contributor

Choose a reason for hiding this comment

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

Make some ranks for the NVA. :)
They'd be used in GM, and they are simple.

Copy link
Contributor

Choose a reason for hiding this comment

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

Added a getVar setting for this,
along with a check to make sure it doesn't overwrite existing entries
e.g. mission init.sq called setFactionRankIcons first

//Change ranks based on faction for all factions that have an entry in CfgFactionClasses
{
if (isArray (_x >> QGVAR(rankIcons))) then {
private _faction = configName _x;
private _icons = getArray (_x >> QGVAR(rankIcons));
[_faction, _icons] call FUNC(setFactionRankIcons);
};
} forEach ("true" configClasses (configFile >> "CfgFactionClasses"));
Neciota marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions addons/nametags/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class CfgPatches {

#include "CfgEventHandlers.hpp"
#include "ACE_Settings.hpp"
#include "CfgFactionClasses.hpp"
#include "CfgVehicles.hpp"

#include <RscTitles.hpp>