--== WFlexMap by Mia_The_Chaotic aka }TCP{Wolf ==--

Version: 2.3


   >Contents<
------------------
0. Audience
1. What is it?
2. Installation
3. Settings
4. Notes/Features
5. Known Bugs
6. Credits
7. Version history
------------------


( 0 ) Audience

This document and the mod it refers to is meant for Unreal Classic server
admins. The mod is actually quite useless in botmatch/offline play...



( 1 ) What is WFlexMap ?

It is a small Unreal mod. It replaces the maplist any "normal" Game Type uses.
It does NOT affect the maplist in your original ini files, but WFlexMap simply
lets Unreal ignore all maps in your original maplist and uses its own.

Why use this one instead of the normal maplist? Simple... the normal unreal
MapList class supports 32 maps to be stored and cycled through, after which
the cycle will restart from the beginning. In effect, WFlexMap allows a map
cycle of exactly 10000 maps per server, allowing larger cycles and lengthened
fun... in addition, WFlexMap2 allows you a much more flexible map selection by
its ability to choose maps depending on the playerload, rather than just
putting up one map stupidly after the other... read the Notes/Features list
for more stuff this maplist does better than the normal MapList.



( 2 ) Installation

Add this into your Unreal.ini at the place where the ServerPackages and other
ServerActors are [Engine.GameEngine]:

ServerActors=WFlexMap.WFlexMapSA

copy all *.u and *.int files into your Unreal system directory. If you
already have a predefined ini file, put it there, too.

If you have an ini file from the WFlexMap release 1, you can leave it in, but
I strongly recommend you edit it with an ASCII editor otherwise you cannot use
the map selection based on playerload.

You Unreal server should naturally be SHUT DOWN while installing... duh...

This mod should support ALL Unreal Versions, theoretically also Unreal
Tournament and as long as EPIC never changes the default classes in future
Unreal versions, this mod should even support Unreal Tournament 2 and Unreal 2
but I hope these new games are so much more better that mods like these will
never be needed... and of course don't shit on me if it doesn't work anyway, it
was tested with all major gaming modes (dm, team...) of:
Unreal 225f (ok)
Unreal 225f Serpentine (version ??) (ok)
Unreal 225f RealCTF 1.0 Build 55 (ok)
Unreal 225f Infiltration 2.5 (ok)
Unreal 226gold Return To Napali (ok)
Unreal 225f UCopLite (ok)
not tested:
Unreal Tournament, WFlexMap 1 was never intended for UT, because UT's map list
are already large and don't need it. However, with the new feature of WFlexMap2
it might be interesting to see if UT works with it -> go and try it out :-)



( 3 ) Settings

After having installed the mod, nothing will happen, because like all my
serverside mods, they are DISABLED at first. All my mods have a switch
called "enabled" which is false by default so that you can turn any of
my mods on and off easily without having to install/uninstall anything.

So, go to advanced options, you will find a new entry called "WFlexMap"
at the lower end of the list (it's alphabetically sorted...).

Click on the plus sign ONCE and wait. Unfortunately it is a bit slow
while configuring when the server is running, so later changes to map
lists are better done in the created ini file with a good ASCII editor.

Okay... if this is your first run, set "enabled" to true, from now on
the mod is active as soon as the next map change takes place. However,
you don't have any maps in your list yet!?
(note: WFlexMap2 comes with a predefined list of popular maps, but of course
no one says you have those...)

Either enter some manually, or also put "CopyOldMapList" and
"CountInstalledMaps" to true, this will ensure you a fast start...
WFlexMap2: You still have to modify the list and tell the mod which map can
take how many players. If you don't, the mod will assume all maps to be
playable from 0 to 99 players.

Hmm... how to tell the mod about the map's playing capabilities?
Simple. The mod expects each map entry in "LargeMapList" to contain 3 pieces
of information: the map name, the minimum number of players, the max. number
of players. So, some default entries might look like this:
LargeMapList[0]=dmdeck16 2 6
LargeMapList[1]=dmcurse 2 6
LargeMapList[2]=dmveltor 2 4
LargeMapList[3]=dmduel 2 2
LargeMapList[4]=dmreallybigmap 6 16
...

I hope you can already guess at how this is to be read. This list tells the mod
that "deck16" and "curse" playa ok for 2 to 6 players. If there are more than
6 players at the end of a match, the next one will not be either of the 2 for
sure (if you enabled that playerload feature...)
"dmduel" will only be played with really 2 players and never else...
"dmreallybigmap" will only come to bear when more than 5 players are online.

Maps which were just used will be put at the end of the list (unless the
randomizer is on where it does not matter) and the first map with a playerrange
allowed for the current number of players will be taken. So if there were 4
players all the time for several hours, and then only 2, "dmduel" will start
next!!

Hmm... what the fuck happens when there are no or only 1 player?
-> 0 or 1 players are ignored and the server will then just go through ALL maps
disregarding the playercount (there ain't much to count....).

got that? Now make a mapchange and the mod runs... From now on, best make
map list changes in the "WFlexMap.ini" only.

Switches:
---------
enabled          true / false - enables/disables the mod. If disabled, your old
                 maplist will be used like always before using this mod...

CopyOldMapList   This will overwrite the first 32 Map entries with whatever was
                 in your old maplist - don't use this function if you already
                 have a running maplist in the mod, otherwise you might lose it.
                 This function is meant as a "quickstart" to get the first maps
                 in the mod quickly - just by reading out what maps you used
                 up to now...

debug            leave on false, unless you want some more shitty infos in your
                 log...

expectedmap      ....ignore this, used internally, stupid editor made this
                 variable visible although it shouldn't be... please don't
                 touch it :)

LargeMapList     An array where all map names are stored. Better not edit on
                 a running server, better shut it down and edit the ini file
                 with a good ASCII editor - should be faster. Allowed map names
                 are with or without ".unr" extenstion

MapChangeByML    Don't touch, another variable the editor failed to make
                 invisible.

randomize        Set to true, if you want maps to be chosen randomely, not
                 in cycle. Works in combination with the next setting (read
                 below).

ChooseMapsByPlayernumber
                 If true, the server will count players at the end of each map
                 and try to find the next map out of its list which has a
                 playerrange allowed to the current number of players. The
                 first map to match will be taken.
                 If the server fails to find a map because for example there
                 are 12 players online, but you only have small maps, then the
                 server will just take the next best map.

Ingame command flags:
---------------------
Ingame command flags are sort of "commands" you can issue to the mod. But I
have not included my full featured command parser into the mod because I
didn't I need to shoot with cannons on sparrows here.
Note that a command flag only works when it has been set and then WFlexMap
changes the map afterwards either by normal gameend or a "skip" - but do not
issue an "admin switchlevel" command!

admin set WFlexMapSA killmap true
   >> Upon next map change, the map you have just played will be taken out
      of the maplist (if it IS in the list...) - This is a good method to sort
      out unwanted maps out of huge map lists while playing :)

admin set WFlexMapSA addmap <mapdescription>
   >> <mapdescription> should be a full entry, e.g.
      "dmdeck16 2 6" will add dmdeck16 with players from 2 to 6
      "dmdeck16 2" will add dmdeck16 for 2 to infinite players
      "dmdeck16" will add dmdeck16 for any playerload (identical to
                 2 to infinite)
      "." will add the CURRENT map for any playerload
      ". 3 6" will add the CURRENT map for 3 to 6 players...
      "3 6" will add a map named "3" for 6 to infinite players which is likely
            NOT what you wanted to do... :P

NOTE:
The command flags "killmap" and "addmap" can be used simultaniously! Why? When?
Okay let's assume you have this entry "DMLargeMap 4 12" - now you are online on
your server and there are just 4 players (the minimum) so WFlexMap starts your
large map. Hmm... now seeing it online you reckon 4 players are not enough and
you SHOULD have made the entry "DMLargeMap 8 12" - but instead of going to
advanced options and changing it, or fiddling with the ini file, do this:
admin set WFlexMapSA killmap true
admin set WFlexMapSA addmap . 8 12
When WFlexMap changes to next map, it will kill the current entry with 4 12
and immediately after that reenter the same map into the list with 8 12 :)
That's because "killmap" is executed before "addmap" - Cool?

admin set WFlexMapSA unmarkbad 1
   >> Upon next map start, all "bad" marked maps will be thrown back into
      the map cycle as "ok".



( 4 ) Notes / Features

* You can store up to 10000 maps in the maplist, not just 32...
* A totally empty maplist may crash a server, so enter at least one...
* Maps are counted from 0 to the first "empty" line, later map names are then
  ignored (same behaviour like normal maplist)
* maps which fail to load are marked bad with 10 ! signs
  so if a map repeats several times, don't wonder, sooner or later the error
  will be detected and the map skipped. You can then look into your ini file
  and easily find where you made any typos in your map selections
  (original Unreal maplist just lets the server loop the same map forever)
* the map-load failure detection will take longer to detect errors if you use
  the "skip" cheat!
* the map-load failure detection will WORK when randomized is true (since
  version 2)
* Maps which are marked as "bad" once by the map-load failure detection are
  skipped immediately when the map cycle arrives at it again :))
* The same map may be listed several times in the cycle if (you want it)
  without any problems...
  (original maplist will shorten the map loop and mess up the cycle if you do
  that)
* Map cycle will continue at whatever position it was last IGNORING what
  map the server was on when either restarting after SHUT DOWN or when admin
  made "switchlevel"...
* serverside mod -> no client download, no network speed loss (Role_NONE)
* Optional selection of maps depending on playerload, guaranteeing the most
  flexibility for the server!



( 5 ) Known Issues

1) Default "expected map" after first start of the mod will be "DmSinfonia".
   That's because UnrealEd is stupid and this can be ignored.

2) Server online-configuration is slow and causes lag. Actually not a real
   bug, just another weakness of the Unreal Engine, which is unable to handle
   complex large data efficiently.

3) variable "expectedmap" is visible to user in the preferences menu.
   Harmless, just ignore it...

4) variable "MapChangeByML" visible to user - DONT TOUCH IT!

!!!!!! THIS ONE IS IMPORTANT !!!!!!!
5) If you quit your server during a map change handled by WFlexMap, the
   variable "expectedmap" and "MapChangeByML" will contain values causing the
   map to be marked "bad" next time you start your server!

If you find bugs please report them to ChaosWorx@gmx.co.uk



( 6 ) Credits

WFlexMap1:
All credits go to me, Mia_The_Chaotic aka }TCP{Wolf in January 2002
Work took 4 days, so that's a rather small mod :)

WFlexMap2:
All credits go to me again... June 2002, work took 2 days.

You may...
... use this mod freely on any server
... give the distributive version (the one without the source visible)
    to anyone
... offer the distributive version for download anywhere - please give
    me the credits though.

You may NOT...
... DECOMPILE the mod (you won't like the shitty code anyway...)
... tell the world you made it - if you do, the world will laugh at you
    for producing such crap - hahaha!
... exploit the mod commercially!!

If you want the sources, ask me... I _might_ be willing to hand them out,
mail to ChaosWorx@gmx.co.uk - but due to the Unreal Engine being so buggy
and crashy, the code isn't too nice at all... I had to make it work, that's
all that finally counted...

Enjoy - and NOW INSTALL SOME MAPS!!!

Mia



( 7 ) Version history

Version 1.0
- initial large maplist
- randomizer feature
- detect load failures feature

Version 2.0
- choose maps on playerload feature
- configuration overhauled
- randomizer feature completely reprogrammed :P

Version 2.1
- minor bugfix causing maps to be regarded as "bad" although they are not

Versiom 2.2beta (lots of debug stuff in LOG if you use new functions will be
                 removed when no bugs are found)
- command flag added (killmap)
- command flag added (addmap)
- added version history (LOL)
- corrected a stupid typo in this readme where it said in the introduction:
  "the mod does affect the maplist in your original ini files" - which is
  bullshit I forgot to include the word NOT, so it now reads:
  "It does NOT affect the maplist in your original ini files"... :)
  my goodness - LOOL

Version 2.3
- fixed one of the reasons maps were incorrectly marked as "bad"
- added "unmarkbad" flag to reenable ALL "bad" marked maps
