Page 1 of 1

Mijin Gakure experiments

Posted: Tue Nov 06, 2012 2:56 am
by PrBlahBlahtson
So, because this has been reported twice in a week, I felt the need to see what barriers were keeping this one out. Turns out, not many. Tested on r1994.

- Damage data: None on FFXIClopedia, none in BG wiki. This would be the primary barrier.
- Damage is directly proportional to current HP.
- Damage is reduced by -MDT, Shell, and Fealty, but is not impacted by MDB. Not sure if the functions in magic.lua are useful here. Didn't bother to check, due to above.
- Enhanced by Nagi (raise to 100% HP after death instead of 50%) and augmented Relic +2 legs (+50% damage dealt) Relic +2 is post-Abyssea, and Mythics aren't implemented.
- An update on July 3, 2009 changed Mijin Gakure so that a player is no longer weakened on Raise, and has 50% max HP. DSP aims for RotZ right now, so take that as you will.

Rough script, has issues:

Code: Select all

function OnUseAbility(player, target, ability)
	local hp = player:getHP();
	target:delHP(hp);
	player:delHP(hp);
	player:setAnimation(3);
	return hp;
end;
Issues:
- Double message, but I think that's a known issue with the "return damage" method on Job Abilities. I could be wrong here.
- For some reason, using player:delHP(hp) or player:setHP(0) changes the animation entirely so that it's white magic. ...idk ¯\(°_o)/¯
- Doesn't claim, but that could easily be fixed with target:updateEnmityFromDamage(player,hp);

Other than that, all that's really lacking is the damage formula, and applying appropriate resistance. There does not appear to be any experience lost, since setAnimation() is used for the kill. If you don't set the animation, you run into the old "Invincible, Unaggro-able Player" bug. If you set the animation, the player can be raised normally.

Well, that was a fun way to kill 10 minutes. If somebody has the damage formula, and the animation issue could be addressed, then this could be done.

Re: Mijin Gakure experiments

Posted: Sun Jun 02, 2013 7:38 pm
by lautan
"Double message, but I think that's a known issue with the "return damage" method on Job Abilities. I could be wrong here."

That happens because abilities will always display a message before the script is processed. The abilitystart method in ai_char has to be redone and not output any "player uses blah" message.

Re: Mijin Gakure experiments

Posted: Sun Jun 02, 2013 7:49 pm
by kjLotus
lautan wrote:"Double message, but I think that's a known issue with the "return damage" method on Job Abilities. I could be wrong here."

That happens because abilities will always display a message before the script is processed. The abilitystart method in ai_char has to be redone and not output any "player uses blah" message.
or set the messageid in the database to 0

Re: Mijin Gakure experiments

Posted: Sun Jun 02, 2013 10:22 pm
by atom0s
- Reacton Arm boosts damage by 10%

Re: Mijin Gakure experiments

Posted: Sun Jun 02, 2013 11:15 pm
by PrBlahBlahtson
Animation remains the big barrier to this. If you try to kill someone during the script, it just doesn't work, whether you use player:setanimation(3), sethp(0), or delhp(player:getHP()).

And half the time you end up with a still-standing player with 0 HP anyway.

Re: Mijin Gakure experiments

Posted: Wed Jun 05, 2013 1:55 am
by bluekirby0
So you need to schedule the player's death. That's what the automation system is for, from what I have seen.