Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN SCRIPTS

- Jump to comments -
Title  Tz-Auber's Perfect Troll Regeneration Script 1.3
Author  Tz-Auber
Submitted / Updated  07-21-2003 / 11-22-2006
Category  Creature Related
Expansions  NWN-1.30
View Code  

Select All Text | View Code in separate window
Format  Module and Code
Type  Type - Combat
Includes  BioWare Standard
Description
This small script properly implements 3rd Edition subdual damage rules as it relates to regeneration. Some of the highlighted features are: - By using the SetImmortal function, feedback for the Troll's health is properly displayed. - Only uses OnHeartbeat and OnDamaged events (and OnPhysicalAttack and OnSpellCastAt minimally). No messing with OnDeath and XP calculations. - Allows for quickly killing a downed Troll through a specified item (by default, a torch item type equipped in the off-hand) or through SoU grenade type weapons (Acid Flask and Alchemist Fire). - A knockdown effect occurs when subdual damage exceeds actual health, and it also simulates attacking a prone opponent. - Allows for automatic 3E Coup de Grace attempts if the Troll is down and the equipped weapon is capable of doing permanent damage. - The zip file contains an SoU demo module and an erf containing the below script for OnUserDefined and a sample OnSpawn script.

Files

NameTypeSizeDownloads
tztrollzip01.ziptztrollzip01.zip
Submitted: 07-21-2003 / Last Updated: 09-23-2003
zip34.67Kb307
--
SCORE OUT OF 10
10
1 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (25):

Posted by Old_Scores_Transfered at 2004-02-20 10:29:27    Voted 10.00 on 02/20/04
This is a compilation of the old system into a single score. There were 7 that made this score of 9.72 then rounded to 10.

Posted by LoCash at 2004-02-07 11:29:00    
i have done some preliminary work with the spellhook function in XP2 and, using lorinton's code as a base, gotten something together which works alright. if you want to have a look let me know.

(i'll explain it in a nutshell; one limitation of the spellhook system is that you CAN'T do:

- do this first
- now go ahead and cast spell
- after the spell casts, do this

Instead, you have to do:

- do this first
- now go ahead and cast spell
- delaycommand 100ms: now do this

you can probably guess what i'm doing. the problem is if someone crit-hits the troll in the 100ms that he's mortal, he gets killed, thus defeating the whole purpose of the script!

in my limited testing involving low-level multi-character fighting against multiple trolls, this did not happen so I'm ok with it. it remains to be seen, however, if a 100ms delay is sufficient for all machines or we can even go as low as a 50ms delay...

another thing is that it's important to block all non-death-magic spells while he's unconscious otherwise some REALLY bizarre behaviour occurs.

i used lorinton's code as a base, but you could easily make the same changes to yours as well. actually i incorporated the coup-de-grace feature from your code, i liked that idea.

and for added fun, i recommend using "Mr. Furious"'s new troll model - looks waay more like true AD&D trolls than the BioWare standard "green ettercap". ;)

Posted by tzauber at 2004-02-05 09:38:00    
Crud!

Since Bioware provides cryptic documentation on scripting functions (when they do provide them), I figured that the Immortal state only related to damage and death effects.

Seems it might be protecting against mind-effect spells too. Well, I'll get to looking at that so let's push up the next release towards the end of February.

Thanks for the heads up LoCash!

Posted by LoCash at 2004-01-28 18:14:00    
Greetings Tz,

Well, the sooner the better. ;) Right now, there doesn't seem to be any Troll script on the Vault that can handle any sort of magic properly! And I'm not just talking about *Death Magic* - that's mostly irrelevant for the mid-level adventures Trolls are likely used in. No, I'm talking about spells like:

- Color Spray (Wizard 1)
- Fear (Wizard 4)
- Bigby's Forceful Hand (Wizard 6) (*)
- Stinking Cloud (Wizard 3)
- Monk's Stunning Fist ability
- a stock Bioware weapon such as Namarra (Neversleep) with the OnHit Daze property

Correct me if I'm wrong, but shouldn't these spells affect trolls? I've only got the 2nd edition monster manual, and it says nothing about trolls being immune to all mind-affecting spells, which is basically whats happening! I've tested magic on both yours and Lorinton's scripts... pretty much same behaviour on both. However with yours, I did notice that the troll always stayed at "uninjured" when I kept casting fireballs at him (until he died).

(*) this spell caused some really strange behaviour; it worked, and the troll fell down but when my caster moved away the troll would get up and follow... and as soon as I stopped moving, it would fall down where it was. Bizarre.

Well, hopefully you can release a nice fully-working version for us soon. Thanks. :) For now, I'm considering using the OnSpellCastAt event to temporarily disable the immortality so all the mind-affecting spells work.


Posted by tzauber at 2004-01-27 21:29:00    
Been busy as of late... I'll probably get something out come February.

Also I'll give a cheap plug to myself by announcing I'll be releasing a new Journey System and Treasure System that should blow many competitors out of the water.

Posted by LoCash at 2004-01-24 20:27:00    
Any idea when the new version will be out? I want to incorporate this into a mod I'm building. Just trying to decide if I should go with your old one or wait for the new one. Nice to see all these old scripts being updated with the new HoTU scripting commands.


Posted by Tz-Auber ( ..xxx.xxx ) at 2004-01-08 11:17:00    
I'm working on the next version to take advantage of HotU's spell routing script. Hopefully that will take care of all spell casting related problems.

The Coup de Grace is just condsidering acid damage and does not discriminate between a physical or magical source. A few more conditionals should be all that's required. I'll certainly get it in when I do the spell routing solution.

Posted by Masterkrull ( ..xxx.xxx ) at 2003-12-19 19:03:00    
love the way it works except my mage gets caught in a loop when ever he uses acid arrow on the troll. It won't die, and he keeps running back to the troll's side to administer a coup de grace everytime one of the acid arrows causes damage. Anyway to fix this little problem?

Posted by DM_Tim ( ..xxx.xxx ) at 2003-11-07 14:43:00    
Critique:
1. Installation - Easy as pie. Read and follow the instructions. Took me all of 3 minutes to convert all the basic troll types.
2. In game feel. Absolutely perfect. This is a wonderful set up you have here.

Conclusion:
If you aren't using troll regeneration scripts in your mod yet, get this! If you are using someone elses, download this and compare. You'll be glad you did.

- DM_Tim

Posted by jGGG ( ..xxx.xxx ) at 2003-10-31 01:43:00    
this is the good stuff. will give you credit on my server's website once it's up. thanks much for this.

Posted by Dalantriel ( ..xxx.xxx ) at 2003-10-01 12:04:00    
We recently upgraded the trolls in our persistent world, Mithral Hammer's - The North, with this script.

For want of a better word, its "perfect" :)

I'd tried 3 other troll systems in the past and this one is by far the simplest to implement and follows the 3rd ed rules to the letter. Don't leave home without those torches!

If you're looking for a system to fully emulate 3rd edition Troll regeneration I'd highly recommend this one.

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-09-28 11:34:00    
BUGS! Ack!

Ya gotta tell me details about these things, if you want the newer better versions! :)

Posted by godbreaker ( ..xxx.xxx ) at 2003-09-27 19:26:00    
damn good,
I played temple of elemental evil last night and you simulate what they have as well, a coup de grace works wether you have torch or fire/acid....I like that.

Even though it has quite a few bugs I recommend it to all DnD lovers.....3.5 rules and 5 foot adjustemnt ot great.

good work Tz

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-09-23 22:43:00    
Okay.. I should've done this a while ago (plus Lorinton seems to be getting the competition going :), but I've finally made a demo module and erf zipped and ready to download.

There is a slight limitation in that I saved the demo module in SoU, so if there are any people left who haven't bought and installed SoU yet.. let me know so I'll become educated.

The erf should work fine for the non-SoU people though.

Enjoy!

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-09-23 20:27:00    
Alright, I've got a pretty tight version now.

Burning a troll checks for a torch-type in the offhand or the use of grenade weapons.

Plus, Coup de Grace rules have been implemented for quickly taking down a Troll with a valid weapon.

The only thing this is short of is considering death spells and healing effects. I'm probably going to wait until HotU for the spell routing script, so I can tackle this nice and neat.

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-08-17 20:43:00    
I am working on a new version to consider death and healing spells and effects better, in that new version I removed the resref dependency
and just used BASE_ITEM_TYPE_TORCH check instead.

Posted by mrdisco ( ..xxx.xxx ) at 2003-08-16 17:03:00    
Hmm, I still can't get this to work. I do many more HP damage to the troll than he starts out with with a torch in my hand and it still won't die.

Posted by mr_disco ( ..xxx.xxx ) at 2003-08-16 16:58:00    
Error found... you can't kill a troll with a torch. You need to change the tag for the torch from "nw_it_torch001" to "NW_IT_TORCH001" because it's case sensitive.

Posted by El Magnifico Uno ( ..xxx.xxx ) at 2003-07-24 20:03:00    
Brillant!! Fabulous!! Marvelous!! Dare I say... Perfect? Congrats.

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-07-24 07:33:00    
Pays to test it before posting, eh? Well I'll ignore that little barb for now. :)

Thanks for checking it out though. I do see the more particular problem. The Troll will never get below 1 hp due to the SetImmortal function. Currently the Troll is still up if no permanent damage is incurred.

However, I sometimes use a house rule for subdual damage for regenerating creatures. Their subdual damage never drops below 0 hp. Let's not argue the pros/cons of this though... I get enough of that from my players! :)

I just reread the entry on subdual damage to be sure and I'll now start keeping track of excess damage.

I'll post a new version in a day or so (two days vault time).

Posted by El Magnifico Uno ( ..xxx.xxx ) at 2003-07-23 22:11:00    
Hmm... Tried it out and followed your notes, but does not seem to work very well. I can beat on the troll all day long with normal weapons, but he won't fall down. Think the problem is:

if ((nPermanentDamage > GetCurrentHitPoints(OBJECT_SELF))&&(!bDowned))
{
ApplyEffectToObject(DURATION_TYPE_PERMANENT,eKnockdown,OBJECT_SELF);
SetLocalInt(OBJECT_SELF,"bDowned",1);
}

If you change the if statement to (nCurrentHPs

Posted by SpiritWarrior ( ..xxx.xxx ) at 2003-07-23 08:09:00    
An SOU troll-script, I hear ya. Cool, I'll try it soon.

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-07-22 19:50:00    
Wow, those posts were close together.

Yeah I know there's a lot of Troll Scripts out there. But they can be rather large and cumbersome.

Plus a number of them (haven't personally tested them all) incorrectly report the Troll's health upon examination. The Troll is listed as Uninjured throughout the entire fight.

This is the first script to take full advantage of the SetImmortal function, as well as eliminating the need for an OnDeath event.

Simplicity was the rule of the day when I thought up this permutation. If you're already using a Troll script.. try this out, I imagine it should make life easier.

Posted by Tz-Auber ( ..xxx.xxx ) at 2003-07-22 19:45:00    
Heh.. well in retrospect the title lacks a little modesty, but I'm pretty proud of my code all the same.

Made a little documentation typo.. On => No messing with ...

Let me know what you all think.

Posted by SpiritWarrior ( ..xxx.xxx ) at 2003-07-22 19:45:00    
We got like, 6 of these already mate.

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Gameworlds


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters