Page 3 of 3

Re: Auto Loot Enhanced for TTW

Posted: Sun Jan 01, 2023 7:10 pm
by Moniker404
Just sharing some useful information on how I updated this patch to crash less and turn auto loot back on after leaving the player home.
Inside the GECK set this esp as active then add the following to the file Miscellaneous>Script>ALEnhS in the locations I show:

short AmmoC
ref AmmoB

;//My Start EDIT--------------------------------------------- This sets up for later
short paused
float timer
;//My End EDIT---------------------------------------------

Begin GameMode
.......

if ALEnhGLoot && ALEnhGPros && (Player.GetInCell MegatonPlayerHouse || Player.GetInCell Tenpenny03Player || Player.GetInCell Lucky38SuiteFloor22 || Player.GetInCell NVDLC03TheSink) ;< ADD PLAYER HOUSE HERE TO TURN OFF AUTO LOOT ON ENTRY
set ALEnhGLoot to 0
set ALEnhGSteal to 0
ShowMessage ALEnhMLootOff
;//My Start EDIT--------------------------------------------- Add Same as above but adding here turns auto loot back on after leaving the cell
elseif ALEnhGLoot == 0 && (Player.GetInCell MegatonPlayerHouse || Player.GetInCell Tenpenny03Player || Player.GetInCell Lucky38SuiteFloor22 || Player.GetInCell NVDLC03TheSink) == 0
set ALEnhGLoot to 1
ShowMessage ALEnhMLootOn
;//My End EDIT---------------------------------------------
............

if DoOnce == 0
set DoOnce to 1
set XAlch to -1
set XMag to -1
set XBook to -1
set XCMNY to -1
set XMsc to -1
endif

;//My Start EDIT-------------------------------------------- This turns Auto looting off during combat and notifies you it was turned off then it turns itself back on 5 seconds after combat ends. This prevents the crash when enemies die to close to the player
if player.IsInCombat
ShowMessage ALEnhMLootOff
endif
if player.IsInCombat
set paused to 1
set timer to 5
elseif player.IsInCombat == 0
set timer to (timer - GetSecondsPassed)
endif

if timer <= 0
set paused to 0
set timer to 0
endif

if ALEnhGLoot && paused == 0
;//My End EDIT---------------------------------------------

Re: Auto Loot Enhanced for TTW

Posted: Sat Jan 07, 2023 2:22 pm
by gzuuuul
Moniker404 wrote:
Sun Jan 01, 2023 7:10 pm
Just sharing some useful information on how I updated this patch to crash less and turn auto loot back on after leaving the player home.
Inside the GECK set this esp as active then add the following to the file Miscellaneous>Script>ALEnhS in the locations I show:

short AmmoC
ref AmmoB

;//My Start EDIT--------------------------------------------- This sets up for later
short paused
float timer
;//My End EDIT---------------------------------------------

Begin GameMode
.......

if ALEnhGLoot && ALEnhGPros && (Player.GetInCell MegatonPlayerHouse || Player.GetInCell Tenpenny03Player || Player.GetInCell Lucky38SuiteFloor22 || Player.GetInCell NVDLC03TheSink) ;< ADD PLAYER HOUSE HERE TO TURN OFF AUTO LOOT ON ENTRY
set ALEnhGLoot to 0
set ALEnhGSteal to 0
ShowMessage ALEnhMLootOff
;//My Start EDIT--------------------------------------------- Add Same as above but adding here turns auto loot back on after leaving the cell
elseif ALEnhGLoot == 0 && (Player.GetInCell MegatonPlayerHouse || Player.GetInCell Tenpenny03Player || Player.GetInCell Lucky38SuiteFloor22 || Player.GetInCell NVDLC03TheSink) == 0
set ALEnhGLoot to 1
ShowMessage ALEnhMLootOn
;//My End EDIT---------------------------------------------
............

if DoOnce == 0
set DoOnce to 1
set XAlch to -1
set XMag to -1
set XBook to -1
set XCMNY to -1
set XMsc to -1
endif

;//My Start EDIT-------------------------------------------- This turns Auto looting off during combat and notifies you it was turned off then it turns itself back on 5 seconds after combat ends. This prevents the crash when enemies die to close to the player
if player.IsInCombat
ShowMessage ALEnhMLootOff
endif
if player.IsInCombat
set paused to 1
set timer to 5
elseif player.IsInCombat == 0
set timer to (timer - GetSecondsPassed)
endif

if timer <= 0
set paused to 0
set timer to 0
endif

if ALEnhGLoot && paused == 0
;//My End EDIT---------------------------------------------
Can't save the script
Image

Re: Auto Loot Enhanced for TTW

Posted: Sun Jan 08, 2023 1:13 pm
by DrakeCaesar
gzuuuul wrote:
Sat Jan 07, 2023 2:22 pm
Can't save the script
You have to replace the line

Code: Select all

if ALEnhGLoot
with

Code: Select all

if ALEnhGLoot && paused == 0
Seems like you left both of them there

Re: Auto Loot Enhanced for TTW

Posted: Wed Jan 11, 2023 8:32 am
by Moniker404
Another update for this mod, I was tired of removing unplayable items constantly so I automated it. Here is the information for any who wish to add it.
1. First load up the AutoLootEnhancedforTTW and set it as active inside the GECK.
2. Go to Object Window> Misc.> Script> Right click on the list and select New..
3. Paste:
scn ALEnhDropSCRIPT

begin GameMode
Player.removeitem ALEnhDopItems 100 1
end
4. While still in Script Editor change the script type to Quest (Default is Object). Save
5. Go to Object Window> Actor Data> Quest> Right click on the list and select New.
6. Copy Settings: Quest Name: Auto Loot Enhanced Dropper ID: ALEnhQDrop Priority: 55
Script: ALEnhDropScript Check the boxes next to Start Game Enabled and Script Processing Delay
Image
7.Go to Object Window> Misc.> Form List> Right click on the list and select New. Set ID: ALEnhDopItems
8. These are the ones I have added so far to my list you can add more yourself. To add to the Form list just drag and drop the items from the Object Window list.
Image

Re: Auto Loot Enhanced for TTW

Posted: Sat Jan 14, 2023 1:10 am
by DrakeCaesar
Thanks for the edits, added both of them to my game and they work great.
I've changed some things tho. Made the part of the script that turns off looting in player homes a to be controlled by a separate variable, so that it does not interfere with the hotkeys.

And I've changed the 5 second combat timer to 1 second, seems to be enough. Do we actually know why it crashes? Is it cause of the dropped weapons? because I've never had the game crash when killing animals. I haven't tested it much, but maybe only weapon type item looting needs to be behind that timer? Also I've added an another condition to starting the timer, checking for left click, cause when you stealth kill someone, you're not in combat. Changed the line

Code: Select all

if player.IsInCombat
to

Code: Select all

if player.IsInCombat || IsKeyPressed 256
Another thing, I've figured out how to make the script loot plants. This probably spams the plants with the Activate function, just likes it spams Locked containers higher than lockpicking level, but seems to work alright. But I recommend removing the Eat-a-tronic from the ALEnhLActi Form List.

Code: Select all

set ActiR to GetFirstRef 21 1 0
has to be changed to

Code: Select all

set ActiR to GetFirstRef 21 1 1

Re: Auto Loot Enhanced for TTW

Posted: Sat Jan 14, 2023 6:02 am
by Moniker404
DrakeCaesar wrote:
Sat Jan 14, 2023 1:10 am
Thanks for the edits, added both of them to my game and they work great.
I've changed some things though.

And I've changed the 5 second combat timer to 1 second, seems to be enough. Do we actually know why it crashes? Is it cause of the dropped weapons? because I've never had the game crash when killing animals. I haven't tested it much, but maybe only weapon type item looting needs to be behind that timer?

Another thing, I've figured out how to make the script loot plants.
Nice work man! I'll have to add the plants line into my esp when I get a chance. I play using a controller and want it to constantly loot so I didn't think of the hotkeys and such, really good catch. From what people reported crashes seem to be weapons related but I did have it crash on another enemy type once and I didn't want to dig too deep into someone else's mod to test it. I also feel that would make it harder for common users to update, since they would have to add any edits we do themselves. I don't think this patch file will get updated anytime soon but on the off chance the original poster (or any one else) does and see this. You have my promisson to add my work into your release file. I would love to make a similar mod from scratch, based off white listing, but I simply don't have the time since I prefer to use the little free time I do get in med school to play the game. 😅

Re: Auto Loot Enhanced for TTW

Posted: Thu Jan 19, 2023 6:40 am
by lizertech
thanks for the effort in fixing stuff
will this modification will also work in FNV only? also is there a way to dl this updated mod with modifications?