rymbrant / SatisfactoryMods_sweetTools

sweetTools for Satisfactory
5 stars 2 forks source link

sweetSigns - AutoText on Storage - Counts Misleading #5

Closed crawshaws closed 4 years ago

crawshaws commented 4 years ago

The auto text on storage containers show the number of slots used not the number of items stored.

Is there anyway that the sign could show the number of items stored (if only a single item is present) rather than the number of slots taken.

(I am installing UE now to take a look at if I could do this, will submit pull if I can)

crawshaws commented 4 years ago

OK, so i have copied the files into the StarterProject (https://github.com/satisfactorymodding/SatisfactoryUnrealProject) but the files seem to be hard linked to your user profile, stating that C:\Users\mircea\satisfactorymodding..... could not be found when trying to click on functions etc.

Any clue how to change the paths that are being pointed to? (I am new to Unreal, more a VS man).

rymbrant commented 4 years ago

I think you posted in the wrong github?

For your first post though, right now it should report inventory slots used / total. To make sure I understand, you are asking for it to report how many items in all the slots it contains right?

One way lets you know if it has space to put things, the other lets you know how much stuff is available. You find knowing what's available more useful? (really asking for feedback here)

crawshaws commented 4 years ago

I understand, that the sign currently shows slots used vs total slots to show if there is space. But it would be useful to also be able to show a count of all individual items in a container too. For instance, if there are 3 stacks of 500, then to show 1,500.

I have been looking at the source for the sign and can see that the Satisfactory API might be restrictive around getting total items. But the misleading part to me would be where there are 3 slots taken but the third slot is not a full stack.

After using this mod for a little while now though, I have gotten used to how it currently works.

rymbrant commented 4 years ago

Good feedback, I think it's a worthy change. I think it is possible to get the total number of items. Would you want it to just say "1500" ya think? I could add another line that lists the most plentiful item type or such but not sure how much space the sign will have.

crawshaws commented 4 years ago

When I was playing with the functions in Unreal, I was attempting to get the count of the item that was in the first slot (I usually only keep one item per storage container, as the output of a manufacturing process).

I'm not sure about performance, but finding the most plentyful item over just counting the total of the same item class that is in the first slot may be more taxing?

As for display, could it show:

[slots full] / [total slots] (total items)

That way the counts can appear on the same line?

I also found that the error regarding not finding the C++ classes was down to the StarterProject (from the ficsit docs) the username on that github matches the user in the error.

crawshaws commented 4 years ago

Just installed the update.... Love it. Thank you so much.

I had checked the Get Num Items function, but wrongly assumed it needed the item class linking up.

Other Suggestions:

That way a user would be able to customise the positioning of various auto text properties. (parsing would only be run if auto text is enabled).

rymbrant commented 4 years ago

Yeah, the getNumItems function returns all items if no class is assigned. A bit misleading.

Right now I have the signs set to only tick every 5 seconds and have their update tied to that. I think one of the factory_tick commands only fires if it is within a certain distance of the player maybe? I could tie to that instead if it works that way. I'll add it to the list to investigate.

I experimented with the Token idea, I have parsing for \n for example. It wouldn't be hard to do really but I don't really know the expense of the increased string operations. I'll think about it.

rymbrant commented 4 years ago

Updated just now, added the tokens and some scaling.

crawshaws commented 4 years ago

Nice... Couple of notes about the latest changes.

Scaling doesn't affect the sign and resets when you close and re-open the menu.

The original auto text is still displayed making %itemCount redundant.

Regards,

rymbrant commented 4 years ago

You have to uncheck the auto checkbox to get the auto text to go away

When you say scaling doesn't affect the sign: TextScale won't affect the sign, just the text. You have to change height and width to make the sign bigger. TextScale only affects the text. Also, make sure you are not trying this on an old sign, it only works on newer placed signs.

crawshaws commented 4 years ago

Ah I see, yes it does work on newly created signs.

Everything seems to be working perfectly now.

Thanks for making these changes. Makes managing my storage much better :)

crawshaws commented 4 years ago

Someone likes your signs :P https://www.youtube.com/watch?v=eHKG7YUWm8Q