Just created my sword, using the wrong palette even though I've changed it?

Vay

New member
I'm at the 1:25:00 mark of the tutorial and I've created my sword, have it appear in the HUD, and can hit B and have it displayed, but my sword in my HUD is using my Player palette, and my sword when I swing it is using Color 4 of the Player palette as well. I've changed the palette for the swinging sword for Melee_H and Melee_V to GameObjects, which makes the blade white, and saved it, yet in game my sword is still a dark teal (the outline of the Player character). Also my sword in my HUD is using colors 2 and 4 of the Player palette making it a blue and peach colored sword. How can I change these? I thought I followed everything in the tutorial.
 

RadJunk

Administrator
Staff member
Something that is a bit difficult to understand (and convey). This is a *full explanation*, so sorry if it's redundant with things you already understand:

For sprites, NES uses 4 "subpalettes" of 3 colors each + the transparent color which is the same in all. NESmaker uses the first two of these for game objects, and the second two of these for monsters.

When you are creating monsters, you are not actually setting their color, you are setting which subpalette they use (3 or 4), using the palettes that show there as reference for what those monsters will look like if put through those subpalettes. The SCREENS actually are what determine what palettes are placed in subpal 3 and 4. If you used the first choice of subpal when creating a monster, it will look like whatever you have placed on the SCREEN for that first monster subpal. And if you use the second choice, it will look like whatever you have placed on the SCREEN for that monster subpal. The palettes used when creating are just references, not actually tied to the monster itself necessarily.

Game Objects are similar, but where you set the game object palettes isn't on the screen, you set subpal 1 and 2 in the PLAYER game object. That determines which two subpalettes will be used for game objects (in sub pal slot 1 and 2). Whatever two subpalettes you set up in the player are the ones that all game objects will use. When creating, if you use the FIRST subpal to create (if it's selected when you're placing tiles in the animation) it will use whatever color set is in the first player sub palette. If you use the SECOND subpal to create, it will use whatever color set is in the second player sub palette.

I hope this makes sense!
 

Vay

New member
Ah, I got it now. I've done some NES Dev before through Notepad++ and using NESasm, but was never able to create anything as extensive as even the simplest things I've been able to create with NESmaker. As GameObject's colors are tied to the second sub pal of the Player GameObject, if a game had multiple different items (blue book, red ring, green sword, orange sword, etc.), would that require palette switching of the second subpal of the Player GameObject through scripting to ensure all items had correct colors?
 

RadJunk

Administrator
Staff member
Yes, you get the idea. :)

But game objects aren't tied to the second subpal...they're tied to the first two subpals. If you create them using the *second subpal*, they'll use the second subpal that is loaded for the player. If they're created using the first subpal, they'll use the first subpal loaded for the player. You could, for instance, make a player that uses both for top and bottom half respectively...you could also make a weapon that uses the first (same as the player).
 

Vay

New member
But the limitation would be having a Player character that uses all colors of the first Player subpal, and also having a couple items drop from monsters that you would want to use very different colors from each other and the Player and all be displayed at the same time. Trickery would have to be used. They were very tricky with NES games, palette switching, background tiles covering sprites and switching them quickly for a brief moment to make different effects. Thanks for the help, I understand the mechanics a lot more now.
 
TheNew8bitHeroes said:
When you are creating monsters, you are not actually setting their color, you are setting which subpalette they use (3 or 4),

I'm not sure if this has ever been said in a video, but this just turned on a light bulb. I didn't understand till right now why my monsters constantly shared the same Palette regardless of what I did.
 
Top Bottom