Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New & restored TerrainType features #1241

Merged

Conversation

Starkku
Copy link
Contributor

@Starkku Starkku commented Apr 6, 2024

Animated TerrainTypes

  • Length of the animation can now be customized by setting AnimationLength as well, defaulting to half (or quarter if damaged frames are enabled) the number of frames in TerrainType's image.

In rulesmd.ini:

[SOMETERRAINTYPE]  ; TerrainType
AnimationLength=   ; integer, number of frames

Damaged frames and crumbling animation

  • By default game shows damage frame only for TerrainTypes alive at only 1 point of health left. Because none of the original game TerrainType assets were made with this in mind, the logic is now locked behind a new key HasDamagedFrames.
    • Instead of showing at 1 point of HP left, TerrainTypes switch to damaged frames once their health reaches [AudioVisual] -> ConditionYellow.Terrain percentage of their maximum health. Defaults to ConditionYellow if not set.
  • In addition, TerrainTypes can now show 'crumbling' animation after their health has reached zero and before they are deleted from the map by setting HasCrumblingFrames to true.
    • Crumbling frames start from first frame after both regular & damaged frames and ends at halfway point of the frames in TerrainType's image.
      • Note that the number of regular & damage frames considered for this depends on value of HasDamagedFrames and for IsAnimated TerrainTypes, AnimationLength. Exercise caution and ensure there are correct amount of frames to display.
    • Sound event from CrumblingSound (if set) is played when crumbling animation starts playing.
    • Destroy animation & sound only play after crumbling animation has finished.

In rulesmd.ini:

[AudioVisual]
ConditionYellow.Terrain=  ; floating-point value

[SOMETERRAINTYPE]         ; TerrainType
HasDamagedFrames=false    ; boolean
HasCrumblingFrames=false
CrumblingSound=           ; Sound

Custom palette

  • You can now specify custom palette for TerrainTypes in similar manner as TechnoTypes can.
    • Note that this palette behaves like an object palette and does not use tint etc. that have been applied to the tile the TerrainType resides on like a TerrainType using tile palette would.

In artmd.ini:

[SOMETERRAINTYPE]  ; TerrainType
Palette=           ; filename - excluding .pal extension and three-character theater-specific suffix

Copy link

github-actions bot commented Apr 6, 2024

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.

@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 6b95c57 to dda2f54 Compare April 9, 2024 12:42
Copy link
Contributor

@chaserli chaserli left a comment

Choose a reason for hiding this comment

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

haven't looke into the impl yet, only a few codestyle issues

@Starkku Starkku force-pushed the feature/terraintype-improvements branch from dda2f54 to 25ad3b9 Compare May 2, 2024 07:10
@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 25ad3b9 to e44005b Compare May 11, 2024 12:19
@Starkku Starkku force-pushed the feature/terraintype-improvements branch from e44005b to 97ab35d Compare May 19, 2024 13:37
@Starkku Starkku force-pushed the feature/terraintype-improvements branch 2 times, most recently from e903f80 to 4c73926 Compare June 14, 2024 20:53
@Starkku Starkku requested a review from chaserli June 15, 2024 15:29
@Starkku Starkku added Minor Documentation is not required and removed Minor Documentation is not required labels Jun 15, 2024
@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 654c331 to 9ba14e7 Compare June 15, 2024 15:38
Copy link
Contributor

@chaserli chaserli left a comment

Choose a reason for hiding this comment

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

will look into details later

@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 9ba14e7 to 7d8c51d Compare June 19, 2024 15:54
@Starkku
Copy link
Contributor Author

Starkku commented Jun 19, 2024

Fixed the issues pointed out in reviews so far.

@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 7d8c51d to 9aa6c2d Compare June 25, 2024 09:33
@Starkku Starkku force-pushed the feature/terraintype-improvements branch 2 times, most recently from e0fad9f to 7fad7e0 Compare July 11, 2024 13:48
@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 7fad7e0 to 5e36802 Compare August 6, 2024 20:45
@Starkku Starkku force-pushed the feature/terraintype-improvements branch from 5e36802 to eb01776 Compare August 28, 2024 19:38
@Starkku Starkku merged commit 4ce6739 into Phobos-developers:develop Aug 28, 2024
5 of 6 checks passed
@Starkku Starkku deleted the feature/terraintype-improvements branch August 28, 2024 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants