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

[Pokeemerald] Dragonsbreath - a new scripting language for Pokeemerald

I've been dreading scripting and cutscene work for my hack for a while now, because after moving from RMXP to the decomps, I was fine with almost every tradeoff I was dealing with in the process, but the scripting system just really frustrated me. I'm not a C/C++ programmer and didn't know how to improve it from within Pokeemerald itself (and making changes would likely make the ROM not match anyways) so I decided to design a new language on top and a simple transpiler that will convert it into Pokeemerald-compatible scripts. This is Dragonsbreath.
Code:
script DragonsbreathTestScript
  lock
    faceplayer
    checkplayergender
    if it is FEMALE
      say "Hey sis!$"
    else
      say "Ugh, what do you want?$"

Spoiler: For the curious, here's what gets outputted when you transpile that
Code:
DragonsbreathTestScript::
  lock
  faceplayer
  checkplayergender
  compare VAR_RESULT, FEMALE
  goto_if_eq _DragonsbreathTestScript_Subscript_Code_1
  msgbox _DragonsbreathTestScript_Subscript_Text_2, MSGBOX_DEFAULT
  release
  end

_DragonsbreathTestScript_Subscript_Text_0:
  .string "Hey sis!$"

_DragonsbreathTestScript_Subscript_Code_1::
  msgbox _DragonsbreathTestScript_Subscript_Text_0, MSGBOX_DEFAULT
  release
  end

_DragonsbreathTestScript_Subscript_Text_2:
  .string "Ugh, what do you want?$"
So, a quick rundown of the features of the language
- Everything is inline - there is no goto for conditionals, messageboxes, or movement
- A natural english syntax with a low learning curve
- Whitespace-delimited formatting. If you like Python (I actually don't) you'll feel pretty at home

An important thing to note is that Dragonsbreath supports all Pokeemerald commands, yes even the custom ones you added for your hack. If Dragonsbreath sees a command it doesn't recognize, it just leaves it unchanged in the final output. A few commands have little additions to their behavior, and some, like the if/else_if/else commands for conditionals, are only usable in Dragonsbreath and get transpiled to something else. For a full list, see here.

Anyways, as of today Dragonsbreath is in a mostly usable state from what I can tell. If any early adopters are interested in trying it out for their hacks and giving me feedback (either on the functionality, commands, or documentation) I'd absolutely adore that.

Code, documentation and install instructions
 
I'm not working on emerald, but I'll bookmark this and check it out later, it seems pretty intresting to try
Also, I will try to report if find any bug
Good luck with this!
 
Back
Top