From 3a8b3f3fcdb1bb927266de69bc4e5731ff66045e Mon Sep 17 00:00:00 2001 From: He-Man Date: Sat, 12 Oct 2019 16:40:59 +0200 Subject: [PATCH] Option to force Gender on Spawn --- Sources/epoch_code/System/player_login.fsm | 7 ++++++- Sources/epoch_config/Configs/CfgEpochClient.hpp | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Sources/epoch_code/System/player_login.fsm b/Sources/epoch_code/System/player_login.fsm index c095cb43..d159471d 100644 --- a/Sources/epoch_code/System/player_login.fsm +++ b/Sources/epoch_code/System/player_login.fsm @@ -1295,7 +1295,12 @@ class FSM { name = "Open_Gender_Selection"; itemno = 78; - init = /*%FSM*/"createdialog ""SelectGender"";"/*%FSM*/; + init = /*%FSM*/"_forcegender = [""CfgEpochClient"", ""ForceGender"", """"] call EPOCH_fnc_returnConfigEntryV2;" \n + "switch (tolower _forcegender) do {" \n + " case ""male"": {EPOCH_PlayerIsMale = true;};" \n + " case ""female"": {EPOCH_PlayerIsMale = false;};" \n + " default {createdialog ""SelectGender""}" \n + "};"/*%FSM*/; precondition = /*%FSM*/""/*%FSM*/; class Links { diff --git a/Sources/epoch_config/Configs/CfgEpochClient.hpp b/Sources/epoch_config/Configs/CfgEpochClient.hpp index a32ca01e..ae2b5eba 100644 --- a/Sources/epoch_config/Configs/CfgEpochClient.hpp +++ b/Sources/epoch_config/Configs/CfgEpochClient.hpp @@ -17,6 +17,7 @@ class CfgEpochClient epochVersion = "1.3.2"; ArmAVersion = 176; debug = "true"; // true = enable extra rpt debug lines, false to disable + ForceGender = ""; // Force Players to spawn as "Male" or "Female" UseOldRevive = "false"; // Revive / Heal Player has been changed to use "HandleDamage" Eventhandler. If scripts are breaking it for you, set it to true (not recommended!) UnconsciousChance = 30; // Change in percent to get unconscious by a hit with an Axe / Sledge / Sword