load npc into battle asm help - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: load npc into battle asm help (/thread-2437.html) Pages:
1
2
|
load npc into battle asm help - Gi Nattak - 12-08-2013 Is there any way via assembly to make it so the game can load NPC sprites/palettes into battle? As it is, the game only loads up to the dog sprite id#25. We (Angelo n I) are trying to load NPC 41 into a battle event but the sprite just comes out all garbled and I see in usme the battle palettes only go up to the dog, so I'm assuming that's how far it goes =( RE: load npc into battle asm help - madsiur - 12-08-2013 (12-08-2013, 04:08 PM)Gi Nattak Wrote: We (Angelo n I) are trying to load NPC 41 into a battle event ... I'm surprise he actually wants to do something hacking related... RE: load npc into battle asm help - madsiur - 12-08-2013 Seriously Mike from sprite 22 and above it will not work since the sprites doesn't have full sprite sheets. By trying to load sprite 41, you're doing 0x2A80 bytes * 41, and you probably fall into the data, past the sprites. I dare you to try to put Interceptor in a battle event, it will never work. RE: load npc into battle asm help - Gi Nattak - 12-09-2013 Ah I forgot to say that I am/I was going to expand the sprite sheet to full via Edrin's tutorial, and then hopefully that would also take care of it spilling over into other sprites data...? RE: load npc into battle asm help - SSJ Rick - 12-09-2013 I was telling u that I know for a fact a full sheet of gestahl will work which is why I did it you know lolz :p but at the same time with the expanded sprites there might be a slight chance but I'm not sure how it will look once the expanded sprite data is entered RE: load npc into battle asm help - madsiur - 12-09-2013 (12-09-2013, 01:28 AM)Gi Nattak Wrote: Ah I forgot to say that I am/I was going to expand the sprite sheet to full via Edrin's tutorial, and then hopefully that would also take care of it spilling over into other sprites data...? I think it will be only good if the previous sprites IDs have full sprite sheets. As an example, if your NPC is #23 you would need full spritesheet from #0 to #22. The reason why is because the battle sprite ID in $2EAE,X don't use the NPC pointer table that is use to load NPCs GFX. In fact I didn't find any pointer table for battle sprites, hence my assumption that the game calculate the offset of the sprite by multiplying the size of a full spritesheet by the sprite ID. RE: load npc into battle asm help - HatZen08 - 12-09-2013 The following tables may be of interest: Code: palettes for characters (battle): address, palette value and related character: If you have valid data for the char graphics, you can change the pointers for new graphics at C2/CE43 table. As example, if you change Terra's pointers from 00 00 D5 to A0 16 D5 the game engine will load Locke's sprite for Terra. It only applies for battles. You must also check how the palette is set in the game engine for these pointers to avoid graphic and palette mismatches. The pointers are hard coded with the sprites ID. If you want to use a sprite ID after #$17, it will bypass the table space and load garbage. You can try to expand the tables or change the code to add a special exception for your specific sprite ID. Alternatively, you can try to recycle one of the pointers for a new data. However, you probably must have to sacrifice one of the usable graphics for a specific sprite ID. RE: load npc into battle asm help - madsiur - 12-09-2013 (12-09-2013, 11:39 AM)HatZen08 Wrote: If you have valid data for the char graphics, you can change the pointers for new graphics at C2/CE43 table. Nice find. I was looking for this yesterday. My assumption were wrong then. RE: load npc into battle asm help - B-Run - 12-09-2013 After relocalizing and expanding the pointer table, here's where it gets called: Code: C1/3D66: BF45CEC2 LDA $C2CE45,X (High byte of pointer to start of character battle graphics) The only real obstacle in using existing NPC sheets (assuming you just need them to show up on the screen, not actually fight) is that they dont structure their additional sprites the same way, but as far as walking around it should work. Its normally better to expand the sheet first to a full PC sheet then use that for battle. RE: load npc into battle asm help - Gi Nattak - 12-10-2013 Thanks for the info guys. When I get some time again here I shall give it a shot. =) |