Giter Club home page Giter Club logo

jkfov's Introduction

Jedi Knight patches

This repository contains patches (in IPS format) for Jedi Knight: Dark Forces II and Jedi Knight: Mysteries of the Sith that were were originally created by Max Thomas.

Field of view

Both games are hardcoded to a 90 degree field of view. These patches increase the field of view to 120.

  • jk-fov120.ips is for Jedi Knight: Dark Forces II
  • jkm-fov120.ips is for Jedi Knight: Mysteries of the Sith

The original version of the patch for Jedi Knight: Mysteries of the Sith causes crashes, black screens and other glitches at certain points in the game, as well as when zooming in and out with the scoped rifle and using force lightning. These happen due to a corruption of the floating point register stack, as it replaces instructions that push a single value to the stack with instructions that push three:

fld  DWORD PTR ds:0x57c19c
fst  DWORD PTR [esp+0x8]
fild DWORD PTR [esp+0x8]
fld  DWORD PTR ds:0x57ae20

This version of the patch simplifies the above to leave only one value on the stack, eliminating the issues:

fld  DWORD PTR ds:0x57c19c
fstp DWORD PTR [esp+0x8]
fld  DWORD PTR ds:0x57ae20

Accompanying these patches is a simple script to generate additional patches for either game for any field of view.

Patch generation script

To generate a 105 field of view patch for Jedi Knight: Dark Forces II:

python gen.py jk 105 -o jk-fov105.ips 

To generate a 110 field of view patch for Jedi Knight: Mysteries of the Sith:

python gen.py jkm 110 -o jkm-fov110.ips

Level of detail

Both games have very low distances for switching to lower level of detail models and smaller base mipmap levels. These patches force these distances to 200, effectively ensuring that the highest level of detail models and biggest base mipmap levels are used at all times.

  • jk-mipmapfix.ips is for Jedi Knight: Dark Forces II
  • jkm-mipmapfix.ips is for Jedi Knight: Mysteries of the Sith

jkfov's People

Contributors

lawadr avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.