Ok I'm trying to make a SetItemInfitine, to do that I'm trying to find
the SetItemDroppable code.
Looking at the data, there is a
SAVEGAME_ITEM_DROPPABLE of UINT8 that is either 1 or 0 (drops or
doesnt).
Now I've tried different SetLocalInt(oItems[nCounts],
"SAVEGAME_ITEM_DROPPABLE", 0); and they don't work.
So if anyone
knows how where I could find the actual code in SetItemDroppable, please
let me know.
Edit: I guess what I'm asking is how do I access
that piece of information via code?
[Help] SetItemDroppable - Where is the code for it? / Making SetItemInfinite
Débuté par
KigenBarzhad
, avril 10 2010 01:21
#1
Posté 10 avril 2010 - 01:21
#2
Posté 10 avril 2010 - 06:09
I'm not quite clear whether you're trying to change a saved game, or write a script?
If the latter, it would be something like
If the latter, it would be something like
object oItem = GetObjectByTag("put_tag_of_item_here");
if (IsItemDroppable(oItem))
SetItemDroppable(oItem, FALSE);
#3
Posté 10 avril 2010 - 06:39
I'm trying to figure out the way that the scripting command SetItemDroppable works. Look at the save game, I realize it must edit the SAVEGAME_ITEM_DROPPABLE uint8 of the save game.
How it edits the property, I don't know.
How it edits the property, I don't know.
#4
Posté 11 avril 2010 - 08:14
I'm not sure how knowing this will help you?
SetItemDroppable is an engine function IIRC, which toggles the item property in memory.
We can't see inside the engine, but Save Game might well be an entirely separate event which copies the item properties in memory to a legible file format.
So I wouldn't expect to be able to edit save game variables with a script.
If you open an item in the object inspector, then examine the variables list, you can see all the item variables that scripting can touch. We know this list is complete, because scripting isn't allowed to change a variable unless it's pre-defined in that 2DA table.
SetItemDroppable is an engine function IIRC, which toggles the item property in memory.
We can't see inside the engine, but Save Game might well be an entirely separate event which copies the item properties in memory to a legible file format.
So I wouldn't expect to be able to edit save game variables with a script.
If you open an item in the object inspector, then examine the variables list, you can see all the item variables that scripting can touch. We know this list is complete, because scripting isn't allowed to change a variable unless it's pre-defined in that 2DA table.
#5
Posté 11 avril 2010 - 10:05
Incidentally, the "infinite" property only applies to merchant inventories. AFAIK there's no way to read or write it by scripting.





Retour en haut






