The goal of this module is to give module developers a clean module with the events already registered so that community content will work without any changes needed. This is a starter module that only has the module events set and includes the scripts for those events.
A module does not have a script associated with every event when you create one from scratch. This causes problems for community content that adds new functionality dependent on these events.
I've also included the scripts as a separate ERF file for existing modules.
There are now two versions: The existing Event Scripted Module that hooks up every event for community override and a Basic Event Scripted Module that only has the critical scripts hooked up (and the existing default scripts for the rest).
The 5 critical events are:
On PC Loaded
On Player Equip Item
On Player Unequip Item
On Player Rest
On Player Level Up
***
Module Event Descriptions
On Acquire Item Script - This event is fired each time an item is added to an objects inventory.
On Activate Item Script - This event is fired each time an item is activated in a module.
On Client Enter Script - This event is fired each time a player exits the module (but before he is fully loaded).
On Client Leave Script - This event is fired each time a player exits the module (the module no longer recognizes the object as a player, used for location information).
On Heartbeat Script - This event is the module heartbeat to manange cases that require constant updating (such as the spirit meter and it dropping over time).
On Module Load Script - Handle the big ticket items that only need to happen when a module is loaded (add companions to the roster, spawn in the area the player is)
On PC Loaded Script - This is a critical event and is fire every time the player is "reloaded" back into the game such as area transitions, leveling up, and resting.
On Player Death Script - Handle a custom death system here.
On Player Dying Script - Handle a custom dying script here such as bleeding to death or troll like regeneration.
On Player Equip Item Script - This is a critical event that is fire every time an item is equipped. This can be used for custom feats dependent on what gear you are wearing.
On Player Level Up Script - This is a critical event that is fired each time the player levels up so taht any additional work can be done on the player leveling up (such as granting new spellbook feats, etc).
On Player Rest Script - This is a critical event that is fired each time you rest and is ideal for resetting custom feats to a specific number.
On Player Unequip Item Script - This is a critical event that is fired every time you unequip an item. This can be used for custom feats dependent on what gear you are wearing.
On Player Respawn Script - This event is fired after you come back from death and is typically where a death penalty is assessed.
On Unacquire Item Script - This event is fired when an object is lost/moved from an objects inventory.
The basic starter module with only the critical module events replaced with the new scripts. Non-critical events still have their original scripts (if any).
Aranen: Changing the events to those listed above (using the ERF) will have NO impact on your module. I set those scripts up to call the x2_mod and nw_ calls the *exact* same way as if you had just hit the new module button. The difference being anyone that uses the k_mod scripts can override them and have custom content work (for level up and pc loaded which do NOT have events by default). This module was posted Thursday night and I thought of a way to help make this even better so I'll have a v1.01 up tomorrow (by including a community script call in each event so that ONLY that get override and any custom module changes will not be altered). _________________________ My Website
Posted by Aranen at 2008-01-04 22:34:18 Voted 10.00 on 01/04/08
A question? Say I am working on a module and have been for a while so I don't want to start new one. I haven't messed with any of the scripts for the event handlers yet and they are all at what ever they start as default. Can I change them to these or will it mess anything else up?
Posted by nicethugbert at 2008-01-04 18:13:17 Voted 10.00 on 01/04/08
I'll put a short description of each event in the description section tomorrow.
Those events right now are set up to work *exactly* like a new module but also hook up every event so that custom content can be used with it. _________________________ My Website
Thank you for uploading it. Will you be able to explain what each of these scripts actually does (or is there for, etc)? _________________________ Joinable NPCs in IWD2. I'm *not* kidding!
You must be Logged In to post comments in this section.
10 - A Masterpiece, Genuinely Groundbreaking 9 - Outstanding, a Must Have 8 - Excellent, Recommended to Anyone 7 - Very Good, Deserves a Look 6 - Good, Qualified Recommendation 5 - Fair, Solid yet Unremarkable 4 - Some Merit, Requires Improvements 3 - Poor Execution, Potential Unrealized 2 - Very Little Appeal 1 - Not Recommended to Anyone