Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Hey Yal, I picked the engine up about a week ago and have been working my way through the code to understand it. Just gotten stuck on where / how you define at what level monsters 'transcend' and if there is an script to remove a monster from the player, eg so you could do one of those in-game trades with an npc where you remove the players monster then generate a new one based on whatever they're meant to get in return? Thank you so much :)

(1 edit)

Evolutions transcendences are defined at Scripts-->Data Mangling-->Database Setup-->Init Monsters, if you scroll to the right a whole bit you'll see this data:

(Basically it's an array of 3-member arrays, which represent the way to evolve, what thing triggers the evolution, and what monster to evolve to. For level evolutions, the trigger is the level to evolve at, for item evolutions it'd be the item ID, and so on... I'm unsure if I ever made item evolutions)


amp_clear_monster deletes a monster from the Active Monster Party (which is the big array that has all the monsters the player owns, including the storage boxes). Then you could use amp_generate_monster to create a new monster on the same AMP-ID, so it takes the exact slot the traded monster occupied. (Actually, you could just amp_generate_monster onto that slot directly, it clears the data with amp_clear_monster first). Once the monster is generated, you can manually apply unique quirks you want the traded monster to have (e.g. special moves or held items).

To get the AMP-ID of the monster to trade, I'd spawn a menu using msh_spawn_monster_list (which spawns a list of the monsters in the active party) which has a new "trade offer" menu event... it'd check if the monster in that slot matches what the NPC wants (that data would be stored in some global variables in the cutscene initialization script with the conversation) and if so, asks you a "ok?" question with msh_areyousure, and its OK script initiates the trade (sets the appropriate "trade done" flag, loads a different room with the trade animation, and then goes back).

If you need to familiarize yourself with how to carry data around, starting from mev_pause_monsters and looking into how the menus read party data further down the line should give you a good starting point in figuring out how to handle the AMP data (and the menu system in general).

Thank you so much Yal, it's amazing how intuitive your engine is, and how quick your support is! I can't believe I didn't scroll far enough to find the evo ttranscendences! I'm such a dolt! I thought of one last question, I'm so sorry to keep asking, but is there any way to set evolution moves? ie, a move it learns as soon as it evolves into charachne? Thanks again and so sorry for the questions! 

(2 edits) (+1)

Usually my support isn't that quick, I only check my itchio messages once per day... you just got lucky and posted that thing just a couple minutes before I happened to log in, gg :P

For evolution moves, it's going to be a bit messier since I didn't consider it when making the engine, but here's my idea:

In obj_evolutioncontrol, at line 73, add some extra code that checks if the newly evolved species (targevo) has any innate moves learned at level NONE. (Those are the moves they always know regardless of level). If there's any, attempt to learn them. The code of obj_battlecontrol's step event case 32 which handles newly learned moves (around line 1010) should be a good starting point for this new code (alongside with the code that sets the movelearn queue around line 997). It might be easier to add a new state to the evolution control's step event than trying to cram all this into case 20 where it waits for the menu objects to be done, just like how battle control uses one state to populate a queue and another state to read the next entry from the queue until it's empty.

With this system in place, you can define new moves learned on-evolution by adding innate moves to the evolved monsters which are learned on level NONE.

If you think the "level NONE" thing is a bit hacky and you want to fully separate always-known moves from on-evolution moves, add a new constant ON_EVO which is a value higher than your max level (e.g. 1000) and check for moves learned on that level in the evolution control instead of moves learned at level NONE. These moves can't be learned through levelling up, since the monster can't reach past the max level, so only the special case in the evolution control will do anything with the data.

Thank you again! Have a good day :)

(+1)

LOL re item evolutions: I just found the script for them and it's just '//todo' XD