Dedicated to all the guys 'n' girls at Link - Best wishes for the GREATEST PW out there!
________________________________________________________________________________
_________
Optimised for PWs and multiple area fires, This system is designed to simulate spreading fire with as little 'lag' as possible (Of course, some slowdown is always going to occur due to processing, but the system should be well optimised to run smoothly.
The system comes already designed to work with any post 1.64 version of NWN, but is also compatible with all CEP and CTP versions, meaning the placeables & tilesets included have been accounted for.
INSTALLATION & INSTRUCTIONS FOR USE:
Place the "Fire_sys.erf" file within the "erf" folder of your NWN root Directory (i.e. "C:/Program Files/Neverwinter Nights/NWN/")
Open the Aurora Toolset and optionally load in your module, or create a new one.
Go to "Import" via "File Menu" and import the "Fire_sys.erf" file.
Included in the download:
1) All required scripts, no overwriting necessary.
The script does make a call to the default bioware "x0_i0_position" script, so if asked to overwrite this, you may answer 'No' without worry. In the unlikely event you 'have' altered this script, only 2 functions are used and they are core functions that altering would greatly affect the gameplay.
2) 5 Placeable objects found under Cutsom - Special - 5. These are "Flames" (x3), "Powderkegs" and "Scorched".
The flames are the 3 sizes of flame placeable used by the system. Other flame placeables within the module will not operate as intended, so
if you want to use this system for spreading fires, you must use these placeables.
The powderkegs are to demonstrate the 'explosive' properties, which can cause certain objects to explode when burnt.
3) One Item object Found under Custom - Special - 5. This is named "~" and MUST NOT BE USED or altered in anyway, ever! This is necessary for Z-Axis vector calculations.
The ~ Item is an integral object that is necessary for calculations used by the script. It is not intended for use as an item.
To use the functionality, simply place (either by spell-hook, DM-Client, script or within the toolset) any of the 3 custom flames at a suitable location. (It is recommended that the smallest of the flame placeables included in the system are started with). As soon as the flames are placed, they will begin to spread and burn objects in their path.
--------------------------------------------------------------------------------
----------------------------------------------------------
Features:
1) Reacts to placeable types, i.e. Wooden objects burn fiercely, stone objects do not.
2) Tilesets. Damp, wet, raining, snowing, wooden floor, sand all have different effects on the spread of the fire.
3) Heat. A larger blaze will have a larger 'heat-radius' which can inflict damage at distance.
4) Well optimised. The scripts have been finely tuned to minimalise slow-down (or 'lag') as much as possible, making the system suitable for PW modules.
5) Allowances made for tag-based systems to prevent destruction of necessary placeables.
6) Flames damage melee attackers, size of blaze affects range and damage.
7) Blazes and Infernos. As the fires grow, they can grow into raging infernoes, dealing more damage and spreading further.
8) Configuration settings. A simple system of 'switchable' settings are included to customise the system.
Fixes & Changes in this Version: THIS VERSION IS ALTERED AT CORE. UNFORTUNATELY PREVIOUS VERSION EXCESS SCRIPTS WILL NEED TO BE REMOVED AND OBJECT INSTANCES UPDATED. THIS INCONVENIENCE WILL NOT BE REQUIRED FOR FUTURE VERSIONS.
1) Added Explosive properties, demonstrated by inclusion of 'Powderkeg' placeables.
2) Fixed a bug in OnDamage event of flames, caused by GetDamageDealtByType() returning negative values when no damage was done.
3) Added ambient lighting changes when blazes are large.
4) Optimised OnDamage system further, also removed constant HB scripts.
5) Attempting to harm Flames by melee will result in possible damage dealt to attacker.
6) Only Magic, Cold, and Acid will harm the fires.
7) Fixed Errors in Placeable code which prevented extinguisher and non-flammable objects being recognised.
8) Added Debugging info.
9) All scripts re-written and optimised meaning less scripts overall and combining common functions into a single 'include' dependency.
10) Added configurable switches and constants. Please see "fire_sys_config" for details.
11) Fixed Bug with incorrect flame-count recording.
12) Fixed an issue with flames not growing or spreading out.
13) Flames now shrink and decay 'realistically' when extinguished.
14) Fixed errors in new spawn location scripts that were ignoring invalid spawns.
15) Fixed damage amount and radius to be correctly proportional.
16) Substituted GetNearest for GetNextInShape type object functions for realism and efficiency.
Bugs & Errors Noted:
1) Multiple fires in one area, despite beng separated by vast distances will still contribute to the overall 'blaze'
2) Damage Resistance feedback OnDamage for flames gives odd and incorrect results. This is due to the lack of toolset functionality to apply DR to placeables as would be done with creatures, and the script recalculates the HP of the flames.
3) Flames atop Tall placeables will not burn them. This is due to the pivotal pont of the placeable being 'out of reach' to the flame, despite the flame touching the placeable mesh. Tghis may not be fixed, depending on efficiency of using further z-axis calculations.
4) Flames can damage Effects. This needs to be checked for.
5) Static placeables are still unaffected.
Although fully operational, I am still working on extra features as shown below:
1) 'Extinguishing' creatures, such as Water Elementals will extinugish flames they come into contact with.
2) Spells such as Gust Of Wind will destroy small flames, but may spread/fan larger blazes.
3) More enhanced tileset functionality, checking for combustible architecture within the tile.
4) Compatibility with Sunjammer's TileMagic and default TileMagic systems, allowing for the system to utilise the features of tiles altered.
5) Torches, Flame-Weapons, Lightning, Doors all to be considered according to switches set.
6) Spread across Area Transitions. The functionality for fire to spread from one area to another.
7) Multiple Scorch-Marks to be optimised, grouped into large ones, or other suitable substitute.
This is a nice system that I will need to get inside of and figure out how to integrate with my module. Thanks for your work. _________________________ Vault Submissions | Arnheim | Beyond Vives
Posted by jdeavila at 2009-12-13 23:42:49 Voted 9.00 on 12/13/09
nice work _________________________ Imtherealthing
this is incredible! imagine, a forest fire spreading into a nearby village. you're a freaking genius. >:D I must use this and will be sure to give full credit. AMAZING _________________________ I lolzorz @ j0ur paffetik gramerz!
ok, just got off my behind long enough to continue working on my PW, I want something like this, and from what I've read (have yet to try it, will vote after I play with it some). Can it start the fires from say a casters fire based spell? or is there a way to do that? Would be fun in a forest area watching the druids get mad at the wizard for torching the whole area just to fireball 1 goblin :)
Posted by coreyh2 at 2007-06-01 22:10:04 Voted 9.00 on 06/01/07
Very neat. I'd like it more with options and easier to read code.
Posted by Ubersaint at 2007-05-20 09:16:39 Voted 10.00 on 05/20/07
Great system easy to get started and best way to get Druids busy ;) _________________________ Trimaris - Kingdom of the 3 Seas PW Story Link
Thank you for all the great votes! I'm a little shocked at the very positive response as the initial upload was very buggy!
New version 1.4 uploaded! Get it while it's hot!
I have addressed many bugs and structured the whole system a lot more efficiently, this will minimalise the slowdown much more. Unfortunately, this introduces incompatibilities with the older version (This inconvenience wont happen again, I promise!) I recommend all previous scripts are removed before importing this new version, and then Update all instances of the objects named "Flames" & "Scorched" after overwriting if they are at all placed in your module.
There are many inclusions and additions now present, although I have a lot of work still to do. I plan on developing this system as much and as efficiently as possible, whilst improving its comprehensiveness. Keep chacking for more updates in the future!
Posted by hexmendacious at 2007-05-05 16:58:37 Voted 10.00 on 05/05/07
Awesome! Just what I was looking for ... although it looks like they I'll need to keep the area very small to reduce lag...
Posted by ffbj at 2007-05-05 09:01:38 Voted 10.00 on 05/05/07