GokhanP

Visitor Messages

1 to 5 of 5
  1. Entaro Ceraphenine
    July 18th, 2020 6:35 PM
    Entaro Ceraphenine
    Understandable. ASM can have that really ugly look.

    Also, I think I made a mistake in my last couple of texts. I am not sure but I think "writebytetooffset (RAM address) (byte value to write at that address)" should be "writebytetooffset (byte value to write at that address) (RAM address)". Please make sure from XSE command lists!
  2. Entaro Ceraphenine
    July 10th, 2020 5:52 AM
    Entaro Ceraphenine
    This is something I was unable to do using scripts alone.
    You can use "writebytetooffset (RAM address) (byte value to write at that address)" to put a constant value at the specified RAM address. But I couldn't transfer a variable's value like that. There might be a command to do so but I dont know which it is.

    It can be easily done using ASM, though. I can help you make something to accomplish the task if you want and if you are comfortable with using ASM.
  3. Entaro Ceraphenine
    July 8th, 2020 11:53 PM
    Entaro Ceraphenine
    You're welcome ^_^
  4. Entaro Ceraphenine
    July 8th, 2020 11:03 AM
    Entaro Ceraphenine
    My bad! Yes you can do that too! You can use:
    "comparefarbytetobyte (RAM address) (value to compare to)
    if (condition) call/goto @somewhere"

    The limitation here is that you can only do one byte check using one comparefarbytetobyte. For the gender of player, it is okay because gender value is stored using only one byte. But the values of variable often takes up two bytes of spaces. If you want to compare something like that, then you have to compare bytes multiple times.

    The conditions to check here are same as the condition checks for the variable in my last message.
  5. Entaro Ceraphenine
    July 8th, 2020 10:30 AM
    Entaro Ceraphenine
    Hello!
    Replying to your post in this thread because I did not want to mix up two topics there!

    Anyways, the variables can be directly manipulated in XSE without the use of their address.
    You can use something like: "setvar (variable number) (value)" to assign a value to a particular variable. Just like your example in the post, setvar 0x4001 0x00 will cause the variable 0x4001 to have value 0 stored in it.

    If you wish to use this value/variable for a different task, then you can use the following syntax:
    compare (variable to compare) (value to compare with)
    if (condition) call/goto @true

    There is a bit to explain here.
    "compare (variable to compare) (value to compare with)" is self-explanatory. If you write "compare 0x4001 0x0", then the game will check if variable 0x4001 is equal to 0, or greater than or less than 0, etc etc.

    The "(condition)" is the main focus here. In case of flags, there are only two options to check: set or cleared. That is why after a checkflag we do either "if 0x0 goto @somewhere" or "if 0x1 goto @somewhere"

    But the check for variables go even further. There can be values from 0x0 up to 0x5 over there. Each value has a different meaning:
    0x0 = Lower Than
    0x1 = Equals
    0x2 = Greater Than
    0x3 = Lower than or Equal to
    0x4 = Greater than or Equal to
    0x5 = Not exactly equal to

    Here is an example to clear things more. Say, you wanted to know if variable 0x4069 is greater than 0x5. If it is greater than 0x5, then the code would branch to a different portion. Then the comparison would be:
    compare 0x4069 0x5
    if 0x2 goto @otherpart

    You can also use 'call' in place of 'goto'. The difference between 'goto @there' and 'call @there' is:
    'goto @there' tells the code to just entirely branch off to the new location if the said condition is true and ignore everything below the goto line.
    'call @there' tells the code to go to the specified new location, do the stuffs written there and then come and continue executing orders from the line below the call line.

    I hope this helps! Sorry if the explanation has become a little too big! You can ask me for more help if needed! Also, there are some fantastic XSE script tutorials in Pokecommunity! You can check them out!

About Me

  • About GokhanP
    Quick Self-Introduction
    Hey. Please ignore my older posts. There may be noob questions there.
    btw name's gokhan hello :)
    Gender
    Male ♂
    Occupation
    Student
    Nature
    Quiet
    Favorite Pokémon
    mudkipz
    Discord Nickname
    GokhanP#3956

Statistics

Total Posts
Activity by Forum
Visitor Messages
Blog
General Information
  • Last Activity: 2 Weeks Ago 10:01 AM
  • Join Date: October 6th, 2018
  • Referrals: 0

Badges

Badges

Mini Statistics

Join Date
October 6th, 2018
Total Posts
11
Blog Entries
0
GokhanP's Avatar

Recent Visitors

The last 4 visitor(s) to this page were:
  1. DrFuji
  2. Entaro Ceraphenine
  3. Jesustiberi
  4. rubenturen