Hello All,
I have a script that generates random armor. What I'd like to do is apply a random color scheme and model to the armor. I've tried AddItemProperty(), but I can't figure out which ItemProperty function to use with the ITEM_APPR_ARMOR_XXX's.
Any idea's or am I going down the wrong path? I've done it before in NWN1, but it was a long time ago and I don't have the script anymore.
Thanks!
Set Item Color/Model
Débuté par
Veyth
, juil. 02 2011 04:29
#1
Posté 02 juillet 2011 - 04:29
#2
Posté 02 juillet 2011 - 09:43
I don't think those nwn1 functions work in nwn2. The vault has some item changing solutions, but I think that generally they spawn in new items rather than editing the ones you have.
Regards
Regards
#3
Posté 03 juillet 2011 - 12:09
Thanks for the reply. I looked in the vault and found that IPDyeArmor was included in "x2_inc_itemprop" so I included it and tried the following script
#include "x2_inc_itemprop"
void main()
{
int nArmor = -1;
int nHelmet = -1;
int nColor2 = -1;
string sArmorTemplate;
string sHelmetTemplate;
object oTarget = OBJECT_SELF;
object oArmor;
int nStackSize = 1;
int nColorType1 = ITEM_APPR_ARMOR_COLOR_METAL2;
nColor2 = Random(62)+1;
nArmor = Random(3)+1;
nHelmet = Random(6)+1;
switch(nArmor)
{
case 1:
sArmorTemplate = "nw_aarcl011";
break;
case 2:
sArmorTemplate = "nw_aarcl007";
break;
case 3:
sArmorTemplate = "nw_aarcl006";
break;
}
switch(nHelmet)
{
case 1:
sHelmetTemplate = "nw_arhe001";
break;
case 2:
sHelmetTemplate = "nw_arhe002";
break;
case 3:
sHelmetTemplate = "nw_arhe003";
break;
case 4:
sHelmetTemplate = "nw_arhe004";
break;
case 5:
sHelmetTemplate = "nw_arhe005";
break;
case 6:
sHelmetTemplate = "nw_arhe006";
break;
}
oArmor = CreateItemOnObject(sArmorTemplate, oTarget, nStackSize);
IPDyeArmor(oArmor,nColorType1,nColor2);
CreateItemOnObject(sHelmetTemplate, oTarget, nStackSize);
}
It compiles but the armor spawned is regular color. - sorry not sure how to create a window for scripts
#include "x2_inc_itemprop"
void main()
{
int nArmor = -1;
int nHelmet = -1;
int nColor2 = -1;
string sArmorTemplate;
string sHelmetTemplate;
object oTarget = OBJECT_SELF;
object oArmor;
int nStackSize = 1;
int nColorType1 = ITEM_APPR_ARMOR_COLOR_METAL2;
nColor2 = Random(62)+1;
nArmor = Random(3)+1;
nHelmet = Random(6)+1;
switch(nArmor)
{
case 1:
sArmorTemplate = "nw_aarcl011";
break;
case 2:
sArmorTemplate = "nw_aarcl007";
break;
case 3:
sArmorTemplate = "nw_aarcl006";
break;
}
switch(nHelmet)
{
case 1:
sHelmetTemplate = "nw_arhe001";
break;
case 2:
sHelmetTemplate = "nw_arhe002";
break;
case 3:
sHelmetTemplate = "nw_arhe003";
break;
case 4:
sHelmetTemplate = "nw_arhe004";
break;
case 5:
sHelmetTemplate = "nw_arhe005";
break;
case 6:
sHelmetTemplate = "nw_arhe006";
break;
}
oArmor = CreateItemOnObject(sArmorTemplate, oTarget, nStackSize);
IPDyeArmor(oArmor,nColorType1,nColor2);
CreateItemOnObject(sHelmetTemplate, oTarget, nStackSize);
}
It compiles but the armor spawned is regular color. - sorry not sure how to create a window for scripts
#4
Posté 03 juillet 2011 - 01:36
You can't on Bioware Social. Social is so awesome there's no need.Veyth wrote...
sorry not sure how to create a window for scripts
Also you can't dye. As Kaldor said you have to spawn new. Yes it's annoying that you can't dye like nwn1, but it is what it is.
#5
Posté 03 juillet 2011 - 02:27
ok thanks





Retour en haut






