• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

Are there any tips for coding contests?

  • 2
    Posts
    262
    Days
    • Seen Feb 11, 2025
    Hello, I've never coded anything before, and I'm looking to create a contest based romhack, and I'm currently hitting a bit of a roadblock.

    I spent a few months learning coding basics from the Brilliant website, I've spent a couple weeks fiddling with porymap, watching some youtube tutorials from the Aqua Hideout, and reading through basic tutorials to try and figure out where I should start. My problem is that while most of these tutorials have been very helpful(even though I don't know what I need hexcoding for yet but I'll get there I'm sure), none of them are seeming to cover what I'm wanting to do, which is edit a lot of contest stuff. Initially I figured I could use my minimal coding knowledge to just add a bunch of "if" statements ("if shiny then +10%, else +0%" for example) but I've learned it doesn't exactly work like that.

    Here's a link to the google doc where I jot down my ideas, it's 7 pages so don't feel inclined to read it all, but personally I think I have some decent ideas for a simple little contest hack (or at least what I thought would be simple and little when I started).

    The basic idea is I want to: replace gyms with contest halls specific to a type with a big Finale Event consisting of 5 contests and one 1v1 Champion contest against the best Coordinator in the region/add a bunch of percentage modifiers to your final contest score for things like friendship, if your pokemon is shiny and (if I can add cosmetics) if your outfit is on theme/add some world encounters of 3-5 round contests against coordinators/add shops that sell custom items/turn the pokenav's calling feature into a way only your parent can connect to you with/add a bunch of storyline event scripts/adjust leveling so contest stats raise +2% with every level.

    I was hoping for a kind soul who could maybe point me in the direction of maybe some contest specific tutorials/documents? Reddit and Google got me this far, but they don't seem to have any info on any contest hacking, and I'm kind of getting nervous that I'm treading new ground, which is scary as a newbie.

    I'm not looking for anything that'll tell me exactly what to do, I know I'll have to figure a lot out(like I figure I can probably figure out how to code the contest encounters by reading through the trainer battle encounter code and the contest code, then somehow mixing the two and just testing it till it works lol). But I was hoping for maybe something along the lines of, "here is where to find the script for adding points to your score", "here's where you'd add your own contest events", and maybe if I'm super crazy lucky "here's how they did cosmetics in D/P and some thoughts on how to recreate it in Emerald".

    I know this is a shot in the dark because I feel like if it existed I would have found it already, but it can't hurt to ask, right?
     
    Over the years I've seen several people come up with the idea of a contest focused romhack, but I don't think anyone has actually developed such a hack. Since most people don't care about contests, romhacks usually either remove them or keep them unchanged from the base game. I don't know if any hack has even edited the contest system.

    Needless to say, contest hacking isn't really popular and there probably aren't any tutorials or external documentation dedicated to it.

    The silver lining is that since you're working with the decomp, you have the ability to look at and change any of the game's code, and thus all the changes that you want to make can be done if you have enough perseverance.

    There are several source files with "contest" in their name in the src/ and src/data/ folders, which is probably where you'll find most of the code for contests. Consider looking through those. There's also the script files for the contest hall maps, which can tell you how contests are started, how the type of contest to start is selected, and how the results of the contest can be checked afterwards.
    With that you should be able to create custom events or trainers that start contests, however you might need to code your own scripting specials for starting contests since the existing category+rank interface might not be flexible enough for you to create all the types of contests that you want.

    I was hoping for maybe something along the lines of, "here is where to find the script for adding points to your score"
    Searching for "points" or "score" in the contest files returns results like:
    Perhaps one of those would be a suitable place for your "if shiny then +10%, else +0%" code. If not, you can do further searches for the variables mentioned there to see where they are used.
    and maybe if I'm super crazy lucky "here's how they did cosmetics in D/P and some thoughts on how to recreate it in Emerald"
    I don't think you'll be that lucky, sorry.
    However, there has been some work on systems that let you change the player sprite, which you might be able to use:
     
    Over the years I've seen several people come up with the idea of a contest focused romhack, but I don't think anyone has actually developed such a hack. Since most people don't care about contests, romhacks usually either remove them or keep them unchanged from the base game. I don't know if any hack has even edited the contest system.

    Needless to say, contest hacking isn't really popular and there probably aren't any tutorials or external documentation dedicated to it.

    The silver lining is that since you're working with the decomp, you have the ability to look at and change any of the game's code, and thus all the changes that you want to make can be done if you have enough perseverance.

    There are several source files with "contest" in their name in the src/ and src/data/ folders, which is probably where you'll find most of the code for contests. Consider looking through those. There's also the script files for the contest hall maps, which can tell you how contests are started, how the type of contest to start is selected, and how the results of the contest can be checked afterwards.
    With that you should be able to create custom events or trainers that start contests, however you might need to code your own scripting specials for starting contests since the existing category+rank interface might not be flexible enough for you to create all the types of contests that you want.


    Searching for "points" or "score" in the contest files returns results like:
    Perhaps one of those would be a suitable place for your "if shiny then +10%, else +0%" code. If not, you can do further searches for the variables mentioned there to see where they are used.

    I don't think you'll be that lucky, sorry.
    However, there has been some work on systems that let you change the player sprite, which you might be able to use:
    I'm nervous for the lifespan of my project, I had noticed I couldn't find a similar one but had hoped maybe they existed and were just too obscure. Fingers crossed it wasn't because of technical issues that will also stop me!

    This information is incredibly helpful, thank you! Learning that coding contests will literally be just me reading existing code and writing my own until something works is truly my best case scenario here, trial and error is the easiest way I personally learn new things. And that costume menu?? Amazing! I'm already thinking of ways I could manipulate it to my needs!

    Thank you so much for your help, it's really gonna get me places. It's sad to hear that in the end my game probably won't be very popular, but my main goal is to make a game I enjoy and am proud of, so keep an eye out for my game announcement post in this forum some year!
     
    I would be super interested in a contest hack!! :)
    I have always wanted to make one because I have always said battling is my least favorite part of Pokemon but haven't had the deep knowledge of code or time to do so.
    I do hope you keep at it and have some luck putting one together. :D I know I'll be watching out for it for sure.😊
     
    Back
    Top