Title    : The Orb of the Meek (for Hexen 2 v. 1.07)
Filename : OrbMeek.zip
Version  : 0.7
Date     : 11/9/97 
Author   : Brian "The Tick" Waak
Email    : waakb@manton.com
Credit   : Eric Hobbs for HCC, without which none of these great mods would be made.
           Well, not until Raven released THEIR compiler anyway... which SHOULD be
           soon, since id's lawyers have had it for weeks now!

           Raven Software for the coolest game on the planet, which has more stuff
           packed into its engine than I ever thought when I dove into the original
           HC code. The effort put into making the code fit together well is obvious
           after reading through just a few files- it's an amazing piece of work!
           Great job, people- can't wait to see what you do next!

           and of course, id Software, the Gods of cyberspace, the Creators of the
           greatest gaming engine the world has known, the mighty Quake... and soon
           Quake 2, now! None of this would exist without you guys.


Type of Mod
-----------
HexenC   : yes
Sound    : no
MDL      : yes


Format of HexenC
----------------
unified diff  : no
context diff  : no
.hc files     : yes- with comments!
progs.dat     : yes


Description of the Modification
-------------------------------
Allows you to use a new item, the Orb of the Meek, which looks like a crystal ball with a smaller white
one inside it. What does it do? Why, makes things meek, of course! :) Actually, I'm using "meek" in
the "small" sense there. Specifically, very small. :) In fact, the Orb is something people have been
wanting to put into a Quake game for a while- a SHRINKER! That's right, it shrinks your enemies to a
small fraction of their former size, and their power is reduced along with it- in fact, if you get close
to a shrunken enemy on the ground, you squash it like the insect it now is! This effect is like the
Shrink Ray from Duke Nukem 3D, except without the "stepping" animation (yet). However, shrunken
enemies (and players) aren't helpless, as they were in DN; rather, they can still use all their weapons
and skills, but the POWER, and size, of those weapons is reduced along with their carriers. This goes
for you too, if you get reduced! Crush the tiny ones quickly, though, because the shrinking spell
(unlike the Seal of the Ovinomancer) DOES wear off on monsters as well as players, and when it does,
the formerly small ones are likely to be quite angry with you!

And yes, you CAN be reduced by your own Orb, if you're too close to it when it goes off. When activated,
an Orb rises into the air and hovers for a short time. Then it explodes in a burst of white energy, and
this energy shrinks every living thing it touches- including the Orb's user, if he or she is too close!
So get away from an Orb after you drop it- that is, unless you WANT to be shrunk- and creative level
designers can give you reasons to want to! I intend to build an "example" level, to be included with
future releases of the Orb, but right now I just have the item done. I decided, though, that I should
show people what it can do, so all the designers (and players!) out there can start thinking up devious
uses for it.

Since the Orb is a new item, it has to be created in a level before it can be used (of course). For
level designers, this should be as easy as putting an "art_shrink" entity into your level somewhere,
though I haven't tested that yet. If you don't want to wait until a level with the Orb is made, you
can still use the old standby, the create command. Just type in "create art_shrink" at the console,
and poof, there it is. This IS tested, and works fine AFAIK. And of course, if you just want to use
the thing, without picking one up first, you can use impulse 43.

Speaking of impulses, there is one annoying thing I haven't found a decent workaround for yet- it
seems Raven HARDCODED the inventory screen into the Hexen II exe! This means that the Orb (or any
other new item, for that matter) will NOT SHOW UP on your inventory, no matter how many you have!
It ALSO means that you can't use it like a normal inventory item, you MUST use the correct "hot key"
item impulse, which for the Orb is 115. In my own config, I just bound a key to "impulse 115" near
some of my other item keys, which works great as long as you can keep the keys straight. Unfortunately,
those of you who always use the inventory (with "[", "]", and "Enter" in the default config) are SOL
until I or somebody else figure out how to get new items to show up in the main inventory! As a half-
fix for this, I have the Orb tell you how many Orbs you have left, each time you use one- this seems
similar to the way a bunch of Quake mods do new items, so I'll figure it's good enough for most people,
for now. Anyway, the item is fun enough to use, that I think it's worth the hassle!

There's also an "auto-shrink" impulse, similar to the "sheep" impulse (14) that always turns you into a
sheep no matter how many polymorph projectiles are flying around (usually none). Just type "impulse 15"
into the console, or bind it to a hotkey, and prepare to experience life as a munchkin! Just as the
sheep impulse does, the shrink impulse behaves as though you were just shrunk by an actual Orb, so it
wears off in the same time, about 30 seconds. You get an experience bonus for killing while small, but
it's smaller than the one you get for being a sheep, since you still have all your weapons as a Tiny
Tim/Tina. Of course, since your life is ALSO reduced when you're small, and you CAN'T heal back up to
your original total until the shrink spell wears off (except with a Mystic Urn of course), you'll
probably want to just run into a dark corner and hide until it's over, in a DM at least.

No special impulse is needed to "step on" a shrunken victim and kill it, this happens automatically
whenever you get close enough. Only players can step on shrink victims right now, which makes it
slightly easier to survive in single player, even though it makes the monsters look stupider. I
might program the ability to "squish" into the more intelligent monsters (like the archers, werecats,
and skull wizards) later, but right now I thought it unnecessary. And of course, you can only "step
on" shrunken creatures which are on the ground (imps don't die when they divebomb you), and only if
you aren't shrunk yourself!

One last similarity to the "sheepinator-" using a Tome while shrunk, unshrinks you. This was an obvious
thing to put in after I added the shrink kill bonus.

Have fun with this mod- I sure do. :)


How to Install the Modification
-------------------------------
The ZIP file includes the progs.dat and copies of the modified HC files, with comments
pointing out where I made modifications, and explanations of the workings of new functions
I wrote. Most of the changes involved adding in damage scales when weapons hit, so small
attackers do small damage, and these are pretty straightforward.

To use the progs.dat, go to your HexenII main directory.
Make a subdirectory and call it whatever you want- I use "OrbMeek".
Then run HexenII adding "-game OrbMeek" (or whatever you called it) to the command line.

To use the modified code, start with the HexenC code base, which you can get (if you
don't have it) by just decompiling the original progs.dat or progs2.dat in the data1
directory. If you want to use this patch as a base, just copy the included .hc files
over the ones with the same names in your progs directory; otherwise, you'll need to
look through the included files for the "OrbMeek Mod" comments.

I put "OrbMeek Mod code start" at the beginning of each modified code block, and
"OrbMeek Mod code end" at the end of each. The code between them is mine, the rest
is unchanged from the original HexenC base. Just add the OrbMeek code where appropriate,
and all should go smoothly.


KNOWN BUGS (and "features :)
----------------------------
I had to change the skull wizards so that they shrink in all directions when they teleport,
or they don't shrink when the Orb does its thing on them- just get really thin. This isn't
a bug, but involves how Hexen does scaling. I'll be working on a better workaround, but
right now that's how it is.

Skull wizards sometimes "phase in" on top of the player when teleporting, and when this happens
both entities get stuck. The only way out of this seems to be to kill the monster, which is
much harder to do since they pretty much always hit you with skulls. Sometimes they immediately
"push" you away when phasing in on top of you, and in this case you just jump for what looks like
no reason, and neither entity gets stuck. I am working on this, but the sticking doesn't happen
much on my machine, so I'll just put this warning into the text file for now.

For the same reason as the new skull wizard scaling, tornadoes appear really short when small, but
the same width & thickness, which ends up making the funnel look like a weird top instead of a
tornado. I'll work on this along with the skull wizard thing, but it doesn't affect the tornado's
behavior at all, so I didn't bother with it yet.

Some of the monsters which have melee attacks (especially golems) can't seem to hit you at all when
shrunk, I'm thinking this is because they're trying it too far away, but don't know for sure yet.

Any others? E-mail me if you find some. I may have (heck, probably did) forgotten to mention some
other strange effects which aren't bugs per se, but I'll trust the Hexen community to point them
out to me in due time. :)


CHANGE LOG
-----------
-Made basic orb model and artifact entity. Added strings to make game print messages correctly.

-Made artifact use motions- thrown like a grenade, then rises off what it hit and explodes in the
 shrink flash a couple of seconds later.

-Added shrink function, correctly resizes bounding box of victims instead of just scaling them.

-Noticed that non-living objects weren't usually redrawing correctly when shrunk, so made shrink
 affect only players and monsters.

-Figured out how to get the "crush death" when a shrink victim is touched by a non-shrunk player.
 Added obits to client.hc.

-Went through weapon & monster code finding places to change, so shrunken entities do less damage.
 Also made projectiles smaller, to correspond to controllers' shrunken status. Whew, it seems so
 EASY when I write it like that... :) This "step" actually took me longer than all of the others
 put together, because there were so many files to go through!

-Added second orb inside big one, in the item entity. Didn't have a clue how to do this until I
 read the code for the Scarab Staff, even though I'd always wanted it to look that way. Now it
 does- and it's much cooler!


Technical Details
-----------------
If you're that interested, feel free to read the code- that's what it's there for. :)
I already explained the bugs I'm aware of, if you find more, feel free to email me at
waakb@manton.com. I'm the only one who plays Hexen 2 at my office and home, so I haven't
tested the item in multiplayer yet- but since I used much of the same code in many places,
it should work fine as long as everybody's running with the same progs.dat. Somebody please
do this and let me know how it went! Better yet, if you get this and want to set up a game
some evening, e-mail me, I'm anxious to try it!

This progs.dat was compiled using the 1.07 compiler, so it won't work with 1.09 or 1.11
(unless you switch out the EXEs as posted on HexenWorld a few days ago). I've made a
decision to not recode a version that works for 1.09, both because you can do the EXE
switch, and also because I'm expecting to have a 1.11 compiler soon. I'm also expecting
that most patched servers will probably be running 1.11 soon, so that's another reason
I'm skipping 1.09 compatibility. If I get inundated with e-mail requesting or demanding
that I do make a 1.09 version, I'll do it, but not until then.


Author Information
------------------
I've created:

- The OvinoImp mod, which should be available from the same servers as this one.

- The Magic Acorn, which is being released simultaneously with this one.

- Lots of other things for Doom, Heretic, Hexen 1, and Quake, most of which were
  just circulated among friends and never released. If anybody played the "Chaos
  Fountain" level for Hexen 1, that was mine. And the reason I have the specific
  clause about CD_ROMs below- I didn't know until a friend told me, that there
  was a CD-ROM with my level on it! I WOULD like to be asked next time, if there
  is one.


Copyright and Distribution Permissions
--------------------------------------

Authors MAY use this modification as a basis for other publically available work.

This file MAY be distributed on Bulletin Board Systems or on the Internet,
PROVIDED that this file IS included and NOT MODIFIED.

This file MAY NOT be sold for profit without my prior consent.

No employee or relative of an employee of Actura software may possess a copy
of this modification.

This file MAY NOT be distributed on any CD-ROM or commercial product without
my prior consent. At least let me know this time! I'll probably give permission!


Availability
------------

This modification is available from the following places:

FTP   : ftp.cdrom.com
