Could someone write me a text editor...

Discussion in 'NDS - ROM Hacking and Translations' started by WataruKun, Dec 13, 2009.

Dec 13, 2009
  1. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    Okay here's the thing, I KNOW the pointers in Doki Doki Majo Shinpan 2 and am well aware of how to repoint them. Up until now, I've been manually repointing text. But the problem with repointing text in this game is that, if ONE POINTER yes, ONE POINTER in the huge script file is wrong, the whole script won't load and you'll just get a black screen in the game. This makes manually repointing text a freaking headache. The last straw was when I could've sworn most of the pointers were correct, even COUNTED them several times and I still got a black screen in the game [​IMG].


    So yes, could someone make a text editor for me? That would help me out a lot. One big thing this text editor has to be able to do, is to be able to automatically repoint text. By the way, I'm not some newbie who just started hacking the game, no. I've been working on translating and hacking this game for weeks and shall continue to do so. I can tell you anything you need to know about the game's text structure. I can tell you the pointers, the line skips, the line ends; anything you'd need to know to make a text editor.

    I would make a text editor myself, but my knowledge of programming is nowhere near good enough to make a text editor.

    So basically, I'm asking, can someone make me a text editor for this game that automatically repoints text? If you need to see an example text file, I can send you one.

    But yeah, if someone could make a program like this for me, that would help this translation project TREMENDOUSLY.

    Here are some screens of the translation, just to show you that I've actually been working on it...

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]
     


  2. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    Sigh... then I guess no one's up for it then. That doesn't mean good for this translation. All that hard work gone to waste.
     
  3. azerty1

    Member azerty1 GBAtemp Regular

    Joined:
    Mar 22, 2009
    Messages:
    160
    Country:
    Canada
    dude...it's been 3 hours since you started the topic...
    how would you describe your level of programming right now? I might be able to help you in that respect a bit...
    i would like to write it for you, but my computer kinda exploded and it is absolute hell to type, much less code on an acer notebook that's smaller than my head...
    and you don't really need a full text editor, I don't think. That would be a lot of effort making a pretty GUI when you can just extract text to .txt files, edit stuff in MS word or notepad and then rewrite the pointers when you reinsert them. It's actually the same thing, really.
     
  4. Poryhack

    Member Poryhack GBAtemp Fan

    Joined:
    Oct 18, 2009
    Messages:
    330
    Country:
    United States
    I've been in your position but jeez... I've never had the gall to ask that a random stranger write a program for me. It just doesn't work that way. And then coming back three hours after the fact and pretending like it's a done thread? Do you honestly believe this place is overflowing with bored programmers that roam the forums at all hours of the night?

    Nobody's gonna do anything unless they have an interest in this, and even then asking with the right attitude is a must.
     
  5. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    Yeah lol I might just put this project on hold for a long while, that is, until I learn how to program a text editor as I have to do all the work for this project. It sucks, but that's the way it has to be, so for now the projects on hold. I'm certainly not going through the headache of repointing every line in a game where one line that's pointed wrong screws up the script.

    Maybe I'll find a game that isn't so script heavy to translate. The problem isn't that I don't know pointers or I don't know how to repoint, the problem is, is that with such a large script it is a headache to do manually and there's no one out there willing to make an editor for it.

    Who knows? I might just quit this rom hacking thing and put my translating skills to better use. Maybe make a guide for it.

    This is one of those impossible to do by yourself things.
     
  6. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    Only other way I could think of dealing with this game is recoding the whole script from scratch, which is probably what I'll have to do.
     
  7. metroid4life14

    Member metroid4life14 GBAtemp Fan

    Joined:
    Sep 13, 2009
    Messages:
    308
    Country:
    United States
    No need to be an ass, poryhack. WataruKun has been putting a lot of work into this, and giving him shit for trying to help the community is NOT what we need.

    I personally don't know any programming, but I'm sure you'll find someone to help you. Don't lose hope just yet!
     
  8. Poryhack

    Member Poryhack GBAtemp Fan

    Joined:
    Oct 18, 2009
    Messages:
    330
    Country:
    United States
    All I'm saying is that his request was not very reasonable, and, judging by how he responded he doesn't disagree with me. So I fail to see how I was an ass...

    If you're gonna kiss butt, at least do it right. [​IMG]
     
  9. jeremy506

    Member jeremy506 Some dude.

    Joined:
    Oct 26, 2009
    Messages:
    587
    Location:
    America
    Country:
    Nauru
    Use DSLAZY and find the source.
     
  10. twiztidsinz

    Member twiztidsinz Taiju Yamada Fan

    Joined:
    Dec 23, 2008
    Messages:
    4,981
    Country:
    United States
    How is it not reasonable?
    From what I understand of coding, it's not a very complex app to write.

    He's not asking for a full editor like NotePad++ or something like that, just a simple app that will allow him a WYSIWYG editor that can update pointers as well.
    Both are fairly easy to code on their own, and shouldn't be too hard to combine the two.
     
  11. metroid4life14

    Member metroid4life14 GBAtemp Fan

    Joined:
    Sep 13, 2009
    Messages:
    308
    Country:
    United States
    All I'm saying is that WataruKun doesn't exactly get paid for what he does. He's taking his personal time to help out the community. The least he deserves is a bit of respect. If you call that "kissing ass," then so be it.
     
  12. Poryhack

    Member Poryhack GBAtemp Fan

    Joined:
    Oct 18, 2009
    Messages:
    330
    Country:
    United States
    This is not disrespect:
    K?
     
  13. jeremy506

    Member jeremy506 Some dude.

    Joined:
    Oct 26, 2009
    Messages:
    587
    Location:
    America
    Country:
    Nauru
    Notepad++ is all I'm saying.
     
  14. twiztidsinz

    Member twiztidsinz Taiju Yamada Fan

    Joined:
    Dec 23, 2008
    Messages:
    4,981
    Country:
    United States
    1). Not a game text editor, it's a plain text editor.
    Many games need to have the data extracted and converted to plain text.

    2). Wouldn't help with his problem: Pointers.
     
  15. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    A simple text editor with that automatically repoints the text is all I'm trying to get. The pointers are only 1-byte. Unfortunately I don't have enough knowledge of programming to make something like that.

    However, some real NICE person offered to make a text editor, so we'll see where that goes.

    Point is, I've seen people due similar programs for much more complex games in a flash.

    Seriously, if I knew how to program it probably wouldn't be that hard to make.
     
  16. twiztidsinz

    Member twiztidsinz Taiju Yamada Fan

    Joined:
    Dec 23, 2008
    Messages:
    4,981
    Country:
    United States
    To be honest, I think coding the app to read the files will be the hardest part (and that's simple).
    The WYSIWYG editor I believe is 'built in' to the coding, so you don't need any libraries for it (it's just read from file, display output, allow editing, allow writing to file), and the pointer would be the same, but with calculations for the new value I believe.
     
  17. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    Looks like this game uses file formats similar to Kimi no Yusha - the text is embedded into the event scripting, so there are no pointers, just line lengths. This makes writing an inserter a lot more complicated, since you have to be able to determine which parts of the file to interpret as text and which parts to ignore. You can either do that by figuring out all the other control codes in the file, or by applying some sort of pattern to identify text.

    For example, this is the format of the control code to display text:
    03xxFFyy[nntt]nntt
    xx = speaker ID
    yy = speaker mode
    nn = length
    tt = text
    If y is 0 it uses the speaker's assigned name from CharaName.dat.
    If y is 1 then before the length and text block there is an additional block with the length and replacement text to use for the speaker's name.
    A text control code is usually followed by control codes 06 and 05, which respectively tell the game to wait for you to press the button and to wait for the text to finish drawing before continuing with the scene.

    If you can identify the format of all the other control codes, or if you can come up with some other way to reliably locate those text control codes programmatically without missing any or finding false positives, I could adapt YushaTrans to work with it. Knowing the format of the other control codes would allow you to add or remove text boxes as necessary, though. The first two bytes of each script file indicate the total number of control codes for that file.
     
  18. WataruKun
    OP

    Banned WataruKun Rom translator.

    Joined:
    Sep 12, 2009
    Messages:
    616
    Country:
    United States
    So basically make a list of what each control code does?
     
  19. DarthNemesis

    Member DarthNemesis GBAtemp Maniac

    Joined:
    Feb 19, 2008
    Messages:
    1,208
    Country:
    United States
    At a minimum, enough information to determine the number of bytes it takes up. Most are always the same length, but for the ones like 03 you need to know more about the format to figure that out.
     
  20. azerty1

    Member azerty1 GBAtemp Regular

    Joined:
    Mar 22, 2009
    Messages:
    160
    Country:
    Canada
    wait, didn't he say that he was getting black screens when he didn't rewrite pointers?
    oh, heh...i personally find embedded codes easier to deal with since you can just corrupt them and it also makes the programming a bit easier. of course, it all depends on the game.
    programming-wise, just loop through the entire program and if ever you land on a byte you recognize, do whatever is needed. Like, if index i is 0x03 and index i+2 is 0xFF, then you know that index i+4 is going to be the length, so read everything from i+4 to i+4+whatever###you just got. a lot depends on luck, though. if 03**FF is used for anything else, you're going to have a lot of garbage in your output...so...the best thing to do is get to know those file formats. some games i've hacked, i've been able to write ane extractor after looking through the hex for about 3 minutes, others i've had to sit there for 3 hours, screwing with stuff until it was happy...
    from darth's' description, it sounds relatively simple compared to other games i've seen, so maybe you might want to take this opportunity and try out coding your own extractor, to learn.
     

Share This Page