Ok. I don't know how this works when you would try to use UT_AddItemToInventory to add a NON-Unique Armor/Weapon to your inventory but aren't unique items supposed to have a "constant" material type?
I tried to add another set of Warden Commander Armor set to my inventory using UT_AddItemToInventory. It worked but turns out the material type is different. The gloves and Boots are Steel and Chest-piece is Silverlite. How is this happening?
And secondly, is there a way around this? I checked out the UT_AddItemToInventory parameters and it doesn't have a an Item Material Type parameter. So is there any other function or something I could use and make sure the material type is 6 (Dragonbone).
To add with a Pre-defined Material Type?
Débuté par
Lykanthric_Aura
, juin 23 2010 04:39
#1
Posté 23 juin 2010 - 04:39
#2
Posté 23 juin 2010 - 05:53
Untested, but you could try something like :
object myArmor = UT_AddItemToInventory(R"myRessource.uti");
setItemMaterialType(myArmor, 6);
object myArmor = UT_AddItemToInventory(R"myRessource.uti");
setItemMaterialType(myArmor, 6);
#3
Posté 24 juin 2010 - 05:23
Nope, not working.
I: 10:45:08 - test.nss - The resource "test.nss" has been saved.
I: 10:45:08 - No modules to process. No XML files generated.
I: 10:45:08 - Generated the campaign file.
I: 10:45:07 - Compile failed
E: 10:45:07 - test.nss - test.nss(8): Undefined identifier (setItemMaterialType)
I: 10:45:07 - Compiling test.nss...
------------------------------------------------------------------------------------------------------------------
#include "utility_h"
void main()
{
object oArmor = UT_AddItemToInventory(R"gwb_im_acc_blt_sny.uti");
oArmor = UT_AddItemToInventory(R"gwb_im_arm_glv_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
oArmor = UT_AddItemToInventory(R"gwb_im_arm_bot_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
oArmor = UT_AddItemToInventory(R"gwb_im_arm_cht_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
}
EDIT --
Ok. I found a topic.
http://social.biowar.../index/209482/1
In this we are changing the material type of the items we have in the inventory. Could I perhaps make a similar script which changes the material type of items by tag?
This could also work for adding NON-Unique items. So that after running the above(or similar) script, one can run another script that changes material type of certain items added by the above script by searching for a item tag?
EDIT ---
void main()
{
object [] GetItemsInInventory
(
object xxxxxxxxxxx,
string sTagFilter="gwb_im_arm_glv_mas_wcm.uti",
)
SetItemMaterialType(oArmor,6)
}
Can this be used somehow? Although this one wont compile.
What exactly am I supposed to use for the object ? The red part.
-----------------------------------------------------------------------
I: 11:32:23 - changemattype.nss - The resource "changemattype.nss" has been saved.
I: 11:32:23 - No modules to process. No XML files generated.
I: 11:32:23 - Generated the campaign file.
I: 11:32:22 - Compile failed
E: 11:32:22 - changemattype.nss - changemattype.nss(5): Parsing variable list
I: 11:32:22 - Compiling changemattype.nss...
------------------------------------------------------------------------
I: 10:45:08 - test.nss - The resource "test.nss" has been saved.
I: 10:45:08 - No modules to process. No XML files generated.
I: 10:45:08 - Generated the campaign file.
I: 10:45:07 - Compile failed
E: 10:45:07 - test.nss - test.nss(8): Undefined identifier (setItemMaterialType)
I: 10:45:07 - Compiling test.nss...
------------------------------------------------------------------------------------------------------------------
#include "utility_h"
void main()
{
object oArmor = UT_AddItemToInventory(R"gwb_im_acc_blt_sny.uti");
oArmor = UT_AddItemToInventory(R"gwb_im_arm_glv_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
oArmor = UT_AddItemToInventory(R"gwb_im_arm_bot_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
oArmor = UT_AddItemToInventory(R"gwb_im_arm_cht_mas_wcm.uti");
setItemMaterialType(oArmor, 6);
}
EDIT --
Ok. I found a topic.
http://social.biowar.../index/209482/1
In this we are changing the material type of the items we have in the inventory. Could I perhaps make a similar script which changes the material type of items by tag?
This could also work for adding NON-Unique items. So that after running the above(or similar) script, one can run another script that changes material type of certain items added by the above script by searching for a item tag?
EDIT ---
void main()
{
object [] GetItemsInInventory
(
object xxxxxxxxxxx,
string sTagFilter="gwb_im_arm_glv_mas_wcm.uti",
)
SetItemMaterialType(oArmor,6)
}
Can this be used somehow? Although this one wont compile.
What exactly am I supposed to use for the object ? The red part.
-----------------------------------------------------------------------
I: 11:32:23 - changemattype.nss - The resource "changemattype.nss" has been saved.
I: 11:32:23 - No modules to process. No XML files generated.
I: 11:32:23 - Generated the campaign file.
I: 11:32:22 - Compile failed
E: 11:32:22 - changemattype.nss - changemattype.nss(5): Parsing variable list
I: 11:32:22 - Compiling changemattype.nss...
------------------------------------------------------------------------
Modifié par Lykanthric_Aura, 24 juin 2010 - 06:06 .
#4
Posté 24 juin 2010 - 11:54
That's because it's SetItemMaterialType with a capital S, you got it right in the second example. And this time I tested with a pair of daggers and it worked.
For your second question, I suppose GetHero() would work.
For your second question, I suppose GetHero() would work.
#5
Posté 25 juin 2010 - 04:04
Oh..Dint know this stuff was case sensitive. Thanks ! That's all.





Retour en haut






