Changing Textures of a Single Object
#1
Let's say I have multiple Item Boxes (ID 0x0076) in my CT. Now I want a specific Item Box to have another texture. Is it possible to change the texture of a single Item Box without changing the textures of the other ones?

I would appreciate any answer Big Grin
Reply
#2
Just give a quick update: I try, together with the single coin amount modifier, to setup a game mode that features Coin Runners in Super Mario 64 style. That means there should be yelllow, red and blue coins, which take on the respective values from the N64/3DS game (yellow 1, red 2, blue 5).

Still I cannot do this, because I have problems to change the textures (appearence) of only a handful coins in game. If I change the texture field in game, all coins are affected. I have not the knowledge of the functions of the game, and I tried a bit but got no good results in the end.

If someone wants to help me here, that would be cool, also, someone can try to take over my Idea and try to realize that Coin Runners game mode.

Thank you already in advance Rolleyes
Reply
#3
(10-08-2024, 11:23 AM)Unnamed Wrote: Just give a quick update: I try, together with the single coin amount modifier, to setup a game mode that features Coin Runners in Super Mario 64 style. That means there should be yelllow, red and blue coins, which take on the respective values from the N64/3DS game (yellow 1, red 2, blue 5).

Still I cannot do this, because I have problems to change the textures (appearence) of only a handful coins in game. If I change the texture field in game, all coins are affected. I have not the knowledge of the functions of the game, and I tried a bit but got no good results in the end.

If someone wants to help me here, that would be cool, also, someone can try to take over my Idea and try to realize that Coin Runners game mode.

Thank you already in advance Rolleyes

Hmm, that actually makes me think for a bit...
Like, remember how certain objects like the cars and Cataquacks have a specific Setting to change color?? Like in this case, using an unused KMP Setting for the Coin object to tell which color, and then another unused Setting to tell how many points you get from it??
You might need to check how Nintendo made the cars or Cataquacks their models how they change textures (or even models??) depending what value the KMP Setting uses. I feel like this should be possible...

You probably already thought of a few options and are way ahead of me but I thought I'd share what I can think of too, maybe more people will join in this and might be able to help you (as I'm not a programmer at all, sorry).

Good luck with this one though, it's a really fun idea that I'm sure at least some will like to fool around with! Maybe we get to the point we can make a certain amount of coins spawn after collecting 8 coins to spawn one more coin (or another object somehow??) that looks like a star to mimic the 8 red coins-star from Super Mario 64, as a custom mission?? Tongue
Reply
#4
An idea is figuring out how texture pattern animations are set for objects (such as cars) and replicating the code for coins, based on a specific action (such as a KMP setting)
mtctr r0 ~ bctrl / BLX R0
Reply
#5
"Like, remember how certain objects like the cars and Cataquacks have a specific Setting to change color??"

Very interesting hint, I saw the documentation of cataquack object and the color is indeed a KMP setting.

And like Ro said, this works with pattern animation. I guess it has one pattern with four different textures for the different colors, and the code is forcing to set a specific frame to load a specific texture.

However, I tried this too with the coin object, but it didn't work (The pattern won't show up). I think the problem is here that the coin model is not fully loaded from brres file, instead, only textures are loaded. Vertex data, uv data and also animation data is loaded from in game. Maybe I have done something wrong but it didn't work for me.
So if anyone wants to try it with texture patterns, please do so. Still, the main problem remains that it should only be applied for some coins, not for all, and for this someone should look into the cataquack settings for the color and try to figure out how that works.

Would appreciate if someone tries to figure it out. Smile
Reply
#6
For reference, this is the set pattern animation frame function, used for cataquacks and other objects (and elements of the game)


r4 = ?
f1 = Texture frame to set
55304C NTSC-U
mtctr r0 ~ bctrl / BLX R0
Reply
#7
When I add a new texture pattern to coins, it crashes the game for me for some reason
mtctr r0 ~ bctrl / BLX R0
Reply
#8
Another maybe flimsy idea would be to use a transparent coin texture and then couple it to a material color. mkw-sp did that with the balloon colors. But I have no Idea if this also works for coins...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)