• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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
    7
    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:
    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.
     
    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:
    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/threads/164276

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