Skip to content

Commit

Permalink
Merge pull request #2 from KillahPotatoes/v2.0
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
Wyqer authored Jul 21, 2018
2 parents cf1e858 + 264df73 commit 441e714
Show file tree
Hide file tree
Showing 55 changed files with 4,564 additions and 952 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
48 changes: 48 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"sqf.enableCBA": true,
"sqf.enableACE3": true,
"files.associations": {
"*.hpp": "sqf"
},
"sqflint.ignoredVariables": [
"findIf",
"ace_interact_menu_fnc_addActionToClass",
"ace_interact_menu_fnc_createAction",
"CBA_Settings_fnc_init",
"KPR_activeUniforms",
"KPR_airPoints",
"KPR_autoMode",
"KPR_autoModeInterval",
"KPR_avhPoints",
"KPR_editPlayers",
"KPR_editUniforms",
"KPR_extendedLog",
"KPR_inactiveUniforms",
"KPR_infPoints",
"KPR_killedPenalty",
"KPR_levelAnnounce",
"KPR_levelDebug",
"KPR_levelSystem",
"KPR_lvhPoints",
"KPR_playerNation",
"KPR_playPoints",
"KPR_playtime",
"KPR_tkPenalty",
"KPR_updateInterval",
"KPR_fnc_addActions",
"KPR_fnc_applyRank",
"KPR_fnc_autoLoop",
"KPR_fnc_entityKilled",
"KPR_fnc_getAceKiller",
"KPR_fnc_initACE",
"KPR_fnc_isAdmin",
"KPR_fnc_openDialogPlayers",
"KPR_fnc_openDialogUniforms",
"KPR_fnc_playerDeath",
"KPR_fnc_savePlayers",
"KPR_fnc_scoreUpdate",
"KPR_fnc_setDefaultUniforms",
"KPR_fnc_showHint",
"KPR_fnc_uniformFill"
]
}
621 changes: 621 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

5 changes: 0 additions & 5 deletions LICENSE.md

This file was deleted.

Binary file modified RANKS-OVERVIEW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
214 changes: 94 additions & 120 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,139 +1,113 @@
[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-nc-sa/4.0/)

# KP Ranks
**Version:** 1.5

**Serverkey:** Yes

**Requires:** CBA_A3

**BI Forum:** [KP Ranks](https://forums.bistudio.com/topic/195034-kp-ranks/)

**Workshop:** [KP Ranks](http://steamcommunity.com/sharedfiles/filedetails/?id=741621641)


## Description:
This mod provides a automatic ranksign system for players, based on the users own config via dedicated server userconfig files or via unit init line in the editor.

The ranksign for the german Bundeswehr (green and brown ranksigns), the US Army and Croatian Army are implemented. They will be automaticly attached to a players uniform.


## Features:
* Ranks for German "Flecktarn", "Tropentarn", US Army and Croatian Troops. (from the bottom til Colonel / Oberst)
* Server owners can manage the applied ranks with a serverside userconfig file, where they can list every player via steamID and the proper rank for them.
* Missionmakers can set the rank of a player unit via init line.
* The ranksign get's reapplied after uniform change or opening the arsenal.
* If a player isn't listed at the server file or don't have something in his unit init line, he will get the lowest rank.
* There is also a userconfig file with the uniform list, on which the mod will apply the ranksigns. Server owners can extend this list as they want.
* You get automaticly the right ranksign, even during running missions. If you wear a german Flecktarn uniform, you'll get a green german one. If you wear a german Tropentarn uniform, you'll get a brown german one and if you wear a vanilla NATO ArmA uniform, you'll get the US ranksign.
* Mission module included to force the usage of this mod.
* Add the rank insignia to every unit in the editor via the identity attributes.

This Mod works on vanilla uniforms, Uniforms of the BW Mod, the KSK 2035 Tropic Mod and D-Man's Croatian Military mod.
[![GitHub license](https://img.shields.io/github/license/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/releases)
[![GitHub Release Date](https://img.shields.io/github/release-date/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/releases)
[![Github All Releases](https://img.shields.io/github/downloads/KillahPotatoes/KP-Ranks/total.svg)](https://github.com/KillahPotatoes/KP-Ranks)

RHS Mod was checked, but the RHS uniforms don't have a proper position for apply the ranksigns, so if you wear a RHS uniform you won't get a ranksign applied.
[![GitHub issues](https://img.shields.io/github/issues-raw/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/issues)
[![GitHub closed issues](https://img.shields.io/github/issues-closed-raw/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/issues?q=is%3Aissue+is%3Aclosed)
[![GitHub pull requests](https://img.shields.io/github/issues-pr-raw/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/pulls)
[![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed-raw/KillahPotatoes/KP-Ranks.svg)](https://github.com/KillahPotatoes/KP-Ranks/pulls?q=is%3Apr+is%3Aclosed)


## Script Commands:
To apply a rank via unit init file to a playable unit:

this setVariable ["KP_Ranks_rank", x];

x = int of the desired rank (0-19)

To apply a new rank during a running mission you have to run this on the machine of the client which rank you want to change:

player setVariable ["KP_Ranks_rank", x];

## Licence:
Copyright (c) 2016 [Wyqer](https://github.com/Wyqer)

This work is licensed under the CC BY-NC-SA 4.0 License.

[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](http://creativecommons.org/licenses/by-nc-sa/4.0/)

Textured for the ranksigns are made by our community- and clanmember [Nils](https://www.killahpotatoes.de/index.php?user/9-nils/).
[BI Forum Thread](https://forums.bistudio.com/topic/195034-kp-ranks/) - [Steam Workshop](http://steamcommunity.com/sharedfiles/filedetails/?id=741621641) - [Discord](https://discord.gg/fjSPn8t)

If you like the work and think it's worth a small donation, feel free to use the following link:

https://www.paypal.me/wyqer

## Changelog:
[Donate via paypal.me](https://www.paypal.me/wyqer)

## Description
This mod provides a complete management system for the ranks/levels of the players of a server/community/group. It's configurable completely ingame on the server without the need to edit/maintain scripts or other files. The included insignias are based on the original ones of the corresponding nations and can also be applied to units in the Eden Editor. This way mission makers can give their AI troops an immersive addition.
Beside of the possibility to manage the ranks of your players you can also enable an optional leveling system. This system will automatically save the score of the players, which is earned during their game sessions, and takes care of the promotion and degradation. You can, of course, individually set the needed score to get/keep a rank, the amount of points a player gets as reward for killing infantry, destroying light, armored or air vehicles and the playtime interval, after which the player gets additional points.

## Features
* Currently provides Eden compatible insignias of German Bundeswehr in *Flecktarn* and *Tropentarn* camo pattern, US Army and Croatian Army.
* Ingame management system for player specific ranks and valid uniforms on servers.
* Mod settings integrated in the CBA settings system.
* A manual action for the player to check and apply his current insignia to the uniform. (Deactivated when auto mode enabled and level system disabled)
* An editor module which can be placed by mission makers, to ensure all players will load the mod when playing the mission.
* Import/Export your KP Ranks player list to exchange them between servers.
* Automatically assigns the appropriate insignia depending on the uniform. (e.g. German uniform will get the German insignia)
* Automatically detects ACE and moves the action to the ACE self-interactions.
* Optional automatic mode which ensures that the player has always the insignia on his uniform. (deactivates manual action)
* Optional leveling system which handles promotion and degradation of players automatically depending on their score and playtime (fully configurable by the server admin).

## Languages
Currently the mod is localized for:
* English
* German
* Polish

## Mods
Required:
* [CBA_A3](https://steamcommunity.com/workshop/filedetails/?id=450814997)

Supported:
* [ACE 3](https://steamcommunity.com/workshop/filedetails/?id=463939057)

Supported Uniforms by default:
* Vanilla NATO Uniforms
* [Bundeswehr Kleiderkammer (PBW)](https://steamcommunity.com/sharedfiles/filedetails/?id=835394852)
* [BW Mod](https://steamcommunity.com/sharedfiles/filedetails/?id=1200127537)
* [D-Man's Croatian Military mod](https://steamcommunity.com/sharedfiles/filedetails/?id=662483132)
* [KSK 2035](https://steamcommunity.com/sharedfiles/filedetails/?id=705947357)
* [RHS USAF](https://steamcommunity.com/sharedfiles/filedetails/?id=843577117)

## Licence
Copyright (C) 2016
* [Wyqer](https://github.com/Wyqer) (Code)
* [Nils](https://steamcommunity.com/id/butmumsaysimspecial) (Insignias)
* [Degman](https://steamcommunity.com/id/degman) (Croatian Insignias)

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

## Changelog
### v2.0.0
* Added: New codebase.
* Added: Usage of CfgFunctions.
* Added: Uniforms and player ranks stored in the servers profile namespace.
* Added: CBA config entries.
* Added: CBA Settings.
* Added: ACE Interaction and Vanilla action to check the current rank.
* Added: Multi language support via stringtable.
* Added: Dialog for player management without the need to edit files and restart the server.
* Added: RHS USAF uniforms support.
* Added: BW Kleiderkammer uniforms support.
* Added: Dialog for uniform management, so admins can choose supported uniforms on the fly during the game.
* Added: Optional automatic leveling system.
* Tweaked: Insignia material in config changed from general default to BIs insignia material.
* Tweaked: Editor module is now just available to create a dependency in a mission.
* Removed: Unnecessary loops.
* Removed: Manual function compiling.
* Removed: Userconfig folder and files.

### v1.5
* Added: All insignias are now available in the arsenal and editor
* Added: initPlayerLocal.sqf example for mission creators
* Tweaked: Automatic insignia assignment functionality can only be enabled via initPlayerLocal.sqf or by placing the "Force KP Ranks" module
* Tweaked: Some small code and config changes
* Added: All insignias are now available in the arsenal and editor.
* Added: initPlayerLocal.sqf example for mission creators.
* Tweaked: Automatic insignia assignment functionality can only be enabled via initPlayerLocal.sqf or by placing the "Force KP Ranks" module.
* Tweaked: Some small code and config changes.

### v1.4
* Added: Croatian ranksigns. Many thanks to [Degman](http://steamcommunity.com/id/degman)
* Tweaked: Brighten up the german "Tropentarn" ranksigns a little bit
* Tweaked: Brighten up the german "Tropentarn" ranksigns a little bit.

### v1.3
* Added: Support for Croatian Military Mod
* Tweaked: Some Code optimizations
* Fixed: Small error when the player is virtual zeus
* Added: Support for Croatian Military Mod.
* Tweaked: Some Code optimizations.
* Fixed: Small error when the player is virtual zeus.

### v1.2
* Added: own textures for the ranksigns
* Added: uniform list
* Added: Mission Module
* Tweaked: Rewritten the Code
* Tweaked: Renamed from "KP Dienstgrade" to "KP Ranks"
* Added: own textures for the ranksigns.
* Added: uniform list.
* Added: Mission Module.
* Tweaked: Rewritten the Code.
* Tweaked: Renamed from "KP Dienstgrade" to "KP Ranks".

### v1.1
* Fixed: Full Ghillies got weird textures
* Fixed: Full Ghillies got weird textures.

### v1.0
* Initial Release

# ------------------------------------------------------------

## Beschreibung:
Diese Mod bietet ein automatisiertes Dienstgradsystem für Spieler.

Es basiert auf einer userconfig Datei für dedizierte Server bzw. auf das Init Feld der Einheit für Missionsbauer.

Die Mod beinhaltet Dienstgrade der Bundeswehr (Flecktarn und Tropentarn), der US Army und der Kroatischen Armee.


## Features:
* Dienstgrade für Flecktarn, Tropentarn, US und kroatische Truppen.
* Serverbetreiber können die Dienstgrade einzelner Spieler direkt per userconfig Datei verwalten. Benötigt ist dazu nur die steamID des Spielers und die gewünschte Nummer des Dienstgrades.
* Missionsbauer können den Spielereinheiten per Init Zeile einen Dienstgrad zuweisen.
* Dienstgrade werden neu auf die Uniform gebracht, wenn die Uniform gewechselt oder das Arsenal betreten wird.
* Ist ein Spieler nicht in der userconfig Datei gelistet oder hat seine Einheit keinen Init Eintrag, so bekommt er den niedrigsten Dienstgrad zugewiesen.
* Außerdem ist eine userconfig Datei für die Uniformen vorhanden. Diese kann durch Serverbetreiber natürlich erweitert werden.
* Der Dienstgrad ist immer entsprechend der Uniform, selbst in laufenden Missionen. Trägt man Flecktarn bzw. Tropentarn, so bekommt man den deutschen grünen bzw. braunen Dienstgrad. Trägt man eine Vanilla NATO ArmA Uniform, erhält man den entsprechenden US Dienstgrad.
* Missionsmodul, um die Benutzung dieser Mod zu verlangen, ist vorhanden.
* Dienstgrade können jeder Einheit im Editor über die Identitäts Attribute zugewiesen werden.

Diese Mod funktioniert mit den Vanilla Uniformen, den Uniformen der BW Mod, der KSK 2035 Tropic Mod und denen der D-Man's Croatian Military Mod.

RHS unterstützt leider nicht die entsprechende Positionierung der Dienstgrade, weshalb auf RHS Uniformen kein Dienstgrad erscheinen wird.


## Scriptbefehle:
Um den Dienstgrad einer spielbaren Einheit per Initzeile im Editor zuzuweisen:

this setVariable ["KP_Ranks_rank", x];

x = int des gewünschten Dienstgrades (0-19)

Um einen Dienstgrad während einer laufenden Mission zu ändern, muss folgender Code bei dem Client ausgeführt werden, der eine entsprechende Änderung erfahren soll:

player setVariable ["KP_Ranks_rank", x];

## Lizenz:
Copyright (c) 2016 [Wyqer](https://github.com/Wyqer)

Diese Mod wird unter der CC BY-NC-SA 4.0 Lizenz veröffentlicht.

[![License: CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.de)

Texturen der Dienstgradabzeichen wurden durch unser Community- und Clanmitglied [Nils](https://www.killahpotatoes.de/index.php?user/9-nils/) erstellt.

Wenn dir meine Arbeit gefällt und du denkst, dass sie eine Kleinigkeit wert ist, benutze gerne folgenden Link:

https://www.paypal.me/wyqer
* Initial Release.
Loading

0 comments on commit 441e714

Please sign in to comment.