Aller au contenu

Photo

Safely overriding EVENT_TYPE_ATTACK_IMPACT and _DAMAGED


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

#1
SuperD-710

SuperD-710
  • Members
  • 130 messages
My Combat mod currently modifies those two (plus others) events. I'm in the process of moving things out to override events instead of the whole core script.

The problem being those two event are used a lot by individual object scripts and handed off to rules_core after they're done with it. If I override those two events, those object will not be able to catch the event, as I don't want rules_core to re-handle my event again.

The only solution I thought of is to look through all the scripts, and grab those object scripts into my event override script, and handle them on a case by case basis. This is really sub-optimal, so is there any way to have my event override only catch any event heading to rules_core? (meaning after those object scripts have handled it)

#2
anakin5

anakin5
  • Members
  • 258 messages
I would say, no, it is not possible.



But may be 2 idea :



1) If you can accept that rules_core run before you script, you can override these 2 events and call HandleEvent at the very start of your script. Then do your stuff, and why not destroy what rules_core did.



2) Forget overriding these event for creatures that have a specific action on theses event. Maybe you can find a common properties of all these creatures. This is used in mod Auto loot I think.





But because you don't want what rules_core do, it seems to be a pretty deep change in the way damage are managed in the game. Don't fear to override rules_core in this case. Your "only solution" is not viable because you will have to parse all creature script EACH TIME BIOWARE RELEASE AN UPDATE !!!

#3
SuperD-710

SuperD-710
  • Members
  • 130 messages
Make sense. There goes my promise of letting them toggle everything on and off in-game :(

#4
DodgeMoreLightning

DodgeMoreLightning
  • Members
  • 30 messages
In the events 2da, there's a section listing all events and an entry that seems to say which script to call. Would having your script in its own file, with it listed as the script to go to in the 2da work? Rules Core would seemingly handle everything but the event you told to point to your script file. If you needed to pass through, you could possibly throw up a HandleEvent(sv,script) at the end like player core does (but since you presumably only are thrown the event you signed up for and you handle it, would it be necessary?).

I wouldn't want to touch Rules Core either. Just an idea. I'm about to override EVENT_TYPE_ATTACK_IMPACT myself.

Modifié par DodgeMoreLightning, 02 janvier 2010 - 08:35 .


#5
anakin5

anakin5
  • Members
  • 258 messages

DodgeMoreLightning wrote...

In the events 2da, there's a section listing all events and an entry that seems to say which script to call. Would having your script in its own file, with it listed as the script to go to in the 2da work? Rules Core would seemingly handle everything but the event you told to point to your script file. If you needed to pass through, you could possibly throw up a HandleEvent(sv,script) at the end like player core does (but since you presumably only are thrown the event you signed up for and you handle it, would it be necessary?).

I wouldn't want to touch Rules Core either. Just an idea. I'm about to override EVENT_TYPE_ATTACK_IMPACT myself.


He knows that. You will faced the same problem as him.