Skip to content

Commit

Permalink
Rank Change Experiment (#6295)
Browse files Browse the repository at this point in the history
# About the pull request
Changes the backend of how paygrades are worked out on equipment presets
so we no longer need to override it several times for different roles
based on playtime.

Added sub-10 hour ranks for most USCM roles (all enlisted that didn't
already have them, and most officers above 2nd LT)
Added 70+ hour ranks for most USCM enlisted and some officers.

<!-- Remove this text and explain what the purpose of your PR is.

Mention if you have tested your changes. If you changed a map, make sure
you used the mapmerge tool.
If this is an Issue Correction, you can type "Fixes Issue #169420" to
link the PR to the corresponding Issue number #169420.

Remember: something that is self-evident to you might not be to others.
Explain your rationale fully, even if you feel it goes without saying.
-->

# Explain why it's good for the game
The hope is that this will make things a little more dynamic, and also
help address the clutter we have of certain paygrades (IE the Sergeant
SL leading 9 lance corporals and a dozen or more PFCs)
Whilst true, in regards to Squad Rifleman, there can now be MORE lance
corporals, the hope is this will be more scattered and accounted for by
senior NCOs being slightly more common.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
code: Changed back-end for working out equipment preset paygrades so as
to remove the manual overrides on several roles based on playtime perks.
add: Added lower ranks for all enlisted and some officer roles subject
to having played for less than ten hours. This rank cannot be used after
playing more than ten hours, and ignores preferences for playtime perks.
add: Added a higher rank achievable to most enlisted and some officers,
requiring 175+ hours.
add: Changed base rank for SL, SG, Spec and FTL by one grade up.
add: Changed low playtime rank for MP and Nurse from Lance Corporal to
Corporal.
/:cl:
  • Loading branch information
realforest2001 authored Jul 30, 2024
1 parent 66c8473 commit 30d8f48
Show file tree
Hide file tree
Showing 38 changed files with 324 additions and 397 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ GLOBAL_LIST_INIT(job_command_roles, JOB_COMMAND_ROLES_LIST)
#define JOB_XENOMORPH_QUEEN "Queen"

// For coloring the ranks in the statistics menu
#define JOB_PLAYTIME_TIER_0 (0 HOURS)
#define JOB_PLAYTIME_TIER_1 (10 HOURS)
#define JOB_PLAYTIME_TIER_2 (25 HOURS)
#define JOB_PLAYTIME_TIER_3 (70 HOURS)
Expand Down
2 changes: 2 additions & 0 deletions code/datums/datacore.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ GLOBAL_DATUM_INIT(data_core, /datum/datacore, new)
var/security[] = list()
//This list tracks characters spawned in the world and cannot be modified in-game. Currently referenced by respawn_character().
var/locked[] = list()
var/leveled_riflemen = 0
var/leveled_riflemen_max = 7

/datum/datacore/proc/get_manifest(monochrome, OOC, nonHTML)
var/list/cic = GLOB.ROLES_CIC.Copy()
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/job.dm
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
if(!gear_preset)
return ""
if(GLOB.gear_path_presets_list[gear_preset])
return GLOB.gear_path_presets_list[gear_preset].paygrade
return GLOB.gear_path_presets_list[gear_preset].paygrades[1]
return ""

/datum/job/proc/get_comm_title()
Expand Down
37 changes: 32 additions & 5 deletions code/modules/gear_presets/_select_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var/list/access = list()
var/assignment
var/rank
var/paygrade
var/list/paygrades = list("???")
var/role_comm_title
var/minimum_age
var/faction = FACTION_NEUTRAL
Expand Down Expand Up @@ -95,8 +95,33 @@
if(minimum_age && new_human.age < minimum_age)
new_human.age = minimum_age

/datum/equipment_preset/proc/load_rank(mob/living/carbon/human/new_human, client/mob_client)
return paygrade
/datum/equipment_preset/proc/load_rank(mob/living/carbon/human/new_human, client/mob_client)//Beagle-Code
if(paygrades.len == 1)
return paygrades[1]
var/playtime
if(!mob_client)
playtime = JOB_PLAYTIME_TIER_1
else
playtime = get_job_playtime(mob_client, rank)
if((playtime >= JOB_PLAYTIME_TIER_1) && !mob_client.prefs.playtime_perks)
playtime = JOB_PLAYTIME_TIER_1
var/final_paygrade
for(var/current_paygrade as anything in paygrades)
var/required_time = paygrades[current_paygrade]
if(required_time - playtime > 0)
break
final_paygrade = current_paygrade
if(rank == JOB_SQUAD_MARINE && final_paygrade == PAY_SHORT_ME3)
if(GLOB.data_core.leveled_riflemen > GLOB.data_core.leveled_riflemen_max)
return PAY_SHORT_ME2
else
GLOB.data_core.leveled_riflemen_max++
return final_paygrade
if(!final_paygrade)
. = "???"
CRASH("[key_name(new_human)] spawned with no valid paygrade.")

return final_paygrade

/datum/equipment_preset/proc/load_gear(mob/living/carbon/human/new_human, client/mob_client)
return
Expand All @@ -110,6 +135,8 @@
/datum/equipment_preset/proc/load_id(mob/living/carbon/human/new_human, client/mob_client)
if(!idtype)
return
if(!mob_client)
mob_client = new_human.client
var/obj/item/card/id/ID = new idtype()
ID.name = "[new_human.real_name]'s ID Card"
if(assignment)
Expand All @@ -123,7 +150,7 @@
ID.registered_ref = WEAKREF(new_human)
ID.registered_gid = new_human.gid
ID.blood_type = new_human.blood_type
ID.paygrade = load_rank(new_human) || ID.paygrade
ID.paygrade = load_rank(new_human, mob_client) || ID.paygrade
ID.uniform_sets = uniform_sets
new_human.equip_to_slot_or_del(ID, WEAR_ID)
new_human.faction = faction
Expand Down Expand Up @@ -188,7 +215,7 @@
new_human.equip_to_slot_or_del(equipping_gear, WEAR_IN_BACK)

//Gives ranks to the ranked
var/current_rank = paygrade
var/current_rank = paygrades[1]
var/obj/item/card/id/I = new_human.get_idcard()
if(I)
current_rank = I.paygrade
Expand Down
6 changes: 3 additions & 3 deletions code/modules/gear_presets/agents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)
assignment = JOB_STOWAWAY
rank = JOB_STOWAWAY
paygrade = "???"
paygrades = list("???" = JOB_PLAYTIME_TIER_0)
role_comm_title = "???"
skills = /datum/skills/civilian/survivor

Expand Down Expand Up @@ -69,7 +69,7 @@
)
assignment = JOB_UPP_REPRESENTATIVE
rank = JOB_UPP_REPRESENTATIVE
paygrade = PAY_SHORT_CREP
paygrades = list(PAY_SHORT_CREP = JOB_PLAYTIME_TIER_0)
role_comm_title = "UPP Rep."
skills = /datum/skills/civilian/survivor

Expand Down Expand Up @@ -105,7 +105,7 @@
)
assignment = JOB_TWE_REPRESENTATIVE
rank = JOB_TWE_REPRESENTATIVE
paygrade = PAY_SHORT_CREP
paygrades = list(PAY_SHORT_CREP = JOB_PLAYTIME_TIER_0)
role_comm_title = "TWE Rep."
skills = /datum/skills/civilian/survivor

Expand Down
10 changes: 5 additions & 5 deletions code/modules/gear_presets/cbrn.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "Generic CBRN" //Parent type for easier gear
assignment = JOB_SQUAD_MARINE
rank = JOB_SQUAD_MARINE
paygrade = PAY_SHORT_ME3
paygrades = list(PAY_SHORT_ME3 = JOB_PLAYTIME_TIER_0)
role_comm_title = "CBRN"
flags = EQUIPMENT_PRESET_EXTRA
auto_squad_name = SQUAD_CBRN
Expand Down Expand Up @@ -67,7 +67,7 @@

/datum/equipment_preset/uscm/cbrn/engineer
name = "CBRN Combat Technician"
paygrade = PAY_SHORT_ME4
paygrades = list(PAY_SHORT_ME4 = JOB_PLAYTIME_TIER_0)
assignment = JOB_SQUAD_ENGI
rank = JOB_SQUAD_ENGI
role_comm_title = "ComTech"
Expand Down Expand Up @@ -111,7 +111,7 @@

/datum/equipment_preset/uscm/cbrn/medic
name = "CBRN Hospital Corpsman"
paygrade = PAY_SHORT_ME4
paygrades = list(PAY_SHORT_ME4 = JOB_PLAYTIME_TIER_0)
assignment = JOB_SQUAD_MEDIC
rank = JOB_SQUAD_MEDIC
role_comm_title = "HM"
Expand Down Expand Up @@ -154,7 +154,7 @@

/datum/equipment_preset/uscm/cbrn/leader
name = "CBRN Fireteam Leader"
paygrade = PAY_SHORT_ME5
paygrades = list(PAY_SHORT_ME5 = JOB_PLAYTIME_TIER_0)
assignment = JOB_SQUAD_TEAM_LEADER
rank = JOB_SQUAD_TEAM_LEADER
role_comm_title = "TL"
Expand Down Expand Up @@ -189,7 +189,7 @@

/datum/equipment_preset/uscm/cbrn/specialist
name = "CBRN Specialist"
paygrade = PAY_SHORT_OPR
paygrades = list(PAY_SHORT_OPR = JOB_PLAYTIME_TIER_0)
assignment = JOB_SQUAD_SPECIALIST
rank = JOB_SQUAD_SPECIALIST
role_comm_title = "Spc"
Expand Down
8 changes: 4 additions & 4 deletions code/modules/gear_presets/clf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
languages = list(LANGUAGE_JAPANESE, LANGUAGE_ENGLISH)
assignment = JOB_CLF
rank = FACTION_CLF
paygrade = PAY_SHORT_REB
paygrades = list(PAY_SHORT_REB = JOB_PLAYTIME_TIER_0)
faction = FACTION_CLF
origin_override = ORIGIN_CIVILIAN
idtype = /obj/item/card/id/data
Expand Down Expand Up @@ -283,7 +283,7 @@
assignment = JOB_CLF_MEDIC
rank = JOB_CLF_MEDIC
role_comm_title = "MED"
paygrade = PAY_SHORT_CDOC
paygrades = list(PAY_SHORT_CDOC = JOB_PLAYTIME_TIER_0)
skills = /datum/skills/clf/combat_medic

/datum/equipment_preset/clf/medic/load_gear(mob/living/carbon/human/new_human)
Expand Down Expand Up @@ -715,7 +715,7 @@
skills = /datum/skills/colonial_synthetic
assignment = JOB_CLF_SYNTH
rank = JOB_CLF_SYNTH
paygrade = PAY_SHORT_SYN
paygrades = list(PAY_SHORT_SYN = JOB_PLAYTIME_TIER_0)
role_comm_title = "Syn"

/datum/equipment_preset/clf/synth/New()
Expand Down Expand Up @@ -959,7 +959,7 @@
flags = EQUIPMENT_PRESET_EXTRA
assignment = JOB_CLF_COMMANDER
rank = JOB_CLF_COMMANDER
paygrade = PAY_SHORT_REBC
paygrades = list(PAY_SHORT_REBC = JOB_PLAYTIME_TIER_0)
role_comm_title = "CMDR"
skills = /datum/skills/clf/commander

Expand Down
20 changes: 10 additions & 10 deletions code/modules/gear_presets/cmb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

/datum/equipment_preset/cmb/standard
name = "CMB - Colonial Marshal Deputy"
paygrade = PAY_SHORT_CMBD
paygrades = list(PAY_SHORT_CMBD = JOB_PLAYTIME_TIER_0)
role_comm_title = "CMB DEP"
flags = EQUIPMENT_PRESET_EXTRA
assignment = "CMB Deputy"
Expand Down Expand Up @@ -141,7 +141,7 @@

/datum/equipment_preset/cmb/leader
name = "CMB - The Colonial Marshal"
paygrade = PAY_SHORT_CMBM
paygrades = list(PAY_SHORT_CMBM = JOB_PLAYTIME_TIER_0)
idtype = /obj/item/card/id/marshal
role_comm_title = "CMB MAR"
flags = EQUIPMENT_PRESET_EXTRA
Expand Down Expand Up @@ -195,7 +195,7 @@
//*****************************************************************************************************/
/datum/equipment_preset/cmb/synth
name = "CMB - Colonial Marshal Investigative Synthetic"
paygrade = PAY_SHORT_CMBS
paygrades = list(PAY_SHORT_CMBS = JOB_PLAYTIME_TIER_0)
idtype = /obj/item/card/id/deputy
role_comm_title = "CMB Syn"
flags = EQUIPMENT_PRESET_EXTRA
Expand Down Expand Up @@ -297,7 +297,7 @@

/datum/equipment_preset/cmb/liaison
name = "CMB - ICC Liaison"
paygrade = PAY_SHORT_ICCL
paygrades = list(PAY_SHORT_ICCL = JOB_PLAYTIME_TIER_0)
idtype = /obj/item/card/id/silver/cl
role_comm_title = "ICC Rep."
flags = EQUIPMENT_PRESET_EXTRA
Expand Down Expand Up @@ -356,7 +356,7 @@

/datum/equipment_preset/cmb/observer
name = "CMB - Interstellar Human Rights Observer"
paygrade = PAY_SHORT_IHRO
paygrades = list(PAY_SHORT_IHRO = JOB_PLAYTIME_TIER_0)
idtype = /obj/item/card/id/lanyard
role_comm_title = "OBS"
flags = EQUIPMENT_PRESET_EXTRA
Expand Down Expand Up @@ -415,7 +415,7 @@

assignment = "Anchorpoint Station Marine Rifleman"
rank = JOB_SQUAD_MARINE
paygrade = PAY_SHORT_ME2
paygrades = list(PAY_SHORT_ME2 = JOB_PLAYTIME_TIER_0)
role_comm_title = "A-RFN"
skills = /datum/skills/pfc/crafty
faction = FACTION_MARSHAL
Expand Down Expand Up @@ -462,7 +462,7 @@
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
assignment = "Anchorpoint Station Marine Team Leader"
rank = JOB_SQUAD_LEADER
paygrade = PAY_SHORT_ME6
paygrades = list(PAY_SHORT_ME6 = JOB_PLAYTIME_TIER_0)
role_comm_title = "A-TL"
minimum_age = 25
skills = /datum/skills/SL
Expand Down Expand Up @@ -504,7 +504,7 @@
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
assignment = "Anchorpoint Station Marine Technical Specialist"
rank = JOB_SQUAD_TEAM_LEADER
paygrade = PAY_SHORT_ME4
paygrades = list(PAY_SHORT_ME4 = JOB_PLAYTIME_TIER_0)
role_comm_title = "A-TS"
skills = /datum/skills/tl

Expand Down Expand Up @@ -546,7 +546,7 @@
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
assignment = "Anchorpoint Station Hospital Corpsman"
rank = JOB_SQUAD_MEDIC
paygrade = PAY_SHORT_ME3
paygrades = list(PAY_SHORT_ME3 = JOB_PLAYTIME_TIER_0)
role_comm_title = "A-HM"
skills = /datum/skills/combat_medic

Expand Down Expand Up @@ -604,7 +604,7 @@
flags = EQUIPMENT_PRESET_EXTRA|EQUIPMENT_PRESET_MARINE
assignment = "Anchorpoint Station Marine Smartgunner"
rank = JOB_SQUAD_SMARTGUN
paygrade = PAY_SHORT_ME3
paygrades = list(PAY_SHORT_ME3 = JOB_PLAYTIME_TIER_0)
role_comm_title = "A-SG"
skills = /datum/skills/smartgunner

Expand Down
Loading

0 comments on commit 30d8f48

Please sign in to comment.