GregLando113 / quickloot-sse

[WIP] Port of Quick Loot by himika to Skyrim: Special Edition
13 stars 6 forks source link

Skyrim SE Crashes on hover over container #2

Open calebadair opened 6 years ago

calebadair commented 6 years ago

After building with no errors, I loaded the dll in along with the remaining required files from the version of QL SE uploaded on the nexus, and game boots fine. When initially loading in, hovering over a container provides no results, and when I hold R to turn on QL and hover back over, the game crashes with only this log indicating anything happened. Any ideas? qldbg.txt

GregLando113 commented 6 years ago

I have stopped working on this project, most likely many addresses and things must be updated in GameFunctions.cpp if you want to get this dll back in working order.

There is a SE port of this mod on the nexus from another author, if you just want a working quickloot i would advise looking into this instead.

calebadair commented 6 years ago

I've been using that version, but the uploader has abandoned the project and there are features I wish to add. Thanks for the pointer.

GregLando113 commented 6 years ago

Alright, I'll help you how I can

One thing I remember is that you must declare an environment variable $(Skyrim64Path), and have it be the full path to your skyrim installation. also, you should be cloning the repository into your Skyrim Special Edition\src\skse64 folder. then you should add the project into the skse64 solution, from there it should be able to resolve any references. let me know if you need further help

GregLando113 commented 6 years ago

Also, I just gave you collaborator access to the repository, you may do this or work on your own. If you have experience with SKSE plugins before I would gladly accept help

zonaren commented 6 years ago

I have stopped working on this project, most likely many addresses and things must be updated in GameFunctions.cpp if you want to get this dll back in working order.

There is a SE port of this mod on the nexus from another author, if you just want a working quickloot i would advise looking into this instead.

Could you elaborate what exactly must be updated in GameFunctions.cpp? I'm having the exact same issue as calebadair.

zonaren commented 6 years ago

It looks like it's crashing on Quickloot.cpp line 300: UInt32 numItems = TESObjectREFR_GetInventoryItemCount(containerRef_, false, false); GameFunctions.cpp line 10: RelocAddr<TESObjectREFR_GetInventoryItemCount_t*> TESObjectREFR_GetInventoryItemCount (0x0028E320 + 0x80);

EDIT: Error: The program '[8532] SkyrimSE.exe' has exited with code -1073741795 (0xc000001d) 'Illegal Instruction'.

iffa commented 6 years ago

I'd love to take a shot at figuring out the correct memory addresses for the latest version, any pointers on what I need to do in order to find 'em? Haven't done a lot of work at the low level like this on a game the size of Skyrim before.

GregLando113 commented 6 years ago

Youll most likely need an x32 and an x64 debugger, as well as skyrim and skyrim se.

I should have documented in the .cpp some referenced strings. follow their path to get to the respective functions in the skyrim code and document their RVA's (their relative offsets from the base of the skyrimse.exe module in the process), and throw them down.

if you want more explanation, my discord is KAOS#8160

I have experience with low level work like this. However my knowledge of the creation kit and SKSE is limited, if you can help with this that would be most beneficial. I dont have much time to dedicate to this anymore, and there are probably much better way to go about remaking the quickloot stuff from himika.

zonaren commented 6 years ago

I added you to discord too. Have been working a little with this in the past few weeks, but same as iffa, I'm not that into assemblies and still learning c++ and skse. In regards to modifying the original code from himika, I think it's a better approach to continue with your code because it is much cleaner and doesn't touch the skse source code. Iffa: My discord is Slarur#1968

iffa commented 6 years ago

Added you both on Discord. Making some progress but having trouble getting the plugin to load successfully (even without any changes) with the latest SKSE...

This is fun! Lmao

Edit: Got it to load, my bad Edit2: Hopefully making more progress with locating new addresses, will find out soon-ish Edit3: TESObjectREFR_GetInventoryItemCount seems to work, still crashing however:

 = START UPDATE
[DBG] QuickLoot.cpp(293): items_.count = 0
[DBG] QuickLoot.cpp(294): Quickloot::Update() START
[DBG] QuickLoot.cpp(297): items_.count = 0
[DBG] QuickLoot.cpp(300): numItems = 4
[DBG] QuickLoot.cpp(301): items_.capacity = 0
[DBG] QuickLoot.cpp(313): ownerForm_ = 000002D0014A2800
[DBG] QuickLoot.cpp(329):  === DEFAULT ITEM START
[DBG] QuickLoot.cpp(343):  === DEFAULT ITEM END
[DBG] QuickLoot.cpp(344): items_.count = 0
[DBG] QuickLoot.cpp(362): items_.count = 0
[DBG] QuickLoot.cpp(364):  === CHANGES START
[DBG] QuickLoot.cpp(367): changes->objList->Count() = 4
[DBG] QuickLoot.cpp(371): pEntry = 000002D0061B9F98
[DBG] QuickLoot.cpp(384): totalCount = 1
[DBG] QuickLoot.cpp(399): itemmap not set to -1
[DBG] QuickLoot.cpp(408): item->formID = 80697
[DBG] QuickLoot.cpp(409): pEntry->extendDataList = 000002D007957DA0
[DBG] QuickLoot.cpp(412):  ========== extendDataList BEGIN
[DBG] QuickLoot.cpp(420): count = 1
[DBG] QuickLoot.cpp(453):  ========== extendDataList END
GregLando113 commented 6 years ago

https://youtu.be/6bydkcw_y4U

I decided to make this video to try to help out with updating the addresses and setting up your build env, hope this helps some people.

EDIT: took video frame by frame and got the console output.

vlc_2018-10-10_23-43-43

GregLando113 commented 6 years ago

NOTE: The reason it is crashing is probably due to GFxLoader * GetGfxSingleton() in QuickLoot.cpp, and all work related to it. The inventory printout to console should work withotu crashing, but I was never able to move on to loading in the quickloot ui element. Commenting out all of the ui/gfx code in quickloot should allow it to be stable-ish

JimBeamBeagle commented 6 years ago

Hi All.. I only just noticed this thread. I'd been working on fixing a different port of this plugin to try and bring it up to speed. Until I stumbled upon this one, My C++ skills are fairly reasonable, and I've been rebuilding a couple of unmaintained plugins to keep them updated. If you're all happier for "the more the merrier" scenario, my discord is JimBeamBeagle#5446. Cheers

iffa commented 6 years ago

@JimBeamBeagle and others interested: https://discord.gg/gU9nNuf - would love some help especially with the scaleform stuff :)

PS. check my fork, its got some fixes that this repo doesn't have (yet)