User:Seb76

From UFOpaedia
Revision as of 20:30, 13 December 2008 by Seb76 (talk | contribs) (→‎Bug Fixes)
Jump to navigation Jump to search

Hi guys, I've been posting here for quite some time now so I guess it's time to make this page. For now it's just a stub, I'll try to update it when time is available.

I was a teenager when the game came out. I had no computer back then but I remember playing it on the computer of a friend's father, it was simply awesome. Years passed, and 3D completely changed the face of videogames. The main focus was turned to polygon counts and frames per second. Duke Nukem, Quake, Unreal, -you name any FPS-; I totally forgot about the "old-era" games. Later my interest in emulation brought me to the dosbox project; a real wayback machine... After all this 3D orgy, I decided to give it a shot and restarted the old X-COM just for fun. But then all memories came back at once; the music, the huge pixels, the tension of the first terror mission... The feeling was still the same after all the years. Still unmatched. IMHO the "best game ever" award it got is really deserved. I since tried the "UFO after-xxx" spinoffs, but I think their pseudo-realtime aspect removes what make X-COM unique to me, this feeling you get when you press the end of turn button. Everything can happen then...

Nowaday, most of my occupation with XCom is analysis of its code, and trying to explain the odd behaviors and see how the game can be exploited (with the help of a few patches). I'll try to gather here the most interesting pieces that I can find (most of my findings are scattered across the talk pages for the moment). Feel free to use the talk page if you have questions/suggestions.

UFO Extender

This section is about a loader I'm working on that adds functionalities/fixes to the UFO Collector edition of the game. You can grab it here: File:UFOLoader.zip. The loader patches the program in memory, it does not modify the executable. The advantage is that it won't change the file on disk so there is little risk of destroying your game installation (still, it is wise to do a backup of your game folder before using this). Modifications are seamless: there is no need to restart or wait for a geoscape/tactical transition to see the effect of the patches.

By default no patch is enabled; you need to activate them in the ini file. To use, just unpack the zip file in your XCOM directory, edit the ini file and start the UFOLoader.exe file. It looks for a file named "UFO Defense.exe" (you can arrange that in the ini file). Of course, if your computer fries while you're using it, I don't take any responsability...

Do not hesitate to report any problem you encounter with it, I'll try to help you fix it. Also feel free to propose any idea that might be worth a mod ;-)

NB: You need the VC2008 runtime to run this program. If you don't already have it installed, you can get it here.

For the curious out there, source is available here: File:UFOExtender-src.zip. The code is awful but I'm too lazy to fix that...

Also I noticed on forums that some people try to run this along with et_2005: there is little chance that it's gonna work. I presume et_2005 heavily modifies the binary and trying to patch on top of it is quite hazardous. Some stuff may work, some other may not; you're on your own there. Finally I don't do DAT files modifications because there are already lots of mods based on that. This allows them to keep working with the loader (that is why some xcomutil features should still work, as long as they are only based on resource modifications).

Equipment Screen

This patch changes the equipment screen. It effectively renders statstrings obsolete ;-)

  • Before battle, it changes the screen like this (in the final version, the psi stats are only shown when the psi skill has been trained):

Equip.png

  • During a mission, it looks like this:

Ingame.png

  • You can also have the rank shown:

Rank.png

(The "Weight>" at the bottom is only because I use a modified english.dat with an old patch, you should not see it in your version)

  • Show Grenade State: if you select a primed grenade, it'll be indicated in the description

PSX Music

If you have the PSX version of the game, you can enjoy the CD music with this patch. The tracks are mapped like that:

  • 1,2,3,4: geoscape music
  • 5: gmdefend
  • 6: gmenbase
  • 7: gmmars
  • 8: gminter
  • 9: gmstory
  • 10,11: battlescape music
  • 12: gmnewmar

gmwin and gmlose are not available. Because of similarity, gmlose is replaced with gmstory and gmwin with gminter.

I'm just wondering if it would be an idea to providing a selectable option that allows you to mix up the tactical music to include some of the other tracks as well, like the Geoscape tracks or gmstory. Breaks up the monotony a bit and can sometimes change the mood of the battle. But leave that until after you've achieved what you're setting out to achieve.
The intro should stick with the midi music, or you could use the interception music since that is a remix of the intro. On second though, scrap that - it lacks the slow buildup that is a major part of the intro.
P. S. Oh, and don't forget that the PSX music tracks start from track 02. -NKF
Hehe, you should have posted this yesterday. I lost one hour banging my head in a why-the-hell-does-it-play-interception-music-in-the-menu way before I realised that ;-) The intro music does not use the same mecanism as ingame music so it is not impacted by the modification. As for your suggestion, well the patch is written in C and mciSendString is flexible enough to allow stuff like that I think. The most difficult part is to define what we want... I'll however update with the current version and keep that improvement for later.

Wreck Analysis

Until the construction of hyper-wave decoders, it is impossible to know what missions aliens are performing. Even after recovering an alien ship, XCOM intelligence is unable to determine what was its purpose. This is no longer true. Salvaged navigation modules can now be analysed and may reveal what evil intentions the aliens had:

Wreck analysis.png

The probability of retrieving the information is based on the difficulty and on the number of UFO navigation items recovered from the mission. UFO mission and geographical zone can be discovered individually too.

Roswell mod

Make scout ships possibly crash during their missions:

Roswell.png

It can happen to all scouts, either detected or not. Crashed UFOs will be made visible so that you can initiate recovery missions.

Base Disjoint Bug

Made a fix for this, but it still requires some testing. I need some feedback to know if I can close the case for good.

Disjoint.png

Base Building Stacking

You can place base stuctures in advance. The construction will start when possible:

Queue1.png Queue2.png

Funds are credited when you place an element. No refund is possible. There might be some issues with 2x2 structures, report any problem you encounter.

Heavy Laser

This adds 2 firing modes to the heavy laser (which sucks big time by default :p):

  • Burst mode: you select 3 target points, and the soldier will shoot a 5 shots burst (on each and between points)

Burst1.png Burst2.png Burst3.png

  • Full auto: you select 2 points, the soldier will spray the area inbetween with 8 shots

Fullauto1.png Fullauto2.png Fullauto3.png

  • Firing the weapon will cost 50 energy

Range Based Accuracy

This modifies the accuracy based on the distance from the target. The accuracy decreases linearly (2% per tile) when shooting beyond the limit of the firing mode:

  • auto shot: 7 tiles
  • snap shot: 15 tiles
  • aimed shot: no penalty

These values should be considered as a first draft; they are configurable in the ini file so feel free to test other settings and report back if you find good ones.

Acc0000.png Acc0001.png Acc0002.png

Stun Fest

Add the "Stun" command in the menu for most weapons. The TU/Damage is based on the weapon's class:

Weapon ClassStun DamageTU %s
Pistols2015
Rifles and small launcher5040
"Heavy" weapons and auto-cannon6550
Launchers8080
Stun Rod (unchanged)6530

Bug Fixes

Mods

  • Hot grenades: they do explode even when held...
  • Alien Inventory: access to mind controlled units' inventory is granted
  • Crafts Always Ready: allow crafts to take off even when not 100% refueled/rearmed/repaired
  • Aliens do not seem to care if you assault a landed UFO. You can now have them retaliate as if their ship was shot down. Note that this was not extensively tested so feel free to report any odd thing that may happen when this patch is activated!!
  • Skippable intro movie
  • Why can't we use alien weaponry without researching? After all a gun's a gun, you just pull the trigger... A new hack was added for this. When activated, you can use all alien items you recovered. Of course you still do need to research items before you're able to manufacture them!
  • No Blaster Bomb Drift: disable the randomness applied to blaster bomb trajectories between waypoints. It'll solve drifting issues experimented with the blaster launcher, but also make aliens even more deadly with that weapon since the hard coded accuracy of 55% they have won't affect their shots anymore
  • Recover All Clips: recover all clips after tactical phase, even those that have been used (does not recover completely depleted ones)
  • No Alien Psi: no more psi trouble when fighting sectoids/ethereals
  • Kill stunned units in explosions (highly experimental!): usually, unconscious units just disappear when they blow up. Now you can score a kill when you blast stunned units (with the experience, morale and all the stuff that goes with it).

Blasted1.png Blasted2.png

In case of XCom units destroyed that way, they'll no longer go MIA but KIA

  • Keep Base Navigation Modules: do not remove navigation controls from recovered items after a successful base assault
  • More Smoke: set the limit of smoking tiles to 2048 (up from 400). I don't expect this to work perfectly on the first try; smoke is referenced on lots of places and I'm not sure I patched everywhere needed. Report what works and what fails
  • Force Language: tired of selectin your language every time your start the game? This is for you
  • Funding Council Income Only
  • Surrender Defence Missions
  • Disable Base Defenses: disable the base defence mecanism. Why delay the inevitable? A battle ship will eventually come through... Useful if you want to use some defence modules for tactical purposes
  • Initial Alien Bases without the trouble of setting things up
  • Show grenades primed status
  • Faster base defense sequence: remove the wait periods during base defense sequence. The need to press the button can be removed too
  • Reorder soldiers in craft

SoldiersPosition.png

Now you can force rookies on the front line...

NB: Since it switches entries in SOLDIER.DAT, it may screw up interaction with XComUtil (e.g. with automatic re-equiping of soldiers).

  • Line of fire restriction for psiamp and mind probe. Of course the aliens are not impacted
  • Change initial base layout
  • Change experience caps
  • Shortcuts: enable keyboard during assault missions. To stay consistent with geoscape, the keymap is qwerty. Current key mapping:
    • UpArrow: unit goes up
    • DownArrow: unit goes down
    • LeftArrow: left menu
    • RightArrow: right menu
    • Return: end of turn
    • Escape: options menu
    • BackSpace: go to next unit, remove current from the queue
    • Tab: go to next unit
    • Space: go to inventory
    • PageUp: view goes up one level
    • PageDown: view goes down one level
    • 1: reserve mode off
    • 2: reserve mode snap
    • 3: reserve mode auto
    • 4: reserve mode aimed

The implementation is rather messy, expect side effects and report them...

  • No Funkers: only guys that went on the last mission are checked for promotion
  • Bloodthirst: compute the "promotion score" based on killing stats only

Hacks

These hacks heavily alter the gameplay and should only be used for testing purpose.

  • Prevent game over when score is really bad at the end of the month
  • Big brother: all shall be revealed ;-)
  • Alien pets: Alien turn handed over to the human player
  • Show All Locations: displays all active locations, detected or not