Skip to content

Money switch building active animation - #2380

Open
dh381-1 wants to merge 66 commits into
Phobos-developers:developfrom
dh381-1:MoneyChangeAnimation
Open

dh381-1 wants to merge 66 commits into
Phobos-developers:developfrom
dh381-1:MoneyChangeAnimation

Conversation

@dh381-1

@dh381-1 dh381-1 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

What kind of change is this?

  • New feature, vanilla bugfix or enhancement of a released feature - changelog, docs and credits entries are needed.
  • Improvement to a new (unreleased) feature - docs and credits entries are needed; no changelog entry (Skip Changelog).
  • Bugfix to a new (unreleased) feature - credits entry is needed; no changelog or docs entries (Skip Changelog, Skip Docs).
  • Bugfix to an old (released) feature - changelog and credits entries are needed; no docs entry (Skip Docs).
  • Completely minor change (e.g. a typo fix) - no entries are needed (Skip Changelog, Skip Docs, Skip Credits).

Description

  • Now you can use ActiveAnim.MoneyAmount, ActiveAnimTwo.MoneyAmount, ActiveAnimThree.MoneyAmount, ActiveAnimFour.MoneyAmount to switch active animation of building.
  • When funds are greater than ActiveAnimFour.MoneyAmount, ActiveAnimFour is played; when funds are greater than ActiveAnimThree.MoneyAmount but less than ActiveAnimFour.MoneyAmount, ActiveAnimThree is played, and so on. If the corresponding animation does not exist, no switch will occur.

In rulesmd.ini:

[SOMEBUILDING]                   ; BuildingType
ActiveAnim.MoneyAmount=1000      ; integar
ActiveAnimTwo.MoneyAmount=2000   ; integar
ActiveAnimThree.MoneyAmount=3000 ; integar
ActiveAnimFour.MoneyAmount=4000  ; integar
All four configuration entries default to `-1`. The feature will only be enabled when all entries have been configured.

Comment thread docs/New-or-Enhanced-Logics.md Outdated
Comment thread CREDITS.md Outdated
@github-actions

github-actions Bot commented Aug 31, 2026 •

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.

Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
Comment thread src/Ext/Building/Hooks.cpp Outdated
&& pTypeExt->ActiveAnimThree_MoneyAmount != -1
&& pTypeExt->ActiveAnimFour_MoneyAmount != -1)
{
if(auto pBuildingExt = BuildingExt::Fetch(pThis))

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.

Same

Comment thread src/Ext/Building/Hooks.cpp Outdated
&& pTypeExt->ActiveAnimThree_MoneyAmount != -1
&& pTypeExt->ActiveAnimFour_MoneyAmount != -1)
{
if(auto pBuildingExt = BuildingExt::Fetch(pThis))

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.

Same

Comment thread src/Ext/Building/Hooks.cpp Outdated
{
int Grade = pBuildingExt->MoneyGrade;
R->EAX(Grade);
__asm { cmp eax, 3 }

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.

You should manually compare and jump to the corresponding address instead of directly writing the assembly.
你应当手动检查并跳转到对应地址,而不是直接写汇编。

Comment thread src/Ext/Building/Hooks.cpp Outdated
__asm
{
cmp eax, 3
mov [esi + 0x6F0], eax

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.

Same here.
这里也是。

@phoboscn-bot

Copy link
Copy Markdown

To Chinese users:
This pull request has been mentioned on Phobos CN. There might be relevant details there:

致中文用户:
此拉取请求已在 Phobos CN 上被提及。那里可能有相关详细信息:

https://www.phoboscn.top/t/topic/755/1

@NetsuNegi NetsuNegi added the ❓Unhardcoding / Customization Make something more tweakable label Sep 9, 2026
@DeathFishAtEase DeathFishAtEase added ❓New feature and removed ❓Unhardcoding / Customization Make something more tweakable labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ❓New feature ⚙️T1 T1 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants