XU4
===

   "Prepare yourself for a grand adventure: Ultima IV, sixteen times
   larger than Ultima III, is a milestone in computer gaming.  Lord
   British has produced a game to challenge, not only your physical
   and mental skills, but the true fabric of your character.  The evil
   triad of Mondain, Minax, and the hellspawn Exodus, have been
   vanquished and peace reigns throughout the land of Britannia.  Evil
   yet abounds, but in isolated pockets and in the hearts of men.  A
   new age awaits the coming of one who can conquer evil on all
   frontiers through the mastery of both magic and the use of force.
   Daemons, dragons and long-dead wizards still plague the countryside
   and must be destroyed.  The seeker on the path of the avatar will
   faces hostile groups composed of mixed enemy types and will survive
   such encounters only by strategic use of weapons and terrain.
   Earthly victories over seemingly impossible odds lead to the final
   conflict, where the ultimate challenge -- the self -- awaits..."
     -- Back cover of Ultima IV box

XU4 is a remake of the computer game Ultima IV.  The goal is to make
it easy and convenient to play this classic on modern operating
systems.  XU4 is primarily inspired by the much more ambitious project
Exult.  Linux is the primary development platform but it gets ported
to Windows and MacOS X regularly. It should be trivial to port to any
system with SDL support.

XU4 isn't a new game based on the Ultima IV story -- it is a faithful
recreation of the old game, right up to the crappy graphics.  If you
are looking for a game with modern gameplay and graphics, this is not
it -- yet.  New features that improve the gameplay and keep with the
spirit of the original game will be added.

XU4 also tries to maintain strict compatibility with the original for
its savegame files.  You can use a game saved in XU4 with the original
and vice versa, at least in theory.


STATUS
------

New in v1.0beta3
 - more bug fixes
 - stability improvements
 - lots more changes under the hood

New in v1.0beta1
 - lots of fixes for dungeons and combat
 - now fully playable from start to finish
 - stability improvements
 - lots of changes under the hood: xu4 is now written in C++, new
   vendor scripting system

New in v0.9
 - dungeon altars and codex sequence (the game is now completeable)
 - added context-sensitive default action to "Enter" key
 - completed first person dungeon view
 - sounds effects
 - a few crasher bugs from 0.8 are now fixed
 - as usual, lots of bugs fixes and code reorganization

New in v0.8
 - dungeon rooms
 - first person view in dungeons
 - improved config menus 
 - config menu navigation with arrow keys
 - can now switch between VGA/EGA versions of the game
 - ranged monster attacks
 - implemented hole up & camp command
 - implemented inn ghost
 - xu4 can now load the Ultima IV data files straight out of
   ultima4.zip and u4upgrad.zip
 - all music can be previewed at the intro screen with the number keys
 - many spells now work: awaken, blink, cure, dispel, gate, heal,
   light, negate, tremor, resurrect, xit
 - The bell, book, candle and skull now work
 - better error reporting under MacOS X
 - bug fixes galore
 - lots of code cleanup

New in v0.7
 - ranged combat
 - long responses now pause before scrolling off screen
 - the telescope in the Lycaeum now works
 - the silver horn now works
 - monsters now initiate combat
 - wind now influences ship movement
 - fields, lava and poison now work in combat
 - added player highlighting in stats display during combat
 - added options to filter move messages and automatically open doors
 - certain people now "turn away" in conversations
 - lots more bugs squashed

New in v0.6
 - many bug fixes
 - lots of code reorganization
 - better pathfinding code
 - all vendors, healers, taverns and inns now work

New in v0.5
 - lots of combat refinements, random monsters
 - lots of fixes to vendor code (weapon, armor and food fully
   implemented)
 - Lord British nows heals party when asked about health
 - "Mix Reagents" command works
 - the "Yell" command now controls horse speed
 - lots of the game mechanics that were guessed before now match the
   original Ultima IV
 - two new utility programs are provided for encoding and decoding the
   graphics files used in the introduction (lzwenc & lzwdec)
 - the usual bug fixes

New in v0.09:
 - first go at combat; still need to figure out true U4
   combat algorithms
 - food vendors now work and buggy weapons/armor vendors are fixed
 - AdvanceMAME scaler (now the default), handles x2, x3, x4
 - configuration menu at startup, settings saved in .xu4rc file
 - drops frames when needed to better handle slow computers or X displays
 - lots of code cleanup and bug fixes

New in v0.08:
 - 2xSaI scaler (now the default)
 - fullscreen mode (-f on the command line)
 - skip intro mode (-i on the command line)
 - shrines and meditation, more actions affect karma
 - sleep fields and poison now work
 - if the party dies, they are now resurrected by Lord British
 - spell casting improvements: Awaken, Cure, Heal, Dispel, Resurrect work

New in v0.07:
 - items searchable (runes, white & black stones, bell, book, candle,
   etc.)
 - city residents now move and have animated tiles
 - gem viewing (tiles aren't quite right)
 - getting chests
 - some actions now affect your virtues (stealing chests, talking to
   hawkwind, finding runes and stones)
 - companions will now join the party if asked
 - added filtering to the scaled images, like exult (2xBilinear only,
   for now); the -scale parameter now accepts a number or "2xBi" for
   filtered scaling (2 is still the default, 2xBi looks bad without
   the VGA upgrade)

To do, in no particular order:
 - sound effects
 - autoconf, automake
 - everything else :)

Some thoughts for possible improvements:
 - Ultima 5 style aiming in combat (i.e. allow angle shots)
 - support for higher-resolution tile sets
 - allow the map view to display more of the world
 - automatically fetch Ultima 4 for DOS if not found
 - move hardcoded data (starting attributes, etc.)
   into xml config file
 - menu-based interface, like Sega version
 - improve the scalers:
   + scale entire screen image rather than individual tiles
   + correct for aspect ratio


COMPILING
---------

Note that you need libxml2, SDL, the SDL development libraries &
headers, and the SDL_mixer library to compile.  TiMidity++ may be
necessary on some platforms, too.  Assuming they are present, type
make in the src directory to build it.  An executable called u4 is
created.


RUNNING
-------

The actual data files from Ultima 4 are loaded at runtime, which means
that a copy of Ultima 4 for DOS must be present at runtime.
Fortunately, Ultima IV is available as closed-source freeware on the
internet (legally).  A copy is mirrored at xu4.sourceforge.net.

Download ultima4.zip and (optionally) u4upgrad.zip, and place them in
the same directory as the u4 executable.  xu4 will read the Ultima IV
data files straight out of the zipfile.

xu4 searches for the zipfiles, or the unpacked contents of the
zipfiles in the following places:
 - the current directory when u4 is run
 - a subdirectory named "ultima4" of the current directory
 - "/usr/lib/u4/ultima4/"
 - "/usr/pkg/lib/u4/ultima4/"

The zipfile doesn't need to be unpacked, but if it is, xu4 can handle
uppercase or lowercase filenames even on case-sensitive filesystems,
so it doesn't matter whether the files are named AVATAR.EXE or
avater.exe or even Avatar.exe.

At the title screen, a configuration menu can be accessed by pressing
'c'.  Here, the screen scale, filter, volume and other settings can be
modified.  Note: the game must be restarted for the new settings to
take effect.  These settings are stored in the file $HOME/.xu4rc.

xu4 also accepts the following command line options:
 -f        - fullscreen mode
 -i        - skip the intro, go directly into the game
 -q        - quiet mode - no music
 -scale n  - scale the original graphics by a factor of n
 -filter n - use a filter on the scaled images; point, 2xBi, 2xSaI,
             and AdvanceMAME can be specified
 -v        - verbose output; prints out information useful for
             troubleshooting


ULTIMA 4 DOCUMENTATION
----------------------

Included with Ultima 4 for DOS, as downloaded from one of the above
sites, are electronic copies of the printed documentation from the
original Ultima IV box.  HISTORY.TXT contains the "The History of
Britannia", a general introduction to the world of Ultima IV.
WISDOM.TXT contains "The Book of Mystic Wisdom", which explains the
system of magic and provides descriptions of the spells and reagents.

PDF versions of these books may be available from:
http://members.aol.com/trigonman3/u4.html

An image of the cloth map from the original Ultima IV box can be found
at either of these sites:
http://members.aol.com/trigonman3/u4.html
http://www.dengler.net/xedragon/hrump/


DEBUG MODE (CHEATS)
-------------------

xu4 has a very useful debug mode (you can also think of it as a cheat mode).
To enable it, go from the xu4 main menu to:
Configure -> Gameplay Options -> Advanced Options -> Debug Mode (Cheats)

Cheat list:
* ctrl-c + h (cheat menu help)
* ctrl-d (destroy monster/object)
* ctrl-h (teleport to Lord British's throne room)
* ctrl-v (switch between 3-d and 2-d view; dungeons only)
* F1-F8 (teleport to a dungeon entrance; surface only)
* F9-F11 (teleport to the altar room of truth/love/courage; surface only)
* F12 (display torch duration)
* Escape (end combat; combat only)

Note:
Except for the Escape key, none of the cheats work during combat.


MISC
----

See http://xu4.sourceforge.net/links.html for some other interesting
Ultima IV related links.

Please send me a mail at andrewtaylor@users.sourceforge.net if you are
interested in helping.
