Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi Ramza, thanks for the response, but in the plugin itself, we can add block value and percentage, right? I was wondering if we can apply a code in the existing parameter instead of a flat value to add the amount of damage blocked

(1 edit)

Not presently, no.

As with all note tags, their values are parsed when the database is first loaded, so even if a conditional were possible, it wouldn't be parsed correctly.

On the other hand, block percent and block value are calculated only when they're needed, and exist solely on the shield that is being used to block. You can see from the exparamfix patch, how that is calculated:

case 'blkp':
    this.drawAttributeName('Block Amount', dx, dy, dw);
if (this._actor.isStateAffected(Ramza.BlockParams.blockStateId) && this._actor.equips()[1] && this._actor.equips()[1].blockPercent){
    this.drawAttributeRate((this._actor.equips()[1].blockPercent / 100), dx, dy, dw);
} else {
    this.drawAttributeRate(0, dx, dy, dw);
}


The default block state also uses those same values from the shield in the damage calculation:

var blockValue = (target.isEnemy() ? target.enemy().blockValue : target.equips()[1].blockValue)
var blockPercent = (target.isEnemy() ? target.enemy().blockPercent : target.equips()[1].blockPercent)

You could modify the state directly to change those values based on your skills. 

edit:

blockValue is a flat number, and blockPercent, at the point I pasted it there is also a whole numbers which is removed from 100% later in the state calculation. You can conditionally add numbers to it in the state in the same way you posted above. Use 'target' as the object, not 'this', and it should work.

~Ramza

(2 edits)

Hi Ramza,

Thanks again for the response. I did think about using the Block state to provide the additional block percent, but the main problem is that this does not show up in the status menu, so my issue was more of an aesthetics reason rather than a functional one. Nonetheless, if there is really no other way, I will just do it by creating a new state. I should not have too many people being able to use Shields in my game so it will not blot the game unnecessarily. I was simply going to the (perhaps unnecessary) extreme to avoid creating new passive states after my last experience game making experience.