Handling Inventory Items

Post » Sun May 18, 2014 10:24 am

Test Function for printing info to log. (Uses another Function I wrote called print which allows me to prefix lines and indent based on the int passed in.)

Spoiler
Function Armor_Addon_Info(Armor _armor_)    Int Num = _armor_.GetNumArmorAddons()    Int Index = 0    ArmorAddon AA    String AAMP_M_FP    String AAMP_F_FP    String AAMP_M    String AAMP_F    Race AARace    int RNum    int Rdex    String Races    While Index < Num        AA          = _armor_.GetNthArmorAddon(Index)        AAMP_M_FP   = AA.GetModelPath(true,false)        AAMP_F_FP   = AA.GetModelPath(true,true)        AAMP_M      = AA.GetModelPath(false,false)        AAMP_F      = AA.GetModelPath(false,true)        int AAslotmask     = AA.GetSlotMask()        RNum = AA.GetNumAdditionalRaces()        Rdex = 0        Races = ""        While Rdex < RNum            Races += "" + AA.GetNthAdditionalRace(Rdex) + ", "            Rdex += 1        Endwhile        Print("Armor Addon: " + AA, 3)        Print("Male First Person: " + AAMP_M_FP, 4)        Print("Female First Person: " + AAMP_F_FP, 4)        Print("Male: " + AAMP_M, 4)        Print("Female: " + AAMP_M, 4)        Print("Races: " + Races, 4)        Slot_Mask_Info(AAslotmask, 1)        Index += 1    EndWhileEndFunction

This is the output for Forsworn Headdress:

Spoiler

[04/24/2014 - 09:59:17PM] [t] (TZ) Item: Forsworn Headdress ID: 888146[Armor < (000D8D52)>]
[04/24/2014 - 09:59:17PM] [t] (TZ) TypeCode: 26--Armor
[04/24/2014 - 09:59:18PM] [t] (TZ) Slots: (42) circlet, (31) hair, [0]
[04/24/2014 - 09:59:18PM] [t] (TZ) AR: 12 Weight Class: Light
[04/24/2014 - 09:59:18PM] [t] (TZ) Model Path (Male:) Clothes\ForswornArmor\ForswornHelmetGO.nif (Female:)
[04/24/2014 - 09:59:18PM] [t] (TZ) Keywords: 4
[04/24/2014 - 09:59:18PM] [t] (TZ) (0) ArmorLight
[04/24/2014 - 09:59:18PM] [t] (TZ) (1) ArmorMaterialForsworn
[04/24/2014 - 09:59:18PM] [t] (TZ) (2) ArmorHelmet
[04/24/2014 - 09:59:18PM] [t] (TZ) (3) VendorItemArmor
[04/24/2014 - 09:59:18PM] [t] (TZ) Armor Addon: [ArmorAddon < (000D8D51)>]
[04/24/2014 - 09:59:18PM] [t] (TZ) Male First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Female First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Male: Clothes\ForswornArmor\ForswornHelmet_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Female: Clothes\ForswornArmor\ForswornHelmet_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Races: [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ], [Race ],
[04/24/2014 - 09:59:18PM] [t] (TZ) Slots: (43) ears, (41) long hair, (31) hair, [0]
[04/24/2014 - 09:59:18PM] [t] (TZ) Armor Addon: [ArmorAddon < (000F44C3)>]
[04/24/2014 - 09:59:18PM] [t] (TZ) Male First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Female First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Male: Clothes\ForswornArmor\ForswornHelmet_Khaj_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Female: Clothes\ForswornArmor\ForswornHelmet_Khaj_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Races: [Race ],
[04/24/2014 - 09:59:18PM] [t] (TZ) Slots: (41) long hair, (31) hair, [0]
[04/24/2014 - 09:59:18PM] [t] (TZ) Armor Addon: [ArmorAddon < (000F44C5)>]
[04/24/2014 - 09:59:18PM] [t] (TZ) Male First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Female First Person:
[04/24/2014 - 09:59:18PM] [t] (TZ) Male: Clothes\ForswornArmor\ForswornHelmet_Arg_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Female: Clothes\ForswornArmor\ForswornHelmet_Arg_1.nif
[04/24/2014 - 09:59:18PM] [t] (TZ) Races: [Race ],
[04/24/2014 - 09:59:18PM] [t] (TZ) Slots: (41) long hair, (31) hair, [0]

The issue stands that we cannot attach Armor Addons with scripting in run time. But these are outlying cases and will not be the norm. I think the easiest solution is to solve for player race. For example, if the player where a Khajiit in the case of the Forsworn Headdress simply make the cloned armor for the Khajiit. I intend for Hallowed Items to have no value and no vendor keywords.

User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am

Post » Sun May 18, 2014 8:45 am

Ignore everything I said about Tempering Recipes. I recently found http://www.creationkit.com/ConstructibleObject_Script Functions.

The only thing that can't be set through scripts is match conditions. It appears that these don't need to be changed.

User avatar
Haley Cooper
 
Posts: 3490
Joined: Wed Jun 14, 2006 11:30 am

Post » Sun May 18, 2014 1:59 pm

Bah! As far I can tell there is no way to locate the Temepring Recipe for a given weapon or armor through scripting.

User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm

Post » Sun May 18, 2014 1:56 am

I was trying to figure that out earlier. If you don't mind needing patches or requiring a skyproc patch, then there is a rather slow way to go about it. Basically you create either a list or a container with all the recipes you want to look at. Then when you want to get a tempering recipe you walk the list or container of recipes until you find the one that includes what you want. You could determine if it a temper recipe versus a normal one by looking at where the recipe is being used. All armor and weapons, are made at the forge.

User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Sun May 18, 2014 12:35 pm

Yeah

Yeah. I had considered that. Probably best to iterate over a form list, but the problem lies in having to patch for other mods. I was attempting to avoid with that scripting.

User avatar
Rob
 
Posts: 3448
Joined: Fri Jul 13, 2007 12:26 am

Post » Sat May 17, 2014 10:58 pm

Oh I'm facing the exact same problem. It's why I plan on offering a couple different version. The first would only need the use a skyproc patch to fill the container with all the recipes. The second would need to be patched, since it would involve creating the formlist or filling the container in the ck. The biggest problem with using formlists is the fact that the size of the list is limited. Chesko made a nice set of arrays and array functions that can technically allow for any size, although setup can be a little annoying. You might be able to create something that trains (like what general stores does) the list so that new items can be included.

User avatar
Kayla Bee
 
Posts: 3349
Joined: Fri Aug 24, 2007 5:34 pm

Post » Sun May 18, 2014 5:02 am

Training the list would still require patches. I just checked Immersive Armors, they don't have form lists to grab nor do they have a test cell with a container filled with items. If they did, I wouldn't need a patch I could just check to see if Immersive Armors was installed and then grab those references on startup. That would still require planning for other mods which is basically the same thing as patching.

I just wanna write a mod that doesn't conflict and doesn't need to know specific information about the existence to of other mods. :cry:

I do however appreciate you ideas and the time you took to respond. :D

User avatar
jessica sonny
 
Posts: 3531
Joined: Thu Nov 02, 2006 6:27 pm

Post » Sun May 18, 2014 12:37 am

What exactly are you trying to do, maybe we could through ideas back and forth. When I meant training I meant some way of adding the armor to an array/ container/ formlist using some mechanic in game. So in the case of the sorters, it was trained by placing the items in a container, and then having those items added to a formlist.

User avatar
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Sun May 18, 2014 7:07 am

I understand what you meant. I have looked at the General Stores code. I posted code in this thread that uses the training method in sorting. I don't know what I said to misrepresent training though.

I have stated my intentions in this thread starting at http://www.gamesas.com/topic/1498760-handling-inventory-items/page-2#entry23596212.

In short, I am trying to make armor that looks like one and has the stats of the other. Both objects have to use the same slots though.

Edit: -- through scripting and without requiring patches. If I have to require patches then I might as well just make one for myself and forget the community, because that would simply involved too much maintenance.

Edit Again: I was frustrated at hitting a wall. I am avoiding the tempering recipe issue. Hallowed Items will be tempered with a special item, Hallowed Stone. The justification is the Hallowing itself. I will have to come up with a method of scaling the item count based on the armor value of the item, so it's affordable at low levels and it's not cheaper than tempering "regular" items.

User avatar
P PoLlo
 
Posts: 3408
Joined: Wed Oct 31, 2007 10:05 am

Post » Sun May 18, 2014 6:36 am

Seeing as how Hallowed is a prefix for enchanted weapons that turn undead, I have to find a new name for my project. I can't seem to find a simple word to fit the meaning and have multiple forms (ie: Hallowed to describe the result and Hallowing to describe the act.).

Edit: To describe in lore terms my project using the word Bond to replace Hallow: Bonded Smithing, the bonding of two items, one for appearance and one for quality, to form a new item. The new item is also bonded to the one who sought it's creation. A buyer can only have so many bonds, but bonded items can be rebound anew. Bonded items share their quality and appearance. Having multiple items of the same bonding is possible, but when a one is rebound it's twins are also rebound. Bonded items can be tempered and enchanted individually. Tempering requires a number of bonding stones, depending upon the quality of the item.

Anyone have a better word?

User avatar
Katharine Newton
 
Posts: 3318
Joined: Tue Jun 13, 2006 12:33 pm

Post » Sun May 18, 2014 3:32 am

Tempering requires the material key words to allow for the smithing perks. This makes the tempering with the transmogrify concept pretty much impossible without affecting existing base items that would be distributed to NPCs.

Edit: I am pretty much done with the whole transmogrify concept. It's not worth it for players to use it. Those who like to invest in smithing are not going to like not being able to improve their items.

I would have really like to work out some lore-friendly/balanced method, but it's simply not possible. While I have learned a deal more about weapons and armors, this certainly feels like a colossal waste of my time.

User avatar
Trevi
 
Posts: 3404
Joined: Fri Apr 06, 2007 8:26 pm

Previous

Return to V - Skyrim