Author Topic: [Solved] Facility Build GUI - Show 4 Requirements  (Read 1480 times)

Offline 0xEBJC

  • Colonel
  • ****
  • Posts: 180
  • Y'all are awesome! Thankful for this community.
    • View Profile
    • My Projects
[Solved] Facility Build GUI - Show 4 Requirements
« on: April 02, 2024, 11:36:52 pm »
Currently I can add in the rul files more than 3 requirement resources for building a facility, but the GUI will only show 3.  I don't want player to have to go into the nerd stats to see what requirements are needed, but I would like to add a 4th requirement to some of the facilities. 

It would be nice to have the GUI show up 4 requirements, there is room to do so, I've attached picture of the current and my proposed GUI modification.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #1 on: April 02, 2024, 11:57:36 pm »
No, we agreed 3 when this was implemented.
(That's the maximum without making the window bigger and uglier... both because it would have a different size than the window(s) behind it and because it would steal space from the other parts of the UI, the empty space there serves an important visual/aesthetic role)

Also, next time you'd want 5, then 6, then 7...
Less is more.

Offline 0xEBJC

  • Colonel
  • ****
  • Posts: 180
  • Y'all are awesome! Thankful for this community.
    • View Profile
    • My Projects
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #2 on: April 05, 2024, 12:24:05 am »
ok, makes sense, yep and I could see wanting facilities with more than 4 resources as well and then this update not really helping.

What I was hoping to alleviate was not needing to go into the nerd stats to see when there were more than 3 resource requirements.

What do you think about:
- When trying to place a facility that doesn't have all the required resources
  -- the pop-up gui stating "Not enough items!"
  -- also show what the 1st item that is insufficient? 
  -- the code is already doing this check, would just need to show the message why, for example:
"            missing:           "
" UFO Power Source: 30"

so ff the base already had 2 UFO Power Source's in storage and 30 total are needed, then the message would show
"            missing:           "
" UFO Power Source: 28"

This would be similar to when trying to remove a facility where it shows "facility in use!" and tells you the first reason why.  If multiple resources are needed, once the UFO Power Source items met the criteria, then the next missing item would be displayed.

Offline shinr

  • Colonel
  • ****
  • Posts: 140
    • View Profile
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #3 on: April 05, 2024, 08:32:45 am »
A probably more annoying to implement way to show a missing 4th resource is to dynamically put the resource that you don't have enough of at the top of the list of requirements.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #4 on: April 28, 2024, 05:16:43 pm »
A probably more annoying to implement way to show a missing 4th resource is to dynamically put the resource that you don't have enough of at the top of the list of requirements.

More annoying, but more acceptable for me than f-ing up the GUI or adding some crazy scrollbar.

If this would be enough, I can do it.

Offline Delian

  • Commander
  • *****
  • Posts: 507
    • View Profile
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #5 on: April 28, 2024, 08:26:41 pm »
The whole problem of not seeing all the required resources can be solved by the modder, by changing the requirements - by introducing an intermediate resource. Instead of requiring ResourceA and ResourceB, the facility construction should require resourceC, which is manufactured from ResourceA and ResourceB. Manufacturing doesn't have any requirement-showing limits.

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9101
    • View Profile
Re: [Suggestion] Facility Build GUI - Show 4 Requirements
« Reply #6 on: August 10, 2024, 02:09:38 pm »
What do you think about:
- When trying to place a facility that doesn't have all the required resources
  -- the pop-up gui stating "Not enough items!"
  -- also show what the 1st item that is insufficient? 
  -- the code is already doing this check, would just need to show the message why, for example:
"            missing:           "
" UFO Power Source: 30"

so ff the base already had 2 UFO Power Source's in storage and 30 total are needed, then the message would show
"            missing:           "
" UFO Power Source: 28"

This would be similar to when trying to remove a facility where it shows "facility in use!" and tells you the first reason why.  If multiple resources are needed, once the UFO Power Source items met the criteria, then the next missing item would be displayed.

But that's exactly how it works, since the beginning (year 2015), see attached screenshot.

Check if your mod is not changing the default translation:

Code: [Select]
STR_NOT_ENOUGH_ITEMS: "NOT ENOUGH MATERIALS!{SMALLLINE}We need more resources to build this facility.{NEWLINE}Missing> {0}: {1}"