[P4G PC] change the date layout to fit French calendar

Need help finding something? Is a program not working? Game crashing? Give us all the details you have and we'll try to sort it out!
Post Reply
User avatar
ElderLink
Posts: 9
Joined: Wed Jun 17, 2020 10:06 am
Has thanked: 2 times
Been thanked: 1 time

[P4G PC] change the date layout to fit French calendar

Post by ElderLink » Sun Jul 26, 2020 12:48 pm

Hi, so I've wanted to change the calendar on the top-right of the screen to fit the French standard for calendars (day first, month second)

Is there a way to modify this data ?

User avatar
Niopack
Posts: 25
Joined: Sun Apr 12, 2020 3:05 pm
Has thanked: 5 times
Been thanked: 9 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Niopack » Tue Jul 28, 2020 12:31 pm

I don't know in P4G but in P3P there is a file that has the GUI info, in this file, you can see and change the tmx files for graphics, the text position, etc., if the day and month text are separated boxes, using amicitia, you should be able to move them around as you like, thus, you can move the month to the right and the day to the left using the "offset" option amicitia has, try to find the GUI file and then pinpoint the date info, I think that, if they are two different text boxes, you can change it.

User avatar
Sakimotor
Posts: 9
Joined: Sat Jun 13, 2020 4:19 pm
Has thanked: 7 times
Been thanked: 2 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Sakimotor » Wed Jul 29, 2020 5:24 pm

Niopack wrote:
Tue Jul 28, 2020 12:31 pm
I don't know in P4G but in P3P there is a file that has the GUI info, in this file, you can see and change the tmx files for graphics, the text position, etc., if the day and month text are separated boxes, using amicitia, you should be able to move them around as you like, thus, you can move the month to the right and the day to the left using the "offset" option amicitia has, try to find the GUI file and then pinpoint the date info, I think that, if they are two different text boxes, you can change it.
I get what you're trying to see, but wouldn't the game just be looking for the sprites to put in place by their name, instead of their offset ? Explanations in spoiler :
Spoiler
Show
What I mean by that, is that, if for example, the game wants to output December the 15th as a date, it would first look for the sprite related to December , so 12, show it on the left, then do the same for the 15th, so 15, and put it on the right, no matter where these sprites were actually located in the tmx file, as long as the offset is correct, right ?

From what I understood about sprite offset, if we were to change the sprites' position without modifying their offset, the sprite shown by the game would be wrong one. If we were to change both the position, and the offset, then it would still show the same sprite at the same place ingame, wouldn't it ? Once again I'm not sure about it but that's how I think it works.
In my opinion, in order to change the date layout, we would have to modify some script ingame that says "show the date as MM/DD" to instead "show the date as DD/MM". How does the game handle this though ? That, I don't really have an answer to.

User avatar
Niopack
Posts: 25
Joined: Sun Apr 12, 2020 3:05 pm
Has thanked: 5 times
Been thanked: 9 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Niopack » Thu Jul 30, 2020 5:28 pm

Using Amicitia, you can change some of the sprite's parameters. Opening the bin file of the GUI in P3P for example, there are two containers, one called "sprites" and another one called "textures", "textures" has the tmx files, while the "sprites" has the mapping for those sprites.

When you open the "sprite" container, you can see the settings for each sprite, where Coordinates, Weight, and Height are used for mapping (the numbers represent pixels). Fortunately, there is the "offset" setting, what it does is change the position of the sprite on the screen, where add in X move it to the right, subtract in X move it to the left, add in Y move it down, and subtract in Y move it up. I'll show you an example:
Spoiler
Show
Image
This is the tmx used when you start a battle (and various things).

Image
The word Player is above Advantage, let's change it.

The sprite info for these mappings are:
INIT_FREE.BIN>init/camp.bin: Sprites>Sprite [ADVANTAGE]
INIT_FREE.BIN>init/camp.bin: Sprites>Sprite [PLAYER]

To move the word "Advantage" up and "Player" down, I have to change their offset. In this particular case, I have to add a value of -17 in OffsetY for Advantage (because I want to move it up):
Image


Then, I do the same with Player, but backward. I add a value of 17 in OffsetY (because I want to move it down):
Image
Then save, build a new umd0.cpk, replace, and test it.

Image
...And done, looks great.
Using this example, it should be possible, in theory, to modify the OffsetX for the date's sprites, moving the month to the right and the day to the left. I haven't tested it in P3P because there are A LOT of sprites and is not my top priority right now, but how I said before, should be possible (if P4G has a GUI file, like P3P of course).

I hope I have explained myself well and help you out with any doubt you had.

User avatar
Niopack
Posts: 25
Joined: Sun Apr 12, 2020 3:05 pm
Has thanked: 5 times
Been thanked: 9 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Niopack » Thu Jul 30, 2020 5:33 pm

On a different note, yes, it would be easier just to make the game show the day before the month, but I haven't found anything myself. Although, that would be more useful in the text rather than graphic aspects.

User avatar
Sakimotor
Posts: 9
Joined: Sat Jun 13, 2020 4:19 pm
Has thanked: 7 times
Been thanked: 2 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Sakimotor » Sun Aug 02, 2020 9:46 am

Niopack wrote:
Thu Jul 30, 2020 5:28 pm
Using Amicitia, you can change some of the sprite's parameters. Opening the bin file of the GUI in P3P for example, there are two containers, one called "sprites" and another one called "textures", "textures" has the tmx files, while the "sprites" has the mapping for those sprites.

When you open the "sprite" container, you can see the settings for each sprite, where Coordinates, Weight, and Height are used for mapping (the numbers represent pixels). Fortunately, there is the "offset" setting, what it does is change the position of the sprite on the screen, where add in X move it to the right, subtract in X move it to the left, add in Y move it down, and subtract in Y move it up. I'll show you an example:
Spoiler
Show
Image
This is the tmx used when you start a battle (and various things).

Image
The word Player is above Advantage, let's change it.

The sprite info for these mappings are:
INIT_FREE.BIN>init/camp.bin: Sprites>Sprite [ADVANTAGE]
INIT_FREE.BIN>init/camp.bin: Sprites>Sprite [PLAYER]

To move the word "Advantage" up and "Player" down, I have to change their offset. In this particular case, I have to add a value of -17 in OffsetY for Advantage (because I want to move it up):
Image


Then, I do the same with Player, but backward. I add a value of 17 in OffsetY (because I want to move it down):
Image
Then save, build a new umd0.cpk, replace, and test it.

Image
...And done, looks great.
Using this example, it should be possible, in theory, to modify the OffsetX for the date's sprites, moving the month to the right and the day to the left. I haven't tested it in P3P because there are A LOT of sprites and is not my top priority right now, but how I said before, should be possible (if P4G has a GUI file, like P3P of course).

I hope I have explained myself well and help you out with any doubt you had.
Oh, so that's how Offset works ! Alright, I will try to find the sprites related to dates then

User avatar
Niopack
Posts: 25
Joined: Sun Apr 12, 2020 3:05 pm
Has thanked: 5 times
Been thanked: 9 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Niopack » Sun Aug 02, 2020 11:07 am

Let us know if you find something!

User avatar
Sakimotor
Posts: 9
Joined: Sat Jun 13, 2020 4:19 pm
Has thanked: 7 times
Been thanked: 2 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Sakimotor » Sun Aug 02, 2020 3:47 pm

Niopack wrote:
Sun Aug 02, 2020 11:07 am
Let us know if you find something!
It's been disastrous so far haha

In data00004/memcard/mcpanel.arc there are Sprites named (in japanese) Day and Month, this gave me some hope Image

By modyfying them (I added some height to the first sprite, and removed some height to the second one) I noticed that the Day value (the second one) is apparently useless, and that the one related to month is not related to the date, but to the separation bar... Image

I'm gonna be real, that makes no sense

User avatar
Niopack
Posts: 25
Joined: Sun Apr 12, 2020 3:05 pm
Has thanked: 5 times
Been thanked: 9 times

Re: [P4G PC] change the date layout to fit French calendar

Post by Niopack » Tue Aug 04, 2020 11:53 am

Sakimotor wrote:
Sun Aug 02, 2020 3:47 pm
Niopack wrote:
Sun Aug 02, 2020 11:07 am
Let us know if you find something!
It's been disastrous so far haha

In data00004/memcard/mcpanel.arc there are Sprites named (in japanese) Day and Month, this gave me some hope Image

By modyfying them (I added some height to the first sprite, and removed some height to the second one) I noticed that the Day value (the second one) is apparently useless, and that the one related to month is not related to the date, but to the separation bar... Image

I'm gonna be real, that makes no sense
Yeah, Persona games have A LOT of placeholders, leftovers, dummy, and repeated files, which makes it difficult to pinpoint these files. The only thing I found that was "apparently" the date in P3P (since it was located within the numbers sprite's info, the one I guess is used for the date), was the variable the game uses (I think), which is "%03d x %03d", although it's hard to tell since there are a lot of variables and that is just one of them. Anyhow, I change the offset of all the "%03d x %03d" files I found, but I didn't see any difference. I still believe that is possible, but I have to search a little deeper within its files, maybe it's in another file, maybe that's not the sprite, who knows. I'll let you know if I found something.

Post Reply