Need help with Job Corrections

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Need help with Job Corrections

Post by Desufire » Sun Mar 01, 2015 11:00 pm

I apologize if this isn't the correct category to post this.

When it comes to scripting, I'm still learning the advanced stuff. I've read through all the How To's that I could find on here, but I'm still having difficulties on scripts that involve multiple steps/checks. So yes, I'm a noob I guess lol.

I've been going by the https://wiki.dspt.info/index.php/What_Works site trying to figure out what I can do. I wanted to focus on fixing the jobs first because to me, the jobs are the foundation of playing.

I see the MNK states that the Footwork needs some work and that WS' return incorrect TP values. What I'm needing help on is locating the file that contains the Footwork. I've looked over everything I can think of and cannot locate anything that remotely looks like it relates to Footwork.

Other thing is Astral Flow. I believe I'm in over my head on this one since it appears none of the A.Flow pet skills are scripted. I'm not looking for someone to write a script for me, but if you could provide a link that relates to what is needed for A.Flow, I'd greatly appreciate it. Unless someone would like to provide a sample onAbilityCheck / onUseAbility that can be used ;).

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Need help with Job Corrections

Post by kjLotus » Sun Mar 01, 2015 11:05 pm

most of footwork is done inside ai_char_normal in ActionAttack I think

as for astral flow, its issue is not code related, but research related (there are no formulas for the correct damage yet, nor has anyone done testing for it)

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Sun Mar 01, 2015 11:29 pm

A player also noticed that the NPC Victoire http://wiki.ffxiclopedia.org/wiki/Victoire wasn't talking or selling anything. I know it's not all important, but in case anyone is like me and isn't the most fluent in scripts, this is what I did.

Code: Select all

-----------------------------------
-- Area: Southern San'Doria
-- NPC:  Victoire
-- Standard Merchant NPC
-----------------------------------
package.loaded["scripts/zones/Southern_San_dOria/TextIDs"] = nil;
-----------------------------------
require("scripts/globals/shop");
require("scripts/zones/Southern_San_dOria/TextIDs");
-----------------------------------
-- onTrade Action
-----------------------------------
function onTrade(player,npc,trade)
end;
-----------------------------------
-- onTrigger Action
-----------------------------------
function onTrigger(player,npc)
    player:showText(npc,OSTALIE_SHOP_DIALOG);
    stock = {
        12432,   1450,       -- Faceguard
	12464,	 1936,	     -- Headgear
        12560,   2230,       -- Scale Mail
	12592,	 2745,	     -- Doublet
        12688,   1190,       -- Scale Fng. Gnt.
	12720,	 1515,	     -- Gloves
        12816,   1790,       -- Scale Cuisses
	12848,	 2110,	     -- Brais
        12944,   1085,       -- Scale Greaves
	12976,	 1410,	     -- Gaiters   
		 }
    showShop(player, SANDORIA, stock);
end;
-----------------------------------
-- onEventUpdate
-----------------------------------
function onEventUpdate(player,csid,option)
	--printf("CSID: %u",csid);
	--printf("RESULT: %u",option);
end;
-----------------------------------
-- onEventFinish
-----------------------------------
function onEventFinish(player,csid,option)
	--printf("CSID: %u",csid);
	--printf("RESULT: %u",option);
end;
I pretty much took a script from another General Merchant and wrote in the items and prices listed on FFxiWiki. player:showText(npc,OSTALIE_SHOP_DIALOG); I wasn't sure if/how I could just add my own dialog, so I wrote in Ostalie's since it's in the TextIDs for the same zone and the message is a general welcome to the store message.

Haven't tested it out since the server owner isn't home yet to plug it in.

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Sun Mar 01, 2015 11:37 pm

kjLotus wrote:most of footwork is done inside ai_char_normal in ActionAttack I think

as for astral flow, its issue is not code related, but research related (there are no formulas for the correct damage yet, nor has anyone done testing for it)
I'm not seeing an ai_char_normal. If it helps, I'm not the server hoster, just helping him out however I can. I have his darkstar-master folder. Is it located in there?

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Need help with Job Corrections

Post by kjLotus » Sun Mar 01, 2015 11:39 pm

Desufire wrote:
kjLotus wrote:most of footwork is done inside ai_char_normal in ActionAttack I think

as for astral flow, its issue is not code related, but research related (there are no formulas for the correct damage yet, nor has anyone done testing for it)
I'm not seeing an ai_char_normal. If it helps, I'm not the server hoster, just helping him out however I can. I have his darkstar-master folder. Is it located in there?
src/map/ai/ai_char_normal.cpp

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Sun Mar 01, 2015 11:43 pm

Learning something new everyday lol. Thank you Lotus. Time for some trial and errors.

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Mon Mar 02, 2015 12:59 am

Okay, found this in attackround at the end of script.

Code: Select all

/************************************************************************
*                                                                       *
*  Creates kick attacks.										        *
*                                                                       *
************************************************************************/
void CAttackRound::CreateKickAttacks()
{
	if (m_attacker->objtype == TYPE_PC)
	{
		// kick attack mod (All jobs)
		uint16 kickAttack = m_attacker->getMod(MOD_KICK_ATTACK); 

		if (m_attacker->GetMJob() == JOB_MNK) // MNK (Main job)
		{
			kickAttack += ((CCharEntity*)m_attacker)->PMeritPoints->GetMeritValue(MERIT_KICK_ATTACK_RATE, (CCharEntity*)m_attacker);
		}

		kickAttack = dsp_cap(kickAttack, 0, 100);

        if (WELL512::irand() % 100 < kickAttack)
		{
			AddAttackSwing(KICK_ATTACK, RIGHTATTACK, 1);
			m_kickAttackOccured = true;
		}

		// TODO: Possible Lua function for the nitty gritty stuff below.

		// Mantra set mod: Try an extra left kick attack.
        if (m_kickAttackOccured && WELL512::irand() % 100 < m_attacker->getMod(MOD_EXTRA_KICK_ATTACK))
		{
			AddAttackSwing(KICK_ATTACK, LEFTATTACK, 1);
		}
	}
}
So if I'm understanding this (and I pray I am), there's a script for Mod_Kick_Attack that can be edited? Or is it as simple as just tweaking:

Code: Select all

kickAttack = dsp_cap(kickAttack, 0, 100);

        if (WELL512::irand() % 100 < kickAttack)
		{
			AddAttackSwing(KICK_ATTACK, RIGHTATTACK, 1);
			m_kickAttackOccured = true;

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Mon Mar 02, 2015 5:01 am

Code: Select all

-- onEffectGain Action
-----------------------------------

function onEffectGain(target,effect)
    target:addMod(MOD_KICK_DMG,31);
    target:addMod(MOD_ATTP,10);
    target:addMod(MOD_DELAY,2);
    target:addMod(MOD_TP_BONUS,6);
end;

-----------------------------------
-- onEffectTick Action
-----------------------------------

function onEffectTick(target,effect)
end;

-----------------------------------
-- onEffectLose Action
-----------------------------------

function onEffectLose(target,effect)
    target:delMod(MOD_KICK_DMG,31);
    target:delMod(MOD_ATTP,10);
    target:addMod(MOD_DELAY,2);
    target:addMod(MOD_TP_BONUS,6);
end;
I cannot find info on how much delay is given while FW is active, so I put it to 2. During my test, w/o FW I was getting 104 TP for every attack round and attacked every 5-6 seconds. With FW active, I received 174 tp per attack round and attacked every 8-9 seconds.

The kick dmg at 31 also seemed to match what I've read people post about their dmg with it active.

I stopped at this because the thought of trying to find a way to link the FW dmg to Dragon Kick and Tornado Kick is daunting.

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Need help with Job Corrections

Post by tagban » Fri Mar 06, 2015 5:47 am

More than likely under Lua files, /scripts/ folder. Just dig around. :) Pretty sure all abilities/spells have a file, that can be easily modified. Just don't forget to Stash Save -> Git Pull -> Stash Pop.

Desufire
Posts: 162
Joined: Sun Feb 22, 2015 2:58 am

Re: Need help with Job Corrections

Post by Desufire » Sat Mar 07, 2015 12:41 am

Right now we put a hold on working out the job stuff. Most of the jobs work fine now and nobody seems to care about Footwork dmg carrying over with some WS'.

We moved on to trying to get the Guildwork items into the game in a not so "Here you go" manor. Right now we're having problems with getting Key Items to be listed in a shop. Just a lot of trial and error going on lol.

I must thank you though tagban. I found a topic where you listed some command scripts and we implemented the @JOBshop for all the jobs to have access to their AF/+1. Made a lot of people happy :).

Post Reply