Page 1 of 7 123 ... LastLast
Results 1 to 10 of 70

Thread: ASM Text to Emotion

  1. #1

    Default ASM Text to Emotion

    well I took toenailed's RTWE source and I tried to use the text to item part to set something in emotion slot one.

    it sort of worked, but it didn't :P

    it stores some no emotion thing in slot one

    here's the source:

    Code:
    ldr r1,=0x022AF136
    mov r5,#0x0
    mov r0,#0x8
    mov r2,#0xF
    loop:
    ldrb r3,[r1]
    add r1,#1
    cmp r3,#0x3A
    blt number
    add r3,#9
    number:
    and r3,r2
    lsl r3,r0
    add r5,r3
    sub r0,#0x4
    bpl loop
    
    ldr r2,=0x021D8FC8
    strb r5,[r2]
    bx lr
    sorry if I did something really stupid in it, please help fix it though :P


    I was also wondering what the address holding the value for the current player (0-3 I think?) so I could make it work for any player
    This is my siggy. I'll make it better when I stop being lazy

  2. #2

    Default Re: ASM Text to Emotion

    Itsme and I are working on this together

    On the posotive it does write to the address we wanted

    There are some un-used Emotions which Nintendo for some reason decided not to use. Perhaps we are not correctly interpreting the hex? or maybe theres leading zeros.....

    Remember to always click the thanks button of those who help you! It makes them feel wanted:

  3. #3
    Chris (Administrator) Vash's Avatar
    Join Date
    Sep 2007
    Location
    Teh Interwebz
    Posts
    1,992
    Blog Entries
    27

    Default Re: ASM Text to Emotion

    Have you watched the address when you activate the code? What is it writing?
    Animal Crossing: City Folk
    ACToolkit - NPC_Tool - PattView

  4. #4

    Default Re: ASM Text to Emotion

    1 in hex I think.

    Remember to always click the thanks button of those who help you! It makes them feel wanted:

  5. #5
    Chris (Administrator) Vash's Avatar
    Join Date
    Sep 2007
    Location
    Teh Interwebz
    Posts
    1,992
    Blog Entries
    27

    Default Re: ASM Text to Emotion

    <_<
    Animal Crossing: City Folk
    ACToolkit - NPC_Tool - PattView

  6. #6

    Default Re: ASM Text to Emotion

    I noticed a couple mistakes with the code and fixed it, making this:

    Code:
    ldr r1,=0x022AF136
    mov r5,#0x0
    mov r0,#0x4
    mov r2,#0xF
    loop:
    ldrb r3,[r1]
    add r1,#1
    cmp r3,#0x3A
    blt number
    add r3,#9
    number:
    and r3,r2
    lsl r3,r0
    add r5,r3
    sub r0,#0x4
    bpl loop
    
    ldr r2,=0x021D8FC8
    strb r5,[r2]
    bx lr
    but it's still not right! it seems to only change the first digit of the emotion and it doesn't do it right either. like any number starting with 1 and any digit afterward gives broken heart, any starting with 2 gives deal cards, etc.
    This is my siggy. I'll make it better when I stop being lazy

  7. #7
    Chris (Administrator) Vash's Avatar
    Join Date
    Sep 2007
    Location
    Teh Interwebz
    Posts
    1,992
    Blog Entries
    27

    Default Re: ASM Text to Emotion

    If emotions are 1 byte each...
    (Don't feel like checking)

    You'll have to add #0x1 to the final text address to get to the correct byte. TTI, by default, gets 2 bytes from the text location. Say you type 01 for your emotion. Well the text address will read 01XX. Then by storing a byte it will place the XX in the emotion slot instead of 01. So to fix this, add #0x1 to the final text address (r5?).
    Animal Crossing: City Folk
    ACToolkit - NPC_Tool - PattView

  8. #8
    J.P. (Global Moderator) Maniac's Avatar
    Join Date
    Sep 2007
    Location
    Ohio, USA
    Posts
    2,083
    Blog Entries
    5

    Default Re: ASM Text to Emotion

    I havn't looked at the source but make sure the TTI only cylces through twice, i.e. if you say 01 it gets the 0 and then the 1. I'll look at the source when I get home and make some corrections I'm sure.

    Say what you mean, mean what you say, and let your actions speak for you.


  9. #9

    Default Re: ASM Text to Emotion

    Quote Originally Posted by Maniac
    I havn't looked at the source but make sure the TTI only cylces through twice, i.e. if you say 01 it gets the 0 and then the 1. I'll look at the source when I get home and make some corrections I'm sure.
    I think that's pretty much the only change I made xP
    that and storing a byte instead of a halfword
    This is my siggy. I'll make it better when I stop being lazy

  10. #10
    Chris (Administrator) Vash's Avatar
    Join Date
    Sep 2007
    Location
    Teh Interwebz
    Posts
    1,992
    Blog Entries
    27

    Default Re: ASM Text to Emotion

    Code:
    ldr r1,=0x022AF136
    mov r5,#0x0
    mov r0,#0x4
    mov r2,#0xF
    loop:
    ldrb r3,[r1]
    add r1,#1
    cmp r3,#0x3A
    blt number
    add r3,#9
    number:
    and r3,r2
    lsl r3,r0
    add r5,r3
    sub r0,#0x4
    bpl loop
    
    ldr r2,=0x021D8FC8
    add r5,#1
    strb r5,[r2]
    bx lr
    Sigh, try that?
    Animal Crossing: City Folk
    ACToolkit - NPC_Tool - PattView

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •