• 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.

[Script] Untitled

5
Posts
6
Years
    • Seen Nov 6, 2023
    i am trying to make a script that makes an npc trainer's team change depending on the starter on pokemon fire red. heres the script im trying to modify.

    #dyn 0x740000
    #org @begin
    trainerbattle 0x0 0x001 0x0 @intro @defeat
    msgbox @afterwards
    callstd msg_normal
    end
    #org @intro
    = I will crush you!!!

    #org @defeat
    = You crushed me[.]

    #org @afterwards
    = I can also say something after the battle
    i am going to use 3 trainer ids:02 03 and 04
     
    Last edited:

    Child Amnesiac

    Ever changing
    341
    Posts
    5
    Years
  • First off, I wouldn't recommend using the script templates from PKUSV. Use XSE instead.
    Second off, I would write a script like this in XSE, and use it through a script tile

    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    msgbox @t1 0x6
    compare 0x4011 0x1
    if 0x1 call @battlex
    compare 0x4011 0x2
    if 0x1 call @battley
    compare 4011 0x3
    if 0x1 call @battlez
    msgbox @t2 0x6
    setvar 0x4012 0x1
    release
    end
    
    #org #battlex
    trainerbattle 0x3 0x1 0x0 @win
    return
    
    #org @battley
    trainerbattle 0x3 0x2 0x0 @win
    return
    
    #org @battlez
    trainerbattle 0x3 0x3 0x0 @win
    return
    
    #org @t1
    = yourtext
    
    #org @t2
    = yourtext

    What happens here is you set the variable 0x4011 to a value when you pick your starter, so you can set up a battle, rival or otherwise that depends on that var. The var chooses the battle based on the starter, for example 1= grass chosen, 2= fire chosen 3= water chosen. It's difficult to explain, but it's the way I'd do it.

    Third off, check out this tutorial series: Link it's how I learned how to ROM hack.
     
    5
    Posts
    6
    Years
    • Seen Nov 6, 2023
    I will watch the videos as soon as I get new headphones. Hopefully that will be soon

    I downloaded XSE and it doesnt have a script generator so theres no point in me using it because i know nothing about making scripts

    I think i need to make the sample scripts. Ill try to find some
     
    Last edited by a moderator:

    Scarlet D.

    The Eternal
    66
    Posts
    8
    Years
  • I know I am offtopic but You have to start from somewhere though, trusting Pokesvui to generate your script seems enough at first but soon enough you will find out that you are very limited to what you can do. I'd suggest you starting with this:

    https://www.pokecommunity.com/showthread.php?t=164276

    it is a very trusty tutorial about XSE, easy to understand and quick on learning
     
    Back
    Top