W
Whitney
Guest
He went to bed lolI don't know
I don't have the biggest handle on these yet
I need to spend alot of time looking at the existing ones
but only if they work......
hopefully DracoHouston responds eventually....
✨ ARCHIVE MODE ✨
The forum has now been set to read-only mode, no new posts, resources, replies etc will not be possible.
We recommend you join our Discord server to get real-time response: Discord Invite Link
He went to bed lolI don't know
I don't have the biggest handle on these yet
I need to spend alot of time looking at the existing ones
but only if they work......
hopefully DracoHouston responds eventually....
xDYeah....
I figured....Damn Australia.....
SetAttackBaseDamage(106,0)
SetAttackMaxPP(106,30)
SetAttackCategory(106,2)
SetAttackAttackCategory(106,1)
SetAttackContestCategory(106,0)
SetAttackType(106,0)
SetAttackPriority(106,0)
SetAttackAccuracy(106,-1)
SetAttackSpecialAttackDelegate(106, "ATTACKS_NORMAL_HARDEN_SPECIAL")
SetAttackAttackingAnimationDelegate(106, "ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION")
function ATTACKS_NORMAL_HARDEN_SPECIAL()
Attacks_AddBattleStep("ChangeStat", Attacks_GetTargetStringByAttackTarget("user") .. "|Defense|1|1")
end
function ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION()
AnimationSequenceBegin()
DoStatChanceAnimation(1, 0.0)
AnimationSequenceEnd()
end
I highly recommend that anyone who tries new codes to create a backup of the vanilla game before doing so.I've been playing around with the lua script for harden the last 15-20 minutes and I think I got the attack fully working. I tested it myself, but would greatly appreciate if someone would do some more tests for me. For anyone interrested, heres the code.
Open the file "harden.lua" with a text editor and copy paste the entire code in there. The file can be found in the folder /Pokemon/scripts/attacks/normal.Code:SetAttackBaseDamage(106,0) SetAttackMaxPP(106,30) SetAttackCategory(106,2) SetAttackAttackCategory(106,1) SetAttackContestCategory(106,0) SetAttackType(106,0) SetAttackPriority(106,0) SetAttackAccuracy(106,-1) SetAttackSpecialAttackDelegate(106, "ATTACKS_NORMAL_HARDEN_SPECIAL") SetAttackAttackingAnimationDelegate(106, "ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION") function ATTACKS_NORMAL_HARDEN_SPECIAL() Attacks_AddBattleStep("ChangeStat", Attacks_GetTargetStringByAttackTarget("user") .. "|Defense|1|1") end function ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION() AnimationSequenceBegin() DoStatChanceAnimation(1, 0.0) AnimationSequenceEnd() end
Changes to Harden:
Attack no longer does damage
Attack activates string about increased defense
Attack does seem to actually increase defends (nned more testing)
Attack animation works
Even if this does work, it might not be how the devs would have done it, but for those of you who can't wait for "proper" fix, try it![]()
SetAttackSpecialAttackDelegate(106, "ATTACKS_NORMAL_HARDEN_[B]SPECIAL[/B]")
SetAttackAttackingAnimationDelegate(106, "ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION")
function ATTACKS_NORMAL_HARDEN_[B]SPECIAL[/B]()
Attacks_AddBattleStep("ChangeStat", Attacks_GetTargetStringByAttackTarget("user") .. "|Defense|1|1")
end
function ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION()
yes, its the second call to setattackcategory, the typo persisted to this version sorrynot saying i know much about the coding, but is it possibly the SetAttackCategory?SetAttackBaseDamage(106,0)
SetAttackMaxPP(106,30)
SetAttackCategory(106,2)
SetAttackCategory(106,1)
SetAttackAttackCategory(106,1)
SetAttackContestCategory(106,0)
SetAttackType(106,0)
SetAttackPriority(106,0)
SetAttackAccuracy(106,-1)
SetAttackSpecialAttackDelegate(74, "ATTACKS_NORMAL_HARDEN_SPECIAL")
SetAttackAttackingAnimationDelegate(74, "ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION")
function ATTACKS_NORMAL_HARDEN_SPECIAL()
Attacks_AddBattleStep("ChangeStat", Attacks_GetTargetStringByAttackTarget("user") .. "|Defense|1|1")
end
function ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION()
AnimationSequenceBegin()
DoStatChanceAnimation(1, 0.0)
AnimationSequenceEnd()
end
This is the text from harden.lua
is it what it should be? What should be different?
SetAttackSpecialAttackDelegate will set a string in that attack template (the templates are copied to pokemon so they have a unique copy for battles). after the attack hits there used to be a function called DidDamage and one called SpecialAttack. diddamage was used by like 4 things, that wanted to know what damage they did and do healing based on it (leechlife etc) and specialattack was used from everything from splash to sand attack. i ended up merging them into 1 thing, and chose specialattack because i figured nils would be more familiar with it. inside the special attack delegate you can check damage done and all kinds of stuff. it only executes on successful hit (after accuracy check and damage (if applicable) is applied)Ummm why is Harden using a special attack category?
Let me see if I can find some more information on that.Code:SetAttackSpecialAttackDelegate(106, "ATTACKS_NORMAL_HARDEN_[B]SPECIAL[/B]") SetAttackAttackingAnimationDelegate(106, "ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION") function ATTACKS_NORMAL_HARDEN_[B]SPECIAL[/B]() Attacks_AddBattleStep("ChangeStat", Attacks_GetTargetStringByAttackTarget("user") .. "|Defense|1|1") end function ATTACKS_NORMAL_HARDEN_ATTACKING_ANIMATION()
attack scripting is pretty easy. by the time i had the interfaces for the first 3 types i did working the others were mostly copy and paste. theres 170 examples in there. the hardest part is animating, really.I decided I was gonna get all of the regular scripts down before i mess with the attack scripts(one at a time please...)
I am on spring break this coming week so i will be learning everything as fast as possible...