Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Hey, thank you so much for this engine:) I am learning a lot from it, all your stuff here on itch.io looks totally awesome! I also read through all the questions here to learn even more about the engine!

Also, as an advice for other mac users considering buying this:  This code worked fine on my mac, but to get it running you have to open and save it at least once in windows. Thats at least how it was for me!

For now, I have two questions: 

1: I would like to implement a minigame when the enemy attacks, kind of like Undertale. Depending on how many times the opponent hits during the minigame it would cause the player damage.  Is there a way to implement something like this?

2: Next to four attack moves I would like to also give the player four dialog options, giving the player the opportunity to either fight or talk their way to success during battle. Any Idea how I could implement this in an easy way?

Thank you so much in advance!

(+1)

Intriguing; I know GM is a bit weird with cross-compiling setups but I've never heard of anything like that. I guess some project paths won't get updated automatically unless you save on Windows and it was still using the ones from my computer...?

Anyway, onto your questions:

1) The attack is applied inside the loop in obj_battlecontrol's step event at line 672 (after the "//Apply to all target(s) individually" comment). The variable trg is set to each target individually; for your use-case I guess you would want to check whether that is a player or enemy character and do different things (it's the ID of a battlemonster object so just check its side variable) - for enemies you can keep the current system, but for players you'd branch out and create a minigame object instead, and it is responsible for applying damage, side effects etc depending on the minigame result. If it's a child of parent_battleturn the RPG turn flow should automatically wait until it destroys itself with no further action from your side.

(Basically add an if statement that checks if trg.side == side_PLAYER, if so create the minigame; then put the entire existing code into the else block)

If you want different minigames for different attacks, the easiest would probably be to extend the move data (see init_moves / init_move) and add a new field for "minigame spawn script" which is run when the move is performed, creating the appropriate minigame object(s) and setting parameters for damage etc.

2) I'm thinking the easiest way would be to give each enemy monster species an array of dialogue-options / script pairs, and then you start a cutscene where you immediately deploy a cc_question that uses it - basically what cis_shrine does, but you'd use a monster-species-specific variable for the menu alternatives rather than a hardcoded array; each of the scripts that are run when you pick an alternative would either display dialogue, enqueue extra attacks, or alter a "progress" variable in the affected enemy (or whatever else you want the dialogue system to be able to do)

For this system to work, there's a couple things you need to do:

  • There's two places where obj_battlecontrol's step event checks that there are no parent_battleturn instances; those checks need to be extended to also check that there's no obj_cutscenecontrol.
  • The monster data needs to be extended with a new field, the array of their dialogue options. You'd just store this as-is. (Game Maker didn't support arrays inside arrays when I made this engine so things like moves are broken up in the engine right now, but that's not a limitation anymore)
  • You'd need to add the "talk" option to the turn menu, its setup code's currently located in obj_battlecontrol's step event on line 359.
  • Figuring out who to talk to - so you can load their dialogue data into that dynamic cutscene - might require you to select a target, check out the code in mev_battle_attack_select for an example of how to do this.
(+1)

Yeah my guess was that mac needed the code saved in the most recent IDE to get it working. Anyways it works fine now!


Thanks a lot for the detailed advice, I will give it a shot!:)