empserver/info
Markus Armbruster 6564ff2240 Integrate air defense missions into interception
The ancients designed interception dead simple: when you overfly a
sector, you get intercepted by the sector owner.  Fine print
interception rules govern which planes intercept.

Then complexity got piled on top of it.

Chainsaw 2 added an extra interception by surface ship owners, in the
target sector only.

Chainsaw 3 added an extra interception by land unit owners, in the
target sector only (Empire 4 later merged this extra land unit
interception with the extra surface ship interception).

Chainsaw 3 added an entirely separate kind of interception: air
defense missions.  When you enter a sector in some air defense op
area, you get intercepted.  Fine print air defense rules govern which
planes intercept.  These rules differ significantly from the
interception fine print.

Additional complexity comes from these facts:

* Air defense mission interception happens in addition to non-mission
  interception.  You can boost your total interception by setting up
  air defense.  Which means you must set it up, or forgo an advantage.

* Air defense planes are not available for non-mission interception
  duty.  You need to decide on a split.

* In contrast to non-mission interception, interceptors flying air
  defense get intercepted.

Moreover, the air defense code breaks one of the plane code's design
assumptions, namely that just one plane sortie is active at a time.
The air defense sortie runs while the sortie it intercepts is in
progress.  This leads to two interceptions being active at the same
time: the one intercepting the original sortie, and the one
intercepting the air defense sortie.  The same plane can fly in both
interceptions, and damage received in the interception of the air
defense sortie is wiped out, triggering a seqno mismatch oops.

The previous commit already simplified non-mission interception: you
get intercepted by anyone who owns the sector, or a surface ship or a
land unit there, whether it's the target sector or not.

Now simplify mission interception, by merging air defense back into
ordinary interception: when you overfly a sector, you get intercepted
by anyone who owns the sector, or a surface ship or land unit there,
or has an air defense mission covering the sector.  That's all.  No
multiple interceptions, no separate air defense rules.

Remove air_defense().  Simplify ac_encounter() and sam_intercept()
accordingly; both lose their last parameter.

Change sam_intercept() and ac_intercept() to intercept in mission op
areas.  New parameter only_mission to suppress non-mission
interception.  Pass zero when the intercepting country owns the sector
or a surface ship or land unit in the sector.

ac_encounter() can't efficiently predict whether a country intercepts,
so it needs to call ac_intercept() unconditionally.  This kills the
optimization to collect interceptors only when needed; simplify
accordingly, replacing getilist() by getilists().
2009-02-01 17:14:39 +01:00
..
accept.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
add.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
announce.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
anti.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
apropos.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
arm.t Add commands related to nukes to Subject Nukes. 2006-06-24 22:36:42 +00:00
army.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
assault.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
attack.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Attacking.t Remove non-mission land unit reaction 2008-12-25 11:47:05 +01:00
Autofish.t Remove option FUEL 2008-05-12 09:25:20 +02:00
Autonav.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Basics.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
bdes.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
bestpath.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Blank.awk Import of Empire 4.2.12 2003-08-23 12:23:04 +00:00
bmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
board.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
bomb.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
break.t Document the transformation of sanctuaries into capitals or highways. 2006-07-11 18:51:08 +00:00
Bridges.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
BTU.t Limit BTU production to 1000 civilians instead of 999 2008-06-15 08:49:26 +02:00
budget.t (prexpense, budg): Printing brackets around expenses that won't 2006-06-01 17:42:59 +00:00
Bugs.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
build.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
buy.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
bye.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
capital.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
cargo.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
census.t Add missing land units to discussion of avail usages. 2006-06-25 11:53:29 +00:00
change.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
CHANGES.CHAINSAW.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
checklist.pl Update for flattened info directory. checklist.pl no longer works. 2006-01-05 14:15:11 +00:00
Citizens.t Update info Citizens on census showing old owner 2008-06-15 08:49:25 +02:00
Clients.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
coastwatch.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
collect.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
commodity.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
consider.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
convert.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
country.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
CRT.MAC The previous revision of Make.mk didn't work with separate build 2006-05-25 08:18:20 +00:00
cutoff.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Damage.t Make depth-charging code and documentation match 2008-03-14 20:25:37 +01:00
declare.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
deity.list Regenerated. 2004-03-17 07:04:15 +00:00
deliver.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
demobilize.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
designate.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
disable.t New command show updates: 2007-07-15 13:34:22 +00:00
disarm.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
distribute.t Prevent distribution from abandoning the distribution center 2009-01-07 07:57:37 -06:00
drop.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
dump.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
echo.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
edit.t Fix documented syntax of edit command. 2008-04-15 20:57:28 +02:00
Education.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
emp2html.pl Implement request ig, except for argument. 2004-03-22 10:34:49 +00:00
Empire2.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Empire3.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Empire4.t Update change log again for 4.3.19 2008-12-07 18:16:19 -05:00
enable.t New command show updates: 2007-07-15 13:34:22 +00:00
enlist.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
execute.t Document restrictions. Warn of common client bugs. 2007-12-09 17:42:12 +00:00
Expert.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
explore.t Update description for map command. 2006-07-12 23:41:42 +00:00
Fallout.t Add commands related to nukes to Subject Nukes. 2006-06-24 22:36:42 +00:00
financial.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
findsubj.pl Update known contributors comments 2008-03-14 20:25:44 +01:00
fire.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Flak.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
flash.t (sendmessage): Don't split messages into lines of no more than 60 2007-01-20 16:32:35 +00:00
fleetadd.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
fly.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
follow.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Food.t Remove references to s_p_etu. 2007-07-15 11:02:17 +00:00
force.t (relo): New command. 2007-07-13 06:04:03 +00:00
fortify.t Remove option FUEL 2008-05-12 09:25:20 +02:00
give.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
God.t Chapters Introduction and Server are also subjects, and all pages in 2005-12-22 12:23:38 +00:00
grind.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Guerrilla.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Guide.t Update copyright notice 2008-01-19 10:15:37 +01:00
Happiness.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
harden.t Add commands related to nukes to Subject Nukes. 2006-06-24 22:36:42 +00:00
headlines.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
help.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Hidden.t (repo_header, repo_list): HIDDEN used to suppress column status. 2006-01-05 15:36:49 +00:00
Hints.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
History.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Hitchance.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
improve.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
INFO.MAC Remove RCS keyword comment, it's a nuisance. 2004-03-01 13:41:10 +00:00
info.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Infrastructure.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Innards.t Remove references to s_p_etu. 2007-07-15 11:02:17 +00:00
Interception.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
Item-types.t Show packing type instead of selected bonuses in show se s 2008-07-27 21:04:44 -04:00
Kill.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Land-units.t Remove non-mission land unit reaction 2008-12-25 11:47:05 +01:00
land.t Remove non-mission land unit reaction 2008-12-25 11:47:05 +01:00
launch.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
lbmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
lboard.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
lcargo.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
ldump.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
ledger.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
level.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
list.t (player_coms): Clean up c_form of announce, break, bye and list. 2008-01-01 19:09:38 +00:00
lload.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
llookout.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
lmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
lmine.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
load.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
lookout.t Improve info on anti, bomb, lookout, starvation and sweep 2008-05-18 11:41:53 +02:00
lost.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
lradar.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
lretreat.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
ls2html.pl (info.html/all.html): Fix to use the full 80 columns for the table. 2007-08-08 06:15:33 +00:00
lstat.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
ltend.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
lunload.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Maintenance.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
map.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
march.t (march, navi): Provide equivalent functionality to map in move(), expl() 2006-07-20 13:33:11 +00:00
market.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Merc.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
mine.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
mission.t Integrate air defense missions into interception 2009-02-01 17:14:39 +01:00
mksubj.pl Update copyright notice 2008-01-19 10:15:37 +01:00
mktop.pl Update copyright notice 2008-01-19 10:15:37 +01:00
Mobility.t Spelling fixes. 2007-04-09 09:36:28 +00:00
morale.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
motd.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
move.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Moving.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
mquota.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
name.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
nation.t Remove bogus paragraphs on RES_POP and NO_PLAGUE. Clarify sentence on 2006-09-23 08:37:57 +00:00
navigate.t (march, navi): Provide equivalent functionality to map in move(), expl() 2006-07-20 13:33:11 +00:00
nbmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
ndump.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
newcap.t Make newcap's second argument mandatory 2008-03-26 22:10:29 +01:00
neweff.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
newspaper.t Fix for N_WELCH_DEAL, N_LND_LOSE, N_BOARD_LAND. 2007-07-10 20:49:07 +00:00
nmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Novice.t Remove non-mission land unit reaction 2008-12-25 11:47:05 +01:00
Nuke-types.t Add commands related to nukes to Subject Nukes. 2006-06-24 22:36:42 +00:00
nuke.t Add commands related to nukes to Subject Nukes. 2006-06-24 22:36:42 +00:00
offer.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Old-empire.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Options.t New option RAILWAYS 2008-11-01 11:40:15 -04:00
order.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
origin.t (orig): Allow moving origin to another country's origin. This is a 2006-01-04 14:36:21 +00:00
Overview.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
paradrop.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
path.t Trim .SA. 2007-12-02 16:49:04 +00:00
payoff.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
pbmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
pboard.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
pdump.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
peek.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Plague.t Don't refer to Innards, it's obsolete. 2006-07-11 18:49:33 +00:00
Plane-types.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
plane.t Let players stop/start units: 2006-05-29 21:11:14 +00:00
player.list Regenerated. 2004-03-17 07:04:15 +00:00
players.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
pmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
power.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
pray.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
production.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Products.t New show product 2008-07-28 07:51:49 -04:00
pstat.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
qorder.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Quick-ref.t Fix whitespace: space before tab 2008-09-17 19:29:42 -04:00
quit.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
radar.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Railroad.t New option RAILWAYS 2008-11-01 11:40:15 -04:00
range.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
read.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
README Update for flattened info directory. checklist.pl no longer works. 2006-01-05 14:15:11 +00:00
realm.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
recon.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
reject.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
relations.t Remove option FUEL 2008-05-12 09:25:20 +02:00
reload.t (relo): New command. 2007-07-13 06:04:03 +00:00
repay.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
report.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Research.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
reset.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
resource.t Don't claim which resources are renewable and which aren't, because 2006-07-11 18:52:26 +00:00
retreat.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
route.t Document delivery of civilians and military 2008-06-02 07:02:26 +02:00
sabotage.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
sail.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
satellite.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
sbmap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
scrap.t Clean up rules on where you can scrap stuff 2008-09-15 07:49:24 -04:00
scuttle.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
sdump.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
sect.t Fix .SA. 2007-07-10 21:00:49 +00:00
Sector-ownership.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Sector-types.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Selector.t Make selector terr do the right thing for deities 2008-07-12 10:43:03 -04:00
sell.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
set.t Document that nukes can be traded 2008-04-15 20:56:07 +02:00
setresource.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
setsector.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
sharebmap.t Spelling fixes. 2007-04-09 09:36:28 +00:00
shark.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Sheep.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Ship-types.t Remove option FUEL 2008-05-12 09:25:20 +02:00
ship.t Remove option FUEL 2008-05-12 09:25:20 +02:00
shoot.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
show.t New show product 2008-07-28 07:51:49 -04:00
shutdown.t Abstract from shutdown initiation mechanism: 2007-01-20 20:40:52 +00:00
sinfrastructure.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
skywatch.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
smap.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
sonar.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
sorder.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Spies.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
spy.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
sstat.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
start.t Change level to Expert to match stop's. 2006-07-14 23:07:22 +00:00
starvation.t Improve info on anti, bomb, lookout, starvation and sweep 2008-05-18 11:41:53 +02:00
stop.t Stop ships, planes, land units and nukes on violent takeover 2008-09-15 19:40:44 -04:00
strength.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
subj2html.pl Fix generated HTML: proper !DOCTYPE, head, body, p. 2004-02-15 19:21:52 +00:00
Suggestions.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
supply.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
survey.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
swapsector.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
sweep.t Intercept the same all along the flight path 2009-02-01 17:14:39 +01:00
Syntax.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Taxes.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Technology.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
telegram.t Clarify syntax. 2006-01-06 17:50:10 +00:00
tend.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
territory.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
test.t Add command test to info subject Transportation 2008-05-15 19:41:32 +02:00
threshold.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Time.t Describe the Empire clock. 2007-07-15 11:53:32 +00:00
toggle.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
torpedo.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Trade-ships.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
trade.t Document that nukes can be traded 2008-04-15 20:56:07 +02:00
transport.t Update description for map command. 2006-07-12 23:41:42 +00:00
treaty.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
TROFF.MAC Fix whitespace: space before tab 2008-09-17 19:29:42 -04:00
turn.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Unit-types.t New option RAILWAYS 2008-11-01 11:40:15 -04:00
unload.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
unsail.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
Update-sequence.t Document stop order expiry. 2006-09-23 13:24:19 +00:00
update.t New command show updates: 2007-07-15 13:34:22 +00:00
upgrade.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
version.t Update example to current output 2008-09-17 21:31:46 -04:00
wall.t (sendmessage): Don't split messages into lines of no more than 60 2007-01-20 16:32:35 +00:00
wingadd.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
wipe.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
wire.t Fix trailing whitespace 2008-09-17 21:31:40 -04:00
Wolfpack.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
work.t (info, html): Implement. 2005-12-22 10:09:17 +00:00
xdump.t Virtual selectors 2008-03-14 20:25:41 +01:00
zdone.t Swap zdone's deity arguments 2008-07-25 08:16:38 -04:00

        --- How to build the info pages ---

Make remakes info pages, table of contents and index automatically.
This requires Perl 5 and troff.  To remake just formatted info pages,
run make info.

To remake HTML info, run make html.  This is not done by default.  The
recommended start page is TOP.html, but you may also like all.html.


        --- How to add a new info page ---

To create a new info page, follow these steps:

1.  Decide which chapter to put your info page in:
      Commands     - Empire Commands
      Concepts     - Game concepts
      Introduction - General info about playing Empire
      Server       - Info about the server

2.  Decide what to call your info page:
    - If it's an Empire command, give it the same name as the command
      as listed in lib/player/empmod.c
    - Info names are case-insensitive.  Make sure there isn't another
      one that differs only in case.
    - Make sure your info page doesn't have the same name as an existing
      subject or chapter.

3.  Format your info page.

The file name for a page NAME must be NAME.t.  It's easiest to start
with an existing file.

The first line must be a title header:
.TH arg1 arg2
  - arg1 should be the chapter, one of: Command, Concept,
    Introduction, Server
  - arg2 is the title of your page.  If it contains more than one
    word, make sure it's in double quotes
  - if the info page is for an Empire command, then arg2 must be the
    command name in ALL UPPERCASE.

The second line must be a name header:
.NA arg1 arg2
  - arg1 must be the name
  - arg2 is a one-line description of the info page which will be
    put on the Subject page that your info page belongs to.  It should
    be in double quotes

The third line must be a level header:
.LV arg
  - arg must be a level, one of Basic, Expert

The last line should be a see also:
.SA "item1, item2, ..., subject1, subject2"
  - the stuff in quotes is a list of other info pages which are
    related to this page and info Subjects to which this page belongs.
  - the stuff in quotes must all be on the same line
  - You must include at least one subject (see the Subjects
    subdirectory) in the list (at the end of the list by convention).

The lines in between can contain troff requests.  The following
additional requests are available:

Empire command syntax:
.SY "command <ARGS>"

An Empire command example:
.EX "command args"

No Formatting:
.NF
this stuff
won't be formatted
.FI

Begin paragraph:
.s1

Item in a description:
.L

Fancy troff magic is prone to break HTML output.

4. Format your info page, update table of contents and index
  Run make info html.  If it fails, peruse the error messages and fix
  your info page.


==APPENDIX A  -  What exactly the Perl scripts do==

The scripts read all of the info pages and create a two-level table of
contents for them, organized by subject.  An info page belongs to a
subject if that subject appears as an entry in the .SA ("SEE ALSO")
field of the info page _and_ that entry is not the name of another
info page.

For example, the .SA field of headlines.t contains the entries
"newspaper" and "Communication".  Since there's already an info page
called "newspaper.t", but there is no "Communication" info page, then
the headlines info page is considered to be a member of the
Communication
subject.

The output of these script is a bunch of .t files.  The file TOP.t is
the top-level table of contents and lists all of the subjects.  Then
for each SUBJECT, a SUBJECT.t file is created, listing all of the info
pages that belong to it.


==APPENDIX B  -  The checklist.pl script==

FIXME This does not work at the moment

This little perl script compares the "list" of legal Empire commands
in your server with the Empire commands documented in info.  To run
it, login to your game and type:

  [##:##]% list > list.out

Then, move the list.out file to this directory and run checklist.pl.