Skip to content

[Minor] Maintain compatibility withold tags#2093

Merged
TaranDahl merged 18 commits intoPhobos-developers:developfrom
DeathFishAtEase:Compatiblewitholdtags
Mar 14, 2026
Merged

[Minor] Maintain compatibility withold tags#2093
TaranDahl merged 18 commits intoPhobos-developers:developfrom
DeathFishAtEase:Compatiblewitholdtags

Conversation

@DeathFishAtEase
Copy link
Copy Markdown
Collaborator

This is a temporary solution supplementing #1984.

Important

It is inelegant and inconvenient to maintain, but we need at least one workable solution ready before the next devbuild release, even if it will eventually be entirely replaced by other implementations.


There have been complaints about what the tag renaming PR did:

  • Some consider it premature, believing it should have been done just before Release 0.5 to facilitate testing;
  • Some think it didn't go far enough—certain tags that should have been renamed were not, but discussions on GitHub ceased after the previous PR was closed;
  • Others strongly oppose changing what is already in use. However, a complete rollback of the previous PR’s changes would also create significant rework, forcing many who have already migrated to revert their changes.
  • More elegant implementations have been considered, such as allowing "aliases" for INI tags, but they are far off, and it’s not even clear when work on them will begin.

Because the Phobos-chat channel keeps mentioning these issues, and maintainers like Ollerus are also concerned about the impact of whether to roll back on users already using the new or old versions, this PR, which was completed long ago but is obviously not perfect, has been opened here—at least when we have to face this problem, it is an option available to us.

Caution

The branch of this PR will be synced with develop relatively frequently, but timely updates to the latest state of the develop branch are not guaranteed.

@DeathFishAtEase DeathFishAtEase added the No Documentation Needed No documentation needed whatsoever label Feb 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 7, 2026

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.

Copy link
Copy Markdown
Contributor

@TaranDahl TaranDahl left a comment

Choose a reason for hiding this comment

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

I think you should add comments near the patch to facilitate future deletion.

@TaranDahl TaranDahl added the No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. label Feb 7, 2026
@TaranDahl
Copy link
Copy Markdown
Contributor

@Metadorius I think there's no problem with this. Can it be merged now?

Copy link
Copy Markdown
Member

@Metadorius Metadorius left a comment

Choose a reason for hiding this comment

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

I still think that old tag names should be read with a log warning emitted. And the proper tag names should be prioritized, not vice versa.

@TaranDahl
Copy link
Copy Markdown
Contributor

And the proper tag names should be prioritized, not vice versa.

As I understand it, it reads the old name first and then the new name. So, it should give priority to using the new name.

@Metadorius
Copy link
Copy Markdown
Member

As I understand it, it reads the old name first and then the new name. So, it should give priority to using the new name.

Right, I think I've seen what @Coronia commented on and was thrown off because of this.

@TaranDahl TaranDahl added the Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions. label Mar 5, 2026
@TaranDahl TaranDahl merged commit ccf43f0 into Phobos-developers:develop Mar 14, 2026
6 checks passed
@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/26/1

DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Mar 15, 2026
@DeathFishAtEase DeathFishAtEase deleted the Compatiblewitholdtags branch March 16, 2026 02:29
Coronia added a commit that referenced this pull request Mar 16, 2026
Does anyone know why repeated loading is necessary? I discovered this
while handling #2093 and suspect it is a bug.
By switching to the `develop` branch and adding log in
`WarheadTypeExt::ExtData::LoadFromINIFile`, it can be observed that each
warhead is loaded twice.
For example, based on 6035b7b, make the
following modifications:
```diff
DEFINE_HOOK(0x75DEA0, WarheadTypeClass_LoadFromINI, 0x5)
{
	GET(WarheadTypeClass*, pItem, ESI);
	GET_STACK(CCINIClass*, pINI, 0x150);

+	static std::map<uintptr_t, int> iniCallCount;
+	uintptr_t iniAddr = reinterpret_cast<uintptr_t>(pINI);
+	int count = ++iniCallCount[iniAddr];
+	Debug::Log("[DEBUG] LoadFromINIFile for [%s] count: %d\n", pItem->ID, count);

	WarheadTypeExt::ExtMap.LoadFromINI(pItem, pINI);

	return 0;
}
```

In `debug.log`, it can be observed:
<img width="1948" height="914" alt="image"
src="https://github.com/user-attachments/assets/63ac1732-9103-444f-88a2-68634fcac5cd"
/>

---------

Co-authored-by: Netsu_Negi <[email protected]>
Co-authored-by: Coronia <[email protected]>
DeathFishAtEase added a commit that referenced this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

No Documentation Needed No documentation needed whatsoever No test needed This PR is simple enough, or changes no in-game logic, so no in-game testing is required. Will be merged in 24h This PR will be merged in 24 hours if no one has further instructions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants