Aller au contenu

Photo

[Help!] Effect Scripting


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
KigenBarzhad

KigenBarzhad
  • Members
  • 132 messages
Basically I've been trying to study some of the game's effect code and I've come up with 2 questions?

How does the code associate the const int with the effect code?

How does the effect code recieve the data (specifically for OnHit effects) if there is a const int effect?

Basically, I want to write a more flexible "Increases Hostility" code. As of now, it is intergrated by its ID# to the sys_itemprps_h and will *always* provide a static 5.0 increase.

By overriding the itemprps.gda/2da, I can make an effect that increases the ThreatTable by the powervalue I have in the toolset (rather than the static 5). I'm just lost on how the code would look like as of now. I'm trying to study the code but comming up with blanks.

would it be

effect FlexibleIncHostility(float fX){
returns UpdateThreatTable(oAttacker,oTarget,fX)
}

Any ideas?

Modifié par KigenBarzhad, 08 janvier 2010 - 07:33 .


#2
Craig Graff

Craig Graff
  • Members
  • 608 messages
There is nothing magical about applying an effect. Unfortunately you will probably need to reroute the OnHit event in an extension of events.xls . Then just modify sys_itemprops_h to do what you want and call it in the script that your event.xls points to.

#3
KigenBarzhad

KigenBarzhad
  • Members
  • 132 messages
Hmm, I would hoping I could avoid editing the sys_itemprops_h so that if that ever gets changed or patched, my addin would continue to work.

I was hoping I could make a new an effect 23000 and plug it in to itemprps.xls

Modifié par KigenBarzhad, 08 janvier 2010 - 08:48 .