Mod that makes items you drop look like themselves, rather than generic loot or caches.
This one is complete, just need you to test it before uploading it to Nexus
Dropped Items
- John Doom
- Posts: 126
- Joined: Wed Dec 01, 2021 5:59 pm
- Location: Italy
- Contact:
Dropped Items
- Attachments
-
- Dropped Items.zip
- (6.51 KiB) Downloaded 100 times
- emmathepony
- Posts: 248
- Joined: Sat Jun 29, 2019 5:26 pm
Re: Dropped Items
What are the main differences between using this mod and clicking the picture icon in the corner of the inventory before dropping said items? I guess this mod drops the actual sprite for each and every item?
- John Doom
- Posts: 126
- Joined: Wed Dec 01, 2021 5:59 pm
- Location: Italy
- Contact:
Re: Dropped Items
Yes, and also automatically splits the loot to contain only one kind of item (with its own sprite).
- Hazelnut
- Posts: 3016
- Joined: Sat Aug 26, 2017 2:46 pm
- Contact:
Re: Dropped Items
Looking at the code, I think your OnWindowChange() will be registering an event listener repeatedly whenever the inventory window is opened. I assume you checked that you don't have repeated calls to the OnClose(), but it still only needs to register one time I think.
Also, why do you prefer the inventory icon over the world one? Did that work and look better? Just curious, as I thought the world sprites should look better in the 3d environment generally.
Nice mod anyway.
(It would be a lot easier if you had a github repo for all your mod code, and it's really useful to see how code has changed over time and why. May not be an issue now, but in a couple of years it might help you. Just a thought, not trying to tell you what to do)
Also, why do you prefer the inventory icon over the world one? Did that work and look better? Just curious, as I thought the world sprites should look better in the 3d environment generally.
Nice mod anyway.
(It would be a lot easier if you had a github repo for all your mod code, and it's really useful to see how code has changed over time and why. May not be an issue now, but in a couple of years it might help you. Just a thought, not trying to tell you what to do)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods
- John Doom
- Posts: 126
- Joined: Wed Dec 01, 2021 5:59 pm
- Location: Italy
- Contact:
Re: Dropped Items
I just didn't care much since I was still prototyping. I may improve it in the future or, if you feel like it, you may fix it yourself and post here (you're going to be credited ofc).Hazelnut wrote: ↑Wed Jan 12, 2022 7:04 pm Looking at the code, I think your OnWindowChange() will be registering an event listener repeatedly whenever the inventory window is opened. I assume you checked that you don't have repeated calls to the OnClose(), but it still only needs to register one time I think.
Unfortunately it was because of a bug: if the sprite isn't also used as inventory icon, looting would crash the game. There may be a fix, but I couldn't find it yet