Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2015-12-30 17:00:39

Fotomac
Member
Registered: 2015-10-25
Post 126/283

Translation question

In regards to languages with gender differences (e.g. Spanish, the language to which I am currently focusing on translating my hack), how do you make the game distinguish the male trainers (e.g. Bug Catchers, Youngsters, Campers) from the female trainers (e.g. Beauties, Lasses, Picnickers) throughout the battle via gendered language (e.g. "¡El CAZABICHOS quiere luchar!" for the Bug Catchers, "¡El AZUL quiere luchar!" for the rival, "¡El PEDRO quiere luchar!" for Brock, "¡La SERENA quiere luchar!" for Misty)?

Last edited by Fotomac (2015-12-30 17:01:29)

Online

#2 2015-12-30 17:44:09

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,209/3,455

Re: Translation question

You would probably do it similar to how the game already determines whether to play the Male Trainer theme or the Female Trainer theme.

- have a list of female trainer class IDs
- read the trainer's class
- if it is in the list, load the female version of the text
- otherwise, load the male version of the text

Offline

#3 2015-12-30 17:50:51

Fotomac
Member
Registered: 2015-10-25
Post 128/283

Re: Translation question

Could you translate it into code? And also, how would that apply to female trainers who don't use the female challenge music (e.g. Misty)?

(I'm assuming the female challenge music is only used for those with a female trainer class ID.)

Online

#4 2015-12-30 19:18:55

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,210/3,455

Re: Translation question

You would just make your own list of IDs instead of the one used by music, especially since it would need to be in the same bank as the routine that shows the text, not the same bank as the one that plays the music. It would be something like:

ld hl, FemaleTrainerIDs
ld a, [wTrainerClass]
ld de, 1
call IsInArray
jr c, .girlTrainer
; original male trainer code would continue after, and you'd put the girl version after that, the same as you do anywhere else that something needs a gender difference.


As for where to put that, I would have to look it up. You'd just need to find the routine that loads the text you're wanting to change and use branches like that to make it load the proper version.

Also, because of the variable I had it check, you won't need to add 200 to the IDs like you do for the music. So the table would just look like this:

FemaleTrainerIDs:
db LASS
db BEAUTY
db MISTY
db SABRINA
db FLANNERY
etc. for whichever trainers you want to show the female text.

Offline

#5 2015-12-30 20:18:44

Fotomac
Member
Registered: 2015-10-25
Post 129/283

Re: Translation question

As for the FemaleTrainerIDs hl... where does it go in the entire code?

Last edited by Fotomac (2015-12-30 20:20:37)

Online

#6 2015-12-30 20:31:31

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,211/3,455

Re: Translation question

It would just go further down in whatever file you were editing, after the routines

Offline

#7 2016-01-06 23:32:11

Fotomac
Member
Registered: 2015-10-25
Post 131/283

Re: Translation question

There's another question I have. Where do you find "Enemy [INSERT NAME HERE]", as in "Enemy BULBASAUR used TACKLE!"? Because I can't seem to be able to find it anywhere. (The general idea for the Spanish translation would be to translate it to "Enem.[INSERT NAME HERE]", as in "¡Enem.BULBASAUR usó PLACAJE!".)

Online

#8 2016-01-06 23:56:34

Mateo
Member
From: The Sims 4
Registered: 2009-11-25
Post 3,217/3,455

Re: Translation question

They appear to be in text.asm. Just search for the word "Enemy". You'll find some entries that just have that as part of a variable like wEnemyMonName or whatever, but you'll also find the ones that say "Enemy so-and-so did whatever" as well.

Offline

#9 2016-01-07 02:01:10

Fotomac
Member
Registered: 2015-10-25
Post 132/283

Re: Translation question

I looked everywhere and couldn't find the specific one I was looking for (it may be an isolated text box meant to connect to another, e.g. "Enemy BULBASAUR's DEFENSE fell!" if Squirtle uses Tail Whip).

Online

#10 2016-02-21 02:05:34

Fotomac
Member
Registered: 2015-10-25
Post 143/283

Re: Translation question

Here's one for the Italian version: how do I rearrange the following code to get in the respective player and rival naming screens "NOME TUO?" and "NOME RIVALE?" (as opposed to "YOUR NAME?" and "RIVAL's NAME?")?

PrintNamingText: ; 68f8 (1:68f8)
    coord hl, 0, 1
    ld a, [wNamingScreenType]
    ld de, YourTextString
    and a
    jr z, .notNickname
    ld de, RivalsTextString
    dec a
    jr z, .notNickname
    ld a, [wcf91]
    ld [wMonPartySpriteSpecies], a
    push af
    callba WriteMonPartySpriteOAMBySpecies
    pop af
    ld [wd11e], a
    call GetMonName
    coord hl, 4, 1
    call PlaceString
    ld hl, $1
    add hl, bc
    ld [hl], $c9
    coord hl, 1, 3
    ld de, NicknameTextString
    jr .placeString
.notNickname
    call PlaceString
    ld l, c
    ld h, b
    ld de, NameTextString
.placeString
    jp PlaceString

Online

#11 2016-02-21 22:56:50

Danny-E 33
Administrator
Registered: 2012-06-09
Post 935/1,021

Re: Translation question

This is actually a very small edit:

PrintNamingText: ; 68f8 (1:68f8)
    coord hl, 0, 1          ; screen coords that "NOME" will be printed
    ld a, [wNamingScreenType]
    ld de, YourTextString   ; de points to "TUO"
    and a
    jr z, .notNickname      ; jump if naming player
    ld de, RivalsTextString ; de points to "RIVALE"
    dec a
    jr z, .notNickname      ; jump if naming rival
    ld a, [wcf91]           ; handling mon nicknames is the same as before
    ld [wMonPartySpriteSpecies], a
    push af
    callba WriteMonPartySpriteOAMBySpecies
    pop af
    ld [wd11e], a
    call GetMonName
    coord hl, 4, 1
    call PlaceString
    ld hl, $1
    add hl, bc
    ld [hl], $c9
    coord hl, 1, 3
    ld de, NicknameTextString
    jr .placeString
.notNickname
    push de                 ; save player/rival text pointer
    ld de, NameTextString   ; de points to "NOME"
    call PlaceString        ; print "NOME" text
    pop de                  ; restore player/rival text pointer
    ld l, c                 ;
    ld h, b                 ; hl now points to screen coords to print to
.placeString
    jp PlaceString          ; print player/rival text

YourTextString: ; 693f (1:693f)
    db "TUO?@"

RivalsTextString: ; 6945 (1:6945)
    db "RIVALE?@"

NameTextString: ; 694d (1:694d)
    db "NOME @"

The only code that I had to edit was after the .notNickname label.

Note that there is now a space in the NameTextString text and a question mark in the other two texts.
Also note that this does not change any behavior for nicknaming mons, but that would not be hard to edit either, if you need to.


Red Hack: Pokémon Prototype

Total number of registered users: 7000+
Total number of active users: ~12

Offline

#12 2016-12-17 17:41:01

Fotomac
Member
Registered: 2015-10-25
Post 262/283

Re: Translation question

Another question, this time specific to the Spanish version: how do you change this line in "engine/menu/status_screen.asm" so it displays an uppercase A instead of an arrow pointing to the right?

ld [hl], $70 ; 1-tile "to"

Online

#13 2016-12-17 20:55:37

Rangi
Member
Registered: 2016-05-09
Post 398/553

Re: Translation question

Fotomac wrote:

Another question, this time specific to the Spanish version: how do you change this line in "engine/menu/status_screen.asm" so it displays an uppercase A instead of an arrow pointing to the right?

ld [hl], $70 ; 1-tile "to"

Look in charmap.asm. "A" is $80, so replace the $70 with that. Or, you can just do:

ld [hl], "A" ; 1-tile "to"

(at least with pokecrystal).

If you wanted to keep the arrow but make it more clear, you could add this to charmap.asm:

charmap "→", $70

And use this code:

ld [hl], "→" ; 1-tile "to"

ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#14 2016-12-30 08:49:03

Fotomac
Member
Registered: 2015-10-25
Post 265/283

Re: Translation question

Returning to my original question. As I'm working on the French translation of my hack thanks to a French disassembly I just recently discovered (which also had the side effect of the delay of my planned return to making new builds for at least a week), I realize I'll also have to allow for the contracted preposition "l'", as in "L'INTELLO REMI veut se battre!". How do I have the game check for trainer classes whose titles begin with a vowel, such as the Super Nerd (Intello in the French version)?

Online

#15 2016-12-30 09:31:44

Rangi
Member
Registered: 2016-05-09
Post 438/553

Re: Translation question

engine/battle/16.asm:PrintBeginningBattleText is the routine responsible for the behavior you want to ch

So here's how you'd figure out how to do this.

The phrase "veut se battre" in English is "wants to battle". I see that the phrase is at text.asm:_TrainerWantsToFightText. The entire bit is this:

_TrainerWantsToFightText:: ; 89c5e (22:5c5e)
    TX_RAM W_TRAINERNAME
    text " @"
    TX_RAM wCurTrainerName
    db $0
    line "wants to battle!"
    prompt

I'm guessing you changed it to something like this:

_DresseurVeutSeBattreText::
    text "Le @"
    TX_RAM W_TRAINERNAME
    text " @"
    TX_RAM wCurTrainerName
    db $0
    line "veut se battre!"
    prompt

Then I search backwards through the code, looking at the chain of what references what until I find the behavior that needs changing. engine.battle/16.asm:TrainerWantsToFightText refers to _TrainerWantsToFightText. Then engine.battle/16.asm:PrintBeginningBattleText refers to TrainerWantsToFightText. Specifically, there's this section:

.trainerBattle
    call .playSFX
    ld c, $14
    call DelayFrames
    ld hl, TrainerWantsToFightText
.wildBattle
    push hl
    callab DrawAllPokeballs
    pop hl
    call PrintText
    jr .done

It's loading TrainerWantsToFightText in hl (if it's a trainer battle) and calling PrintText. You want it to print a different phrase for vowel trainers, probably this:

_VowelDresseurVeutSeBattreText::
    text "L'@" ; change preposition
    TX_RAM W_TRAINERNAME
    text " @"
    TX_RAM wCurTrainerName
    db $0
    line "veut se battre!"
    prompt

Of course you'll also need this:

VowelDresseurVeutSeBattreText:
    TX_FAR _VowelDresseurVeutSeBattreText
    db "@"

Anyway, the actual assembly logic part is in deciding whether to load DresseurVeutSeBattreText or VowelDresseurVeutSeBattreText in PrintBeginningBattleText.

One way is to copy a recurring pattern throughout the code, and call the IsInArray routine. Look at home.asm:IsMoveHM:

IsMoveHM:: ; 3049 (0:3049)
    ld hl,HMMoves
    ld de,1
    jp IsInArray

HMMoves:: ; 3052 (0:3052)
    db CUT,FLY,SURF,STRENGTH,FLASH
    db $ff ; terminator

You would write something like this:

DoesTrainerBeginWithVowel::
    ld hl,VowelTrainers
    ld de,1
    jp IsInArray

VowelTrainers::
    db YOUNGSTER,ENGINEER;etc
    db $ff ; terminator

And then call it in PrintBeginningBattleText:

.trainerBattle
    call .playSFX
    ld c, $14
    call DelayFrames
    ; load different text for vowel trainers
    ld a, [W_TRAINERCLASS]
    push af
    push bc
    call DoesTrainerBeginWithVowel
    pop bc
    pop de
    jr c, .is_vowel_trainer
    ld hl, DresseurVeutSeBattreText
    jr .wildBattle
.is_vowel_trainer
    ld hl, VowelDresseurVeutSeBattreText
.wildBattle
    push hl
    callab DrawAllPokeballs
    pop hl
    call PrintText
    jr .done

Another way is to directly check the first letter of the name. Something like this should work:

.trainerBattle
    call .playSFX
    ld c, $14
    call DelayFrames
    ; load different text for vowel trainers
    ld a, [W_TRAINERNAME] ; loads the first letter
    cp "A"
    jr z, .is_vowel_trainer
    cp "E"
    jr z, .is_vowel_trainer
    cp "I"
    jr z, .is_vowel_trainer
    cp "O"
    jr z, .is_vowel_trainer
    cp "U"
    jr z, .is_vowel_trainer
    ld hl, DresseurVeutSeBattreText
    jr .wildBattle
.is_vowel_trainer
    ld hl, VowelDresseurVeutSeBattreText
.wildBattle
    push hl
    callab DrawAllPokeballs
    pop hl
    call PrintText
    jr .done

I've been basing this off the Red++ code. Sorry if it's too different from original pokered, but either general approach should be adaptable.


ROM hack: Pokémon Polished Crystal — version 2.2.0 released!

Offline

#16 2016-12-30 09:51:49

Fotomac
Member
Registered: 2015-10-25
Post 266/283

Re: Translation question

Thanks. I decided to code it this way:

.trainerBattle
    call .playSFX
    ld c, 20
    call DelayFrames
    call IsTrainerSpecial
    jr c, .specialTrainer
    call DoesTrainerBeginWithVowel
    jr c, .vowelTrainer1
    call IsTrainerFemale
    jr c, .girlTrainer1
    ld hl, TrainerWantsToFightTextM
    jr .wildBattle
.girlTrainer1
    ld hl, TrainerWantsToFightTextF
    jr .wildBattle
.vowelTrainer1
    ld hl, TrainerWantsToFightText
    jr .wildBattle
.specialTrainer
    call DoesTrainerBeginWithVowel
    jr c, .vowelTrainer2
    call IsTrainerFemale
    jr c, .girlTrainer2
    ld hl, TrainerWantsToFightTextM2
    jr .wildBattle
.girlTrainer2
    ld hl, TrainerWantsToFightTextF2
    jr .wildBattle
.vowelTrainer1
    ld hl, TrainerWantsToFightText2
.wildBattle

Additionally, I took into account "special" Trainers, that would be identified only by name, and female Trainers, who would be identified by such phrases as "La PIQUE-NIQUE NANCY veut se battre!" and "La MORGANE veut se battre!", putting them together in Bank 0 to make it easier. Would that be acceptable?

Online

Board footer

Powered by FluxBB