Jump to content

FO3Edit question about a long list


adambukowski

Recommended Posts

Hey everybody, I’m a fallout 3 modding newb, so I was just wondering if anybody could help me figure this out.

Background:

When I play Fallout 3, I become a hoarder. If it’s not nailed down, I’m taking it home with me: junk, trash, gore, ammo, EVERYTHING. This turns fallout into a trash-collection simulator for me, so to combat that, I installed the DALCO Junk-O-Matic mod. It’s a wearable item that automatically moves all the purely junk items in your current cell into a container in your megaton house. I want it to pick up almost everything, so I can play the game without being distracted by all the junk on the ground.

In the notes for that mod, it explains how to use FO3Edit to add a null entry into the mod’s list of items it’ll pick up, then edit that entry into any other item ID you want. I successfully added 2 items to the list following those instructions, but I have 573 more things I want to add to the list. (I used Excel to organize a list of every item in the game, and then took out the things I still want to find on the ground, like quest items, unique weapons and keys)

The actual question:
Is there a way (with or without FO3Edit) for me to copy/paste my whole list into the mod’s files so that I don’t have to create a new entry for every single item on my list?

Thanks in advance for any help or advice you can give!

Link to comment
Share on other sites

For adding one or two items to that list, the mod author correctly decided that FO3Edit would be the quickest method with the lowest learning curve. I think what you want to do would be much easier in the GECK. Load that file into the GECK and double-clock that FormList to edit it. Show the Misc Items in the Object Window. You can select multiple items using the standard Shift-click and Ctrl-click methods. Drag the ones you want into the formlist and save the file when you're done. No backup file will be made; you need to do that yourself if you want a backup. I think the datestamp will be updated so you'll need to reassign its position it in your load order when you're done.

Link to comment
Share on other sites

Hey CarlCorey,

Thanks for your help! I was able to figure out how to use the GECK to drag and drop large lists of items into the mod's "junk list".

However, I have noticed another problem. The mod only seems to work on certain random items. Although it will collect a few of the items i added to the list, like tin cans, caps and pilot lights, it will not pick up many other items I added to the list, like stimpacks or .32 pistols. There doesn't seem to be much consistency to what types of items it will pick up, or if the items were added using the GECK or FO3Edit.

I ran BOSS on it just to make sure, but I don't think my load order should be a problem, seeing as I only have the unofficial patch and DALCO Junk-O-Matic installed so far, and Junkomatic is last.

What are some likely causes for this problem? Is it the mod, or something I might have done wrong?

Link to comment
Share on other sites

Ah. The script on the item is just iterating though the MISC items in the cell and checking for their presence in the list. Stimpaks are consumables and .32 pistols are Weapons. So just being in the list isn't enough.

 

To make it work for other item types, you would need to edit the script attached to the JunkOMatic to have a GetFirstRef/GetNextRef loop just like the one for MISC (Type 31) objects for each object type you want. Hmm... then for weapons and armor, you'd want to get the health of the found item so you can set the health of the item it puts in the box in your house. It could get complicated quickly.

Link to comment
Share on other sites

Woo-hoo! After a lot of reading and many attempts, I've gotten a version of the script that works! Its perhaps a bit inelegant as it switches to a new item category every 5 seconds, (so when I walk in a room, first the the junk disappears, then 5 seconds later the ammo, then the alchemy (consumables). But it works! I skipped weapons and armor for now because of the added complexity of the health of the item, as you pointed out.

Thanks for the help, CarlCorey! If you or anybody else has any suggestions for a way to improve the code, or an idea of how to implement the copying of health info from the original weapons/armor to the duplicate, please let me know! I've come a long way since I started this thread, I still have a long way to go- I don't even really understand everything that's happening at the center of this mod's script, haha.

 

Here is my modified version of the DALCO Junk-O-Matic mod, if you are interested. My changes are in bold:

ScriptName DALCOJunkOMaticScript

;This script is attached to the DALCOJunkOMatic device in the player's inventory. The only difference between this script and the one with the 2 is the box things go in.
;It looks for all the MISC items in a cell, and checks for being disabled, being in the player's cell (house), ownership and true junk status
;It then Disables the item and does an AddItem for that item directly to the Box in the player's house for all the items in the stack.
;armor type = 24, weapon= 40, ammo=41, alchemy= 47, misc=31

float fTimer
int iLoopType; declares a counter, default value equals zero
short bRunIt

short iSizeOfStack

reference rBaseObject
reference rOwner
reference rPieceOfMisc

Begin OnEquip

if DALCOJOMFoseCheckQuest.bIsFoseOn ; checks to see if FOSE is present - must be done this way because a direct call to GetFOSEVersion will kill the script if FOSE is not loaded

set bRunIt to 1

;Failsafe Variable Initializations
set fTimer to 0
set iSizeOfStack to 1

else ;If FOSE isn't running, display a warning and set things up to quit

set bRunIt to 0
ShowMessage DALCOJOMFoseWarningMessage

endif ;done with FOSE existence check
End
Begin GameMode

if bRunIt

if (fTimer < 5) ; Want the big stuff to run only periodically. So, if less than five seconds have passed, just increment the timer

set fTimer to fTimer + GetSecondsPassed

else ; This is the main stuff that run every 5 seconds

if iLoopType == 0
set iLoopType to 1
;ShowMessage myType0
endif
if iLoopType == 1
set rPieceOfMisc to GetFirstRef 31 0 0 ; Finds the first reference in the current cell of MISC type ("31")
;ShowMessage myType1
elseif iLoopType == 2
set rPieceOfMisc to GetFirstRef 41 0 0 ; Finds the first reference in the current cell of AMMO type ("41")
;ShowMessage myType2
elseif iLoopType == 3
set rPieceOfMisc to GetFirstRef 47 0 0 ; Finds the first reference in the current cell of ALCH type ("47")
;ShowMessage myType3
elseif iLoopType == 4
;ShowMessage myType4
elseif iLoopType == 5
;ShowMessage myType5
elseif iLoopType > 5
set iLoopType to 0; resets the loop counter
endif
set iLoopType to iLoopType + 1 ;increments the loop counter




Label 10 ; this is the start of the loop to grab all MISC items in the cell
if (rPieceOfMisc) ; if it found something to process -- now see if it's not mine already

if (rPieceOfMisc.GetDisabled == 0) ; make sure I haven't already disabled the item (the game hasn't deleted it yet)

if (player.IsInMyOwnedCell == 0) ; prevents the script from constantly grabbing junk from any themes/upgrades to player's house

set rOwner to rPieceOfMisc.GetOwner

if (rOwner != player) ; Only look at things that don't belong to me

if (rPieceOfMisc.IsInList DALJunkItemsList) ; if it's in this list, it's junk

set iSizeOfStack to rPieceOfMisc.GetRefCount ; find out how many items are being pointed to
rPieceOfMisc.SetOwnership ; since it's junk (i.e., mostly worthless), set it to me so I can take it
set rBaseObject to rPieceOfMisc.GetBaseObject ; for use after Activate on the ref
rPieceOfMisc.Disable ; disables the item (makes it disappear from the game)
DALCOMiscItemsBox.AddItem rBaseObject iSizeOfStack 1 ;AddAllItemsToContainerInPlayerHome(NoMessage)

endif
endif
endif
endif

set rPieceOfMisc to Apple ; Prevent "apple" bug
set rPieceOfMisc to GetNextRef ; get the next reference in the current cell of MISC type ("31") and repeat
Goto 10

endif

set fTimer to 0 ; we've done our processing for this clock cycle, so set the timer back to 0

endif
endif



End

Begin OnUnequip

set bRunIt to 0
End

Edited by adambukowski
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...