Sky Demon
16 years ago
The title is self-explanitory. Is it possible to have more than 5 shortcut commandbuttons in vanilla C&C Generals?

I have already experimented with simply increasing the
SpecialPowerShortcutButtonCount = 5
to a larger number, the game simply ignored any buttons I added to the commandset higher than 5.

I then thought that by extracting the "GenPowersShortcutBarUS.wnd" from Zero-Hours Window.big to the directory /window/ and changing it's name to "GenPowersShortcutBarUSZH.wnd" and specifying the new window in the PlayerTemplate.ini and changing the buttoncount to 11 it would work. Making the PlayerTemplate.ini looking like so:

  SpecialPowerShortcutWinName     = GenPowersShortcutBarUSZH.wnd
  SpecialPowerShortcutButtonCount = 11
I found that with this configuration the game loaded fine with no problems, however when I loaded into a Skirmish Game (just as the player leaves the loading screen with the playerlist), I recieved a "Technical Difficulties" error. The ReleaseCrashInfo.txt gave the following error code:

Release Crash at Mon Jul 06 12:45:03 2009
; Reason Uncaught Exception in GameEngine::update

Last error:
Exception is access violation
WinMain at 4017d0
Error code: EXCEPTION_ACCESS_VIOLATION
Description: The thread tried to read from or write to a virtual address for which it does not have the appropriate access.
Access address:00000004 was read from.

Stack Dump:
  <Unknown>(-1) : <Unknown> 0x004DEA90

Details:
Register dump...
Eip:004DEA90	Esp:0013F678	Ebp:03A9F1A0
Eax:00000000	Ebx:00000000	Ecx:00000000
Edx:008B7218	Esi:03A9F0B0	Edi:00000001
EFlags:00010246 
CS:001b  SS:0023  DS:0023  ES:0023  FS:003b  GS:0000
EIP bytes dump...

Bytes at CS:EIP (004DEA90)  : 8B 41 04 56 8B 74 24 08 8B D0 0B D6 89 51 04 5E C2 04 00 90 90 90 90 90 90 90 90 90 90 90 90 90 


Current stack:
I have come to associate this kind of error code generation with the game not supporting some code or not finding a certain asset (a required file etc). Please help me, I am confused as to why the game is crashing. It should have no problem with the new "GenPowersShortcutBarUSZH.wnd" as it simply contains more information stating there are more commandbuttons.

Whilst the vanillagenerals "GenPowersShortcutBarUS.wnd" stops at

    NAME = "GenPowersShortcutBarUS.wnd:ButtonParent5";
the ZH version continues right up to

    NAME = "GenPowersShortcutBarUS.wnd:ButtonParent11";

**EDIT** - And what about the allowed number of CommandButtons?I don't like to turn one topic into a double question as it can confuse things, but I figure it will save creating a new Topic for a question that is closely related to the existing one.

Anyhow. I also noticed that as well as there being a limited amount of buttons on the shortcut bar, there are also only 12 allowed spaces in the commandset.ini, whilst Zero-Hour supports 14!
Could there be a way to increase the ammount of allowed commandbuttons allowed in the controlbar/commandset.ini? Or am I dreaming to far ahead? I would like to get this new factions units and abilities as close to that as in Zero-Hour.

Thank you for your help, it is greatly appreciated!! 😎 👍
Sponsor
Sky Demon
16 years ago
It wasn't a required part of the mod but it was definitely a limitation. Just wondering, it would be amazing if I could have more than 5 measly shortcuts. Having to select what I can and can't have shortcuts for really sucks.

Never mind. Close topic.
CommieDog
16 years ago
[Topic closed at poster's request]
UserPostedImage 
CommieDog: Because someone has to do your dirty work for you