Aller au contenu

Photo

Questions about events.XLS


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

#1
Challseus

Challseus
  • Members
  • 1 032 messages
So, I am currently using my own version of events.XLS (contains columns for ID, event name, comment, and script) to override EVENT_TYPE_COMMAND_PENDING. Now, I always thought it was weird that out of all the events in it, the only ones that have any explicit values for scripts are EVENT_TYPE_APPLY_EFFECT, EVENT_TYPE_REMOVE_EFFECT, EVENT_TYPE_COMMAND_PENDING, and EVENT_TYPE_COMMAND_COMPLETE. All the other ones are blank.

At any rate, I am trying to override EVENT_TYPE_ABILITY_CAST_START, but the event is never passed through to the specified script. Anyone else able to override the base script for any of the events in there, besides the 4 that I mentioned? Is it just not possible?

Thanks.

#2
Nodrak

Nodrak
  • Members
  • 144 messages
Events.xls is comprised of two worksheets that are in fact 2 distinct M2DAs. The m2da called 'events' is for animation stuff. The m2da called 'engineevents' is the one you are interested in.

You can add to engineevents (or override it) with your own custom m2da, instead of replacing the whole thing.

Well, I assume thats your issue :D

Also, overriding that event has massive implications to existing ability structures, are you sure you need to override it?

Modifié par Nodrak, 04 décembre 2009 - 07:45 .


#3
Challseus

Challseus
  • Members
  • 1 032 messages

Nodrak wrote...

Events.xls is comprised of two worksheets that are in fact 2 distinct M2DAs. The m2da called 'events' is for animation stuff. The m2da called 'engineevents' is the one you are interested in.

You can add to engineevents (or override it) with your own custom m2da, instead of replacing the whole thing.

Well, I assume thats your issue :D

Also, overriding that event has massive implications to existing ability structures, are you sure you need to override it?


Hi.

Yeah, disregard the whole "replacing" thing. That was just for a quick and dirty test. It'll be an M2DA in the end. At any rate, as I stated in my initial post, I am already overriding EVENT_TYPE_COMMAND_PENDING successfully.

It's when I try to override EVENT_TYPE_ABILITY_CAST_START where it doesn't work. I'll make it an M2DA, but I don't think that will make a difference...

As for the massive implications with overriding it, yeah, I'm aware of that. I'm just changing how/when the ability name is displayed for all of my custom abilities I have been creating over the past month.

Anyway, off to make it an M2DA, here's hoping that for some weird reason, that fixes it...

#4
Challseus

Challseus
  • Members
  • 1 032 messages
Right.

So as expected, after making it an M2DA, the EVENT_TYPE_ABILITY_CAST_START still isn't firing into the specified script, while EVENT_TYPE_COMMAND_PENDING is. Here's my engineevents_roe:

32 EVENT_TYPE_ABILITY_CAST_START roe_ability_core
35 EVENT_TYPE_COMMAND_PENDING roe_rules_core

I have logs in both scripts, but only the ones in roe_rules_core are printed. Now, here is what I was trying to say in my initial post: Are ALL events in this file able to be pointed to new scripts? Because if you look at the original, you actually only see explicit scripts for the ones I have been able to modify:

...
31 EVENT_TYPE_ABILITY_CAST_IMPACT
32 EVENT_TYPE_ABILITY_CAST_START 
33 EVENT_TYPE_APPLY_EFFECT           rules_core
34 EVENT_TYPE_REMOVE_EFFECT        rules_core
35 EVENT_TYPE_COMMAND_PENDING  rules_core
36 EVENT_TYPE_COMMAND_COMPLETE  rules_core
37 EVENT_TYPE_GAMEOBJECTSLOADED
38 EVENT_TYPE_AREALOAD_PRELOADEXIT
...

All of that said, has anyone been able to point other events to their own scripts? Events other than the ones that are explicitly pointed to rules_core?

Hopefully, I'm just missing some small detail Posted Image

Thanks.

Modifié par Challseus, 04 décembre 2009 - 03:24 .


#5
Nodrak

Nodrak
  • Members
  • 144 messages
Oh my mistake, it wasn't clear that you overrode those 4 with sucess. My understanding of engineevents is there are two types, outbound and inbound. Event_Type_Ability_Cast_Start for example is called outbound by the engine to ability_core. I suspect you cannot override these events in this manner.

I have seen a few overrides of some of these events, and I suspect any of the events not originating in the engine code will be able to be overrode.

Try overriding EVENT_TYPE_DEATH, since it originates in event script.

For reference: http://social.biowar.../Event_override

From the sound of it you want to change (or add new) floaty text when you cast an ability?

Modifié par Nodrak, 04 décembre 2009 - 04:30 .


#6
Challseus

Challseus
  • Members
  • 1 032 messages

Nodrak wrote...

Oh my mistake, it wasn't clear that you overrode those 4 with sucess. My understanding of engineevents is there are two types, outbound and inbound. Event_Type_Ability_Cast_Start for example is called outbound by the engine to ability_core. I suspect you cannot override these events in this manner.

I have seen a few overrides of some of these events, and I suspect any of the events not originating in the engine code will be able to be overrode.


Interesting... That would definitely explain it. I wonder if the engine uses global_objects_h.ncs to reference ability_core.ncs:

const resource RESOURCE_SCRIPT_ABILITY_CORE = R"ability_core.ncs";

I wonder if making the change there would do it. I'm so hesitant to modify core scripts, but this would be the lesser of 2 evils Posted Image At least with this change, any change Bioware makes to ability_core.ncs won't screw my custom module up, since my roe_ability_core will always pass events off to it anyway...

#7
Challseus

Challseus
  • Members
  • 1 032 messages

Nodrak wrote...

From the sound of it you want to change (or add new) floaty text when you cast an ability?


On a high level, yes. I have different types of new custom abilities, and the type will be reflected in the floaty text. It's just something I am carrying over from my current module series from NWN. Purely an aesthetic thing, but something important nonetheless.

Unfortunately, as you are aware of, ability_core will automatically display the ability name as read from ABI_ when it catches EVENT_TYPE_ABILITY_CAST_START.

Hence, this thread Posted Image

#8
AND04

AND04
  • Members
  • 154 messages

Challseus wrote...

Nodrak wrote...

From the sound of it you want to change (or add new) floaty text when you cast an ability?


On a high level, yes. I have different types of new custom abilities, and the type will be reflected in the floaty text. It's just something I am carrying over from my current module series from NWN. Purely an aesthetic thing, but something important nonetheless.

Unfortunately, as you are aware of, ability_core will automatically display the ability name as read from ABI_ when it catches EVENT_TYPE_ABILITY_CAST_START.

Hence, this thread Posted Image


edit: nevermind - was mixing up stuff

Modifié par AND04, 04 décembre 2009 - 05:10 .


#9
Georg Zoeller

Georg Zoeller
  • Members
  • 188 messages
Most events that have no explicit scripts in this file will be fired to the object that owns them and then follow the script defined event chain:

custom object event script  -> core script

e.g.

creature specific custom script -> creature_core -> rules core.


Since there is a maximum level of event rerouting of 8, some events are excluded from this behavior to protect the game from running into that problem.



Challseus wrote...

So, I am currently using my own version of events.XLS (contains columns for ID, event name, comment, and script) to override EVENT_TYPE_COMMAND_PENDING. Now, I always thought it was weird that out of all the events in it, the only ones that have any explicit values for scripts are EVENT_TYPE_APPLY_EFFECT, EVENT_TYPE_REMOVE_EFFECT, EVENT_TYPE_COMMAND_PENDING, and EVENT_TYPE_COMMAND_COMPLETE. All the other ones are blank.

At any rate, I am trying to override EVENT_TYPE_ABILITY_CAST_START, but the event is never passed through to the specified script. Anyone else able to override the base script for any of the events in there, besides the 4 that I mentioned? Is it just not possible?

Thanks.



#10
Challseus

Challseus
  • Members
  • 1 032 messages
Thanks for that explanation, Georg. I'm gonna try the "modify global_objects_h" method later tonight to see if that will work for me.

Modifié par Challseus, 04 décembre 2009 - 10:31 .


#11
Nodrak

Nodrak
  • Members
  • 144 messages
I would still reccomend overriding ability_core since you plan on making your own stand alone module. Changes to the original ability_core will not effect your mod (if compiled locally, with backup scripts) unless the engine level interface changes, at which you would likley have to make alterations to any mod.

Modifié par Nodrak, 05 décembre 2009 - 01:43 .


#12
RecklezzRogue

RecklezzRogue
  • Members
  • 193 messages

Georg Zoeller wrote...

Most events that have no explicit scripts in this file will be fired to the object that owns them and then follow the script defined event chain:

custom object event script  -> core script

e.g.

creature specific custom script -> creature_core -> rules core.


Since there is a maximum level of event rerouting of 8, some events are excluded from this behavior to protect the game from running into that problem.




Glad I found this little gem.... ;-)