Rough Jump + Research

Dragoon
Post Reply
PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Rough Jump + Research

Post by PrBlahBlahtson » Sat Sep 01, 2012 3:28 pm

So a while ago, I started trying to write a function to implement Jump. Once I had the full research in front of me, I realized that an LUA wasn't going to cut it, and this really was better handled in the core. There's just so much that LUA couldn't do without new/modified functions.

Below is what I had when I stopped working on it, along with the notes I had jotted down. It does work, unless I broke something cleaning up my notes. It just doesn't come remotely close to retail.

I'm just hoping the code/research will be useful to someone.

Code: Select all

function OnUseAbility(player, target, ability)

	-- Crit rate
		-- Ryunohige always crits (19004, 19073, 19093, 19625, 19723, 19832, 19961)
		-- Ignores Crit Defense Bonus
	-- Distance (9.5)
	-- Should be possible to skill up.
	-- Should NOT proc damage spikes if the target has them.
	-- Spirit Surge (defense -20% on target, probably can't be resisted, overwrites Angon)
		-- -30% on BGWiki
	-- Can't do anything about animations, personally.  Either handled differently, or animation ID > 255 (unlikely)
		-- Purple on regular hit, green on crit, if I remember right.  The colors matter.
		-- Animation varies depending on melee weapon.
	-- Delphinius (L99, 19794) should give an additional effect of Stun.
	-- Accuracy
		-- Volans Greaves grant +4 acc (15347)

	damage = player:getMeleeHitDamage(target);
		-- Returns -1 on miss
	vit = player:getStat(MOD_VIT);
	printf("Damage: %i",damage);
	
	if(damage == -1) then
		-- Return miss message how?  Try passing -1 eventually.
		-- Needs to pass to all players.  This is not a solution.
		player:messageBasic(324,66,target);
		--return 0;
	else
		-- Calculate damage
		-- floor((base damage)*(vit/256+1)
			-- Formula is disputed in Drake Ring research on FFXIAH, but nothing new provided
		damage = math.floor((damage)*(vit/256+1));
		printf("Modified damage: %u",damage);
			-- Gear that changes the formula
				-- AF/+1 feet grant +10% attack (14102, 15365)
				-- Skanda boots needs verification, but same +10%? (15700)
				-- Drake Ring is just unknown.  Possibly +Atk or Acc or both.
			-- Double/Triple Attack, Enspells, Occ Attacks X., Additional Effects
				-- Vougier's contus (L89) has a double attack % during jump. (16854)
			-- Dual-wield/H2H should have both attacks
		-- Calculate returned TP
			-- Does not grant target TP (seems to be covered)
			-- Gear that modifies TP returned
				-- Barone (body 14416, legs 14317) +2 each
				-- Conte (body 14417, legs 14318) +2.5 each
				-- Skystrider (18128) +5
				-- These grants TP even on a 0 damage hit...
		target:delHP(damage);
		target:updateEnmityFromDamage(player,damage);
		return damage;
	end
end;
Last edited by PrBlahBlahtson on Tue Dec 11, 2012 4:35 pm, edited 1 time in total.

xtcraver2003
Posts: 5
Joined: Wed Nov 21, 2012 12:01 am

Re: Rough Jump + Research

Post by xtcraver2003 » Mon Dec 03, 2012 5:45 pm

lol I tried to make a jump.lua as well. Those SE mofo's decided to make the damage as convuluted as possible. Also what would be a proper way to include the emnity loss% in high jump? Adding a new function to emnity container to get the players current emnity?
As for the damage/multihit/souleater/everything else, it might be helpful to make jump akin to the weaponskill.lua or use it as a resource? Final tought, How would you use the att+ from gear to help determin the damage if the basedamage is calculated without it....

hakusho
Posts: 49
Joined: Wed Nov 07, 2012 1:01 pm

Re: Rough Jump + Research

Post by hakusho » Tue Dec 04, 2012 3:30 am

Awesome! How do I implement this in my FFXI environment?
I'm guessing the Jump animation is still MIA but a working code basis that deals the damage and returns TP is a great first step.

Hopefully we can work together with the people involved in this thread to get the Jumps working as soon as possible:

http://forums.dspt.info/viewtopic.php?f ... jump#p2688

Post Reply