Skip to content

Penetration damage on garrisonable structures - #1370

Open
FS-21 wants to merge 28 commits into
Phobos-developers:developfrom
FS-21:feature/penetrates-garrison
Open

Penetration damage on garrisonable structures#1370
FS-21 wants to merge 28 commits into
Phobos-developers:developfrom
FS-21:feature/penetrates-garrison

Conversation

@FS-21

@FS-21 FS-21 commented Aug 30, 2024

Copy link
Copy Markdown
Contributor

Penetration damage on garrisonable structures

  • Warheads can now damage garrisoned infantry at impact.
  • PenetratesGarrison Enables the logic.
    • PenetratesGarrison.RandomTarget specifies if the damage will go at some random garrisoned soldier or if all infantry should be damaged at the same time.
    • PenetratesGarrison.DamageMultiplier can be used to modify the damage applied against the garrisoned infantry. A random percentage value will be picked between the specified range.
    • PenetratesGarrison.CleanSound can be used to specify a sound to play when the structure lost all the garrisoned soldiers with this logic.
    • PenetratesGarrison.Allowed can be set on garrisonable buildings to protect the garrisoned infantry, or used on garrisoned infantry to make them not be affected by this logic.

In rulesmd.ini:

[SOMEWARHEAD]                                 ; WarheadType
PenetratesGarrison=false                      ; boolean
PenetratesGarrison.RandomTarget=true          ; boolean
PenetratesGarrison.DamageMultiplier=1.0,1.0   ; floating point value - single or comma-sep. range (percentages)
PenetratesGarrison.CleanSound=                ; sound entry

[SOMETECHNO]                                  ; TechnoType
PenetratesGarrison.Allowed=true               ; boolean

FS-21 added 3 commits August 20, 2024 13:33
- Warheads can now damage garrisoned infantry at impact.
- `GarrisonPenetration` Enables the logic.
- `GarrisonPenetration.RandomTarget` specifies if the damage will go at some random garrisoned soldier or if all infantry should be damaged at the same time.
- `GarrisonPenetration.DamageMultiplier` can be used to modify the damage applied against the garrisoned infantry. A random percentage value will be picked between the specified range.
- `GarrisonPenetration.CleanSound` can be used to specify a sound to play when the structure lost all the garrisoned soldiers with this logic.
- `ImmuneToGarrisonPenetration` can be set on garrisonable buildings to protect the garrisoned infantry. If used on infantry these units won't affected by this logic.

In `rulesmd.ini`:

[SOMEWARHEAD]                                 ; Warhead
GarrisonPenetration=false                     ; boolean
GarrisonPenetration.RandomTarget=true         ; boolean
GarrisonPenetration.DamageMultiplier=1.0,1.0  ; floating point value - single or comma-sep. range (percentages)
GarrisonPenetration.CleanSound=               ; sound entry

[SOMETECHNO]                                  ; TechnoType
ImmuneToGarrisonPenetration=false             ; boolean
@FS-21 FS-21 closed this Aug 30, 2024
@github-actions

github-actions Bot commented Aug 30, 2024

Copy link
Copy Markdown

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@FS-21 FS-21 reopened this Aug 31, 2024
@FS-21

FS-21 commented Aug 31, 2024

Copy link
Copy Markdown
Contributor Author

garrison-penetration-01
Reopened because I finally tested it online and is free of desyncs.

@Fryone

Fryone commented Sep 15, 2024

Copy link
Copy Markdown
Contributor

Isn't it similar to Ares Pass Through? https://ares-developers.github.io/Ares-docs/new/buildings/urbancombattrenches.html
though, Ares did it through projectiles and buildings...

@mevitar

mevitar commented Sep 18, 2024

Copy link
Copy Markdown

There were some issues with that garrison logic that i do not remember right now, and this feature here might allow for better control over what can get cleared and what not.
If anything, this one is much more intuitive.

@Coronia Coronia 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.

suggest to change these tags' names into PenetratesGarrison, to keep consistent with the already exists PenetratesBunker tag

Comment thread src/Ext/WarheadType/Detonate.cpp Outdated
Comment thread src/Ext/WarheadType/Detonate.cpp Outdated
Comment thread src/Ext/WarheadType/Detonate.cpp Outdated
From GarrisonPenetration to PenetratesGarrison
Comment thread src/Ext/WarheadType/Detonate.cpp Outdated
Comment thread src/Ext/WarheadType/Detonate.cpp Outdated
@Starkku
Starkku force-pushed the develop branch 2 times, most recently from b429215 to 280b1c8 Compare June 29, 2025 19:13
…es-garrison

# Conflicts:
#	CREDITS.md
#	YRpp
#	src/Ext/TechnoType/Body.cpp
#	src/Ext/WarheadType/Detonate.cpp
@Coronia
Coronia force-pushed the feature/penetrates-garrison branch from feba95c to 7809074 Compare July 8, 2025 15:02
@Coronia Coronia added Needs testing ⚙️T1 T1 maintainer review is sufficient labels Jul 8, 2025
@Coronia
Coronia requested a review from CrimRecya July 9, 2025 02:39
@Coronia

Coronia commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

the damage part should be done by a proper ReceiveDamage function, or it'll create various of issues in edge cases

@FS-21

FS-21 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

the damage part should be done by a proper ReceiveDamage function, or it'll create various of issues in edge cases

I still don't understand what is suggested, I need to hook inside ReceiveDamage and apply this damage to kill infantry?

@Coronia

Coronia commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

You need to do the damage through ReceiveDamage, instead of doing so by just reducing HP. Otherwise there'll be leftover things to handle manually which can be risky

@FS-21

FS-21 commented Aug 23, 2026

Copy link
Copy Markdown
Contributor Author

probably is done

@fagonghaiwo

Copy link
Copy Markdown

[SOMETECHNO] ; TechnoType
PenetratesGarrison.Allowed=false ; boolean

maybe default value is true

@FS-21

FS-21 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

[SOMETECHNO] ; TechnoType PenetratesGarrison.Allowed=false ; boolean

maybe default value is true

Yes, the first message is very old. I'll update the first comment but always go to the documentation that must be updated to reflect what does the game tags

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

Labels

Needs testing ⚙️T1 T1 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants