mr_hymn_
8 years ago

The magic happens in the .wnd files, study those files...
If im not mistaking the commandbuttons are implemented in ControlBar.wnd...

Originally Posted by: acidbrain 



Yep I know that file I edit it and all button are messed up. Anyway I will try to understand them.

As below sample code I have no idea what it means.

FILE_VERSION = 2;
STARTLAYOUTBLOCK
  LAYOUTINIT = [None];
  LAYOUTUPDATE = [None];
  LAYOUTSHUTDOWN = [None];
ENDLAYOUTBLOCK
WINDOW
  WINDOWTYPE = USER;
  SCREENRECT = UPPERLEFT: 0 416,
               BOTTOMRIGHT: 799 599,
               CREATIONRESOLUTION: 800 600;
  NAME = "ControlBar.wnd:ControlBarParent";
  STATUS = ENABLED+BORDER+SEE_THRU;
  STYLE = USER;
  SYSTEMCALLBACK = "ControlBarSystem";
  INPUTCALLBACK = "ControlBarInput";
  TOOLTIPCALLBACK = "[None]";
  DRAWCALLBACK = "W3DGameWinDefaultDraw";
  FONT = NAME: "Times New Roman", SIZE: 14, BOLD: 0;
  HEADERTEMPLATE = "[None]";
  TOOLTIPDELAY = -1;
  TEXTCOLOR = ENABLED:  255 255 255 255, ENABLEDBORDER:  255 255 255 255,
              DISABLED: 255 255 255 255, DISABLEDBORDER: 255 255 255 255,
              HILITE:   255 255 255 255, HILITEBORDER:   255 255 255 255;
  ENABLEDDRAWDATA = IMAGE: NoImage, COLOR: 252 249 249 128, BORDERCOLOR: 255 252 252 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                    IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255;
  DISABLEDDRAWDATA = IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                     IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255;
  HILITEDRAWDATA = IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255,
                   IMAGE: NoImage, COLOR: 254 254 254 255, BORDERCOLOR: 0 0 0 255;
  CHILD
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
Just draw it out, get the texture from the commandbar and figure it out, just check the coordinates, if others can do it you can do it too...:P

CommandButton01:

WINDOW
        WINDOWTYPE = PUSHBUTTON;
        SCREENRECT = UPPERLEFT: 223 494,
                     BOTTOMRIGHT: 273 538,
                     CREATIONRESOLUTION: 800 600;
        NAME = "ControlBar.wnd:ButtonCommand01";
        STATUS = ENABLED+IMAGE+NOFOCUS+WRAP_CENTERED+ON_MOUSE_DOWN;
The resolution is 800x600 so you can set out the whole window on paper by checking the coordinates.
Upper left 223, 494...so 223 to the right on the x-axis and 494 down on the y-axis is the top/left corner.
Lower right 273, 538...so 273 to the right on the x-axis and 538 down on the y-axis is the lower/right.corner.
This creates a 50x44 button

CommandButton02:

WINDOW
        WINDOWTYPE = PUSHBUTTON;
        SCREENRECT = UPPERLEFT: 223 545,
                     BOTTOMRIGHT: 273 589,
                     CREATIONRESOLUTION: 800 600;
        NAME = "ControlBar.wnd:ButtonCommand02";
        STATUS = ENABLED+IMAGE+NOFOCUS+WRAP_CENTERED+ON_MOUSE_DOWN;
Upper left 223, 545...so 223 to the right on the x-axis and 545 down on the y-axis is the top/left corner.
Lower right 273, 589...so 273 to the right on the x-axis and 589 down on the y-axis is the lower/right.corner.
This creates a second 50x44 button under the first button with a gap of 7 between them.

CommandButton03:

WINDOW
        WINDOWTYPE = PUSHBUTTON;
        SCREENRECT = UPPERLEFT: 278 494,
                     BOTTOMRIGHT: 328 538,
                     CREATIONRESOLUTION: 800 600;
        NAME = "ControlBar.wnd:ButtonCommand03";
        STATUS = ENABLED+IMAGE+NOFOCUS+WRAP_CENTERED+ON_MOUSE_DOWN;
Upper left 278, 494...so 278 to the right on the x-axis and 494 down on the y-axis is the top/left corner.
Lower right 328, 538...so 328 to the right on the x-axis and 538 down on the y-axis is the lower/right.corner.
This creates a third 50x44 button to the right of the first button with a gap of 5 between them.


The rest is up to you...:P
Panem et kirkinses
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
Maybe this will help...:P
UserPostedImage

I attached a file with C&C Utilities, the WNDEdit app is in there...
We cant thank DeeZire enough...:D

Greetz   C&C Utilities.rar (1,865kb) downloaded 687 time(s).
Panem et kirkinses
mr_hymn_
8 years ago
Thank you. I called that a good hint. that would help me a lot. I will try to change the commandbar too if possible.
mr_hymn_
8 years ago
Hmmm why it crash every time I am trying to open. I did extract the files out.
UserPostedImage
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago

Thank you. I called that a good hint. that would help me a lot. I will try to change the commandbar too if possible.

Originally Posted by: Mr_Hymn_ 



Practice makes perfect, if you spend some time on it, dont give up and figure it out the feeling will be great if you succeed...


Panem et kirkinses
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago

Hmmm why it crash every time I am trying to open. I did extract the files out.

Originally Posted by: Mr_Hymn_ 


Windows 10?

Panem et kirkinses
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
I actually never modded the windows but i must say i am curious so im going to help you with it...
Panem et kirkinses
mr_hymn_
8 years ago

Hmmm why it crash every time I am trying to open. I did extract the files out.

Originally Posted by: acidbrain 


Windows 10?

Originally Posted by: Mr_Hymn_ 



Gosh I am using windows XP. Too old I guess. I will install windows 10 tomorrow then.
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago

Hmmm why it crash every time I am trying to open. I did extract the files out.

Originally Posted by: Mr_Hymn_ 


Windows 10?

Originally Posted by: acidbrain 



Gosh I am using windows XP. Too old I guess. I will install windows 10 tomorrow then.

Originally Posted by: Mr_Hymn_ 



Was just a question no requirement for the app, i use windows 7 and it runs fine...
Panem et kirkinses
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
ZH
UserPostedImage

OFS
UserPostedImage

You also have to adjust the commandbar texture a bit btw...
Panem et kirkinses
qqqqqqqqqp
8 years ago
Hmmm ini editor... idea:A++ I shall test this on a Windows ten. Windows xp is not bad its just everything getting to were it only works on newer OS which then leaves the older ones in the dark. But if you can upgrade I would say Windows 7 it was nice on my laptop... then I went to 10 and it broke the way my graphics card works :/

Edit: it appears to work fine on Windows 10. Don't have ini file on laptop
9Q_1P at your service. Moddin help and mod maker ranges from paradrop planes, aircraftcarriers and yes snow men with death lazer eyes
Want a peek? Visit this page
Advanced warfare 
Blbpaws
  • Blbpaws
  • 100% (Exalted)
  • Administrator
8 years ago
AdrianeMapMaker
8 years ago
Well I Had the Same thing with Mr Hymn its crashes whenever i edit the wnd file

Btw Can u send me what should i change when i want to change the orange layout of the Vgen and i want to make it like Zero hour (Blue)
A part of ZH worldbuilders map making community
https://discord.gg/tJ6zyGb 

UserPostedImage




acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
Well since i have zero experience with wnd files i did a little test.
I exchanged the ControlBar.wnd from fos with the original ControlBar.wnd from zh and this was the result...
UserPostedImage

Its a matter of making your own coordinates so it doesnt become a copy of fos, i did a bit of measuring and i think you can fit 18 buttons without adjusting the original stuff that much, the challenge is to adjust the texture without ruining it in the process, i can be wrong though, hope im not..:P

You can make the left hud a bit smaller, gives you 18 pixels extra room, by removing the gaps between the buttons you gain 30 pixels room, and the space btween the start of the row of buttons and the end is 7 pixels, resizing the buttons to 46 gives you 28 pixels extra room.
Load the commandbar texture into paint.net and create a new layer with a colored box on it with the size of all the commandbuttons so you can see how you have to adjust the texture...
Maybe you can even make 3 rows of buttons if you make the buttons even smaller...

Fun project btw, good challenge...

Greetz
Panem et kirkinses
elliesy
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
Well i managed to get 20 buttons on it, it is only a design in paint.net, going to implement all the buttons now...
Here is a pic of the new layout, started with the USA Controlbar...
UserPostedImage
Panem et kirkinses
elliesy
8 years ago

Well i managed to get 20 buttons on it, it is only a design in paint.net, going to implement all the buttons now...
Here is a pic of the new layout, started with the USA Controlbar...
UserPostedImage

Originally Posted by: acidbrain 


.
.
.
Nice Layout , Hey Sir Acid it is possible to attach in my vgen .

.
.
if possible How to i start ...:D


acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
Bad news...
Game doesnt like 20 buttons, you can add them to the .wnd file but when you go over 18 buttons in commandset.ini the game says "no way mister"...
Here is a pic, going to rebuild it to 18 buttons now...
UserPostedImage
Btw, the hardest part is adjusting the commandbar texture, took the most time, coding this stuff is meh...

Greetz
Panem et kirkinses
acidbrain
  • acidbrain
  • 94.25% (Exalted)
  • General Topic Starter
8 years ago
18 buttons finished, now comes the hard part, making the textures so you dont start crying when you see it...

UserPostedImage
Panem et kirkinses