[MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Place for sharing your game modifications for Life is Feudal: Your Own

Fawkinay
 
Posts: 1
Joined: 08 Apr 2018, 05:07

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Fawkinay » 22 Apr 2018, 18:13

Ellian810 wrote:The aim of the mod is to reduce the size of the inventory window.
If many people don't want this resize anymore, I might include a setting in the configuration file.


+1 request for a setting to disable Inventory window resizing.

Thank you!


Dunkhan
 
Posts: 13
Joined: 26 Feb 2016, 12:10

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Dunkhan » 10 May 2018, 11:44

I noticed the herb sorting was bugged - namely, if there are more than maxstackcount (default 15) herbs in a row, they are invisible.

I investigated and found that the algorithm that makes the y offset when the row is full is totally bugged and is setting the y value of the herb to infinity.

I also found other random cruft that appeared either to have no effect or to do something strange that I didn't understand.

I rewrote the code locally so I could use it. But I thought it might be nice to share with the devs/other users so here it is.

In HerbToolConfig.cs you change this block ("..." is a placeholder for the old code)
Code: Select all
function InventoryOrganizer::sortHerb(%this, %herbId, %invItem, %stackCount){...}


with this one:
Code: Select all
function InventoryOrganizer::sortHerb(%this, %herbId, %invItem, %stackCount){
   %usedcount = %stackCount;
   %yoffset = 0;
   %xoffset = 0;

   for (; %usedcount>=InventoryOrganizer.maxstackcount; %i++){
   
      %usedcount-=InventoryOrganizer.maxstackcount;
      %yoffset+=InventoryOrganizer.stackSpace;
   }
   
   %row = %herbId;
   %x = InventoryOrganizer.startX + (InventoryOrganizer.stackSpace*%usedcount)+%xoffset;
   %y = InventoryOrganizer.startY + (%row*InventoryOrganizer.spaceY) + %yoffset;
   %pos = %x @ " " @ %y;
   
   %invItem.position = %pos;
}


Side effect:
1. The variable "rows" is no longer used. There will automatically be the same number of rows as the highest number you use for herbId (default 6). Changing this variable will no longer have any effect.

Note to devs:
InventoryOrganizer.factorY and InventoryOrganizer.factorX were returning nothing, so dividing by them was resulting in infinite coordinates. This might be because of how I set up my main config but I could not find a place to set these values. Either way the way I set it up in the code above is cleaner and more sensible imo.

for anyone that is curious, the settings I use to keep as many herbs in the window as possible while not covering any of the count/quality indicators are:
Code: Select all
startX = 2;
startY = 32;
stackSpace = 25;   
maxstackcount = 13;
spaceY = 64;


Teah
 
Posts: 26
Joined: 14 Jun 2016, 13:49

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Teah » 09 Jul 2018, 19:33

Thank you so very much for this mod :) its amazing.


Wessller
 
Posts: 2
Joined: 24 Jan 2016, 18:32

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Wessller » 12 Jul 2018, 18:49

Question:

The only way to get this mod to automatically sort Herbs, is to modify the file "HerbToolConfig.cs" for all 66 herbs?

No automatic way?

User avatar
NimRodelle
 
Posts: 29
Joined: 03 Mar 2016, 09:54

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by NimRodelle » 22 Jul 2018, 09:21

So what I'm trying to figure out is why the mod isn't utilizing all of the available inventory window space to sort things?

Image

The last object being sorted is that stack of 460 clay, everything else is just free floating in the window.

Nim


Rustyrocks6969
 
Posts: 9
Joined: 05 Apr 2017, 21:40

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Rustyrocks6969 » 30 Jul 2018, 15:36

Hey, so this mod is not getting worked on anymore. http://skunkfu.net/sf-mods/ Take a look at SF-Mods


Mattia.bonaducci
 
Posts: 1
Joined: 08 Dec 2017, 23:46

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Mattia.bonaducci » 16 Sep 2018, 01:21

Just do add something in this topic, I actually maintaned this mod for my (and my guild use) and recently I decided to work on it a bit more.
I have version from march which I optimized for Ellian (known problem with regional resources) but I'm not sure if it was ever released in EMP.

I actually wanted to fix a few issues related to custom inventory sizes, mostly to fix usage of full container space regardless of it's size (works with custom image files extending it as well). I think I'll "release" it soon for my guild and I can post it here as well if someone is interested.

@NimRodelle It's hardcoded to stop sorting if you hit 400px height. Does not matter how high is the window and it stopped after first object in next line. Everything else was not sorted. I want to do something that will be a bit more useful in big warehouses etc.


Xelat84
 
Posts: 2
Joined: 09 Nov 2018, 08:51

Re: [MOD][Client] EllianMod::InventoryOrganizer (Approved for YO, Usable on MMO)

Post by Xelat84 » 18 Nov 2018, 12:26

Not all items are sorted when there is too many items in inventory/container. (or may be it has some another reason)

Return to Game mods