Can I have two two tokens with the same hex in reinsertion

Started by Guadozoku, January 01, 2023, 09:51:54 AM

Previous topic - Next topic

Guadozoku

I'm doing a small project where the game already has English letters in it. The game only has upper case letters for the time being, and a hacker would have to add a lower case font (I already have a request in.) For now, though. would there be a way to make reinsertion work without changing my translated script to upper case letters only. I could try this:

01=A
01=a

but that would result in an error during dumping. Can I do anything with reinsertion to make it work?

Bunkai

Quote from: Guadozoku on January 01, 2023, 09:51:54 AMI'm doing a small project where the game already has English letters in it. The game only has upper case letters for the time being, and a hacker would have to add a lower case font (I already have a request in.) For now, though. would there be a way to make reinsertion work without changing my translated script to upper case letters only. I could try this:

01=A
01=a

but that would result in an error during dumping. Can I do anything with reinsertion to make it work?

To answer the title's question, No.

If you want to keep your script, make the new table (for insertion) as if there was lower letters already (with new/more hexes). In a sense a table makes the relations between some addresses and their referenced font, not actual letters.

[It won't show the lower cases, just garbled tiles for those tho]

PS: I'm not completly sure it works due to stuff like font table offsets.
Curiosity leads to knowledge,
be curious.

svambo

Why dont you just copy the charset so that there are 2 sets with upper case letters. Then you can keep your script the way it is and just have to exchange the second part of the charset with lower case letters later.

abw

Another approach to the problem would be to keep your original script file as-is but create a temporary upper-case version as part of your build process. E.g. if your build process is currently something like this:
Atlas.exe ROM.ext Script.txt
you could modify it to instead do something like this:
tr [:lower:] [:upper:] < Script.txt > Script_UC.txt
Atlas.exe ROM.ext Script_UC.txt
(assuming access to standard Unix tools, anyway; the Windows equivalent appears to be something like "(Get-Content Script.txt) | ForEach-Object {$_.ToUpper()} | Out-File -encoding ASCII Script_UC.txt").

A benefit to this approach is that you don't have to map lowercase letters to hex at all until the game is hacked and ready to use them, so you don't have to worry about lowercase letters getting mapped to e.g. random control codes and can still playtest using your (uppercased) script.