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

Hey yal, I'm adding in a move speed stat for each move, with the intention of using it to multiply the user's speed so I can create a sort of move priority (with most moves having a move speed of 1 so it doesn't have any effect, but a quick attack-like move having a speed of 2 so the users speed is doubled when using it for who goes first calculations) 

I'm just wondering if you know where is best to put it? at the moment I have changed line 421 in the battle control step event to:

(monster_get_spd(action_monster.amp_id)*global.move_data[a_comm,mvd_MOVESPEED])

but I get an error since a_comm isnt defined yet. I think this is because the engine doesn't actually check speed. on a turn by turn basis, right? So what I'm doing wouldn't be possible (at least the way I'm doing it). Any help would be much appreciated


Edit: just to let you know I have sorted the constants and everything else for move speed, as well as the init_move changes that were needed.

(1 edit)

The ID of the move the enemy monster(s) picked is in the variable mv, which is defined at that point... so just change a_comm to mv and it should work as you intended. Speed is only checked when actions are slated / enqueued, they're sorted in a priority queue using the speed as priority and executed in that order.

It might be cleaner to add your speed variable to the case 30 block a bit further down, since that's where slated actions get finalized. There's a block here that lowers effective speed by -75% if the monster is paralyzed, and you could add in a new block that checks if the action type (battleaction_COMM_TYPE element of the array) is an attack, and if so, multiplies the SPEEDPRIO element with the move's speed. It shouldn't matter where you put this as long as it's before the "Finally, enqueue the action" bit, but it's probably safest to put it after the ailment block.

(+1)

Thanks again, and actually that's a really good point. I suppose I need to consider how I wasn't paralysis to effect the overall priority, if it comes in after the move speed priority or before etc. Lots to think about. thanks again yal!