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

Fixed Headbutt

Status
Not open for further replies.

DracoHouston

Kolben Developer
Contributor
if you want a quick fix to this go to your pokemon folder, then scripts, attacks, normal, then open Headbutt.lua in a text editor, it will look like
Code:
SetAttackBaseDamage(29,70)
SetAttackMaxPP(29,15)
SetAttackCategory(29,0)
SetAttackAttackCategory(29,1)
SetAttackContestCategory(29,0)
SetAttackType(29,0)
SetAttackPriority(29,0)
SetAttackAccuracy(29,255)
SetAttackSpecialAttackDelegate(29, "ATTACKS_NORMAL_HEADBUTT_SPECIAL")
 
function ATTACKS_NORMAL_HEADBUTT_SPECIAL()
    Attacks_TryToFlinch(30, "target")
end
change this line

SetAttackAttackCategory(29,1)

to

SetAttackAttackCategory(29,2)

and it will do damage again. my bad.
 

DracoHouston

Kolben Developer
Contributor
i know this won't help most people but under the new attack system attacks are LUA scripts and you guys can change them. if a bugged attack annoys you you can try making it work. not every attack is possible, but everything the 170 moves we had could do can be used

this patch the most common problem in a script is the 'attack category' property of an attack is not actually part of the pokemon battle system, it is used by the AI and our engine to distinguish between attacks that do special damage and moves that are actually 'special' in a literal sense. like physical damage moves that lower stats or apply a status effect. as a result, when i auto generated the templates for all the moves they did not come with this set. if i forgot to set it weird things happen, some of which didn't happen in my build >.<

anyway, SetAttackAttackCategory takes 2 arguments, move id and an index to the category it belongs in, the default is 0, 'damage'
0 - 'damage' doesn't do anything except base attack for some reason even though i asked for that not to happen anymore! >:| this tells ai this attack just hits the target
1 - 'special' tells the battle to not try and calculate damage for this or check types, still does the special delegate and so on. still does accuracy check, use -1 accuracy for never misses
2 - 'specialdamage' does the damage calculations, also does all the delegates, does not have anything to do with attacks using special attack or not, confusingly

if a buff/debuff move that doesnt do damage is doing damage try opening its script and SetAttackAttackCategory it to 1. if a move that should be doing something extra isnt doing it set it to 2.

this way people can fix these things themselves as they find them, while they wait for official fixes to come. its no replacement for us just fixing the scripts (i'm going to do that right now D: ) but the option is there

further reading for those who are interested
http://pokemon3d.net/wiki/index.php?title=Attack_Scripting_Portal

you can add custom attacks with this too
 

Xane

Pokémon Ranger
Contributor
Thanks for the info Draco, I just used your example to fix headbutt. Also, the Aipom that I tested it against happened to use sand-attack (if i remember correctly) and the move damaged me lol. Il'l probably fix that too.

1 question though; Won't downloading a new version of the game automatically replace the lua scripts? If that's so, it means we have to manually edit our scripts each time a new update comes out:banghead:

I know we can always just do backups of our scripts, but seriously...

But again, thanks anyway;)
 

snoe

Active Member
Xane

The thinking is that when it updates. The moves will be fixed anyways :D
So it shouldn't be something to worry about!
 

Xane

Pokémon Ranger
Contributor
Over time, yes, but we don't know exactly when that is, thanks for the reply though:p
 

DracoHouston

Kolben Developer
Contributor
Thanks for the info Draco, I just used your example to fix headbutt. Also, the Aipom that I tested it against happened to use sand-attack (if i remember correctly) and the move damaged me lol. Il'l probably fix that too.

1 question though; Won't downloading a new version of the game automatically replace the lua scripts? If that's so, it means we have to manually edit our scripts each time a new update comes out:banghead:

I know we can always just do backups of our scripts, but seriously...

But again, thanks anyway;)
if you fix something let me know and i'll make sure its in my copy of the scripts at least, i can't promise that fixes will come and replace your fixed files with fixed files but ideally thats what we'll do. i only offer the manual fixing as a short term solution for players that would rather mess with a script a little and fix the game up so they can play than wait a week for myself and nils to do it. i know it can be a long wait sometimes :(
Over time, yes, but we don't know exactly when that is, thanks for the reply though:p
back up the game before updating so you can copy paste them over i guess.

in time we're probably consistency checking all the scripts in the base game so people can't mess with scripts then go pvp with someone but for now i hope it gives you all something to do when you run out of content
 

Xane

Pokémon Ranger
Contributor
Thanks for the info Draco, I just used your example to fix headbutt. Also, the Aipom that I tested it against happened to use sand-attack (if i remember correctly) and the move damaged me lol. Il'l probably fix that too.

1 question though; Won't downloading a new version of the game automatically replace the lua scripts? If that's so, it means we have to manually edit our scripts each time a new update comes out:banghead:

I know we can always just do backups of our scripts, but seriously...

But again, thanks anyway;)
if you fix something let me know and i'll make sure its in my copy of the scripts at least, i can't promise that fixes will come and replace your fixed files with fixed files but ideally thats what we'll do. i only offer the manual fixing as a short term solution for players that would rather mess with a script a little and fix the game up so they can play than wait a week for myself and nils to do it. i know it can be a long wait sometimes :(
Well I'm not playing the game that much atm, but I will inform you if I fix something. Thanks for the response:p

EDIT: Maybe it was a bit overkill to qoute your entire post just for this...
 
Status
Not open for further replies.
Top