I would like to find a way to determine which material an item (like weapons and armor) are made out of such as adamantine, darksteel, etc.
There isn't a function made for this already.
According to some document I found somewhere, something called Bioware Aurora Item Format , there a number of item properties defined in a struct such as "AddCost", "BaseItem", "Charges", etc.
Is there any way to access this information from this struct? If so, I bet "Material" is one of the new ones in NWN2.
Item Structs (Materials)
Débuté par
CrawBird
, juin 14 2011 07:50
#1
Posté 14 juin 2011 - 07:50
#2
Posté 14 juin 2011 - 09:14
I don't know why it doesn't come up in ScriptAssist like SetItemBaseMaterialType does, but GetItemBaseMaterialType is defined.
#3
Posté 14 juin 2011 - 11:32
Wow, that's great; thanks!
I actually had another question that I thought would be answered by instructions of how to uses item structs: I may want to start making scripts that change an item's appearance and color. Is that best done as a struct thing or should I be relying on "CopyItemAndModify"?
I actually had another question that I thought would be answered by instructions of how to uses item structs: I may want to start making scripts that change an item's appearance and color. Is that best done as a struct thing or should I be relying on "CopyItemAndModify"?
#4
Posté 15 juin 2011 - 12:09
I'm honestly not sure if this applies to NWN2 but in NWN1 the vector data type/struct is the only one that you can pull public data from with the "." operator. For the other datatypes you are limited to whatever functions are available, to get the info you need. So yes you will probably be using "CopyItemAndModify" or similar functions.
Modifié par GhostOfGod, 15 juin 2011 - 12:48 .
#5
Posté 15 juin 2011 - 05:32
CrawBird wrote...
I would like to find a way to determine which material an item (like weapons and armor) are made out of such as adamantine, darksteel, etc.
There isn't a function made for this already.
According to some document I found somewhere, something called Bioware Aurora Item Format , there a number of item properties defined in a struct such as "AddCost", "BaseItem", "Charges", etc.
Is there any way to access this information from this struct? If so, I bet "Material" is one of the new ones in NWN2.
You already know how to get material.
you can't reach AddCost because it's just one parameter in the item value calculations.
but you can reach BaseItem. GetBaseItemType() and charges can also be reached with a similar function GetItemCharges() or something like that i don't have the toolset nearby, but I know it's there.
#6
Posté 16 juin 2011 - 11:52
Being able to access the internals of structures like itemproperties and locations would be pretty handy, but I don't think it's possible. I didn't even know GetItemBaseMaterialType existed, though - I was using tags and local ints - so thank for that! ;-)
#7
Posté 16 juin 2011 - 10:50
Yeah, I'm pretty sure this has come up before. I just found a (cached, for now) thread from nwn2forums.bioware.com started by Lance Botelle called "GetItemBaseMaterialType (v1.23 function) - Do I need an include file for this?" He notes that GetItemBaseMaterialType does not come up in ScriptAssist.
Grinning Fool does identify it as working (and I think experience supports this) but confirms that it doesn't appear in Script Assist. In situations like this when I know something should be defined but can't find where, I usually turn to the CSL lookup, as I linked above.
Grinning Fool does identify it as working (and I think experience supports this) but confirms that it doesn't appear in Script Assist. In situations like this when I know something should be defined but can't find where, I usually turn to the CSL lookup, as I linked above.
Modifié par MasterChanger, 16 juin 2011 - 10:50 .
#8
Posté 16 juin 2011 - 11:21
I've just put it in my Rust Monster logic, and it seems to be working just fine - as far as I can tell. It certainly compiles OK, anyway.
#9
Posté 17 juin 2011 - 05:29
Speaking of SetItemCharges (which we weren't) - is there a way to reset per day usage of an item, apart from having the player rest? SetItemCharges only seems to work for items with a fixed number of charges, rather than charges per day. I could destroy the item and recreate it from a blueprint, but that would remove it from its hotbar slot.
#10
Posté 19 juin 2011 - 01:26
Not that I know of, at least off the top of my head.





Retour en haut






