Command & Conquer Generals: Difference between revisions

From Funiaita
No edit summary
 
Line 8: Line 8:


== w/a/s/d via Autohotkey for camera ==
== w/a/s/d via Autohotkey for camera ==

* [https://www.autohotkey.com/ Autohotkey]
* [https://www.autohotkey.com/ Autohotkey]
* Current Autohotkey as of 2024-12-31
* Current Autohotkey as of 2024-12-31
Line 38: Line 39:


=== If you use XP-SP2 compatibility mode ===
=== If you use XP-SP2 compatibility mode ===
<span style="color: Red">
This seems to create a new bug where the screen scrolls ALL down and can't be stopped.
Perhaps the script has a bug? Use at your own peril.
This bug happens (to me) only if I activate the compatibility mode.
But without the compatibility mode the game crashes from time to time.
</span>


It has been suggested to run C&C Generals under Windows 10 with the XP-SP2 compatibility mode to avoid crashes.
It has been suggested to run C&C Generals under Windows 10 with the XP-SP2 compatibility mode to avoid crashes.
If you do that, you need to use the following script:
If you do that, you need to use the following script:

Latest revision as of 13:59, 31 December 2024

Resolution

  • If you don't want to use one of the resolutions you see in the options, then change everything in the options dialog to something you like, then exit the game.
  • Add to the launch options
    • Properties / General / Selected Launch Option
-xres 1920 -yres 1080

Of course you use the values you want.

w/a/s/d via Autohotkey for camera

  • Autohotkey
  • Current Autohotkey as of 2024-12-31
  • create a file called "C&C Generals wasdCameraButAction.ahk"
  • paste the code below into it
  • Double-click the file.
    • No error, good.
  • Start C&C Generals and in the menu press 't'.
    • If you hear a beep, then the script is active.
    • If you don't hear a beep, then the script is not active.
  • In-Game, just press alt-w, alt-a, alt-s or alt-d to move the camera.
; wasdCameraButAction, v1
; AutoHotkey script which allows to use w/a/s/d for the camera while still having hotkeys for (a)ttack move, (s)top and others
; 2024-12-31 by ZanyScum

#HotIf WinActive("Command & Conquer Generals")

t::SoundBeep
~!w::Up
~!a::Left
~!s::Down
~!d::Right

#HotIf

If you are on ANY web page or in ANY document which has "Command & Conquer Generals" somewhere in it's title, like "wiki of Command & Conquer Generals", then the script will be active too. Just to keep this in mind.

If you use XP-SP2 compatibility mode

This seems to create a new bug where the screen scrolls ALL down and can't be stopped. Perhaps the script has a bug? Use at your own peril. This bug happens (to me) only if I activate the compatibility mode. But without the compatibility mode the game crashes from time to time.


It has been suggested to run C&C Generals under Windows 10 with the XP-SP2 compatibility mode to avoid crashes. If you do that, you need to use the following script:

; wasdCameraButAction, v1.1
; AutoHotkey script which allows to use w/a/s/d for the camera while still having hotkeys for (a)ttack move, (s)top and others
; Added code to start with admin rights because otherwise the script does not work if C&C Generals runs in XP-SP2 compatibility mode
; 2024-12-31 by ZanyScum

full_command_line := DllCall("GetCommandLine", "str")

if not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
    try
    {
        if A_IsCompiled
            Run '*RunAs "' A_ScriptFullPath '" /restart'
        else
            Run '*RunAs "' A_AhkPath '" /restart "' A_ScriptFullPath '"'
    }
    ExitApp
}

; MsgBox "A_IsAdmin: " A_IsAdmin "`nCommand line: " full_command_line

#HotIf WinActive("Command & Conquer Generals")

t::SoundBeep
~!w::Up
~!a::Left
~!s::Down
~!d::Right

#HotIf

Manual

In the installation folder is a folder "Manuals" which contains the game's manual in multiple languages. This is a must read, not because there is any secret information, but because it is so much fun to read it and know more abut all these units you will either build or destroy.

Keys

  • ctrl-1 to ctrl-0 save a building or selection of units to be selected again with 1-0. If you save your barracks as ctrl-0, you can build new infantry units without having to move the camera to the barracks. You can even set a new rally point without moving the camera back to your camp.
  • ctrl-f will create a formation which is a selection of units that will stay together and keep their relative positions. Ctrl-f again will undo the formation.
  • ctrl-F1 to ctrl-F8 will save a camera position and F1-F8 will recall the camera position.