[UI-MOD] All-In-One Package

Post mods you have finished or are working on here.

Moderators: Balthagor, Legend, Moderators

Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

mrgenie wrote: Dec 08 2020 Arahatree, in short:"I can now confirm what you want is doable!"

In fact, I might even redo the whole tooltip thingy LOL Now I know how to design own panels heheh
That's great mrgenie!! :D actually Mr. Genius!! :-) :-)

wooow!!! I just read it fast, cause i don't have time right now, but i got the idea that we can create our own bitmaps and use them :D :D :D

As soon as i get some free time tonight or tomorrow morning i'll read all posts in detail.

I also made another mod to upload, another one that you can include in this All-in-one package if you are interested.

I think your tooltip is great! on the other hand, Evildari tooltip has that big 3d model that looks so impressive with the mod i published recently "SR remastered", because that way it looks like an enciclopedia of units really nice, with all those big 3d models so realistic looking. Maybe, if you don't like Evildari tooltip, another idea could be to add in your tooltip a big window showing the 3d model :-) :-) what do you think about it?

i would like to know more about how HAPS work. My problem is that i don't know how HAPS files are organized: one HAPS file calls another one, right? i don't know what obSyspar means, or obUdefxp... I think those are used to call other haps?

&&HAPOB 6, --> what 6 means? sometimes it's 3 or other number...

What's the meaning of every haps file? For example, STA_F5A? what's that haps for? STA = "statistics"?? F5A... no idea. The only way i find them is searching for tooltips and titles texts inside all HAPS files content. If there is a button without tooltip or title text, it's impossible for me to find it.

How it can be done to use our own bitmaps?

If i would know how all this works, i cound spend a weekend trying to do that "units manager" UI.

And you find all that so easy, and you only need a pen, it makes you look like a wizzard.

Sometimes i think it's a miracle that my haps mods are actually working. If i would tell you the logic and the way i was thinking to make them work you would laugh :lol:

Surprisingly enough my next mod that i will upload tomorrow morning is going to be another hapx file :lol: :lol:
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by evildari »

how to use your own background:
1. add line to \ini\Styles.csv

Code: Select all

15,1,1,0,0,0,1128,1090,,,,,,,,,,,,,//,826,Modular Spreadsheet,21811,16x9,1128,1090,,,,,
the entries up to the // are the most important - note that the 826 after the // is a reminder to see where it is allocated , it is the number to put in the next point into the .hapx
first number is the used SRBITS*.png - think it like hex-system where 10 is A and 15 is F - so in this case it would look in the file Graphics\skin*´\SRBITSF.png
the 5th and 6th number are the x and y top left coordinates and the 2 next ones the x and y coordinates of the bottom right - this is the area where the graphics for this "bitmapstyle" came from

2. make a SRBITS*.png that matches the first number as described above. And place it in \graphics\skin* folder \skin0 should work most of the time

3. change in a .HAPX file (used my SO mod finance page)

Code: Select all

&&HAPOB	6, 
obName	, 
obSysuse	2, 
obFlags	0x0, 
obState	0x0, 
obStyle	0, 
obUdef	0, 
obUdefxc	0, 0, 0, 0, 
obAction	0, 
obData	0, 
obDatafmt	0, 
ToolTip	, 
ToolTipSel	, 
ToolTipGrid	, 
obRect	0, 0, 1128, 1090, //size of object
obSyspar	1, 
hapname	"MOD_3FINANCES",
obUdefxp	, 
bitmapstyles	826, 0,          // this one is important - its the next free entry in the \ini\Styles.csv (first number foreground , 2nd number background image)
currframe	0,  // this to but leave at 0
4. profit
MS-demo1.jpg
5. failed at trying to be extremely modular with tiling : dont know how to remove spaces between the tiles (just a 92x22 pixel .png)
MS-demo2-1cell-tiles-notadjacent.jpg
You do not have the required permissions to view the files attached to this post.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

Arahatree wrote: Dec 09 2020 I think your tooltip is great! on the other hand, Evildari tooltip has that big 3d model that looks so impressive with the mod i published recently "SR remastered", because that way it looks like an enciclopedia of units really nice, with all those big 3d models so realistic looking. Maybe, if you don't like Evildari tooltip, another idea could be to add in your tooltip a big window showing the 3d model :-) :-) what do you think about it?
added to the To Do List.
Arahatree wrote: Dec 09 2020 i would like to know more about how HAPS work. My problem is that i don't know how HAPS files are organized: one HAPS file calls another one, right? i don't know what obSyspar means, or obUdefxp... I think those are used to call other haps?
ObSysPar (Object System Part ) I would guess it means.. but what it does is simple.. the object itself is part of another object defined here
obUdefxp you call upon a client haps.. basically you might have put it all in 1 large huge gigantic HAPS file..
I could easily move all HAPS into 1 huge gigantic file.. to make it more overviewable you split it up into subparts that make sense..
Arahatree wrote: Dec 09 2020 &&HAPOB 6, --> what 6 means? sometimes it's 3 or other number...
1 are the panels
3 are the objects inside a panel
6 are the bitmaps inside a panel
Arahatree wrote: Dec 09 2020 What's the meaning of every haps file? For example, STA_F5A? what's that haps for? STA = "statistics"?? F5A... no idea.
undocumented quite often in programming even programmers forget what their abbreviations mean..

In this case the file name is practically irrelevant.. from GAM_ROOT downwards you can easily pinpoint everything in the game.. because all the HAPS are children
of this root HAPS.

But for this very reason when people riddle, when I'm programming every variable I have an abbreviation for I always add once the long name like "UnitStrengthAgainstCloseCombatSoftTargets" as comment
and then I define UnitSCCST = 0; // UnitStrengthAgainstCloseCombatSoftTargets and from here on I only work with UnitSCCST but for the sake of if later
someone else will continue my work.. they can just look at the reference.. I ALWAYS comment everything..

I worked quite a lot in teams.. I found not commenting your work properly = waste of time.. always comment properly.. it may seem losing time at first..
but in complex development projects later on you save time if properly commented, or else others going to waste your time asking..

I'm sure somewhere in BG they have a paper what everything means..
Arahatree wrote: Dec 09 2020 The only way i find them is searching for tooltips and titles texts inside all HAPS files content. If there is a button without tooltip or title text, it's impossible for me to find it.
That's usually a good workaround to trace something in files :lol: from there on you can read inside the file at the top the parent file or inside the object links the children files.
Arahatree wrote: Dec 09 2020 How it can be done to use our own bitmaps?
I'm working on an example how to make a modular panel-construction approach.. with key elements and then you can in-game virtually
create unlimited panels with just using the HAPS..
Arahatree wrote: Dec 09 2020 If i would know how all this works, i cound spend a weekend trying to do that "units manager" UI.
That's why I'm working on an "Example" .. so you can easily see how it's done..

But I don't just make cheap examples, so give me a bit time to produce a nice good looking example mod..
Arahatree wrote: Dec 09 2020 And you find all that so easy, and you only need a pen, it makes you look like a wizzard.
A pen doesn't make anyone a wizzard :lol: it makes us old-school and that's not necessarily bad hehe
Arahatree wrote: Dec 09 2020 Sometimes i think it's a miracle that my haps mods are actually working. If i would tell you the logic and the way i was thinking to make them work you would laugh :lol:

Surprisingly enough my next mod that i will upload tomorrow morning is going to be another hapx file :lol: :lol:
Actually I found not seldom where BG produced HAPS files with values for the objects that don't make sense until I go up to parents and see what happened..
they used an older bitmap, during some update changed it.. and instead of fitting the panels and bitmaps and the objects properly to a 0,0 and calculating the proper offsets to
X,Y = 0,0 they just moved the object by the change in the bitmap..

Which causes sometimes text slightly off from the center of the updated bitmap..

this isn't visible to the user just playing the game.. I never noticed it.. until now editing files I all of the sudden notice it.. :lol:

Just shifting a bit is a good fast method.. but it does sometimes mean 1 or 2 pixels off from the center.. and since I'm a perfectionist I get grey hairs when I see it..
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

I edited the original menu a little bit.. to fit 2 more buttons for Evildari mod and the Unit Manager Arahatree wants to make..
New Menu 2 Extra Buttons.jpg
For the Evildari Mod which is an overview, I'm actually thinking editing it a bit to have 2 columns of units listed..
every column you can switch between "units you can research" or "units you already researched and can build right now"

In between, comes a bunch of 30+ (from top screen to bottom), not sure yet how this doing properly, information on the unit stats..
so you can compare directly between units in the research queue, as well between units already researched and between research&researched..

Easier to decide which to skip and which to actually build and which to actually research..

Also I'm thinkin for such a feature to the diplomacy panel.. so you KNOW what you actually have already and can easily compare if the AI has something really better..
You do not have the required permissions to view the files attached to this post.
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

With the 3 of us, I'm sure we can create the greatest modpack ever for this game..

which is my favorite game.. in fact the only game I'm still playing sometimes.. as I got sick of all the other games that keep re-inventing the wheel..
developing a game should always be improving what you already have, add more and better..

Especially with CPU ever getting better..

I loved the Civilization Franchise.. until Civ 4.. when they came with Civ 5 and basically threw everything of Civ 4 out of the window..
and then Civ 6.. again, everything out of the window..

They should have made civ 4, 64 bit.. improve the AI.. and add more depth to the game and that they could have sell as civ 5
then again... focus on performance, add more and better AI, more and better combat tactics, etc.. and that's civ 6..

but they didn't instead every time back to square one.. with TERRIBLE AI.. even a baby can beat the ai.. terrible..

Especially sea battles, long range attacks, airplanes..

unlike BG that kept improving the engine for the SR series..

I hope they continue.. and if they stop.. please go open-source so we can compile our own engine.. would love to add a lot of things I have in mind for this game..

Naval Battle groups.. Carrier Strike groups.. etc.. Units not single handedly walking around like now, but forming DIVISIONS and ARMIES..

As humans exploit the stacking.. have the AI do the same..

Some areas where tactical like peninsulas I build strong fortresses and then stack units.. similar i'd program the AI to exploit this..
OR if the AI detects this, NUKE IT ROFLMAO

SO many ideas I have for this game.. but.. no open source..

I hope one day they release an SDK for modders to add additional AI coding ourselves and compile it into the exe
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

evildari wrote: Dec 09 2020 how to use your own background:
1. add line to \ini\Styles.csv

Code: Select all

15,1,1,0,0,0,1128,1090,,,,,,,,,,,,,//,826,Modular Spreadsheet,21811,16x9,1128,1090,,,,,
the entries up to the // are the most important - note that the 826 after the // is a reminder to see where it is allocated , it is the number to put in the next point into the .hapx
first number is the used SRBITS*.png - think it like hex-system where 10 is A and 15 is F - so in this case it would look in the file Graphics\skin*´\SRBITSF.png
the 5th and 6th number are the x and y top left coordinates and the 2 next ones the x and y coordinates of the bottom right - this is the area where the graphics for this "bitmapstyle" came from

2. make a SRBITS*.png that matches the first number as described above. And place it in \graphics\skin* folder \skin0 should work most of the time

3. change in a .HAPX file (used my SO mod finance page)

Code: Select all

&&HAPOB	6, 
obName	, 
obSysuse	2, 
obFlags	0x0, 
obState	0x0, 
obStyle	0, 
obUdef	0, 
obUdefxc	0, 0, 0, 0, 
obAction	0, 
obData	0, 
obDatafmt	0, 
ToolTip	, 
ToolTipSel	, 
ToolTipGrid	, 
obRect	0, 0, 1128, 1090, //size of object
obSyspar	1, 
hapname	"MOD_3FINANCES",
obUdefxp	, 
bitmapstyles	826, 0,          // this one is important - its the next free entry in the \ini\Styles.csv (first number foreground , 2nd number background image)
currframe	0,  // this to but leave at 0
4. profit
MS-demo1.jpg

5. failed at trying to be extremely modular with tiling : dont know how to remove spaces between the tiles (just a 92x22 pixel .png)
MS-demo2-1cell-tiles-notadjacent.jpg
THANK YOU!! :-) :-) :-) :-)
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

omg.... i don't have time right now to read all this, but THIS TOPIC IS GOLD!
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

You are right mrgenie with what you say about other games when they reinvent the wheel. They cut off features that were working and nice. For example in hoi4, they took away money, supplies stockpiling, the piramid of influence... So, i play hoi3 instead of hoi4 :lol:

But i play more SRU, because the economic system is much better and realistic, population is not simplified, etc. plus everything is less abstract: if you bomb a factory you go to bomb a factory and you see it destroyed, is not an industry capacity percentage number hidden somewhere like happens in hoi4.

At the beginning i was playing more hoi3 than SRU because of the micromanagement hell (and because hoi3 has supply sea routes system), but i discovered that if i place all hotspots in the border, at the hoi4 style, i get all units arranged. The problem now is that there are a bunch of bugs for repair, hotspots, land-air transports... :-? all those bugs are making me micromanage everything again :-( i hope they fix all that.

Hotspots arrangement in the border screenshot:
You do not have the required permissions to view the files attached to this post.
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

ok, i have to go now. But, I will come back to this topic to read all the rest of posts that i didn't have time now to read so far.
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

Created now an additional button bitmap for inside the Titlebar..
UnitManagement Button.jpg
just an example for a "Unit Management" button and a functioning button that also get's the greeny border when select..

native as vanilla game.

It's late now.

Tomorrow I create the panel..

Well the bitmap I already did..
But tomorrow I put a HAPS connecting to the extra button in the Titlebar..

then I upload the files so Arahatree can see what's changed in the files..

I found always the best way for someone to learn.. is showing them basic stuff..
and then the changes easy to compare with vanilla..

from the changes it's always easy to see what's done..
PanelExample.jpg
You do not have the required permissions to view the files attached to this post.
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

This is an example of the LibreOffice Calc Screenshot

Or CSV file actually, Comma-separated values... but I have an question maybe Evildari knows..

if I save this.. it always puts trailing commas behind the &&BITMAPS and &&OBSTYLES

which corrupts the game.. can't load it with the commas behind these..

So I open after save in Notepad++ and delete these commas on these 2 lines..

Do you know how to save without this additional commas?

Or maybe another app that does what I want to do?
Maybe Excel? Or maybe a setting in LibreOffice not to save the commas?
You do not have the required permissions to view the files attached to this post.
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

Before going i just read this last post, so i answer now and then i'll read the rest of the topic:

When i work with .csv files i do it with excel. The problem is that when i export the file, excel converts all commas into semicolons |O

So i go to notepad++ and replace all semicolons into commas :lol:

I tried other apps, but they are worst than seeing a sh***t on a window.

i hope this helps.

i'll read all the rest of posts later, sorry that i can't right now.

See you soon!!
mrgenie
Brigadier Gen.
Posts: 923
Joined: Jul 08 2008

Re: [UI-MOD] All-In-One Package

Post by mrgenie »

Arahatree wrote: Dec 10 2020 Hotspots arrangement in the border screenshot:
Interesting setup.. and same exploit of stacking I use..

too bad the AI doesn't do this.. if I were to get hands on the source codes for this game.. all these exploits humans (ab)use I'd also do that to the AI..

or like when I do an overseas invasion, I NEVER go there alone with units.. always a few battleships at first.. put a few battleships next to your invading force and 20 or 30
units can easily destroy 200-300 enemy units simply because of the battleships..

Another trick I have, I let subs "patrol" a predefined route I set.. slower subs.. and faster units like battleships, aircraft carriers, supply ships.. I put them on escort..

I figured on the sea you can have 0 subs stack and then 9 surface ships stack.. 18 in total (I might be off a few here as I can't remember the exact number)
and then I let 1 sub do the patrolling and the rest escort..

there's no enemy ship that can cross my stacked battle group :lol:

Usually I setup 4 or 5 of these battle groups and let them patrol.. whatever the enemy sends, it's 100% destroyed..

The only thing I occasionally have to check is damage..

So I'd program this also in the game.. battle groups for naval ships..

obviously I'd also have subs ALONE..

and then a few sub I'd stack with the big boys as battle groups.. hunting down where my littoral and subs spotted the enemy..

that's code I'd ADDITIONALLY add to the game..

Also airplanes for recon of seas and oceans the AI now doesn't do this well.. as in the battle of midway movie they shown the tactics at that time..
in all directions you send out airplane to spot enemy ships..

That's something I'd also program.. have aircraft carriers in the battle groups with planes for recon and these planes then fly around the main task force to spot the enemy
and once spotter the airplane launch strikes while the battle group hunts down..

against such an AI.. a lot of human players would freak out Hahahahah
[UI-MOD] All-In-One viewtopic.php?f=91&t=31906
evildari
Brigadier Gen.
Posts: 629
Joined: Aug 10 2017
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by evildari »

mrgenie wrote: Dec 10 2020 This is an example of the LibreOffice Calc Screenshot

Or CSV file actually, Comma-separated values... but I have an question maybe Evildari knows..

if I save this.. it always puts trailing commas behind the &&BITMAPS and &&OBSTYLES

which corrupts the game.. can't load it with the commas behind these..

So I open after save in Notepad++ and delete these commas on these 2 lines..

Do you know how to save without this additional commas?

Or maybe another app that does what I want to do?
Maybe Excel? Or maybe a setting in LibreOffice not to save the commas?
i used the spreadsheet program Planmaker lately even exported styles.csv and it worked - did not pay attention to the trailing commas.
In your screenshot i see other issues that may cause corruption - since my experience is that those trailing commas (at least in other parts of modding) do no harm.
Check the row "u" there are several cells that miss the "//" (two slashes) - this is usually used by BG for comments (though i dont know if it also applies to styles.csv)
fill those fields and it should work.
Also dont enter a comment only line before the last line - it may cause corruption - or at least that line could be not used.
It seems that styles.csv has no ID in its line (just that number behind the two slashes) and the game is just counting the lines after the header.

Unlinke changes in .hapx files - changes in styles.csv need a complete game restart - not just return to main menu.
my mods
http://www.bgforums.com/forums/viewtopi ... 79&t=25932 (even techs and units for everyone - AI will own you too)
http://www.bgforums.com/forums/viewtopi ... 79&t=29326 (MARSX2)
Arahatree
Lt. Colonel
Posts: 211
Joined: Mar 23 2019
Human: Yes

Re: [UI-MOD] All-In-One Package

Post by Arahatree »

All this is great!

At last I got time to read.

Well, all this is as great as complicated, but anyways I will try to do it.

I have spent a lot of time trying to do a mod that changes the supply system to make it look more like the hoi3 Supply system. Why is it more realistic?

Because in ww2, in Dunkirk pocket, the Germans didn't have to strategic bombing in order to cut supplies for the trapped English and French troops. Not only this happens in that historical pocket, but also in all historical pockets in ww2 and modern times.

In the supply system we have now, small villages, villages, small towns and towns are providing military supplies to tanks, artillery, infantry, etc. in very unrealistic. They shouldn't have heavy armament factories in every single small village.

So the mod I have tried is that only from town ahead provide supplies, and let those small urban buildings to provide only 1% supplies (to make them act more like roads). That way, when you are planning an invasion into the enemy, you are paying attention to the sources of supply and you will plan accordingly. Also this makes strategic bombing less micromanage.

So, with this mod, units surrounded as those in Dunkirk pocket would be doomed if they don't receive airborne supplies. Without need of strategic bombing every single small town inside of that pocket.

And I made the mod. And it was wonderful in Europe!!

But after making it I realized that countries like Brazil, most of South America and most of Africa, have small village as the capital, and small villages as the rest of urban hexes.

So, I just wasted my time HUH

But now I'm thinking about making all those small villages with very low indirect fire defense... that way the pocket will become more realistic after a previous unrealistic strategic bombing. But now again the problem would be that strategic bombing would be overpowered on countries as Brazil, etc. which should be able to resist until the last of their guerrillas and garrisons... I'll keep thinking about it.

I will get to this units manager as soon as possible.

Thank you Mrgenie for creating that space to placing units manager button! :-) :-)

Yes, I'd like to help to this combined effort to make the best UI mod SRU has ever seen! :-)

So, you can include any of my mods to this package (including the units manager if I'm actually able to do it :lol: ), and you can assign me tasks for other features.

I think first of all we should organize our thoughts, we should talk about what do we want, how do we want it, and then make a UI design. Discuss that design, and when we all three agree to it, get our hands working on it :-)

And I think we could also discuss about the philosophy of the project. For example here are some of my ideas:
- we would appreciate the help and collaboration of any new modder that wants to join us for this project.
- we would include as many features as possible, as many buttons and options as possible, in order to allow several different styles of playing.
- we would design the ui trying to save as many clicks and mouse miles as possible, avoiding micromanagement.
- The UI should be clean and nice to the sight (no black background with white characters, and no white background with black characters... as far as I know the most smooth and nice for the sight is black characters on light brown background).
- The UI should provide as much information as possible, about units or other stuff. And try to fill all empty spaces with that information or with more buttons and functions.
- Decisions taken on the design of the UI should be under a total agreement, not only because of a majority. This is to avoid having one of us working and spending time and effort on something that he actually doesn't agree.
- We have to respect and be happy with each of us skills and limitations. For example if one of us try to do something and he's unable in the end, we all should be happy with that and redistribute the work to give him something that he actually knows how to do it.
- The project is altruistic, and there's not personal glory to be expected, just to improve the game because we like it this way.

What do you think about all this guys?
Post Reply

Return to “Modding Show & Tell”