Skip to content

Add concealment stat - #4676

Open
Keshash wants to merge 1 commit into
Developmentfrom
Concealment
Open

Add concealment stat#4676
Keshash wants to merge 1 commit into
Developmentfrom
Concealment

Conversation

@Keshash

@Keshash Keshash commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Additions

Describe new functionality added by your code, e.g.

  • Adds concealment stat for targets that increases visibility penalties against them. 100% by default. Can be increased or reduced, so conspicuous targets can decrease aiming penalties against them. Both stats can be applied to implants, apparel and weapons just like night vision.
  • Adds a line to the shooting tooltp about it

References

Links to the associated issues or other related pull requests, e.g.

Reasoning

Why did you choose to implement things this way, e.g.

  • There are multiple mods that try to implement camouflage stats, but CE doesn't support the bonuses it gives.
  • Concealment buffs could be used to make certain enemies more elusive, forcing additional aiming errors against them. Could be used to buff silenced weapons. Could use it to make proper ghillie suits. Or it could be used to make certain big armors more undesirable.

Testing

Check tests you have performed:

  • Compiles without warnings
  • Game runs without errors
  • (For compatibility patches) ...with and without patched mod loaded
  • Playtested a colony (specify how long)

@Keshash
Keshash requested review from a team as code owners July 30, 2026 20:34
@github-actions

Copy link
Copy Markdown

You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-30579794133.zip

@github-actions github-actions Bot added the Download in Comments This PR has a zipfile download available. label Jul 30, 2026

@N7Huntsman N7Huntsman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes:

  • The stat description should be revised to clearly state that the stat is a direct multiplier on range error. The current description notes it "increases" it, but doesn't really explain in what way.
  • Do we want to add a separate debug setting to the aiming tooltip to denote the effect from concealment, similar to how we breakout other factors? It's currently captured within visibility shift.

General Remarks:

  • How difficult would it be to support a stat property that can be given to a stuffable material? e.g. a futuristic "chameleon cloth" sort of thing that clothing can be made from.
    • I don't know if we'd want this to apply to a longsword made out a "chameleon metal" because it doesn't make a lot of logical sense, but I'm not sure how we'd handle that.

Balance:
I'm not sure exactly how situational we're expecting this to be, but the current effect on range error (as displayed by the aiming tooltip) is negligible.

For testing purposes, I applied <ConcealmentEfficiency_Apparel>10</ConcealmentEfficiency_Apparel> to the Burka. At max range with a Normal quality bolt action rifle during artificial light (~50% brightness) with a Level 1 shooter, the observed Visibility Errors and the associated Range Error were:

  • No burka: 7.40 | 31.81
  • Awful quality burka: 7.40 | 31.82
  • Normal quality burka: 7.40 | 31.82
  • Masterwork quality burka: 7.41 | 31.85

Under the same circumstances during mid-day light (100% brightness), the visibility error on all 4 targets was 0, and the range error was identical.

So, somewhere along the line the overall impact of your concealment factor is getting crushed by the other light calculations.

Bugs:

  • Pawn has no implants, but implant concealment is 100% (See image below)
Image

Burka Example & Test Save

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_Burka"]/equippedStatOffsets</xpath>
		<value>
			<ConcealmentEfficiency_Apparel>10</ConcealmentEfficiency_Apparel>
		</value>
	</Operation>

camo test.zip

@Keshash

Keshash commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

The stat description should be revised to clearly state that the stat is a direct multiplier on range error. The current description notes it "increases" it, but doesn't really explain in what way.

Currently doesnt affect range error. see below

How difficult would it be to support a stat property that can be given to a stuffable material? e.g. a futuristic "chameleon cloth" sort of thing that clothing can be made from.

I'll check

So, somewhere along the line the overall impact of your concealment factor is getting crushed by the other light calculations.

This is because it currently only applies to visibility error, which is: light, smoke and weather. Range error is a separate error. However, it makes sense that range error should be affected, I'll add that

Pawn has no implants, but implant concealment is 100% (See image below)

The way it works, is that 1.0 is the default value, so that you could reduce it to between 0 and 1 and make pawn MORE visible than they normally would be (anti-concealment). E.g. if they're wearing a bright glowing red dot on their face.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Download in Comments This PR has a zipfile download available.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants