Skip to content

Black hostage hands#233

Open
Jacky720 wants to merge 3 commits into
Lyall:masterfrom
Jacky720:hostage-scene-fixes
Open

Black hostage hands#233
Jacky720 wants to merge 3 commits into
Lyall:masterfrom
Jacky720:hostage-scene-fixes

Conversation

@Jacky720
Copy link
Copy Markdown
Contributor

Loads a custom model (just pasted the kms and cmdl but replaced the arm texture) for the black hostages in the Shell 1 core, if it is available in the assets folder. The replaced arm texture allows the hostages' skin tone to be consistent between the head and hands.

image

@ShizCalev
Copy link
Copy Markdown
Collaborator

ShizCalev commented May 15, 2026

I kinda want to add a manifest parser as some added safety, or detect on level transition what manifest is being loaded and watch which assets get loaded (which i already do with my debugprint mod, so that'll be easy to wire up into hdfix.) just a little safeguarding incase the user verifies their game files and has leftover loose mod files, so they don't end up in a state where a dirty vanilla install will crash the game (which i've definitely had to troubleshoot in the past)

Will merge once I write that up

@ShizCalev ShizCalev self-assigned this May 15, 2026
@ShizCalev ShizCalev added MGS2 Metal Gear Solid 2 Fixes labels May 15, 2026

// user/mode/demo/demod.c -> StartDemo()
MAKE_HOOK_MID(baseModule, "48 83 EC 28 48 8B 15 ?? ?? ?? ?? 48 85 D2 74 53", "Texture Swaps (Ocelot Spying)", {
if (!strcmp("d036p03", CurArea[0] + 0x2c) && GM_Item[0][0x83] == 6) {
Copy link
Copy Markdown
Collaborator

@ShizCalev ShizCalev May 15, 2026

Choose a reason for hiding this comment

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

strcmp("d036p03", CurArea[0] + 0x2c)

There's an IsStage() helper in GameVars to check against the current stage (mostly to safeguard against typos in stage names)

g_GameVars.IsStage(MGS2Stages::D036P03)


GM_Item[0][0x83] == 6

GM_Item here is the linkvarbuf, which holds all of the game's vars, with 0x83 being the real GM_Item.

Since I have a few item/weapon checks that I have to do for Third person view, I'm gonna grab the PL_GetPlayerItem() func + add all the item enums in my next commit to use instead, so this can ideally be updated to PL_GetPlayerItem() == MGS2Items::IT_Uniform for readability/parity with the way the game internally handles these checks

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

Labels

Fixes MGS2 Metal Gear Solid 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants