Skip to content

Installation Steps for Gothic 2

szapp edited this page Mar 5, 2019 · 25 revisions

Check the installation requirements first.

Usage (Important!)

By using these scripts, you agree to the terms of the MIT License and need to include the license as well as visible mentions of the original author when redistributing your source code.

Please respect my efforts and accredit my work in your project accordingly by visibly mentioning the name of the project, the original author and a link to this repository, i.e:

Gothic Free Aim by mud-freak (@szapp) https://github.com/szapp/GothicFreeAim


Installation Steps for Gothic 2

  1. Make sure Ikarus and LeGo are installed and parsed in _work\data\Scripts\Content\Gothic.src.

  2. Copy all files from this repository into your Gothic installation. Mind the relative paths. Do not forget the binary files (GFA_Textures.zip) that come with the release.

  3. Have the files parsed:

    • In _work\data\Scripts\Content\Gothic.src, somewhere after Ikarus, LeGo and AI\AI_INTERN\FOCUS.D, add
      GFA\GFA_G2.src
      
    • In _work\data\Scripts\System\Camera.src, at the end, add
      Camera\CamInstGFA.d
      
    • In _work\data\Scripts\System\ParticleFX.src, at the end, add
      PFX\PfxInstGFA_G2.d
      
    • In _work\data\Scripts\System\SFX.src, at the end, add
      SFX\SfxInstGFA.d
      
    • In _work\data\Scripts\System\VisualFX.src, at the end, add
      VisualFX\VisualFxInstGFA.d
      
    • In _work\data\Scripts\System\Menu.src, between _intern\menu.d and menu\menu_main.d, add
      Menu\Menu_Opt_Game_GFA.d
      
  4. Add a new menu entry to the options game menu. With this users can enable and disable free aiming from the options menu. Keep in mind, that there are still players preferring keyboard controls over mouse. Free aiming will always be possible to disable in the Gothic.ini file.

    • In _work\data\Scripts\System\Menu\Menu_Opt_Game.d find items[XX] = "MENUITEM_GAME_BACK"; in the instance MENU_OPT_GAME and change it to

      items[XX]       = "MENUITEM_OPT_GFA";
      items[XX+1]     = "MENUITEM_OPT_GFA_CHOICE";
      
      items[XX+2]     = "MENUITEM_GAME_BACK";

      By default, XX is 15 and it should look like this afterwards:

      items[15]       = "MENUITEM_OPT_GFA";
      items[16]       = "MENUITEM_OPT_GFA_CHOICE";
      
      items[17]       = "MENUITEM_GAME_BACK";
    • In the same file find posy = MENU_BACK_Y; in the instance MENUITEM_GAME_BACK and change it to

      posy = MENU_BACK_Y+300;
    • In _work\data\Scripts\System\Menu\Menu_Opt_Game_GFA.d set the constant MENU_ID_GFA to the next available slot in the menu, typically (XX-1)/2 which is 7 by default. For example:

      const int  MENU_ID_GFA      = 7; // Next available Y-spot in the menu
    • In the same file you might have to adjust the menu labels. By default they are in German.

  5. In _work\data\Scripts\Content\Story\Startup.d find the function INIT_Global(). Inside, either somewhere after Ikarus and LeGo or instead of them, initialize Gothic Free Aim with

    GFA_Init(GFA_ALL);

    GFA_ALL will enable all features that come with this script package. You can disable features like so

    GFA_Init(GFA_ALL & ~GFA_REUSE_PROJECTILES);

    Read on here to find out more about the different features.
     
    If you initialize LeGo before GFA, make sure to do so with the necessary LeGo packages for GFA (LeGo_All is not enough!): Required Lego Packages.

  6. If you are using the feature GFA_SPELLS, it is recommended to add the following lines at the beginning of the function C_CanNpcCollideWithSpell() in the file _work\data\Scripts\Content\AI\Magic\C_CanNpcCollideWithSpell.d to restrict the range of spells (the AI does not react to damage beyond a certain distance).

    // Do not damage beyond maximum fighting range (AI does not react)
    if (Npc_GetDistToNpc(self, other) > FIGHT_DIST_CANCEL) {
        return COLL_DONOTHING;
    };
  7. In _work\data\Anims\Humans.mds add the lines as indicated in _work\data\Anims\Humans.mds.additions. Make sure you add the lines before the two closing brackets "} }" at the end of the file.
    Do the same analogous for _work\data\Anims\MDS_Overlay\Humans_BowT2.mds.additions and _work\data\Anims\MDS_Overlay\Humans_CBowT2.mds.additions.

  8. Backup and delete the following files

    • _work\data\Anims\_compiled\HUMANS.MSB
    • _work\data\Anims\_compiled\HUMANS_BOWT2.MSB
    • _work\data\Anims\_compiled\HUMANS_CBOWT2.MSB

After parsing the scripts, GFA should be fully implemented. Read on here to find out how to adjust GFA to your preferences.