dehacked: Add dehacked file for FreeDM.

FreeDM has different levels and therefore needs a different BEX
patch to the main project. Update the text generator to generate the
level name graphics for FreeDM based on the new BEX file.
This commit is contained in:
Simon Howard 2014-01-10 03:23:33 +00:00
parent 51ac17358b
commit ec9dcdd073
4 changed files with 348 additions and 35 deletions

View file

@ -174,7 +174,11 @@ COLORMAP
ENDOOM
GENMIDI
FREEDOOM
#ifdef FREEDM
DEHACKED = fdm_deh
#else
DEHACKED
#endif
#ifdef DOOM2
DMXGUSC = dmxgus

View file

@ -81,19 +81,6 @@ white_graphics = {
# Note: level names are also included in this dictionary, with
# the data added programatically from the DEHACKED lump, see
# code below.
# TODO: Generate FreeDM level name graphics from DEHACKED lump.
'dmwilv00': 'DM01', 'dmwilv01': 'DM02', 'dmwilv02': 'DM03',
'dmwilv03': 'DM04', 'dmwilv04': 'DM05', 'dmwilv05': 'DM06',
'dmwilv06': 'DM07', 'dmwilv07': 'DM08', 'dmwilv08': 'DM09',
'dmwilv09': 'DM10', 'dmwilv10': 'DM11', 'dmwilv11': 'DM12',
'dmwilv12': 'DM13', 'dmwilv13': 'DM14', 'dmwilv14': 'DM15',
'dmwilv15': 'DM16', 'dmwilv16': 'DM17', 'dmwilv17': 'DM18',
'dmwilv18': 'DM19', 'dmwilv19': 'DM20', 'dmwilv20': 'DM21',
'dmwilv21': 'DM22', 'dmwilv22': 'DM23', 'dmwilv23': 'DM24',
'dmwilv24': 'DM25', 'dmwilv25': 'DM26', 'dmwilv26': 'DM27',
'dmwilv27': 'DM28', 'dmwilv28': 'DM29', 'dmwilv29': 'DM30',
'dmwilv30': 'DM31', 'dmwilv31': 'DM32',
}
blue_graphics = {
@ -230,32 +217,33 @@ def read_bex_lump(filename):
result[assign[0].strip()] = assign[1].strip()
return result
def update_from_bex(config, bexdata):
"""Update the given config dictionary with data from a BEX lump.
def update_level_name(lumpname, bexdata, bexname):
"""Set the level name for the given graphic from BEX file.
Args:
config: Dictionary of lumps, mapping from lump name to
text string to contain in it.
bexdata: Dictionary of data read from BEX lump.
lumpname: Name of output graphic file.
bexdata: Dictionary of data read from BEX file.
bexname: Name of entry in BEX file to use.
"""
def update_lump(lumpname, bexname):
if bexname not in bexdata:
raise Exception('Level name %s not defined in '
'DEHACKED lump!' % bexname)
# Strip "MAP01: " or "E1M2: " etc. from start, if present:
levelname = re.sub('^\w*\d:\s*', '', bexdata[bexname])
config[lumpname] = levelname
if bexname not in bexdata:
raise Exception('Level name %s not defined in '
'DEHACKED lump!' % bexname)
# Strip "MAP01: " or "E1M2: " etc. from start, if present:
levelname = re.sub('^\w*\d:\s*', '', bexdata[bexname])
white_graphics[lumpname] = levelname
for e in range(4):
for m in range(9):
# HUSTR_E1M1 from BEX => wilv00
update_lump('wilv%i%i' % (e, m),
'HUSTR_E%iM%i' % (e + 1, m + 1))
freedoom_bex = read_bex_lump('../../lumps/freedoom.bex')
freedm_bex = read_bex_lump('../../lumps/freedm.bex')
for m in range(32):
# HUSTR_1 => cwilv00
update_lump('cwilv%02i' % m,
'HUSTR_%i' % (m + 1))
for e in range(4):
for m in range(9):
# HUSTR_E1M1 from BEX => wilv00
update_level_name('wilv%i%i' % (e, m), freedoom_bex,
'HUSTR_E%iM%i' % (e + 1, m + 1))
update_from_bex(white_graphics, read_bex_lump('../../lumps/dehacked.lmp'))
for m in range(32):
# HUSTR_1 => cwilv00
update_level_name('cwilv%02i' % m, freedoom_bex, 'HUSTR_%i' % (m + 1))
# HUSTR_1 => dmwilv00 (from freedm.bex)
update_level_name('dmwilv%02i' % m, freedm_bex, 'HUSTR_%i' % (m + 1))

1
lumps/fdm_deh.lmp Symbolic link
View file

@ -0,0 +1 @@
fraggle/freedm.bex

320
lumps/fraggle/freedm.bex Normal file
View file

@ -0,0 +1,320 @@
[PARS]
; Par times don't matter so much for FreeDM, just set all to zero.
par 1 0
par 2 0
par 3 0
par 4 0
par 5 0
par 6 0
par 7 0
par 8 0
par 9 0
par 10 0
par 11 0
par 12 0
par 13 0
par 14 0
par 15 0
par 16 0
par 17 0
par 18 0
par 19 0
par 20 0
par 21 0
par 22 0
par 23 0
par 24 0
par 25 0
par 26 0
par 27 0
par 28 0
par 29 0
par 30 0
par 31 0
par 32 0
[STRINGS]
GOTARMOR = picked up a light armor vest.
GOTMEGA = picked up a heavy armor vest.
GOTHTHBONUS = got a 1% health bonus.
GOTARMBONUS = got a 1% armor bonus.
GOTSTIM = picked up a small health pack.
GOTMEDINEED = found a large health pack, just in time!
GOTMEDIKIT = picked up a large health pack.
GOTSUPER = you got the overdrive sphere!
GOTBLUECARD = picked up a blue passcard.
GOTYELWCARD = picked up a yellow passcard.
GOTREDCARD = picked up a red passcard.
GOTBLUESKUL = picked up a blue skeleton key.
GOTYELWSKUL = picked up a yellow skeleton key.
GOTREDSKULL = picked up a red skeleton key.
GOTINVUL = temporary invulnerability!
GOTBERSERK = you got the steroid pack!
GOTINVIS = you got the stealth sphere!
GOTSUIT = picked up a hazard suit.
GOTMAP = got the tactical survey map.
GOTVISOR = got the night vision goggles.
GOTMSPHERE = you got the ultra-overdrive sphere!
GOTCLIP = picked up an ammo clip.
GOTCLIPBOX = picked up a box of ammo.
GOTROCKET = picked up a missile.
GOTROCKBOX = picked up a crate of missiles.
GOTCELL = picked up a small energy recharge.
GOTCELLBOX = picked up a large energy recharge.
GOTSHELLS = picked up some shotgun shells.
GOTSHELLBOX = picked up a box of shotgun shells.
GOTBACKPACK = second backpack!
GOTBFG9000 = the SKAG 1337 ... time to kick some ass!
GOTCHAINGUN = you got the mini-gun!
GOTCHAINSAW = you got the angle grinder!
GOTLAUNCHER = you got the missile launcher!
GOTPLASMA = you got the polaric energy cannon!
GOTSHOTGUN = you got the pump-action shotgun!
GOTSHOTGUN2 = you got the double-barrelled shotgun!
PD_BLUEO = this object requires a blue key.
PD_REDO = this object requires a red key.
PD_YELLOWO = this object requires a yellow key.
PD_BLUEK = this door requires a blue key.
PD_REDK = this door requires a red key.
PD_YELLOWK = this door requires a yellow key.
PD_BLUEC = this door requires the blue passcard.
PD_REDC = this door requires the red passcard.
PD_YELLOWC = this door requires the yellow passcard.
PD_BLUES = this door requires the blue skeleton key.
PD_REDS = this door requires the red skeleton key.
PD_YELLOWS = this door requires the yellow skeleton key.
PD_ANY = this door requires any key.
PD_ALL3 = this door requires all three keys.
PD_ALL6 = this door requires all six keys and passcards!
HUSTR_E1M1 = E1M1
HUSTR_E1M2 = E1M2
HUSTR_E1M3 = E1M3
HUSTR_E1M4 = E1M4
HUSTR_E1M5 = E1M5
HUSTR_E1M6 = E1M6
HUSTR_E1M7 = E1M7
HUSTR_E1M8 = E1M8
HUSTR_E1M9 = E1M9
HUSTR_E2M1 = E2M1
HUSTR_E2M2 = E2M2
HUSTR_E2M3 = E2M3
HUSTR_E2M4 = E2M4
HUSTR_E2M5 = E2M5
HUSTR_E2M6 = E2M6
HUSTR_E2M7 = E2M7
HUSTR_E2M8 = E2M8
HUSTR_E2M9 = E2M9
HUSTR_E3M1 = E3M1
HUSTR_E3M2 = E3M2
HUSTR_E3M3 = E3M3
HUSTR_E3M4 = E3M4
HUSTR_E3M5 = E3M5
HUSTR_E3M6 = E3M6
HUSTR_E3M7 = E3M7
HUSTR_E3M8 = E3M8
HUSTR_E3M9 = E3M9
HUSTR_E4M1 = E4M1
HUSTR_E4M2 = E4M2
HUSTR_E4M3 = E4M3
HUSTR_E4M4 = E4M4
HUSTR_E4M5 = E4M5
HUSTR_E4M6 = E4M6
HUSTR_E4M7 = E4M7
HUSTR_E4M8 = E4M8
HUSTR_E4M9 = E4M9
CC_ZOMBIE = zombie
CC_SHOTGUN = shotgun zombie
CC_HEAVY = mini-gun zombie
CC_IMP = footsoldier
CC_DEMON = slither-beast
CC_LOST = skull flare
CC_CACO = orb monster
CC_HELL = pain bringer
CC_BARON = pain lord
CC_ARACH = small technospider
CC_PAIN = globe fiend
CC_REVEN = undead servant
CC_MANCU = hellslug
CC_ARCH = flamebringer
CC_SPIDER = large technospider
CC_CYBER = mechabomination
CC_HERO = savior of us all
HUSTR_1 = DM01
HUSTR_2 = DM02
HUSTR_3 = DM03
HUSTR_4 = DM04
HUSTR_5 = DM05
HUSTR_6 = DM06
HUSTR_7 = DM07
HUSTR_8 = DM08
HUSTR_9 = DM09
HUSTR_10 = DM10
HUSTR_11 = DM11
HUSTR_12 = DM12
HUSTR_13 = DM13
HUSTR_14 = DM14
HUSTR_15 = DM15
HUSTR_16 = DM16
HUSTR_17 = DM17
HUSTR_18 = DM18
HUSTR_19 = DM19
HUSTR_20 = DM20
HUSTR_21 = DM21
HUSTR_22 = DM22
HUSTR_23 = DM23
HUSTR_24 = DM24
HUSTR_25 = DM25
HUSTR_26 = DM26
HUSTR_27 = DM27
HUSTR_28 = DM28
HUSTR_29 = DM29
HUSTR_30 = DM30
HUSTR_31 = DM31
HUSTR_32 = DM32
PHUSTR_1 = DM01
PHUSTR_2 = DM02
PHUSTR_3 = DM03
PHUSTR_4 = DM04
PHUSTR_5 = DM05
PHUSTR_6 = DM06
PHUSTR_7 = DM07
PHUSTR_8 = DM08
PHUSTR_9 = DM09
PHUSTR_10 = DM10
PHUSTR_11 = DM11
PHUSTR_12 = DM12
PHUSTR_13 = DM13
PHUSTR_14 = DM14
PHUSTR_15 = DM15
PHUSTR_16 = DM16
PHUSTR_17 = DM17
PHUSTR_18 = DM18
PHUSTR_19 = DM19
PHUSTR_20 = DM20
PHUSTR_21 = DM21
PHUSTR_22 = DM22
PHUSTR_23 = DM23
PHUSTR_24 = DM24
PHUSTR_25 = DM25
PHUSTR_26 = DM26
PHUSTR_27 = DM27
PHUSTR_28 = DM28
PHUSTR_29 = DM29
PHUSTR_30 = DM30
PHUSTR_31 = DM31
PHUSTR_32 = DM32
THUSTR_1 = DM01
THUSTR_2 = DM02
THUSTR_3 = DM03
THUSTR_4 = DM04
THUSTR_5 = DM05
THUSTR_6 = DM06
THUSTR_7 = DM07
THUSTR_8 = DM08
THUSTR_9 = DM09
THUSTR_10 = DM10
THUSTR_11 = DM11
THUSTR_12 = DM12
THUSTR_13 = DM13
THUSTR_14 = DM14
THUSTR_15 = DM15
THUSTR_16 = DM16
THUSTR_17 = DM17
THUSTR_18 = DM18
THUSTR_19 = DM19
THUSTR_20 = DM20
THUSTR_21 = DM21
THUSTR_22 = DM22
THUSTR_23 = DM23
THUSTR_24 = DM24
THUSTR_25 = DM25
THUSTR_26 = DM26
THUSTR_27 = DM27
THUSTR_28 = DM28
THUSTR_29 = DM29
THUSTR_30 = DM30
THUSTR_31 = DM31
THUSTR_32 = DM32
HUSTR_PLRGREEN = g:
HUSTR_PLRINDIGO = i:
HUSTR_PLRBROWN = b:
HUSTR_PLRRED = r:
AMSTR_FOLLOWON = map following player
AMSTR_FOLLOWOFF = map no longer following player
AMSTR_GRIDON = map grid on
AMSTR_GRIDOFF = map grid off
AMSTR_MARKEDSPOT = added map bookmark
AMSTR_MARKSCLEARED = all map bookmarks cleared.
STSTR_MUS = music changed
STSTR_NOMUS = unknown music track?
STSTR_DQDON = god mode on
STSTR_DQDOFF = god mode off
STSTR_KFAADDED = keys, weapons and ammo added.
STSTR_FAADDED = weapons and ammo added.
STSTR_NCON = noclip on
STSTR_NCOFF = noclip off
STSTR_CHOPPERS = vroom!
STSTR_BEHOLD = v=invuln, s=steroids, i=invis, r=hazard, a=map, l=night vision
NIGHTMARE = this is the highest skill level.\nnot recommended unless you're experienced.\n\n(press y to confirm)
#HUSTR_CHATMACRO1
#HUSTR_CHATMACRO2
#HUSTR_CHATMACRO3
#HUSTR_CHATMACRO4
#HUSTR_CHATMACRO5
#HUSTR_CHATMACRO6
#HUSTR_CHATMACRO7
#HUSTR_CHATMACRO8
#HUSTR_CHATMACRO9
#HUSTR_CHATMACRO0
#HUSTR_TALKTOSELF1
#HUSTR_TALKTOSELF2
#HUSTR_TALKTOSELF3
#HUSTR_TALKTOSELF4
#HUSTR_TALKTOSELF5
#HUSTR_MESSAGESENT
# For FreeDM we shouldn't be seeing these...
E1TEXT = You've finished episode 1!
E2TEXT = You've finished episode 2!
E3TEXT = You've finished episode 3!
E4TEXT = You've finished episode 4!
# After MAP06, before MAP07:
C1TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
# After MAP11, before MAP12:
C2TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
# After MAP20, before MAP21:
C3TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
# After MAP30 (endgame text):
C4TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
# Before MAP31 (secret level #1):
C5TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
# Before MAP32 (secret level #2):
C6TEXT = You're playing FreeDM, the Freedoom\ndeathmatch spinoff project.\n\nFor more information about Freedoom\nand FreeDM, see:\n\nhttp://freedoom.github.io/
#P1TEXT
#P2TEXT
#P3TEXT
#P4TEXT
#P5TEXT
#P6TEXT
#T1TEXT
#T2TEXT
#T3TEXT
#T4TEXT
#T5TEXT
#T6TEXT
#BGFLATE1
#BGFLATE2
#BGFLATE3
#BGFLATE4
#BGFLAT06
#BGFLAT11
#BGFLAT20
#BGFLAT30
#BGFLAT15
#BGFLAT31
#BGCASTCALL
#STARTUP1
#STARTUP2
#STARTUP3
#STARTUP4
#STARTUP5
#SAVEGAMENAME