View Single Post
  #20859    
Old March 28th, 2012 (4:39 PM).
The Void's Avatar
The Void The Void is offline
hiiiii
     
    Join Date: May 2010
    Location: MOTHA RUSSIA
    Gender: Male
    Nature: Calm
    Posts: 1,416
    Quote:
    Originally Posted by Pppgggr View Post
    Hey, I recently attempted to begin Rom hacking and I've had some serious problems when I've tried to use both Advanced map and PVS-UI script editor. I'm not sure which program is the cause, so I'm going to be a thurough as possible as to what I did when I installed both programs, and what I'm trying to do.

    My Installation
    Spoiler:

    Advance Map:
    Downloaded the zip, unzipped it, clicked the exe, selected my language, and then opened a rom.
    PVS:
    Downloaded the zip, unzipped it into its own folder, and ran the AssociateShell.


    What I'm attempting to do:
    Spoiler:

    I'm setting up a quick code to see if I've gotten the hang of the PVS programming language. I'm basically assigning a specific code to a person event with advance map. This person event will basically offer you a pokemon, give you a yes or no prompt, if you click yes, it sets the flag to 1 and gives you an egg. If you speak to him again, he simply asks how the pokemon is doing. If you click no, it displays a separate message.

    How I went about this:
    Spoiler:

    I openned up Fire Red on PVS and typed up this code:
    Spoiler:

    Code:
    #dynamic 0x740000
    #org @main
    lock
    faceplayer
    checkflag 0x200
    if 0x1 jump @haveit
    message @want
    callstd MSG_YESNO
    if 0x1 jump @pushedyes
    jump @pushedyes
    jump @pushedno
    #org @haveit
    message @howsit
    callstd MSG_NORMAL
    release
    end
    #org @pushedyes
    setflag 0x200
    giveegg TORCHIC
    message @herego
    callstd MSG_NORMAL
    release
    end
    #org @pushedno
    message @dontwant
    callstd MSG_normal
    release
    end
    #org @want
    = I have this egg. Do you/nwantit?
    #org @howsit
    = So, hows that egg I gave/nyou?
    #org @herego
    = Raise it well!
    #org @dontwant
    = Oh, ok. Maybe someone/nelse will take it

    Then, I compiled it.(Compile logs here)
    Spoiler:

    Code:
    Initialized.
    #DYNAMIC
       -> 0x740000
    #ORG
       -> @main
    CHECKFLAG
       -> 0x200
    IF
       -> 0x1
       -> JUMP
    DYN-> @haveit
    MESSAGE
    DYN-> @want
    CALLSTD
       -> msg_yesno
          -> 0x5
    IF
       -> 0x1
       -> JUMP
    DYN-> @pushedyes
    JUMP
    DYN-> @pushedyes
    JUMP
    DYN-> @pushedno
    #ORG
       -> @haveit
    MESSAGE
    DYN-> @howsit
    CALLSTD
       -> msg_normal
          -> 0x6
    #ORG
       -> @pushedyes
    SETFLAG
       -> 0x200
    GIVEEGG
       -> torchic
          -> 0x118
    MESSAGE
    DYN-> @herego
    CALLSTD
       -> msg_normal
          -> 0x6
    #ORG
       -> @pushedno
    MESSAGE
    DYN-> @dontwant
    CALLSTD
       -> msg_normal
          -> 0x6
    #ORG
       -> @want
    [STRING]
       -> I have this egg. Do you/nwantit?
    #ORG
       -> @howsit
    [STRING]
       -> So, hows that egg I gave/nyou?
    #ORG
       -> @herego
    [STRING]
       -> Raise it well!
    #ORG
       -> @dontwant
    [STRING]
       -> Oh, ok. Maybe someone/nelse will take it
    #ORG: data
       -> @main <-> 0x740DB8 (0x22 bytes)
       -> @haveit <-> 0x740DDA (0x9 bytes)
       -> @pushedyes <-> 0x740DE3 (0xF bytes)
       -> @pushedno <-> 0x740DF2 (0x9 bytes)
       -> @want <-> 0x740DFB (0x21 bytes)
       -> @howsit <-> 0x740E1C (0x1F bytes)
       -> @herego <-> 0x740E3B (0xF bytes)
       -> @dontwant <-> 0x740E4A (0x29 bytes)

    Then, I copied everything after the 'x' on the @main offset (the 740DB8 portion) and pasted it into the script offset for the person event in Advance map. In advance map, I did nothing but assign the Brandon icon to the event, and then input the offset. When I input the offset and click open script, I get this:
    Spoiler:

    Code:
    #org 0xC0DB874
    '-----------------------------------

    When I set up Advancemap to use PVS, I clicked no when it gave me the prompt. Something to do with whether or not the offsets used ":" or " " or something or other. I assumed it meant the
    -> @main <-> 0x740DB8 (0x22 bytes)
    type thing, so I set it to no.
    Hiya, I'm pretty sure you mean PKSV, not PVS xD
    All the steps you did were correct, except sometimes you need to copy paste the script in the

    #org 0xC0DB874
    '-----------------------------------

    and then compile it again, if you get what I mean. Usually that's what I do in cases like this. >.
    __________________
    Όφις ην μη φάγη όφιν, δράκων ου γενήσεται.