Skip to content

Commit

Permalink
Allow to alter the chance of using a Character Pool character when CP…
Browse files Browse the repository at this point in the history
… is in Mixed mode (#1279)
  • Loading branch information
Iridar authored Oct 29, 2023
1 parent d2818da commit 2a54dbe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions X2WOTCCommunityHighlander/Config/XComGame.ini
Original file line number Diff line number Diff line change
Expand Up @@ -272,3 +272,8 @@ bEnableVersionDisplay=true
;;; HL-Docs: ref:DrawDebugLabels
; Uncomment the following line to enable the DrawDebugLabels CHL event
; bDrawDebugLabels = true

;;; HL-Docs: ref:MixedCharacterPoolChance
; Set the chance of using a Character Pool character when Character Pool is in Mixed mode.
; A value between 0 and 100 is expected.
iMixedCharacterPoolChance = 50
3 changes: 3 additions & 0 deletions X2WOTCCommunityHighlander/Src/XComGame/Classes/CHHelpers.uc
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ var localized string m_strFramerateSmoothingDisabledReason;
// Variable for Issue #1245 - enables the triggering of the DrawDebugLabels CHL event
var config bool bDrawDebugLabels;

// Variable for Issue #599 - 0-100 chance of using a character pool character when CP is in Mixed mode.
var config int iMixedCharacterPoolChance;

// Start Issue #885
enum EHLDelegateReturn
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ function ECharacterPoolSelectionMode GetSelectionMode(ECharacterPoolSelectionMod
// check for mixed, 50-50 chance of random/pool
if( OverrideMode == eCPSM_Mixed || SelectionMode == eCPSM_Mixed )
{
if( `SYNC_RAND(2) == 1 )
/// HL-Docs: feature:MixedCharacterPoolChance; issue:599; tags:
/// Allows to alter the chance of using a Character Pool character when Character Pool is in Mixed mode.
if (`SYNC_RAND(100) < class'CHHelpers'.default.iMixedCharacterPoolChance) // Single line for Issue #599
return eCPSM_PoolOnly;
else
return eCPSM_RandomOnly;
Expand Down

0 comments on commit 2a54dbe

Please sign in to comment.