Jump to content

mort1111

Members
  • Posts

    3
  • Joined

  • Last visited

Nexus Mods Profile

About mort1111

mort1111's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I managed to get it working, thanks for the pointers. Below is the function to handle it. I added all components to the AllComponents array and set the ModKeyword to ObjectTypeLooseMod. Seems to work just need to give it a lot more testing as while debugging I managed to loose 2 mods as they went in one side and did not come out the other. Component[] Property AllComponents auto keyword Property ModKeyword auto int function GetItemType(ObjectReference itemRef) debug.trace("item is " + itemRef) Form baseForm = itemRef.GetBaseObject() debug.trace("base form is " + baseForm) int res = 0 if baseForm as Weapon debug.trace("Is Weapon") res = 1 elseif baseForm as Armor debug.trace("Is Armor") res = 2 elseif baseForm as Potion debug.trace("Is Aid") res = 3 elseif baseForm as Ammo debug.trace("Is Ammo") res = 4 else MiscObject miscItemToSort = itemRef.GetBaseObject() as MiscObject bool isJunk = false if miscItemToSort int i = 0 while i < AllComponents.Length && !isJunk if miscItemToSort.GetObjectComponentCount(AllComponents[i]) > 0 isJunk = true endif i = i + 1 endWhile endif if isJunk debug.trace("Is junk") res = 5 else if itemRef.HasKeyword(ModKeyword) debug.trace("Is mod") res = 6 else debug.trace("Is misc") res = 7 endif endif endif return res endFunction
  2. Thanks, I will give that a go. EDIT: After having tried it I can sort some forms without issue but I am having trouble with others. Weapons - baseForm as Weapon Armor - baseForm as Armor Ammo - baseForm as Ammo Aid - baseForm as Potion Misc - baseForm as Book gets the books and notes but misses the holodisks and other misc items junk - baseForm as MiscObject partially works but I need an array of all components to finalise it Does anyone have a list of the base forms I can use for Misc? Thanks
  3. Hi, I am trying to mod the manufacturing sorter to sort items based on the major inventory headings (weapons/junk/misc/etc.) and I am having trouble identifying the underlying form type as they pass through the sorter. I figured I could use a combination of the form type (WEAP/MISC/etc.) as shown in the creation kit and secondary checks for things like identifying junk using GetComponentCount and detached mods by the keyword ObjectTypeLooseMods. The secondary checks seem strait forward (at the moment) but the form type check is doing my head in. I have tried defining a property and assigning a form so I can use the HasForm check but the list of available forms does not seem to have the forms I need. Can anyone give me any pointers on where to look or an alternate way to identify the form type via script? Thanks.
×
×
  • Create New...