Mab
fleeting assembly
- 8,707
- Posts
- 14
- Years
- She/Her
- Hyperspace
- Seen yesterday
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.
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
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?$"
- 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