"character_add_model_replacement()" dont work for certain objects

Youlinikki

Member
Modder
Oct 7, 2026
3
0
180
Pronouns
she
For the custom character i'm making I'm trying to replace certain ennemy and object models with custom ones. I'm using the command character_add_model_replacement() from the api of character select. I replaced the bobomb without any trouble, but the pink bobomb isn't working. For some reason, only the pink bobomb in snow snow moutain work. I have a similar issue with lakitu : i replaced the lakitu of the introduction without any trouble, but the one that talks to Mario on the bridges still has the basic model. I dont have errors on the consol, i dont understand why it doesn't work.

It's really weird that some models work but others don't. If you have any idea why, that would be a big help !!!

my code :

local E_LAKITU = smlua_model_util_get_id("lakitu2_geo")
local E_MONOBOMB = smlua_model_util_get_id("bobomb_geo")
local E_USABOMB = smlua_model_util_get_id("bobombBuddy_geo")

[...]

local function on_character_select_load()

[...]

charSelect.character_add_model_replacement(CT_CHIAKI, id_bhvBeginningLakitu, E_LAKITU) work
charSelect.character_add_model_replacement(CT_CHIAKI, id_bhvCameraLakitu, E_LAKITU) doesn't work
charSelect.character_add_model_replacement(CT_CHIAKI, id_bhvBobomb, E_MONOBOMB) work
charSelect.character_add_model_replacement(CT_CHIAKI, id_bhvBobombBuddy, E_USABOMB) doesn't work
charSelect.character_add_model_replacement(CT_CHIAKI, id_bhvBobombBuddyOpensCannon, E_USABOMB) work

[...]
end

hook_event(HOOK_ON_MODS_LOADED, on_character_select_load)


in game :
battle.png

Bobomb works, Pink bobomb doesn't

snow.png


only this pink bobomb works

fly.png


this lakitu is okay

bridge.png


this one isn't
 
this could be because of cs not expecting these to be used, or ebcause certain romhacks change these models? unsure but this is probably why it isnt working.
 
this could be because of cs not expecting these to be used, or ebcause certain romhacks change these models? unsure but this is probably why it isnt working.
This isn't a problem related to a ROM hack; I've tested my mod only on the base version of sm64. But yes it could be an issue of CS and my mod itself.
 
This isn't a problem related to a ROM hack; I've tested my mod only on the base version of sm64. But yes it could be an issue of CS and my mod itself.
i mean it in the way of it being a prevention of romhack glitching built into the game? kinda pulling stuff outta nowhere but it could be whats happening
 

Users who are viewing this thread