• ✨ 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

[0.28.2]Moves that still don't work properly

Status
Not open for further replies.

Xane

Pokémon Ranger
Contributor
If it bothers you that much Darkfire, I can tell you that it is indeed one of the SetAttackCategorys, probably the second, but not sure, that is the culprit. Draco forgot to change the name of the function, hence the reason why there is 2, but i'm not entirely sure what it should be changed into.

EDIT: It should be the second SetAttackCategory function that he forgot to change
 

Xane

Pokémon Ranger
Contributor
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.

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
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.

Changes to Harden:

Attack no longer does damage
Attack activates string about increased defense
Attack does seem to actually increase defense (need 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;)
 

snoe

Active Member
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.

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
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.

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;)
I highly recommend that anyone who tries new codes to create a backup of the vanilla game before doing so.
I'm not saying this code won't work(I'm positive it will) but its standard precautions
 

Prince Vade

Champion
Trusted Support
Retired Mod
Ummm why is Harden using a special attack category?
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()
Let me see if I can find some more information on that.
 
W

Whitney

Guest
yes thats really strange.

I hope the moves can be fixed/straightened out in the next update. Or should I say, oopdat. :3
 

DracoHouston

Kolben Developer
Contributor
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?
not saying i know much about the coding, but is it possibly the SetAttackCategory?
yes, its the second call to setattackcategory, the typo persisted to this version sorry
 

DracoHouston

Kolben Developer
Contributor
category is 0 physical, 1 special, 2 status

status does no damage and doesnt check types but can still have accuracy
the other 2 are damaging moves but they can have a special attack delegate (confusing name but its basically 'do this after the attack hits')
 

snoe

Active Member
it makes sense, especially for complex move such as mudslap which does damage and lowers accuracy.
the hard part is that not everyone is confident in tinkering with code and scripts :p

SCIENCE! COMPUTER SCIENCE!
 

DracoHouston

Kolben Developer
Contributor
Ummm why is Harden using a special attack category?
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()
Let me see if I can find some more information on that.
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)

the name you give the delegate can be anything. it could have been called function klsdghklstygdflkgftg() and it'd work if i set the string to that. the function names look like they do because i use that naming convention, in a form that no one would reasonably want to use in their own code. ATTACKS_TYPE_ATTACK_NAME_SPECIAL() ATTACKS_TYPE_ATTACK_NAME_HIT_ANIMATION() and so on
 

Darkfire

Administrator
Administrator
P3D Developer
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...
 

DracoHouston

Kolben Developer
Contributor
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...
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.

the function names do what they say they do (with the exception of the category and special attack stuff which have weird, confusing names, sorry about that) and attacks.lua has a bunch of helper functions i made to do very common stuff (like doing the stat up/down animation, having a chance to flinch, stuff like that)
 
Status
Not open for further replies.
Top