Changing HUD interface size

What does it matter. BUG is python anyway.
Even if BUG modified something, it is modified via python and thus editable via python.
 
Not sure which "bar" you are referring to, but all panels you see on the screen are defined via python, which means size can definitely be altered.

We are talking about the bottom part of the screen which has the selected unit in it when in the map screen or the building you are building in it if you are in the city screen.

I have not seen anything anywhere which lets you move those grey lines that divide the screen.

Ah... I was just getting clarification. It seemed BUG/BULL or whatever had some rewriting between dll and python.

BUG has no dll stuff in it. Not sure about BULL.
 
Whether it is the bottom left panel with unit stats/building list, or the bottom right panel with minimap or the bottom center with action buttons, they are all defined in the starting sections.
 
The lines around them are not so you can't increase the size of the box. Or that is what I have been told. I have not tried to change the size of the box myself.
 
Who cares about the panel border lines themselves. The border lines are part of the panel itself. When you change the panel size or location, the border lines follow suit.
 
Real newbie talking here, so forgive me if i use wrong terminology or am understanding things wrong.

To my understanding Python is basicly all overlay, this includes, but may not be limited to:
- gold (per turn) era, time, advisor buttons.
- research rates / buttons.
- Unit information, tile description, battle predictions,
- Unit options, building options
- Minimap, nation flag, civilization scores.
- New building needed, wonder build, random event
- curson information (text when hoovering mouse)
- Any blue bar (including borders) to fit any of the above

I would think all that was run by a different, seperate process (Python?)

I am now intreged and willing to risk breaking my own version to play with it :D.

Any direction where i should look for info / links regarding python? Am I in the right direction of what Python is? And if so could it maybe be tricked to think it is running in a different resolution?

I understand this might be different from most other modding, so that my chances are slim, but one can hope :D Thanks for all information so far :)
 
Majority of screens you can see, is coded via python, which includes all advisor screens, city screen, WB and pedia.

For every screen, you can add panels, add text, add pics whatever.
Naturally, panels can be fixed size or vary according to resolution.

Other than modifying screens, python main other use is granting special effects which cannot be achieved via XML, either through CvEventManager, or CvGameUtils, such as nuking your capital 100 times when a special building is built.

To do what you want, you need to revamp the whole CvMainInterface, which can be done, if you are experienced enough with python.
 
Well i dont have much experience but i do have time :D

what i found in a quick search:

In CyUserProfile (has a "not in SDK" tag) there are get resolution rules.
Line: 34-36

INT getResolution ()
INT getResolutionMaxModes ()
STRING getResolutionString (INT iResolution)

and line 82:
VOID setResolution (INT i)

I was hoping to rewrite a rule to not getRelutionstring, but setResolution maybe? Also mid-reading up at the moment so not sure where i would edit this lol. I have to use eclipse? is it JAVA? (noob but did hear a term here and there lol)
 
For every screen, you can add panels, add text, add pics whatever.
Naturally, panels can be fixed size or vary according to resolution.

To do what you want, you need to revamp the whole CvMainInterface, which can be done, if you are experienced enough with python.

Also in reply to this. Yeah i am not looking to edit every menu the game has. I am hoping there is a general way to make python bigger, as if the game is ran in a low resolution. I will not want to edit every window. I imagine changing the resolution of Python with that of the game can give various issues. Also I think it would also only work in windowed mode, where everything gets stretched to window size.
 
Python is a programming language, just like C++ or java.
You certainly don't make python bigger...

As I said, what you see in the screen, is coded via python, which determines exactly the location and size of each panel.

Thus, what you have to do is modify the codes of every single panel to vary with screen resolution because most of them in BTS are fixed size.
 
I think i am beginning to see what you mean, correct me if i'm wrong. Python draws every menu and window and does this by resolution rules for each window. Then (i guess) uses the game window + resolution to draw on. So font size etc are always linked to game?

What i hope(d) for is that game and python resolutions are not 100% linked together. By "bigger" i mean that the ratio on real screen from python to game is different. I know python already has settings to do so. Because running a low resolution game, and then full screening your window, will give a "bigger" Python. So i want to use the lower resolution version of Python, on top of a higher resolution game.

So i went on a notepad hunt and by going through all menu's and options in Python, i found that al lot have functions that include:
getXResolution() and getYResolution()

Most functions seem to be made to calculate the window sizes for that menu. How i assume Python handles different resolutions and ratios, when the game plays in a different resolution.

So i went to look for setXResolution functions, and i found only 1 in Caveman2Cosmos\Assets\Python\Afforess\ScreenResolutionSize.py with this function:
Spoiler :

def setValues(self):
screen = CyGInterfaceScreen("MainInterface", CvScreenEnums.MAIN_INTERFACE)
global g_iXResolution
global g_iYResolution
g_iXResolution = screen.getXResolution()
g_iYResolution = screen.getYResolution()

gc.getGame().setXResolution(g_iXResolution)
gc.getGame().setYResolution(g_iYResolution)


This function still dont make sense to me. It refers to a setXresolution elsewhere. I tried with lolnotepadmodding to change g_iXResolution to a set number rather then function. Hoping it would set the Xresolution to that, but yeah, didnt really lol.

So forgive me being stubborn :), and i know this is probably impossible and different from other mod types. I am 100% my notepadmodding wont get it done either lol. Most likely if i change something it will change window size, but not actual font size etc, or give the effect want :crazyeye:

But i am still hopefull and stubborn... to me the theory should work. To run the game in a different resolution then Python and, because displayed in a window, both stretched to fit.

Thank you for information so far :), This never being possible, doesnt make digging through Python less fun :)

*edit I realize this is also not really that interesting to put time in. Running anything in a lower resolution then fullscreening it is very ugly. Also i apreciate any information, and don't want to come across as not believing what is said. I like to learn, so that is why i keep trying. This is something specific for me to play with and have fun with. Large Python could mean i can sit further from my TV maybe. But yeah mostly the fun.
 
Put it simply:

Resolution A is 800 x 600
Resolution B is 1024 x 720

In the codes, you defined a panel X to be 400 x 300, and panel Y to be screen resolution X - 400, screen resolution Y - 300.

Thus, obviously under Resolution A, panel X will look similar to panel Y, since panel Y will be 400 x 300 as well.
But under Resolution B, panel X will look smaller than panel Y, since panel Y is now bigger.

All panels in BTS are coded in similar fashion, where certain panel sizes are fixed, while the rest will vary depending on screen resolution.
As I already stated, top left and top right are fixed size, while top mid will become longer or shorter based on screen resolution.
Similarly, top left and bottom left are fixed, so again center mid will vary.

Stop looking at the dll files. It is all coded in CvMainInterface.py
 
Spoiler :
Put it simply:

Resolution A is 800 x 600
Resolution B is 1024 x 720

In the codes, you defined a panel X to be 400 x 300, and panel Y to be screen resolution X - 400, screen resolution Y - 300.

Thus, obviously under Resolution A, panel X will look similar to panel Y, since panel Y will be 400 x 300 as well.
But under Resolution B, panel X will look smaller than panel Y, since panel Y is now bigger.

All panels in BTS are coded in similar fashion, where certain panel sizes are fixed, while the rest will vary depending on screen resolution.
As I already stated, top left and top right are fixed size, while top mid will become longer or shorter based on screen resolution.
Similarly, top left and bottom left are fixed, so again center mid will vary.

Stop looking at the dll files. It is all coded in CvMainInterface.py

CvMainInterface.py uses only getXresolution to determine what resolution the game runs in. To not get the problems you described for obvious reasons. Also I don't want to edit every window because I still wouldn't get a bigger text. So thats not the purpose.

But going with your example.

Asuming i run the game in windowed mode. Which forces any resolution to stay the same (real world)size on screen by full screening the window. So Resolution A and Resolution B are be same real world size.

I would want to run the game in resolution B. Have Python think i run in resolution A. Then with a magic trick (maybe Bill Gates) have the windows Python creates, fit to window size. Realising this is not optimal and giving blurry and deformed text.

The 400x300 window, under normal settings fills 50% of resolution A and 40% of resolution B. So it becomes "smaller".

If Python dipslays in resolution A with the game in resolution B, but still tries to fit both to window size. Then the box will stay 50% of the screen. (ugly / deformed / blurry etc, but still)

This is what i want to try. But this does require both "The game" and Python to be ran in different resolutions, but fit to same screen size. Which I doubt will be possible.

Also this might be the completly wrong aproach to the problem, but i think there might be no solution. Basicly i want bigger font type everywhere, but it seems they are fixed.
 
To do what you want, you need to revamp the whole CvMainInterface, which can be done, if you are experienced enough with python.

Which is what I am trying to do. However getting time to do it is a problem.

Also this might be the completly wrong aproach to the problem, but i think there might be no solution. Basicly i want bigger font type everywhere, but it seems they are fixed.

If it is just the text you want bigger that may be possible. The problem will be in making it look good on screen.
 
I just want bigger text yes. Can you set it at once for every text? Or does each window have font size defined just like their window (i guess it would)?

If it takes redoing every window just for a bigger font type, then that might be a lot of work.

I would be interested to see how bigger font would look, even without the fitting window sizes. Maybe i figure out how to edit some of the windows myself.
 
Just go to the theme files and define the font size bigger...
But bigger font size will not make panels or buttons bigger.
You end up with big words with the same small size buttons which look odd.
 
@platyping
Theme files?

I do find font in a lot of files, including in CvMainInterface.py, mean those?

thanks again :)
 
:D Platyping Thank you very much :D

I changed line 378,383,384,385 in file Civ4Theme_Common.thm, increasing font size by 2

Increasing their size did exactly what i want. In some cases, like the window you get when you hover your mouse on a building, the box already adjusts :D

My gold/turn is through my era now, and some other things only barely fit. But it doesnt look bad :D. Big civilization scores, and bigger building descriptions etc, I am happy :D

*big edit + screenshots:
Big tile description, building information, current mouse information, City screen, combat odds, unit information, etc. Doesn't seem all to broken to me, very happy with it :). Only place i really notice it is gold(/turn) but still can still tell i am doing good (if not economic advisor). Also the time barely fits, but good enough :D

I haven't noticed any really broken screens yet. I'm sure there will be, but like the city screen buildings already build, resources etc all that information stayed small. Units or buildings with a very long description go out the top of my screen. So i can't see the name. Noticed that once with a building. But again no major issue, many other ways to find out the name.

Overall this made me very happy :), it seems good and working across most advisors etc too. Most windows had (still have) extra room since in high resolution. This to me though looks much better :D
 

Attachments

  • Civ4ScreenShot0006.JPG
    Civ4ScreenShot0006.JPG
    397.9 KB · Views: 188
  • Civ4ScreenShot0005.JPG
    Civ4ScreenShot0005.JPG
    320.7 KB · Views: 152
  • Civ4ScreenShot0007.JPG
    Civ4ScreenShot0007.JPG
    493 KB · Views: 162
Top Bottom