NWN SCRIPTS- Jump to comments -
| Title | RiffRaff's Item Set System v4.0 | | Author | RiffRaff | | Submitted / Updated | 07-07-2006 / 11-22-2006 | | Category | Scripting routines | | Expansions | HOTU-1.67 | | View Code | Select All Text | View Code in separate window | | Format | Module and Code | | Type | Type - Other | | Includes | Custom | | Description | An item set is a group of items that alone are weak, but combined together they become very strong.
Example: Let's say you are a paladin and you are seeking ancient artifacts. A +2 Sword of Paladine, a +2 Shield of Aegis, and a +2 Cloak of Lawfulness. If these items are used alone individually, they are all +2. If you have the sword and the shield, they are both +3 and if you have all 3, they are all +4 each.
This system allows for the easy creation of item sets. |  |
Files |
|
|
Posted by maddogfargo at 2009-04-14 16:29:07 Voted 10.00 on 03/25/09
| Hm...something's not working when I import these into my CEP 2.2 mod. The standalone mod works fine. Tagged scripts fire fine on the apropriate events. I've tested that thoroughlly. And I even copied the include, SA script and SA items from the working mod to mine to test. The script fires because I can see it removing the wings off my RDD, but it never adds the bonuses to the set items.
Anyone have any ideas/thoughts? |
Posted by maddogfargo at 2009-03-25 19:52:03 Voted 10.00 on 03/25/09
| This is an OUTSTANDING set item system. After reading the docs and looking at the scripts I'm very impressed. It's clean, highly customizable, well documented and EXACTLY what I was looking for! I honestly can't think of ANYTHING more I'd like it to do.
As for appearances...nah leave it. As Scarface says, that's what subraces are for. :)
Fantastic work RiffRaff! |
Posted by Fleshmelter at 2009-03-09 03:12:10 Voted 10.00 on 03/09/09
| How I missed this I will never know...just awesome! _________________________ PW Action Server:
| Chaosgate |
|
Posted by riffraff at 2007-03-24 21:15:58 | No credit needed Thaladar, I'm just glad you like it! Lemme know if you have any problems. _________________________ My Submissions |
Posted by Thaladar9 at 2007-03-06 17:03:38 Voted 10.00 on 03/06/07
| wow. I voted 10 right away! I cant wait to see your other submissions. I plan on implementing it when I get the chance. If i use this in my PW, how do you want credit? _________________________ Check out Farcrown Arena, a full awesome Capture-the-Flag arena module for download! Host it and watch the forces collide! :D
Link |
Posted by DarkStar at 2006-09-25 13:41:58 Voted 10.00 on 09/25/06
| | Nicely done. Road pointed me here to take a look at the script. Very immpressive, and kept simple; which is always nice. I am not sure why more PWs aren't using this. Keep up the good work. |
Posted by Menoh at 2006-08-07 17:55:47 Voted 10.00 on 08/03/06
| | crap, could i send you what I have so you can see what maybe I'm doing wrong? |
Posted by Menoh at 2006-08-07 17:54:49 Voted 10.00 on 08/03/06
| [nwscript]
const int AURA_DEATH = 1;
const int AURA_HEAL = 2;
const int AURA_STR = 3;
const int AURA_CON = 4;
const int AURA_ATT = 5;
const int AURA_DIVINE = 6;
const int AURA_ICE = 7;
const int AURA_LIT = 8;
const int AURA_ACID = 9;
#include "x2_inc_switches"
#include "rr_cepv2wings"
// iPowerType / i* / iSubType
// ITEM_PROPERTY_ABILITY_BONUS / Points / ABILITY_*
// ITEM_PROPERTY_AC_BONUS / Points / NA
// ITEM_PROPERTY_ATTACK_BONUS / Points / NA
// ITEM_PROPERTY_BONUS_FEAT / IP_CONST_FEAT_* / NA
// ITEM_PROPERTY_CAST_SPELL / IP_CONST_CASTSPELL_NUMUSES_* / IP_CONST_CASTSPELL_*
// ITEM_PROPERTY_DAMAGE_BONUS / IP_CONST_DAMAGEBONUS_* / IP_CONST_DAMAGETYPE_*
// ITEM_PROPERTY_DAMAGE_REDUCTION / IP_CONST_DAMAGEREDUCTION_* / IP_CONST_DAMAGESOAK_*
// ITEM_PROPERTY_DAMAGE_RESISTANCE / IP_CONST_DAMAGERESIST_* / IP_CONST_DAMAGETYPE_*
// ITEM_PROPERTY_DARKVISION / 1/0 (Y/N) / NA
// ITEM_PROPERTY_ENHANCEMENT_BONUS / Points / NA
// ITEM_PROPERTY_FREEDOM_OF_MOVEMENT / 1/0 (Y/N) / NA
// ITEM_PROPERTY_HASTE / 1/0 (Y/N) / NA
// ITEM_PROPERTY_HOLY_AVENGER / 1/0 (Y/N) / NA
// ITEM_PROPERTY_IMMUNITY_MISCELLANEOUS / IP_CONST_IMMUNITYMISC_* / NA
// ITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL / IP_CONST_IMMUNITYSPELL_* / NA
// ITEM_PROPERTY_IMPROVED_EVASION / 1/0 (Y/N) / NA
// ITEM_PROPERTY_KEEN / 1/0 (Y/N) / NA
// ITEM_PROPERTY_LIGHT / IP_CONST_LIGHTBRIGHTNESS_* / IP_CONST_LIGHTCOLOR_*
// ITEM_PROPERTY_MASSIVE_CRITICALS / IP_CONST_DAMAGEBONUS_* / NA
// ITEM_PROPERTY_MIGHTY / Points / NA
// ITEM_PROPERTY_REGENERATION / Points / NA
// ITEM_PROPERTY_REGENERATION_VAMPIRIC / Points / NA
// ITEM_PROPERTY_SAVING_THROW_BONUS / Points / IP_CONST_SAVEBASETYPE_*
// ITEM_PROPERTY_SKILL_BONUS / Points / SKILL_*
// ITEM_PROPERTY_SPELL_RESISTANCE / IP_CONST_SPELLRESISTANCEBONUS_* / NA
// ITEM_PROPERTY_TRUE_SEEING / 1/0 (Y/N) / NA
// ITEM_PROPERTY_VISUALEFFECT / 1/0 (Y/N) / ITEM_VISUAL_*
// ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE / IP_CONST_DAMAGEIMMUNITY_* / IP_CONST_DAMAGETYPE_*
void AddPower(int iPowerType, object oPC, object oItem, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13, int iSubType);
// EFFECT_TYPE_CONCEALMENT
// EFFECT_TYPE_MOVEMENT_SPEED_INCREASE
// EFFECT_TYPE_ULTRAVISION
// EFFECT_TYPE_VISUALEFFECT
void AddPowerToPC(int iPowerType, object oPC, object oItem, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13);
// Damage / heal aura values:
// DC10 - 1, 2
// DC20 - 3, 4
// DC30 - 5, 6
// DC40 - 7, 8, 9, 10, 11, 12, 13
// All damage is d4()
//
// For Elemental Auras:
// 1 = 1 / 2 = 2 / 3 = 1d4
// 4 = 1d6 / 5 = 1d8 / 6 = 2d4
// 7 = 1d10 / 8 = 1d12 / 9 = 2d6
// 10 = 2d8 / 11 = 2d10 / 12 = 2d12
// 13 = 2
//
// AURA_DEATH - Drains life from enemies/neutrals and gives it to you
// AURA_HEAL - Heals your friends and damages undead
// AURA_STR - Gives a strength bonus to friends
// AURA_CON - Gives a constitution bonus to friends
// AURA_ATT - Gives an attack bonus to friends
// AURA_DIVINE - Gives friends extra divine damage on their weapon
// AURA_ICE - Gives friends extra ice damage on their weapon
// AURA_LIT - Gives friends extra electrical damage on their weapon
// AURA_ACID - Gives friends extra acid damage on their weapon
void AddAuraToPC(int iPowerType, object oPC, object oItem, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13);
// CREATURE_WING_TYPE_ANGEL
// CREATURE_WING_TYPE_BAT
// CREATURE_WING_TYPE_BIRD
// CREATURE_WING_TYPE_BUTTERFLY
// CREATURE_WING_TYPE_DEMON
// CREATURE_WING_TYPE_DRAGON
// CREATURE_WING_TYPE_NONE
// * cep 2.0 wings can also be used here
void AddWingsToPC(int iPowerType, object oPC, object oItem, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13);
void ItemSet();
void RecalculatePowers(object oPC);
void RemoveAllItemSetProperties();
int GetNumberOfSetItems(string sSet, object oPC);
string GetItemSet(object oItem);
void RemoveAllTempIPs(object oItem);
void RemoveAllEffectsByCreator(object oPC, object oItem);
void RemoveAllItemSetProperties()
{
object oItem = GetPCItemLastEquipped();
object oPC = GetPCItemLastEquippedBy();
if (GetUserDefinedItemEventNumber() == X2_ITEM_EVENT_UNEQUIP)
{
oItem = GetPCItemLastUnequipped();
oPC = GetPCItemLastUnequippedBy();
DelayCommand(0.1f, RemoveAllTempIPs(oItem));
DelayCommand(0.1f, RemoveAllEffectsByCreator(oPC, oItem));
}
string sSet = GetItemSet(oItem);
int i;
for(i=0;i |
Posted by riffraff at 2006-08-06 17:02:03 | case INVENTORY_SLOT_ARMS:
// Valid values are IP_CONST_DAMAGEIMMUNITY_5_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_75_PERCENT, IP_CONST_DAMAGEIMMUNITY_90_PERCENT, IP_CONST_DAMAGEIMMUNITY_100_PERCENT
AddPower(ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE, oPC, oItem, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGETYPE_SLASHING);
AddPower(ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE, oPC, oItem, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGETYPE_PIERCING);
AddPower(ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE, oPC, oItem, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_10_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_25_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGEIMMUNITY_50_PERCENT, IP_CONST_DAMAGETYPE_BLUDGEONING);
break;
_________________________ My Submissions |
Posted by Menoh at 2006-08-06 15:06:06 Voted 10.00 on 08/03/06
| | Changing the immune up to 50 at the end with slashing, piercing, and bludgeoning. |
Posted by riffraff at 2006-08-06 04:43:32 | What types of modifications are you making? _________________________ My Submissions |
Posted by Menoh at 2006-08-05 10:57:18 Voted 10.00 on 08/03/06
| | Right on, thanks man! I dled it and was trying to modify it but now it seems that nothing is working at all?? I'm also wondering is there a cap for the immunity? If I modify it at all it says that it's defined without a damage type. |
Posted by riffraff at 2006-08-04 04:42:56 | I made a special file for you in the downloads section, check it out Menoh. _________________________ My Submissions |
Posted by Menoh at 2006-08-03 19:54:47 Voted 10.00 on 08/03/06
| Here's what I have and I'm still getting the error.
case ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE:
AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyDamageImmunity(iSubType, i), oItem, 38400.0f);
return; |
Posted by riffraff at 2006-08-03 19:40:37 | Your case should be:
case ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE: _________________________ My Submissions |
Posted by Menoh at 2006-08-03 17:36:35 Voted 10.00 on 08/03/06
| So I put that in there and it says "ERROR: CASE PARAMETER NOT A CONSTANT INTEGER".
I also tried
case ITEM_PROPERTY_DAMAGE_IMMUNITY:
AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyDamageImmunity(iSubType, i), oItem, 38400.0f);
return;
Then in when calling it for an item I have
AddPower(ITEM_PROPERTY_DAMAGE_IMMUNITY, oPC, oItem, IP_CONST_DAMAGEIMMUNITY_10, IP_CONST_DAMAGETYPE_SLASHING)
Extending it out 13 times over a progression of course. |
Posted by riffraff at 2006-08-03 16:59:50 | Add this line:
case INVENTORY_SLOT_ARMS:
break;
in the slot list and you can do guantlets.
To add Damage immunity, go to the AddPower function in rr_itemsets and add a line like this:
case ITEM_PROPERTY_IMMUNITY_DAMAGE_TYPE:
AddItemProperty(DURATION_TYPE_TEMPORARY, ItemPropertyDamageImmunity(iSubType, i), oItem, 38400.0f);
return; _________________________ My Submissions |
Posted by Menoh at 2006-08-03 09:49:34 Voted 10.00 on 08/03/06
| | Just adding that this is a great set of scripting. This is the first bit of scripting that I've ever tried to impliment (mostly by playing with it), the notes are great and the read me really helps. |
Posted by Menoh at 2006-08-02 20:45:43 Voted 10.00 on 08/03/06
| | Ok, so I dled everything and have been testing the stuff here. The only thing that I noticed is that there's not a way to add anything to the bracers slot and there's no way to add Damage Immunity. I don't know enough to add it myself so could someone please help me out? |
Posted by Menoh at 2006-08-02 09:09:54 Voted 10.00 on 08/03/06
| | Ok, time for noobishness to be totally revieled. I've been trying to get this scripting down for a while now and I guess I'm just not getting it. Could you post like a "tutorail" as to how to implement this script? Like what goes where and so on? I would really appreciate it. Thanks. |
Posted by RoadWyrm at 2006-07-17 08:42:52 Voted 10.00
| | Yeah, Im usually sweating blood by the time I type in "Great work!"..Har! |
Posted by RoadWyrm at 2006-07-12 22:02:04 Voted 10.00
| This goes beyond the average set scripts. I think many moduals would do well to have this as an addition to their "special items".
It is somewhat shocking to me that there are only 3 votes in on this...doesnt anyone else here vote? |
Posted by riffraff at 2006-07-10 04:48:29 | For the problem of specific slot issues, try code like this in the config file:
case INVENTORY_SLOT_LEFTRING:
if (GetResRef(oItem) == "rr_pl_r_ring")
{
SendMessageToPC(oPC, "This ring only works on your right hand");
DelayCommand(0.5f, AssignCommand(oPC, ClearAllActions(TRUE)));
DelayCommand(0.5f, AssignCommand(oPC, ActionUnequipItem(oItem)));
} else AddPower...
break; _________________________ My Submissions |
Posted by riffraff at 2006-07-09 16:39:33 | I'm pretty sure I'm done. I was thinking about appearance changes, but it could mess up the wings. I think I'm gonna quit while im ahead... At least for this weekend! ;) _________________________ My Submissions |
Posted by riffraff at 2006-07-09 10:29:19 | This is the correct prototype comment for addauratopc:
// Damage / heal aura values:
// DC10 - 1, 2
// DC20 - 3, 4
// DC30 - 5, 6
// DC40 - 7, 8, 9, 10, 11, 12, 13
// All damage is d4()
//
// For Elemental Auras:
// 1 = 1 / 2 = 2 / 3 = 1d4
// 4 = 1d6 / 5 = 1d8 / 6 = 2d4
// 7 = 1d10 / 8 = 1d12 / 9 = 2d6
// 10 = 2d8 / 11 = 2d10 / 12 = 2d12
// 13 = 2
//
// AURA_DEATH - Drains life from enemies/neutrals and gives it to you
// AURA_HEAL - Heals your friends and damages undead
// AURA_STR - Gives a strength bonus to friends
// AURA_CON - Gives a constitution bonus to friends
// AURA_ATT - Gives an attack bonus to friends
// AURA_DIVINE - Gives friends extra divine damage on their weapon
// AURA_ICE - Gives friends extra ice damage on their weapon
// AURA_LIT - Gives friends extra electrical damage on their weapon
// AURA_ACID - Gives friends extra acid damage on their weapon
void AddAuraToPC(int iPowerType, object oPC, object oItem, int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i9, int i10, int i11, int i12, int i13); _________________________ My Submissions |
Posted by riffraff at 2006-07-09 10:28:27 | Good idea Wyrm... Looks like there is gonna be a version 4 :) _________________________ My Submissions |
You must be Logged In to post comments in this section.
|