There are cases in which the builder/master needs that PC loses hit points, independently from their protections!
I didn't found a NWN default working solution for that cases... the third parameter of the standard "EffectDamage()" function doesn't work! So I created a custom one!
pat_damage_rri.zip contains just four files... but the real contents are the contents of the two main files! :)
So, shortly, the four files are:
- pat_damage_rri.erf: it's the main content of the file! It conteins the script files that contains all 12 new custom functions!
- pat_damage_rri.mod: a complete test module for all the custom functions! You can use it to implements your used custom 2da, hak, etc... to see if functions still works properly. Or you can examine thoroughly others content (script, object) and export/import/use them.
- English Readme.txt
- Italian readme (Leggimi.txt)
This script file add 12 new custom functions!
I'll shortly introduce them (however pat_damage_rri file describes them before declaring):
- int GetHigherDamageProtection (object oTarget, int iResRedImm, int iType)
This function returns biggest iType amount of Damage Resistance/Reduction/Immunity on oTarget. oTarget is an item to search on.
- string GetHigherDmgMagicProtect (object oCreature, int iResRedImm, int iType, string sInfo)
This function returns informations about biggest iType of active Spell's Damage Resistance/Reduction/Immunity on oCreature.
- object GetNextItemEquipped (object oCreature)
Get the next item equipped by oCreature (continue to cycle through oCreature's equipment).
- object GetFirstItemEquipped (object oCreature)
Get the first item equipped by oCreature (start to cycle through oCreature's equipment).
- int GetEquipHigherDamageProtection (object oCreature, int iResRedImm, int iType)
This function returns biggest iType amount of Damage Resistance/Reduction/Immunity by searching in the equipped oCreature items.
- int GetInventHigherDamageProtection (object oCreature, int iResRedImm, int iType)
This function returns biggest iType amount of Damage Resistance/Reduction/Immunity by searching in the whole oCreature equipped and inventory items.
- int GetEquipHigherReductPower (object oCreature)
This function returns biggest equipped oCreature items amount of needed weapon power to overcome his Damage Reductions. (Ex: if PC has both 20/+3 and 10/+5 DR, the amount is +5!)
- int GetInventHigherReductPower (object oCreature)
This function returns biggest whole oCreature equipped and inventory item amount of needed weapon power to overcome his Damage Reductions. (Ex: if PC has both 20/+3 and 10/+5 DR, the amount is +5!)
- int GetHigherReductPower (object oTarget)
This function returns biggest oTarget amount of needed weapon power to overcome his Damage Reductions. oTarget is an item to search on. (Ex: if Item has both 20/+3 and 10/+5 DR, the amount is +5!)
- string GetEquipHDmgProtName (object oCreature, int iResRedImm, int iType)
This function returns the name of the item with biggest iType amount of Damage Resistance/Reduction/Immunity by searching in the equipped oCreature items.
- string GetInventHDmgProtName (object oCreature, int iResRedImm, int iType)
This function returns the name of the item with biggest iType amount of Damage Resistance/Reduction/Immunity by searching in the whole oCreature equipped and inventory items.
- effect EffectDamageOverProtection (int iDamageAmount, int iDamageType, int iDamagePower, object oCreature)
Create a Damage effect, same as DamageEffect() function, but overcoming oCreature Protections. (It could be considered the main custom function, but all other functions may be used stand alone, if you need)
The test module enclosed needs to let you do your wanted test with my scripts.
Ci sono casi in cui il builder/master ha bisogno che i PG perdano punti ferita, indipendentemente dalle loro protezioni!!
Non ho trovato nessuna soluzione di default di NWN che funzioni in questi casi... il terzo parametro della funzione standard "EffectDamage()" non funziona! Quindi ne ho creata una!
pat_damage_rri.zip contiene solo 4 file... ma il vero contenuto � il contenuto dei due file principali! :)
Quindi, brevemente, i quattro file sono:
- pat_damage_rri.erf: � il contenuto principale del file! Contiene il file di script che contiene tutti e 12 le nuove funzioni customizzate!
- pat_damage_rri.mod: un modulo di test completo per tutte le funzioni custom! Potete usarlo per implementare i vostri 2da, hak, ecc... e vedere se funziona ancora tutto correttamente. O potete sbirciare gli altri conenuti (script, oggetti) ed esportarli/importarli/usarli nei vostri moduli.
- Il Readme.txt in inglese.
- Il Leggimi.txt italiano.
Questo script aggiunge 12 nuove funzioni customizzate!
Ve le introdurr� brevemente (comunque il file pat_damage_rri le descrive prima di dichiararle):
- int GetHigherDamageProtection (object oTarget, int iResRedImm, int iType)
Questa funzione ritorna il pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType su oTarget. oTarget � un oggetto su cui cercare.
- string GetHigherDmgMagicProtect (object oCreature, int iResRedImm, int iType, string sInfo)
Questa funzione ritorna informazioni sul pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType procurate da incantesimi attivi su oCreature.
- object GetNextItemEquipped (object oCreature)
Ottiene l'oggetto successivo equipaggiato da oCreature (continua il ciclo tra l'equipaggiamento di oCreature).
- object GetFirstItemEquipped (object oCreature)
Ottiene il primo oggetto equipaggiato da oCreature (inizia il ciclo tra l'equipaggiamento di oCreature).
- int GetEquipHigherDamageProtection (object oCreature, int iResRedImm, int iType)
Questa funzione ritorna il pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType cercando nell'equipaggiamento di oCreature.
- int GetInventHigherDamageProtection (object oCreature, int iResRedImm, int iType)
Questa funzione ritorna il pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType cercando nell'intero inventario ed equipaggiamento di oCreature.
- int GetEquipHigherReductPower (object oCreature)
Questa funzione ritorna il pi� grande valore di potenza dell'arma utile per passare la Riduzione ai Danni data ad oCreature dal suo equipaggiamento. (Es: se il PG ha sia 20/+3 che 10/+5 in DR, il valore � +5!)
- int GetInventHigherReductPower (object oCreature)
Questa funzione ritorna il pi� grande valore di potenza dell'arma utile per passare la Riduzione ai Danni data ad oCreature dall'intero inventario ed equipaggiamento. (Es: se il PG ha sia 20/+3 che 10/+5 in DR, il valore � +5!)
- int GetHigherReductPower (object oTarget)
Questa funzione ritorna il pi� grande valore di potenza dell'arma utile a passare la Riduzione ai Danni di oTarget. oTarget � un oggetto su cui cercare. (Es: se l'oggetto ha sia 20/+3 che 10/+5 in DR, il valore � +5!)
- string GetEquipHDmgProtName (object oCreature, int iResRedImm, int iType)
Questa funzione ritorna il nome dell'oggetto col pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType cercando nell'equipaggiamento di oCreature.
- string GetInventHDmgProtName (object oCreature, int iResRedImm, int iType)
Questa funzione ritorna il nome dell'oggetto col pi� grande quantitativo di Resistenza/Riduzione/Immunit� al danno iType cercando nell'intero inventario ed equipaggiamento di oCreature.
- effect EffectDamageOverProtection (int iDamageAmount, int iDamageType, int iDamagePower, object oCreature)
Crea un effetto Danneggiamento, come la funzione DamageEffect(), ma superando le protezioni di oCreature. (Pu� essere considerata la funzione principale, ma tutte funzioni possono essere usate a se stanti, se necessario)
Il modulo di test allegato serve a permettervi di fare i vostri test con i miei script.
pat_damage_rri.zip contains 4 files:
- pat_damage_rri.erf: it conteins the script files that contains all 12 new custom functions.
- pat_damage_rri.mod: a complete test module.
- English Readme.txt.
- Italian readme (Leggimi.txt).
Sì però ho notato che, anche nelle altre entry che ho fatto... la gente scarica ma non vota e non commenta una cippa (tranne una richiesta di aiuto ogni tanto). -_-' _________________________ by Patcha -> my vaultages <-
Grazie per i voti!
Ma è vero che se ne piglio un altro entro sto mese finisco in TOP 10, o vale solo per i moduli? :D _________________________ by Patcha -> my vaultages <-
Posted by Cattaneo at 2007-02-11 15:45:15 Voted 10.00 on 02/11/07
Complimenti per l'ottimo lavoro Patcha!!!
Posted by magobargle at 2007-02-10 21:27:14 Voted 10.00 on 02/10/07
Just tested on the sub-water zones of my module "le isole del Dragone", (cep 1.68_ck) using various immunity/reduce items, to protect my PC from damage. (10Hp/round, cold, to simulate the drowning)
it works with no problem !
good, the readme (another true tutorial)
and very good, the little tutorial module: big tecnical contents, but easy (and funny)to understand.
it's funny, it works correctly and I've solved my problems, :-) ten !
------------------------------------------
Appena testato sulle zone subaquee del mio modulo "le isole del dragone" (cep 1.68_ck), usando vari oggetti per ridurre/immunizzare il mio Pg dal danno (10Pf/round da freddo, per simulare l'annegamento)
funziona senza broblemi!
buono il readme, che è un vero e proprio tutorial già di per sè, e molto buono il minimodulo tutorial, che ha grandi contenuti tecnici, ma è molto facile (e divertente)da capire
E' simpatico, funziona bene ed ho anche risolto il mio problema :-) dieci !
ENGLISH v.1.01
Fixed Minor Bug: if PG got 100% immunity, the script should switch to any of physical damage in witch the PG is not 100% immune.
With the 1.00 version, if the script was not "OnConversation" or "OnUsed", after switched the physical protections was not overcomed.
Now fixed.
ITALIANO v.1.01
Corretto Bug Minore: se il PG ha 100% di immunità, lo script dovrebbe riversare uno dei tipi di danni fisici nel quale il PG non è immune al 100%.
Con la versione 1.00, se lo script non era "OnConversation" o "OnUsed", dopo aver cambiato il tipo di danni le protezioni fisiche non venivano superate.
Ora è stato corretto. _________________________ by Patcha -> my vaultages <-