ROM Hack changing position of graphics in a screen possible?

Disq

Member
OP
Newcomer
Joined
Jul 11, 2010
Messages
9
Trophies
0
XP
24
Country
Gambia, The
I hope it's ok to make a new thread.

Informations:
Me: Noob
Game: Summon Night
Language of translation: German

So, back to my question.
Is it possible to change the position of a graphic in a screen?

This is a menu how it looks in japanese.
roomj.png

There are some tiles like #3, which are easy to edit.
The othere tiles (#1, #2, #4) are like... "font tiles".
As you can see, there is no ? for ??? (save).
So the ? from #2 is used for #4

This is the best I could edit.
roomg.png

#1
Between the characters in #1 there is a space and it seems there is no tile filling this space (only the bg tiles, which are repeating in the bg).
#2
Everything fine
#3
Everything fine
#4
Using a tile from #2

The tiles for "sta" "tus" are positioned apart and I think there should be something like x and y coordinates, which say where this tiles are positioned.
If I knew where (in the same file? in the nds-file? in an arm-filme?) the xy coordinates (?) are and how to find them, I can solve this problem.

Tile repeating is a problem too. If I could say to the file he should take another tile instead, it would be fine. (Take tile #9 instead of tile #7, for example)
In the battle menu and shop menu there are the same problems.

But is it possible to do? Or did I misunderstand everything?
 

rastsan

8 baller, Death Wizard,
Member
Joined
May 28, 2008
Messages
1,002
Trophies
1
Location
toronto
Website
rastsan.wordpress.com
XP
413
Country
Canada
Does it come with a map file? If you use ct2 and you view the file system (ctr-n) you can locate the file you need to change - the graphic with its (.nscr) map file (if it has one) and you edit that image and then paste it in to the same spot CT2 can ask you to make a new one... which is what I had to do for zoids battle coleseum translation quite a few times the graphic by itself doesn't look anything like it should but when I used the map file it looked like it did while playing. I edited the map version of the image and then pasted that in and CT2 asked if it should make new I said yes and it works just fine.
Okay so you have blah.ncgr (the graphic file), you have blah.nclr (the pallete), you may have blah.nscr (the map file) that is what you need to change. if it doesn't have the .nscr then this is not the way you need to go. But if you do just right click it in the file system window view map and then export and edit that image, then paste it back in that spot.
If it doesn't have this then you are in something different that I can't help you with.
 

Disq

Member
OP
Newcomer
Joined
Jul 11, 2010
Messages
9
Trophies
0
XP
24
Country
Gambia, The
Yes, I use ct2.
It doesn't seem like it have a map file. I see a .NCER, .NCBR, .NANR and a .NCLR in it (and some dummys).
When I load the palette and retrive the tile adress, it shows up with a size of 64 x 64.
In 64 x 64 the tiles are scaled down, but if I change it to 32 x 32 I can see some tiles clearly.
If I make it 16 x 16, this "font graphics" show up, but the graphics shown in 32 x 32 disapper.

To look if there is a tile in this space, I have replaced the whole graphic with a gradation.
gradx.png

There is no tile between these two tiles, as you can see.
unsure.gif

It looks like something different, but thank you anyway for trying to help me.

Maybe the key is .NCER, because it has an "?" next to the filename in this filesystem?
 

Lyan53

Member
Newcomer
Joined
May 11, 2010
Messages
24
Trophies
0
Age
46
Location
France
XP
172
Country
France
In your file "myroom_sp_main0000.narc" uncompressed , edit with an hex editor :

For #1

100721115234658937.png


offset 0x41c > change 0xBC to 0xB8
offset 0x422 > change 0xA4 to 0xA8
offset 0x46A > change 0xBC to 0xB8
offset 0x470 > change 0xA4 to 0xA8
offset 0x4B8 > change 0xBC to 0xB8
offset 0x4BE > change 0xA4 to 0xA8

100722120013195363.png





For #4 it's more difficult , You will have to extend the NCGR file to add 4 or 8 tiles at the end , recalculate new tile adress and screen position in NCER file ...

But it is necessary to know how to analyze the data contained in the NCER file and it's relatively complex :/
 

Disq

Member
OP
Newcomer
Joined
Jul 11, 2010
Messages
9
Trophies
0
XP
24
Country
Gambia, The
It works!! Thank you, now #1 looks good!

... Would you be so kind to explain me how you could find the offsets for edit?
Maybe I can move the tiles around to hide the unneccesary things.
(Replace ー with a font needed for #4 and hide it behind a fonttile of #2 or like this)

Edit:
I have free space for a new tile, so I think this won't be a problem.
 

Disq

Member
OP
Newcomer
Joined
Jul 11, 2010
Messages
9
Trophies
0
XP
24
Country
Gambia, The
Looked at the code for a while, compared them with Lyans change and I think I see relations between the codes.

Code:
? / ? / x-Axis? / ? / Tile Number? / y-Axis?
BA 40 8C 41 00 B0
BA 40 AC 41 01 B0
BA 40 C5 41 02 B0

C2 00 BC 41 03 C0 / BC -> B8
C2 00 A4 41 04 C0 / A4 -> A8

CA 40 C4 41 05 B0
BA 40 C4 41 05 B0
BA 40 AD 41 05 B0
BA 40 8D 41 05 B0
CA 40 AD 41 05 B0
CA 40 8D 41 05 B0
C2 00 D4 41 06 B0
C2 00 8D 41 07 B0
C2 40 B1 81 08 A0
C2 40 91 81 08 A0
C2 40 C1 81 08 A0

C2 00 BC 41 03 D0 / BC -> B8
C2 00 A4 41 04 D0 / A4 -> A8

CA 40 C4 41 05 B0
BA 40 C4 41 05 B0
BA 40 AD 41 05 B0
BA 40 8D 41 05 B0
CA 40 AD 41 05 B0
CA 40 8D 41 05 B0
C2 00 D4 41 06 B0
C2 00 8D 41 07 B0
C2 40 B1 81 08 A0
C2 40 91 81 08 A0
C2 40 C1 81 08 A0

C2 00 BC 41 03 E0 / BC -> B8
C2 00 A4 41 04 E0 / A4 -> A8

I've found tile #0E, which should be the repeating tile, 6 times, so I think I'm right.
Correct me, if I'm wrong.

Maybe I can do this now...
biggrin.gif


Edit:

Yes, I made it!
dones.png

Font got somehow ugly in the last part, but it worked.
Thank you so much Lyan.
 

Lyan53

Member
Newcomer
Joined
May 11, 2010
Messages
24
Trophies
0
Age
46
Location
France
XP
172
Country
France
In the NCER file , the data are not in tiles but in cells ( 8x8 pix , 16x8 pix , 16x16 pix , 32x16 pix , etc ...)

In your "myroom_sp_main0000.narc" , all the cell are used .

It's necessary to extend your .NCGR file for add and replace the cell used in #2/#4 to the #4 position
wink.gif


---------------------


Add a new 16x16 pix Cell >>>


Add 128* 0x0 bytes in the end of .NCGR file (offset 0x3BBC)

100722124157278053.png


It is necessary to adapt the file size in files headers



Adapt file size for the NCGR >>>

offset 0x1214 > change 0xB029 to 0x302A (NCGR file size)
offset 0x1220 > change 0xA029 to 0x202A (CHAR size)
offset 0x1234 > change 0x8029 to 0x002A (DATA size)

100722010030241508.png




Adapt file size and DATA for the NARC file >>>

offset 0x8 > change 0x0466 to 0x8466 (NARC file size)

and data :

offset 0x20 and 0x24 > not change (NCER file size)
offset 0x28 and 0x2C > change 0xA43A to 0x243B (NCER + NCGR file size)
offset 0x30 and 0x34 > change 0xC462 to 0x4463 (NCER + NCGR + NANR file size)
offset 0x38, 0x3C, 0x40, etc..., 0x60 > change 0xEC64 to 0x6C65 (NCER + NCGR + NANR + NCLR file size)

100722023357505277.png




Now you have add 4 new tile (1 cell of 16x16 pix) on the NCGR file (at the end)
100722012931502227.png




Replace Cell adress in NCER file :
(3 entries , 1 by color palette)


Offset 0xB08 > change 0x0E to 0x53 (new Cell adress, palette 0xC "normal")
Offset 0xB5C > change 0x0E to 0x53 (new Cell adress, palette 0xD "unaviable")
Offset 0xBB0 > change 0x0E to 0x53 (new Cell adress, palette 0xE "selected")

100722024905416187.png



And the result :

10072202542479005.png




.......................................


The NCER tilemap contain data relative to image , each image are divised on Cell

In the NCER , there are 3 parts : 1- header , 2- image data , 3- Cell data


For the image data (2nd part) :

100722031020198496.png



Each image is stocked on 16 bytes (or sometimes 8 bytes in other game)

1st valor (in blue) > number of cell to make up this image

2nd valor (in green) > offset relatif to 3rd part of NCER file , it contain the Cell detail



For the cell data :

100722032604360462.png


Each cell is detailled on 6 bytes

1st byte : y position on the screen
2nd byte : cell width
3rd byte : x position on the screen
4th byte : cell height
5th byte : adress cell in NCGR file
6th byte : number of color palette used




For the adress of cell in NGGR file :

100722034336287937.png



Warning : all the Cells are not in 16x16 pix in NCGR file
wink.gif





EDIT

arf !! it's too late
tongue.gif


Greats work Disq
wink.gif
 

Disq

Member
OP
Newcomer
Joined
Jul 11, 2010
Messages
9
Trophies
0
XP
24
Country
Gambia, The
That's a great tutorial you wrote.
I could only make a guess, but you know how it works.
This won't be the last file which is made like this and I have to edit, so this is really useful for me.
Now I know what the other bytes are for and how to make a new cell.
This time I was lucky because of the free space, but next time I may need this knowledge how to add a new cell.
Changing the filesize in the header was something I wanted to know too, because I didn't really get it till now.

Thanks a lot, you really did a gread job
yay.gif
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-