Hexen II: Hammer of Thyrion
Support for Standalone Free contents

[STATUS:  BETA / Incomplete, 2012-09-11, HoT-1.5.7, Engine version 1.29 ]


This document is about the support for standalone free contents / mods:
They are mods which would run completely indepentant of Raven Software's
usual Hexen II pakfiles, etc.  So in standalone mode, the game would not
look for valid Raven data at all.
This is different than usual mods which are run by the -game parameters.

You must apply the StandaloneMods.diff patch and re-compile for this to
take effect.


Running a standalone mod:
-------------------------

Three commandline arguments must be given:  -standalone -basegame <modname>

-standalone :  Tells the engine that this is a standalone game. None of the
Raven directories (data1, portals, hw) will be scanned/used.  Without this,
the engine runs normally and will look for valid Raven data.

-basegame <modname> :  Tells the engine that the directory for your standalone
mod is <modname>
Example:  glhexen2 -standalone -basegame mygame

The modname must not be any of the reserved Raven directory names (data1,
portals and hw), regardless of character case.

If someone else makes an expansion for your mod, that mod can be run be run
with the usual -game commandline arguments.
Example:  glhexen2 -standalone -basegame mygame -game myextra


stdalone.flg file:
-------------------------

Plain text file with a single line consisting of a positive integer number
only. Do not write floating point numbers or negative numbers in it.
The engine will read the standalone mod's requirement flags from this file.

GAME_WANT_PORTALS	128
Means that your standalone mod has the extra stuff provided by the Portal
of Praevus expansion pack such as the Demoness (Succubus) class, etc.  If
the engine sees this it will enable all of the portals features.

GAME_ONLY_HEXEN2	32768
Means that your standalone mod is for Hexen II only and not Hexenworld.
If the engine sees this and the engine running is Hexenworld, it will error
out.

GAME_ONLY_H2W		65536
Means that your standalone mod is for HexenWorld only and not Hexen II.
If the engine sees this and the engine running is Hexen II, it will error
out.

You must pick your requirements from these flags and add them. Examples:

If you only want mission pack support and don't care about anything else,
stdalone.flg should only contain 128

If you want mission pack and run under hexenworld only: 128 + 65536 = 65664
stdalone.flg should only contain 65664

If you want mission pack and run under hexen2 only: 128 + 32768 = 32896,
stdalone.flg should only contain 32896

If you don't require anything, put only a 0 in it.  Do not pick both of
GAME_ONLY_HEXEN2 and GAME_ONLY_H2W values, which means nothing will actually
run!

As it is usual for quake/hexen2 filesystem, this file can be overriden in
several ways.   Say, you put it in your pak0.pak file and pak1.pak file.
Since pak1.pak will have priority, the file from pak1 will be used.  Say,
that you put a stdalone.flg file in your modname directory out of a pak
file:  Files not living in pakfiles will always have priority.  Say, that
the user used a "-game modname2" commandline argument.  If modname2 has
this file (the same priority rules apply to modname2), the file from
modname2 has the priority (because the -game directory has priority over
the base directory.)


TODO:
--------------------

- Implement a way to find and properly use a "credits.txt" file provided
  by the mod.  Required by the menu system for the scrolling quit/credits
  messages. (this should be easy.)

- Implement a way to find and properly use a "startmap.txt" file provided
  by the mod.  Required by the menu system to start a single player game,
  otherwise the game will try starting demo1 (or keep1, if the mission pack
  support is active.)  (This should be easy, too.)

- Implement something for the menu system multiplayer map/episode selection.
  (may not be easy.)

- menu.c:  In case we are in PORTALS mode, disable the "Old Mission" entry
  and print "New Game" instead of "New Mission".  That kind of expansion
  pack support won't be available for standalone mods.   [Hexen II only.]

- menu.c:  Disable the "View Intro" entry???  Would the mods have an intro
  demo like the t9.dem of portals?  How about a GAME_HAVE_INTRO flag for
  standalone mods???   [Hexen II only.]

