CowCaster 08/03/26 v1.7c

---

th075Caster is a netplay tool for the game Touhou Suimusou:
Immaterial and Missing Power.

CowCaster is a mod for th075Caster that adds a huge pile of
new features, including replay renaming, a practice dummy,
and customized player palettes.

This is maintained by mauve of irc.mizuumi.net's #iamp IRC channel,
please stop by if you have any comments.

The latest version of CowCaster may always been found at:
http://iamp.mizuumi.net/index.php/Custom_casters

Original th075Caster site: http://njm4558.run.buttobi.net/

---

!!! IMPORTANT NOTE: !!!

If you are using the desync fix, and you probably are, replays
recorded with this will NOT play back correctly in IaMP.
To fix this, you will need the replay watcher.

The latest version and usage instructions may be found at:
http://iamp.mizuumi.net/index.php/Replay_watcher

A direct download if it is needed:
http://mauve.sandwich.net/iamp/ReplayEx015.zip

------------------------------------------------------------------
  SETTING UP CASTER
------------------------------------------------------------------

Step by step guide:
- Patch IaMP to 1.11. The patch may be found at:
  http://www.tasofro.net/touhou/download.html
  or
  http://iamp.mizuumi.net/stuff/th075_111s.exe
- Download the full unlock file if you have not already unlocked
  all of the characters:
  http://iamp.mizuumi.net/stuff/tools/score.dat
  Replace your score.dat with that.
- If the folder containing IaMP has japanese characters in its
  name, rename it to something that doesn't.
- Copy the CowCaster.exe, config_caster.ini, and info.ini from the
  exe folder to the exact same folder that th075.exe is in.
- Optionally edit config_caster.ini to your preferences - setting
  player names if you want.
- Stop anything that might interfere with CowCaster: Most noteably
  anything that runs GameGuard.
- Run CowCaster, select 9: vs th075Booster. If all is well, you
  will be brought to the character select.
- Use 1 to host a game, or 2 to connect to another user. CowCaster
  will automatically calculate a recommended delay value when you
  connect to each other.

Troubleshooting:
- If you see a CharInit() error, there is a problem with your pad
  configuration.
- For anything else, you probably did something wrong.

Router issues:
- If you are behind a router, you will need to forward port 7500
  to your computer in order to host to host. This is not required
  to connect to another user.
  http://www.portforward.com/ contains information on this.
  You may use 8: Test myPort to see if your port is open.
  Simply use it on mizuumi.net to see if it works.
- If neither user can forward ports, then you may connect to each
  other through a Standby relay.
  Simply have both users use 7: Standby on mizuumi.net and, as
  long as no one else is trying to connect, it should connect you
  to each other. See below for more information.
  Standby connections are a DIRECT CONNECTION and do not add lag.
- If _that_ fails, you'll probably need to go get Hamachi, but
  this should be considered a last resort as Hamachi adds lag.

Performance issues:
If your computer simply can't keep up with the game, there are
a few things you can do.

- Disable all window resizing, including the fake d3d8 dll
  and the internal CowCaster resizing. Both add significant
  performance overhead.
- Make sure your config.exe program works. You can find
  instructions on making it work as well as an English-translated
  version here:
  http://iamp.mizuumi.net/index.php/FAQ#Installation

There are six checkboxes on the right hand side of the config
window, they are:

- Fullscreen: This has no effect on performance.
- Simple backgrounds: This will simplify the stage graphics.
  If you run well on Patchouli's stage but not the others,
  turning this on will speed things up drastically.
  It will also reduce memory usage somewhat.
- 1/2 frame rate: Enabling this will cause IaMP to only render
  every other frame. The result will be less smooth, but will
  improve performance overall.
- 16 bit color: Self-explanatory. It is unknown if this will
  reduce the amount of video memory used or not, but it can't
  hurt to try!
- Resize textures: This should be OFF. This is for compatibility
  with certain broken video cards. If it is on, IaMP will
  consume substantially more memory but will not have rendering
  glitches with those cards. Normally, this is not necessary.
- Display juggle meter: Self-explanatory.

All of this applies for normal Caster as well.

------------------------------------------------------------------
  FEATURES OVER REGULAR CASTER
------------------------------------------------------------------

- Synced to th075Caster-071227

- New features:
  * Replay autosaving. Originally from moeCaster. 
  * Automatic replay naming and file renaming when using autoSave
  * Player name information transferred
  * 4 more color slots for every character, and custom color edits
    transferred to other players! Read palette.txt for info.
  * Window resizing, UI render filtering.
  * In-game BGM toggle
  * Configurable keybinds.
  * Infinite spirit cheat built-in
  * Enhanced practice dummy to supplement IaMP's rather crummy
    built-in one. It adds random guard, one-hit guard, selectable
    guard reactions, HJ movement, random movement, move repeating,
    random guard crushes, random attack, configurable teching,
    and more.

- Usability changes:
  * config_caster.ini and info.ini translated to English.
  * English documentation on general Caster usage added.
  * Keyboard inputs no longer taken if window is not focused.
  * Player 1 pad defaults to keyboard if no pads are connected
    when spectating.
  * Player 2 pad is not bound if not in Broadcast mode, preventing
    unnecessary charInit() errors relating to the secondary pad.
  * Spellcard hiding has been fixed. Originally from moeCaster.
  * Remembers the last picked characters after saving a replay.
  * Automatically calculates a default delay on connecting.
  * Can resolve hostnames now.
  * All port options completely removed from main menu. In order
    to access a non-standard port, enter the address in host:port
    form.
    e.g: mizuumi.net:7500
  * Remembers last chosen port and IP for connecting. Default
    Standby address is now set to mizuumi.net
  * roundShow flag can print out who won each match and the total
    number of rounds won in a given session.
  * Spectate option on main menu waits for the remote client to
    begin playing before trying to connect.
  * Get Information will now optionally report the remote host that
    the destination is connected to if both clients are using
    CowCaster 070923 or later.
  * Booster no longer listens when you play it when you don't want
    it to. 
  * noFast flag to disable high speed spectating.
  * Can save a session log file, which keeps track of your matches.
  * Names are optionally transferred when observing, so you can
    know who's watching if they want you to know.
  * Screensavers can be disabled.
  * alwaysOnTop toggle key.

- Miscellaneous:
  * Fancy Yuyucow icon, by popular demand.
  * No more Vista-specific code.
  * Booster listening glitch fixed, can now properly listen on
    games run at faster than normal speed.
    (Replaywatcher at full blast will still mess up, though.)
  * Compatible with translation patches. 

------------------------------------------------------------------
  HOTKEY LIST
------------------------------------------------------------------

These are the default keys. You may reconfigure them in the
[KEYBIND] portion of config_caster.ini

Key     Action                              Notes
------- ----------------------------------- ----------------------
[       Turn off autoNext

]       Turn on autoNext

0 to 9  Change local delay value

-       Disable automatic replay saving     CowCaster only

=       Enable automatic replay saving      CowCaster only

\       Cycle roundCount value              CowCaster only

`       Toggle BGM                          CowCaster only

/	Toggle alwaysOnTop                  CowCaster only

F8      Infinite spirit cheat               In match only
                                            CowCaster only

Backsp  Stage manual / Stage free           Char menu only
                                            Key ] in th075Caster

Backsp  Toggle noFast                       In match only
                                            CowCaster only

'       Cycle processRemotePalettes value   Char menu only
                                            CowCaster only

'	Save remote palettes		    In match only
                                            CowCaster only

------------------------------------------------------------------
  USING CASTER
------------------------------------------------------------------

--- Hosting, connecting to games

To host a game, simply select "Wait for access". To connect to
someone else, select "Try access" and connect to their IP. If the
host doesn't know his own IP, he can find out by going to
http://www.whatismyip.com/
If on IRC, a simple /whois nickname or /dns nickname works as well.

"Try access ( Tough )" is similar to a normal connection, but will
continue trying to connect, and try to maintain the connection,
even if the connection is known to be unstable. Note that this
will also cause Caster to not know if the other person really does
lose connection!

When you connect, it will randomly assign players(if playerSide
has not been set) and request a delay value from player one.
CowCaster will automatically suggest a delay, based on these
values:

-   0ms to   4ms: 1 delay
-   5ms to  43ms: 2 delay
-  44ms to  75ms: 3 delay
-  76ms to 107ms: 4 delay
- 108ms to 139ms: 5 delay
- 140ms to 171ms: 6 delay
- 172ms to 203ms: 7 delay
- 204ms to 236ms: 8 delay
- 237ms to 267ms: 9 delay
- 268ms to 320ms: 10 delay

Any higher than 320ms is not playable no matter what.

Note that these are somewhat conservative values and you can
sometimes use a delay value that is one lower. This may cause
connection spiking, though.

If you enter 0 delay, it will refresh the ping with the remote
host and ask you to enter delay again.

Note that you Caster will prevent you from selecting Sakuya-day
stage, Youmu-day stage, or Suika's stage because of visibility
issues with certain projectiles. You may disable this at the
character select with the backspace key, but it is highly
recommended that you not do so, if just for courtesy's sake.

"Get Information" will tell you the state of a remote Caster
client. It will return the following possible states:
- "Default" Either sitting at the main Caster menu or waiting on
  the remote client. No game is running at this time.
- "Default (Wait)" if they are hosting a game and waiting for
  someone to connect
- "Menu" If in game, sitting at the character select menu.
- "x vs y (n sec)" If in game, with the given matchup, that has
  been running for the given amount of time.

Relevant config_caster.ini options:
- defaultIP: This is the host that Try access will automatically
  attempt to connect to. This is unique to CowCaster.
- autoWaitOn: While hosting, after a session with another client,
  it will automaticlaly go back into a hosting state.
- beep: Sounds a beep whenever someone connects to you while you
  are hosting, or when a Standby connection occurs.
- playerSide: With this, you can choose to be player 1 or player 2
  at all times.
- stageLimitCancel: If enabled, will allow selection of banned
  stages. This is not recommended.
- autoNextOn: If enabled, Caster will automatically skip past the
  end of match win quote and menu. This may be toggled by
  pressing ] inside a match.
- replaySave: Makes the default selection at the end of a match to
  save a replay, rather than return to character select.
- autoSave: Will automatically save a replay at the end of every
  match. This may be enabled or disabled by pressing - or = in
  the middle of a match. This is unique to CowCaster.
- roundShow: Prints information on the result of each match, and
  total information at the end of a session. Its state may be
  cycled by pressing ] during character select. This is unique to
  CowCaster.
  See config_caster.ini for more information.
- sessionLog: Prints information equivalent to roundShow 2 to
  sessionlog.txt, handy for later parsing.
- floatControl: Enables desync fixes. This breaks replays
                somewhat, see note way above.

--- Standby

Standby uses Skype-style UDP hole punching to allow two users that
are both behind routers to connect to each other by using a third
party.

mizuumi.net runs a standby daemon at all times that you may use,
but any running Caster client will work.

It will tell you the IP and port of the client that has connected
to you. If you want someone to be able to spectate your games,
simply send that address to them.

THIS IS A DIRECT CONNECTION. IT DOES NOT CAUSE LAG, UNLIKE HAMACHI.
Therefore, it is highly recommended to use this instead of Hamachi
whenever possible, as it is a direct connection.

If you want to run a standby daemon yourself, the FreeBSD/Linux
source code can be found here:
http://mauve.sandwich.net/misc/standbyd.tgz

A description of the method used can be found here:
http://en.wikipedia.org/wiki/UDP_hole_punching

--- Spectating games

Spectating active games is easy. Simply connect to a client that
already has a Caster game running. You will receive a verification
prompt as to whether or not you want to watch.

Don't snipe other people's games! Use "Get Information" to make
sure that they are playing before connecting. CowCaster has a
special option on the main menu for spectating that will wait
until the remote client has started playing to join, it is highly
recommended that you use this.

Spectating does not lag the players unless their upstream is
really, really, really bad. Like modem bad. This is because only
one spectator is allowed on each player, and all future spectators
will be automatically routed through him. Up to four spectators
are allowed on each user.

If he disconnects, so will all spectators, even if the matches are
still in progress.

Additionally, you can spectate on people when they are playing
Booster or against the Practice Dummy. (Note that if you use any
cheat codes, they are not transferred and will have to be pressed
on the other end!)

Relevant config_caster.ini options:
- obsCount: If enabled, tells you when new observers connect.
            If someone is reconnecting, you will not be notified.
- allowObs: If disabled, prevents people from spectating your games.
- anonymousObs: If enabled, will not tell the remote who you are.
- practiceNoSpec: Disallows people from spectating you when you
                  are in Debug, Booster, or Practice Dummy modes.
                  This is unique to CowCaster.
- noFast: Prevents it from catching up at faster than normal
          speeds. Can be toggled with backspace in a match.
- disableScreensaver: Turns off the screensaver so that you can
                      watch without irritating interruptions.
                      On by default.This is unique to CowCaster.

--- Broadcast

Broadcast creates a local 2 player game, adding support for all
CowCaster features, and allows other people to spectate. Delay A
and Delay B are the respective input delays of the two players.

--- Test myPort

This tests to see if you can host games, by having another client
try to connect to you. Simply point it at someone else's running
Caster or the relay at mizuumi.net to see.

--- th075Booster

Booster is an enhanced AI that learns from playing. Without any
data files it won't do anything, though.

See http://iamp.mizuumi.net/index.php/Th075booster for more
information, as well as th075Booster in config_caster.ini

--- Command line parameters

The following command line parameters may be passed to Caster:

-w         Automatically go into wait mode.
-i ip      Caster will automatically try to connect to the address.
-p port    Sets the port used for the -i parameter.
-s ip      Caster will automatically try to spectate the address.
-f         Uses info.ini to do the connection.
           It can be set to:
           - Wait for a connection
           - Wait for a connection from a specific IP.
           - Connect to an IP set in the file
           See info.ini for more details.

Relevant config_caster.ini options:
- allowArgMode: Enables -i parameter.
- allowFileMode: Enables -f parameter.
- fileModeState: Acts as if -f parameter is always set.

--- Autosave, replay renaming

Automatic replay saving is a special feature of CowCaster and
moeCaster.

To turn it on, simply edit config_caster.ini and set autoSave to 1.
You can also skip replay saving entirely by setting it to 2.

Pressing - and = in game will turn it off and on, respectively.

This feature was written by tropsy, and all credit goes to him.

Replay naming/renaming is unique to CowCaster and is the primary
purpose of the name system.

Assuming there are two players named:

1p short name: PLR1
1p name: Player 1
2p short name: PLR2
2p name: Player 2

If autoSaveReplayName is enabled...
  Short names are used for the in-game replay names. There is an
  8 character limit for these. The names will be of the format:
  PLR1PLR2

If autoSaveReplayFileRename is enabled...
  Replays will be autoamtically renamed to the format specified by
  replayFilenameFormat. See config_caster.ini for more details.
  Example:
  replayFilenameFormat = %d%t %A(%5) - %B(%6) (%ms)%F

  Will rename the replay file to:
  20071102003139 Player 1(Yuk) - Player 2(Rei) (79s)(FPU).rep

--- Enhanced practice dummy

The practice dummy is a special feature of CowCaster added to help
with training.

Available practice modes:

- 1: Random guard crushes

The dummy will randomly use 22a or 22b while walking forwards
inbetween them.

Additionally, Youmu will use 214B and Yukari will use 236A.

- 2: Repeat selectable move

You can choose any of the standard moves in the game and the dummy
will spam it for you.

- 3: Jump, Repeat selectable move

Same as 2, but now you can set the dummy's jump!

- 4: Any normal/command normal/guard crush/graze attack

Randomly uses one of 5a, 5b, 2a, 2b, 6a, 6b, 66a, 66b, 33a, 33b,
22a, or 22b.

This is probably best used on Suika.

- 5: Move randomly

Dummy will use any of 5, 4, 6, 7, 8, 9, D4, D6, D7, D8, or D9 in
as unpredictable fashion as possible.

- 6: Move and do selectable move randomly

As with 2, you will be able to select any single move in the game
for it to use randomly in addition to the above movement.

- 7: Jump

Dummy will jump repeatedly in the way you choose.

- 8: Random Guard (with 5)

Dummy will use any of 5, 4, or 1. Note that since there is no
testing of the opponent's actions implemented, it will be
constantly doing this and thus walking away.

- 9: Random Guard (without 5)

Dummy will use either of 4 or 1.

- 10: Standing guard

Dummy will constantly use 4.

- 11: Crouching guard

Dummy will constantly use 1.

- 12: Jumping guard

Dummy will jump repeatedly in the way you choose and guard any
hits. Note that HJs have a vulnerability period that will cause
CHs on hit.

- 13: One-hit guard

Immediately after recovering from hitstun, dummy will block until
it is left alone for half a second.

- 14: Do nothing

Mostly used for teching.

- Notes:

The dummy does not understand the concept of buffering inputs, so
it is delayed by a few frames in inputting things and it is very
possible to hit it out of things that are normally escapable.
Assume that if it got hit on a guard reaction, it would have
dashed out or something.

Spellcards require declaring to use. If you set a spellcard to be
used in any of the selectable modes, it will immediately try to
22d on wakeup after knockdown.

The first 9 modes can have a timing factor set which determines
how often they pulse or change their current action. ASAP mode
will always change as soon as it is able to. This has
entertaining results on random guard.

On the guarding modes, you can set a reaction move that it will
use immediately after it comes out of blockstun. The main purpose
of this is to test how airtight your blockstrings are, either by
dealing with specific counterattacks or how escapable they are.
Additionally, reaction moves can be set on being hit or on wakeup.

Teching can be set for all modes, to be forward, backwards,
random, or none at all.

- Cheats:

In order to best make use of the dummy, IaMP's built-in cheats
need to be used.

F2: Puts both players on first lifebar.
F3: Puts both players on second lifebar.
F4: Stops refilling health.
F5: Continuously refills health instantly, sets bombs to maximum,
    and gradually fills the spellcard meter.
F6: Quickly raises spellcard meter as long as it is held.
F7: Quickly decreases spellcard meter as long as it is held.
F8: Infinite spirit. (CowCaster feature only!)

Unfortunately, there is no way to change spellcard interactively
at this time.
