Skip to content

feat: IW3 menu dumping#909

Open
michaeloliverx wants to merge 8 commits into
Laupetin:mainfrom
michaeloliverx:iw3-menu-dump
Open

feat: IW3 menu dumping#909
michaeloliverx wants to merge 8 commits into
Laupetin:mainfrom
michaeloliverx:iw3-menu-dump

Conversation

@michaeloliverx

Copy link
Copy Markdown
Contributor

Summary

Relates to #626

Adds IW3 menu and menulist dumping. The original source cannot be reproduced exactly because macros and preprocessing are lost, but the output preserves runtime behaviour and can be relinked with the official tools.

Verification

  • Dumped stock ui_mp.ff
  • Copied the generated menus and menulist into CoD4 Mod Tools
  • Rebuilt a mod.ff using the official linker_pc
  • Tested the relinked menus in game

Notes

Loading every ui_mp menu in one mod exceeds stock CoD4’s 128-menufile limit:

Exceeded limit of 128 'menufile' assets.

CoD4x can raise the limit for testing:

.\iw3mp.exe +set r_xassetnum "menufile=512"

The stock linker also cannot load four generated menu files because their paths exceed its 63-character path limit. It reports them as missing even though the files exist:

Couldn't find menu file 'ui_mp/demolitions_popup_cac_defaultclasswarning_heavy_gunner.menu'
Couldn't find menu file 'ui_mp/demolitions_popup_cac_defaultclasswarning_demolitions.menu'
Couldn't find menu file 'ui_mp/heavygunner_popup_cac_defaultclasswarning_heavy_gunner.menu'
Couldn't find menu file 'ui_mp/heavygunner_popup_cac_defaultclasswarning_demolitions.menu'
link...compress...save...done.

The linker still completes and writes the fastfile.

References

Emit numeric tokens without quotes so the linker keeps colour arguments separate.

Before: `"0.1" "0.1" "0.12" "0.5"` becomes `"0.10.10.120.5"`
After: `0.1 0.1 0.12 0.5`

This fixes `mouseExit` colour commands failing to clear menu hover borders.
Keep explicit empty text distinct from null text when dumping menu items.

This fixes CD-key values overflowing their input boxes.
rect 10 20 180 24 1 2
style 1
type 1
visible when((localvarint("ui_highlight")==5&&localvarstring("ui_choicegroup")=="popmenu"));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The expressions could be printed better but I didn't investigate what it would take.

@Laupetin Laupetin added the enhancement New feature or request label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants