Displaying Resources

Have modding questions or discovered something new? Post here.
Post Reply
User avatar
Secg
Half Track L2
Half Track L2
Posts: 200
Joined: Sat Jun 10, 2017 12:28 am
United States of America

Displaying Resources

Post by Secg »

Afaik, up to the last eight digits of the numbers of player-possessed Plastic & Electricity are visible.
Spoiler
When players start with 50,000,000 Plastic & 20,000,000 Electricity:
Image

When players start with 99,999,999 Plastic & 99,999,999 Electricity:
Image

When players start with 500,000,000 Plastic & 200,000,000 Electricity:
Image
Anyone knows how to change the amount of last digits visible (e.g. from last eight digits to last nine digits)? :?

Thanks beforehand,

Secg!
ImageImage
User avatar
TommyCD1
Moderator
Moderator
Posts: 1144
Joined: Tue Jun 04, 2013 8:55 am
Location: East Coast
Contact:
United States of America

Re: Displaying Resources

Post by TommyCD1 »

The digits displayed are limited only by the size of the actual control displaying them. To get more digits, you simply need to increase the width of the control.

This can be done by opening the file if_game_resourcewindow.cfg, located within client\p\ingame.x and changing line 23

Code: Select all

  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(202, 26);  // default value 202 pixels wide
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }

Code: Select all

  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(640, 26);  // change to what is needed
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }
Just keep in mind that this may cause the resources numbers to bleed into or over top other interface elements once high enough, such as on screen timers.
I may not make the best maps, or be the best player, but I put a lot of time, effort, and care into my stuff. That counts for something, right? No.
Image
"Can we order a pizza?"
GameRanger ID: 913974
User avatar
Secg
Half Track L2
Half Track L2
Posts: 200
Joined: Sat Jun 10, 2017 12:28 am
United States of America

Re: Displaying Resources

Post by Secg »

TommyCD1 wrote: Tue Feb 27, 2024 10:36 am This can be done by opening the file if_game_resourcewindow.cfg, located within client\p\ingame.x and changing line 23

Code: Select all

  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(202, 26);  // default value 202 pixels wide
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }

Code: Select all

  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(640, 26);  // change to what is needed
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }
I also haphazardly guessed that specific file should be modded. However, instead of subjecting myself to trials and errors, I lazily came here for a quick solution. :NOOB2:

Thanks for your help ( :SWEET: ) as always, TommyCD1!

EDIT: It works ( :ROCK: )!
Spoiler
Vanilla Code:

Code: Select all

  
  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(202, 26);  // default value 202 pixels wide
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }
Modded Code:

Code: Select all

  
  DefineControlType("Client::Resource::Base", "Client::Resource")
  {
    Size(228, 26);  // change to what is needed
    Style("Transparent", "Inert");
    Geometry("Right");

    ShowSeen(1);
    FilterRate(80%);
  }
Result:

Image
ImageImage
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests