• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
H
Reaction score
1

Profile posts Latest activity Postings About

  • You would calculate the result of [(a * X(n)) + c] (which you described accurately), divide that by m, and then take the *remainder* as the value of X(n+1).
    so like in this equation: Xn+1 = [(a * Xn) + c] mod m, it would be Xn plus one equals Xn multiplied by "a" and then added to "c" and the result of [(a * Xn) + c] would be divided by m, right?

    and i know what you mean. i got this like 4 hours later XP
    Sorry for late response, PC is bad at notifications >_<

    Mod (or modulus), often represented with "%", is the remainder you'd get if you divided the first number by the second. A few simple examples:

    30 % 3 = 0
    31 % 3 = 1
    32 % 3 = 2
    33 % 3 = 0
    30 % 4 = 2
    31 % 4 = 3
    32 % 4 = 0
    32 % 4 = 1

    XOR and AND are boolean operators; it'd probably be a good idea to look up boolean logic as it's a bit detailed to explain via PMs. XOR returns true if one argument or the other is true, but false if they're the same. AND returns true only if both arguments are true. You'll also want to be familiar with OR, which returns true if either argument is true. In assembly, these are usually applied between on a bitwise basis, so you get operations like this:

    x0011 AND x0110 = x0010
    First, do you have any actual programming experience? Your questions don't make a lot of sense.

    Don't do Multitype first. It's not worth the amount of effort it'll take. Trust me. Don't even talk about it as there's multiple ways to do it (none of which are straightforward) and thus no sense trying to use it as a frame of reference.

    Code does not branch from structs, nor is it typically stored in them. A struct is a block of data- you do not under normal circumstances execute structs as code.

    I don't know where the ability name and description tables are off the top of my head. You should be able to find them yourself with a hex editor and any tool for inserting text into the ROM- XSE will work for this.

    You can't decompile THUMB ASM without manually going through it, to my knowledge. You can use VBA's disassembler to look at it, though. There's also a partial FR disassembly floating around, but with emphasis on the partial, sadly.
    There's two main kinds of pokemon data: pokemon structs and battle structs. The former represents a pokemon in your party, and has all of its persistent information; the latter represents it in battle and has most of its battle-pertinent information. The Pokemon struct only stores a single bit for ability, indicating which of its species' abilities it has; battle structs store the ability byte outright, and change to accommodate effects like Trace and Skill Swap. Usually, you want the latter struct- it's documented in the old JPAN thread I was talking about.

    A special case is a branch in code for one specific case, and is how the majority of abilities are handled. For example, there's some code in the game that if decompiled would look something like:

    if(pokemon.ability == ABIL_NATURALCURE)
    pokemon.status = 0;

    This is in opposition to the standardization you see with most moves, where Flamethrower has a 10% chance of inflicting burn because its battle script rolls against its proc rate, which is defined in a table.
    Pretty much all the ability checks are special cases, so what ASM knowledge you need depends on which ones you're going for. If you're new to hacking, I'd suggest starting by expanding the ability name and description tables. If you can pull that off, go look up Hackmew's tutorial on ASM; it'll teach you most of what you need to know. Also dig up JPAN's old thread on battle scripts; it's short, but his posts are immensely useful.
  • Loading…
  • Loading…
  • Loading…
Back
Top