Dropped Items

Show off your mod creations or just a work in progress.
Post Reply
User avatar
John Doom
Posts: 126
Joined: Wed Dec 01, 2021 5:59 pm
Location: Italy
Contact:

Dropped Items

Post by John Doom »

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 :)
Attachments
Dropped Items.zip
(6.51 KiB) Downloaded 94 times

User avatar
emmathepony
Posts: 248
Joined: Sat Jun 29, 2019 5:26 pm

Re: Dropped Items

Post by emmathepony »

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?

User avatar
John Doom
Posts: 126
Joined: Wed Dec 01, 2021 5:59 pm
Location: Italy
Contact:

Re: Dropped Items

Post by John Doom »

:) Yes, and also automatically splits the loot to contain only one kind of item (with its own sprite).

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Dropped Items

Post by Hazelnut »

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)
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
John Doom
Posts: 126
Joined: Wed Dec 01, 2021 5:59 pm
Location: Italy
Contact:

Re: Dropped Items

Post by John Doom »

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.
:roll: 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 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.
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 :(

Post Reply