swwmgz_m/zscript/compat/swwm_compat.zsc
Marisa the Magician 2aa0ea4680 More work towards Legacy of Rust support (with caveats).
As of this commit, do not consider the experience when playing that new
expansion to be complete. I've only partially written some of the mission texts
and rudimentarily enhanced some boss fights.

Currently there is one major limitation in that the intermission texts cannot
be replaced, as they're hardcoded inside the UMAPINFO. I don't know if I can
work around that.
2025-08-20 16:47:24 +02:00

671 lines
24 KiB
Text

// level compatibility scripts
// sometimes stuff breaks, or certain changes are needed for balance or to mesh
// with the mod's mechanics better, this is here for that
Class SWWMLevelCompatibility : LevelPostProcessor
{
private void EquinoxBossBrainHandle( uint lineno, int sectortag )
{
// don't spawn boss brains until it's time to crush them
for ( uint i=0; i<GetThingCount(); i++ )
{
if ( GetThingEdNum(i) != 88 ) continue;
SetThingEdNum(i,9001);
SetThingID(i,666);
}
// change the crusher line
SetLineSpecial(lineno,ACS_Execute,-Int('EQUINOX_BRAINCRUSH'),0,sectortag);
}
protected void Apply( Name checksum, String mapname )
{
int ncellsa = 0, ncellsb = 0;
int nbackpack = 0;
bool wolfmap31 = false;
switch ( checksum )
{
case 'none':
return;
// okuplok
case 'F7F353146676920238935A8D0D1B6E8E':
// add 7 more backpacks on top of existing one, for a full embiggening
// (players will need it)
for ( int i=0; i<7; i++ ) AddThing(8,(11808,-2016,0));
break;
// holy hell revealed
case '83569A062B5261C6BB4A034BA8245D24':
// remove boss brain and re-spawn it when end is reached, prevents cheesing the map with the ynykron
SetThingEdNum(50183,9001);
SetThingID(50183,666);
SetLineSpecial(21964,ACS_Execute,-Int('HHR_BRAINWALL'));
break;
// NRFTL MAP08
case '7EB864A03948C3F918F9223B2D1F8911':
// prevent easy cheesing of the exit teleporter
AddSectorTag(155,24);
OffsetSectorPlane(155,1,-80.);
SetLineSpecial(652,ACS_Execute,-Int('NERVE_EXITOPEN'));
// remove the mp cyberdemon entirely as it disrupts the vanilla boss handler
SetThingEdNum(202,0);
break;
// INTER-EPISODE PROGRESSION STUFF
// Doom E1M8
case '97079958C7E89C1908890730B8B9FEB7':
// 1.1-1.2
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E2M1";
// no damage in exit sector
SetSectorSpecial(13,0);
// paint it black
for ( int i=1; i<4; i++ )
level.Sectors[13].SetSpecialColor(i,0xFF000000);
// teleport sequence
for ( int i=299; i<=306; i++ )
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
// remove enemies
for ( int i=106; i<=112; i++ )
SetThingEdNum(i,0);
for ( int i=118; i<=125; i++ )
SetThingEdNum(i,0);
break;
case '058FB092EA1B70DA1E3CBF501C4A91A1':
// 1.666-1.9
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E2M1";
// no damage in exit sector
SetSectorSpecial(66,0);
// paint it black
for ( int i=1; i<4; i++ )
level.Sectors[66].SetSpecialColor(i,0xFF000000);
// teleport sequence
for ( int i=299; i<=306; i++ )
SetLineSpecial(i,ACS_Execute,-Int('E1M8_KNOCKOUT'));
// remove enemies
for ( int i=106; i<=112; i++ )
SetThingEdNum(i,0);
for ( int i=118; i<=125; i++ )
SetThingEdNum(i,0);
break;
case 'A1F105211112747EE50BA520462A471E':
{
// E1M8B
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E2M1";
// no damage in exit sector
SetSectorSpecial(538,0);
// paint it black
for ( int i=1; i<4; i++ )
level.Sectors[538].SetSpecialColor(i,0xFF000000);
// teleport sequence
static const int exitlines[] =
{
3048, 3055, 3073,
3074, 3075, 3076,
3077, 3078, 3079,
3080, 3081, 3082
};
for ( int i=0; i<12; i++ )
SetLineSpecial(exitlines[i],ACS_Execute,-Int('E1M8_KNOCKOUT'));
// remove enemies
for ( int i=183; i<=190; i++ )
SetThingEdNum(i,0);
break;
}
// Doom E2M8
case 'EFFE91DF41AD41F6973C06F0AD67DDB9':
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E3M1";
break;
// Doom E3M8
case 'EF128313112110ED6C1549AF96AF26C9':
level.nextsecretmap = level.nextmap; // so the handler can detect this
if ( LevelInfo.MapExists("E4M1") ) level.nextmap = "E4M1";
else if ( LevelInfo.MapExists("MAP01") ) level.nextmap = "MAP01";
break;
// Doom E4M8
case '2DC939E508AB8EB68AF79D5B60568711':
level.nextsecretmap = level.nextmap; // so the handler can detect this
if ( LevelInfo.MapExists("E5M1") ) level.nextmap = "E5M1";
else if ( LevelInfo.MapExists("MAP01") ) level.nextmap = "MAP01";
break;
// SIGIL E5M8
case '6EAD80DA1F30B4B3546FA294EEF9F87C':
level.nextsecretmap = level.nextmap; // so the handler can detect this
if ( LevelInfo.MapExists("E6M1") ) level.nextmap = "E6M1";
else if ( LevelInfo.MapExists("MAP01") ) level.nextmap = "MAP01";
break;
// SIGIL II E6M8
case '5BA3D00F6B64F6268E11C6851D47ECBF':
level.nextsecretmap = level.nextmap; // so the handler can detect this
if ( LevelInfo.MapExists("MAP01") ) level.nextmap = "MAP01";
break;
// Legacy of Rust E1M7
case '7F00D2FAA5F0B10A6028BE2FC5530EC9':
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "MAP08";
break;
// Heretic E1M8
case '27639D04F8090D57A47D354992435893':
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E2M1";
break;
// Heretic E2M8
case '5158C22A0F30CE5E558FD2A05D67685E':
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E3M1";
break;
// Heretic E3M8
case '4719C2C71EF28F52310B889DD5A9778B':
level.nextsecretmap = level.nextmap; // so the handler can detect this
if ( LevelInfo.MapExists("E4M1") ) level.nextmap = "E4M1";
break;
// Heretic E4M8
case '30D1480A6D4F3A3153739D4CCF659C4E':
level.nextsecretmap = level.nextmap; // so the handler can detect this
level.nextmap = "E5M1";
break;
// Micro Slaughter Community Project MAP13 (beta) / MAP14 (v1)
case 'E45AA3BE411845AA0DEE7CA5DAAB65FE':
case 'CDF12AAE960E6BD11D98E1F0A1782B7B':
// reduce OBSCENELY EXCESSIVE number of cell packs in voodoo doll conveyors (400), which will cause immense lag when replaced with mod ammo
// unsurprisingly, this actually makes the map go from completely unplayable to having perfectly smooth performance (gee, I wonder why)
for ( uint i=0; i<GetThingCount(); i++ )
{
if ( GetThingEdNum(i) != 17 ) continue;
Vector3 pos = GetThingPos(i);
if ( pos.y != 480. ) continue;
if ( pos.x == -5472. )
{
ncellsa++;
if ( ncellsa > 20 ) SetThingEdNum(i,0);
}
else if ( pos.x == -5344. )
{
ncellsb++;
if ( ncellsb > 20 ) SetThingEdNum(i,0);
}
}
break;
// Ultimate Doom 2 MAP20 (dv3.1)
case '96C5914A9B4A2383DE6BBE363940DF2F':
{
// add a "sector enter" action for reaching the exit room
// and make it trigger a dialogue
uint nt = AddThing(9998,(-9360,12768,12));
SetThingFlags(nt,MODES_ALL|MTF_STANDSTILL); // trigger once
SetThingSpecial(nt,Thing_Activate);
int tiddy = level.FindUniqueTid(9999);
SetThingArgument(nt,0,tiddy);
nt = AddThing(4206930,(0,0,0));
SetThingID(nt,tiddy);
break;
}
// EQUINOX: various boss brain setups that could be cheesed with the Ynykron or silver bullet
// Equinox MAP04
case 'E66BCCFAD7AC40EFB21E2A19131E1522':
EquinoxBossBrainHandle(2406,27);
// raise floor by 10 units so its untextured lower lines don't glitch out at eye level
OffsetSectorPlane(248,0,10.);
break;
// Equinox MAP07
case 'A0B6B83DC8BD50FC84170572840DE585':
EquinoxBossBrainHandle(3423,31);
break;
// Equinox MAP10
case 'F91E3FE225F10EECBE21486E1BB14834':
EquinoxBossBrainHandle(2813,29);
break;
// Equinox MAP13
case '3805A661D5C4523AFF7BF86991071043':
EquinoxBossBrainHandle(4106,60);
break;
// DOOM VACATION: this wad is weird
// Doom Vacation MAP01 (1.4)
case 'F286BABF0D152259CD6B996E8920CA70':
// Doom Vacation MAP01 (1.5)
case 'A52BD2038CF814101AAB7D9C78F9ACE2':
// two girls shouldn't be headpattable, as they have use lines around them
SetThingArgument(314,0,1);
SetThingArgument(315,0,1);
SetThingID(314,666);
SetThingID(315,667);
// unfortunately the line special wrangling has to be done one tic after map load
// because ACS is just that goddamn weird
break;
// Doom 2 MAP07
case '291F24417FB3DD411339AE82EF9B3597':
// remove excess backpacks (there's 10 of them for crying out loud)
for ( uint i=0; i<GetThingCount(); i++ )
{
if ( GetThingEdNum(i) != 8 ) continue;
if ( nbackpack ) SetThingEdNum(i,0);
nbackpack++;
}
// no cheesing of the exit
AddSectorTag(3,669);
OffsetSectorPlane(3,0,-72.);
for ( uint i=149; i<=153; i++ )
{
SetLineFlags(i,Line.ML_CHECKSWITCHRANGE);
SetWallTexture(i,1,2,"BRICK4");
}
level.ExecuteSpecial(ACS_Execute,null,null,false,-Int('DIMPLE_EXITOPEN'));
// mark the DM-exclusive bfg room as a secret
SetSectorSpecial(1,0);
SetSectorSpecial(23,1024);
SetWallTexture(168,1,2,"BRICK4"); // fix gap
// remove the deathmatch exit
ClearLineSpecial(174);
SetWallTexture(174,0,1,"BRONZE3");
level.Lines[174].sidedef[0].SetTextureYOffset(1,0);
//
// ABANDON ALL HOPE YE WHO ENTER HERE
//
// we're going to recycle the exit sign linedefs to
// commit some serious crimes here, this will be fun
// (in ccw order from bottom left)
// vertexes of exit sign: 151, 152, 153, 154
// linedefs of exit sign: 184, 185, 186, 187
// vertexes of northeast pillar: 23, 0, 24, 8
// linedefs of northeast pillar: 22, 23, 24, 21
// displace vertices of exit sign inside pillar
SetVertex(151,-112,-48);
SetVertex(152,-80,-48);
SetVertex(153,-80,-16);
SetVertex(154,-112,-16);
// move pillar references
SetLineVertexes(22,151,152);
SetLineVertexes(23,152,153);
SetLineVertexes(24,153,154);
SetLineVertexes(21,154,151);
// move exit sign references
SetLineVertexes(184,23,0);
SetLineVertexes(185,0,24);
SetLineVertexes(186,24,8);
SetLineVertexes(187,8,23);
// set pillar sector refs
SetLineSectorRef(22,0,24);
SetLineSectorRef(23,0,24);
SetLineSectorRef(24,0,24);
SetLineSectorRef(21,0,24);
// set exit sign sector refs
SetLineSectorRef(184,0,0);
SetLineSectorRef(185,0,10);
SetLineSectorRef(186,0,10);
SetLineSectorRef(187,0,0);
// change the textures
SetWallTexture(184,0,0,"BROWN1");
SetWallTexture(185,0,0,"BROWN1");
SetWallTexture(186,0,0,"BROWN1");
SetWallTexture(187,0,0,"BROWN1");
SetWallTexture(184,0,2,"BROWN1");
SetWallTexture(185,0,2,"BROWN1");
SetWallTexture(186,0,2,"BROWN1");
SetWallTexture(187,0,2,"BROWN1");
level.Lines[184].sidedef[0].SetTextureXScale(0,8.);
level.Lines[185].sidedef[0].SetTextureXScale(0,2.);
level.Lines[186].sidedef[0].SetTextureXScale(0,8.);
level.Lines[187].sidedef[0].SetTextureXScale(0,2.);
level.Lines[184].sidedef[0].SetTextureXScale(2,8.);
level.Lines[185].sidedef[0].SetTextureXScale(2,2.);
level.Lines[186].sidedef[0].SetTextureXScale(2,8.);
level.Lines[187].sidedef[0].SetTextureXScale(2,2.);
level.Lines[184].sidedef[0].SetTextureXOffset(0,0);
level.Lines[185].sidedef[0].SetTextureXOffset(0,0);
level.Lines[186].sidedef[0].SetTextureXOffset(0,0);
level.Lines[187].sidedef[0].SetTextureXOffset(0,0);
level.Lines[184].sidedef[0].SetTextureYOffset(0,24);
level.Lines[185].sidedef[0].SetTextureYOffset(0,24);
level.Lines[186].sidedef[0].SetTextureYOffset(0,24);
level.Lines[187].sidedef[0].SetTextureYOffset(0,24);
level.Lines[184].sidedef[0].SetTextureXOffset(2,0);
level.Lines[185].sidedef[0].SetTextureXOffset(2,0);
level.Lines[186].sidedef[0].SetTextureXOffset(2,0);
level.Lines[187].sidedef[0].SetTextureXOffset(2,0);
level.Lines[184].sidedef[0].SetTextureYOffset(2,24);
level.Lines[185].sidedef[0].SetTextureYOffset(2,24);
level.Lines[186].sidedef[0].SetTextureYOffset(2,24);
level.Lines[187].sidedef[0].SetTextureYOffset(2,24);
SetWallTexture(22,0,1,"BROWN144");
SetWallTexture(23,0,1,"SW1DIRT");
SetWallTexture(24,0,1,"BROWN144");
SetWallTexture(21,0,1,"BROWN144");
level.Lines[22].sidedef[0].SetTextureXScale(1,.5);
level.Lines[23].sidedef[0].SetTextureXScale(1,.5);
level.Lines[24].sidedef[0].SetTextureXScale(1,.5);
level.Lines[21].sidedef[0].SetTextureXScale(1,.5);
level.Lines[22].sidedef[0].SetTextureXOffset(1,96);
level.Lines[23].sidedef[0].SetTextureXOffset(1,16);
level.Lines[24].sidedef[0].SetTextureXOffset(1,32);
level.Lines[21].sidedef[0].SetTextureXOffset(1,64);
level.Lines[22].sidedef[0].SetTextureYOffset(1,4);
level.Lines[23].sidedef[0].SetTextureYOffset(1,4);
level.Lines[24].sidedef[0].SetTextureYOffset(1,4);
level.Lines[21].sidedef[0].SetTextureYOffset(1,4);
// make the pillar openable with use
OffsetSectorPlane(24,0,24+64);
OffsetSectorPlane(24,1,8);
SetLineSpecial(184,Floor_MoveToValue,0,8,40,0);
SetLineSpecial(185,Floor_MoveToValue,0,8,40,0);
SetLineSpecial(186,Floor_MoveToValue,0,8,40,0);
SetLineSpecial(187,Floor_MoveToValue,0,8,40,0);
SetLineActivation(184,SPAC_Use);
SetLineActivation(185,SPAC_Use);
SetLineActivation(186,SPAC_Use);
SetLineActivation(187,SPAC_Use);
SetLineFlags(184,Line.ML_SECRET);
SetLineFlags(185,Line.ML_SECRET);
SetLineFlags(186,Line.ML_SECRET);
SetLineFlags(187,Line.ML_SECRET);
SetLineFlags(22,Line.ML_DONTDRAW);
SetLineFlags(23,Line.ML_DONTDRAW);
SetLineFlags(24,Line.ML_DONTDRAW);
SetLineFlags(21,Line.ML_DONTDRAW);
SetLineActivation(23,SPAC_Use);
SetLineSpecial(23,Door_Open,668,16);
AddSectorTag(25,668);
// hide the secret sector lines
for ( uint i=164; i<=175; i++ )
{
if ( i == 168 ) continue;
SetLineFlags(i,Line.ML_DONTDRAW);
}
//
// OK, THE CRIME TIME IS OVER
//
break;
// Doom 2 MAP31
case '0BB515B79E0A6C42C4846C4E6F5F1D73':
case '3FF94E27423F91C1585B3396F0C03459':
case 'F2235342F1591B59154022E1DAF3EB2F':
case '3FF94E27423F91C1585B3396F0C03459':
wolfmap31 = true;
// Doom 2 MAP32
case '34A8DB0B341A32267CB461D8C219DF0A':
case 'AA4CA3FC891D13821ACCABD836E29EB5':
case '9AA7780B46EC4471F630572798943D71':
// sound sequence handling
foreach ( l:level.Lines )
{
if ( !l.backsector ) continue;
TextureID t;
bool wolfdoor = false;
for ( int i=0; i<3; i++ )
{
t = l.sidedef[0].GetTexture(i);
if ( t.IsValid() && ((TexMan.GetName(t) == "ZDOORF1") || (TexMan.GetName(t) == "ZDOORB1") || (TexMan.GetName(t) == "ZELDOOR")) )
{
wolfdoor = true;
break;
}
}
if ( !wolfdoor && l.sidedef[1] ) for ( int i=0; i<3; i++ )
{
t = l.sidedef[1].GetTexture(i);
if ( t.IsValid() && ((TexMan.GetName(t) == "ZDOORF1") || (TexMan.GetName(t) == "ZDOORB1") || (TexMan.GetName(t) == "ZELDOOR")) )
{
wolfdoor = true;
break;
}
}
if ( wolfdoor )
l.backsector.SeqName = 'DoorWolf3D';
else if ( (l.special == Door_Open) || (l.special == Door_Raise) )
l.backsector.SeqName = 'PushwallWolf3D';
}
// enemy replacements
for ( uint i=0; i<GetThingCount(); i++ )
{
int ednum = GetThingEdNum(i);
if ( (ednum == 84) || (ednum == 3004) )
SetThingEdNum(i,wolfmap31?4206990:4206992); // guard / ss
else if ( ednum == 3002 )
SetThingEdNum(i,4206993); // dog
else if ( ednum == 16 )
SetThingEdNum(i,4206991); // hans grosse
}
break;
// Doom 2 Redux MAP20
case 'C9FFFD855FCF9BD6BC3ABCCA5DC2240A':
// move boss brain so the player telefrags it (lets the mod know this is a death exit)
SetThingXY(497,3296,-96);
AddThing(2035,(3360,-96,0),315); // put a barrel in the hole that was left
break;
// Doom 2 Redux MAP31
case '4A8EAAB2B29CB438ED6EE972D3EEE951':
// contribute to Aximal's illusion by putting a single WolfSS facing away from the player start
// we can re-use thing 0, which is a shotgunner corpse
SetThingEdNum(0,4206992);
SetThingAngle(0,0);
break;
// Hexen MAP06
case '1B6DF1FD51FDC3D882009D287B5A28C6':
case '65EFFD49449AD3FD32A6EB347C6D923B':
// replace an Icon of the Defender with a Chancebox
SetThingEdNum(193,4206920);
SetThingSkills(193,SKILLS_ALL);
SetThingFlags(193,MTF_SINGLE|MTF_COOPERATIVE);
// replace a Mystic Ambit Incant with a Chancebox
SetThingEdNum(377,4206920);
SetThingSkills(193,SKILLS_ALL);
SetThingFlags(377,MTF_SINGLE|MTF_COOPERATIVE);
SetThingAngle(377,90); // should face north
break;
case 'A3D86F121B41320BFD1EB747D9133EF2':
// replace an Icon of the Defender with a Chancebox
SetThingEdNum(193,4206921);
SetThingSkills(193,SKILLS_ALL);
SetThingFlags(193,MTF_SINGLE|MTF_COOPERATIVE);
// this version doesn't have a Mystic Ambit Incant placed
AddThing(4206921,(-32,-3072,-456),90,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Hexen MAP11
case 'F8DFDCBAA677F83E2CD2409F5C00505F':
case 'CC90EAF7131A1CA59F8322735C92899C':
case 'B2A1B321E56494081085E51931EB3158':
// replace Mystic Urns with Chanceboxes
SetThingEdNum(62,4206920);
SetThingEdNum(63,4206920);
SetThingEdNum(64,4206920);
SetThingSkills(62,SKILLS_ALL);
SetThingSkills(63,SKILLS_ALL);
SetThingSkills(64,SKILLS_ALL);
SetThingFlags(62,MTF_SINGLE|MTF_COOPERATIVE);
SetThingFlags(63,MTF_SINGLE|MTF_COOPERATIVE);
SetThingFlags(64,MTF_SINGLE|MTF_COOPERATIVE);
SetThingAngle(62,0);
SetThingAngle(63,270);
SetThingAngle(64,180);
break;
// Hexen MAP31
case '4A4436544EBFA930AE3C4C8C2409FD6E':
case 'D48508B92843539B4464235C2B355CC3':
case 'BF9DFE95D9351AA3A65666185BFC921C':
// place 2 Chanceboxes at the final room
AddThing(4206920,(416,-352,0),180,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
AddThing(4206920,(544,-352,0),0,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Hexen MAP26
case '339B4B50B615BE6E1D8454F6C605A97C':
case 'BFDC70A9D445EA5B9010ABB133253D6F':
case '2CF971EECD6B790782DB44B0E917B5B2':
// place 2 Chanceboxes in the central square
AddThing(4206920,(-224,416,-128),270,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
AddThing(4206920,(-224,-672,-128),90,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Hexen MAP39
case '2639C89B8B7052E2CE4CB9CFC63F4C53':
case 'EC5A1B294CC7FB822A6C913F811797C4':
case 'FEA83EE6BCFC899F06CBE394DFBE6707':
// replace Porkalator with a Chancebox
SetThingEdNum(179,4206920);
SetThingSkills(179,SKILLS_ALL);
SetThingFlags(179,MTF_SINGLE|MTF_COOPERATIVE);
SetThingAngle(179,270);
// add two more Chanceboxes near it
AddThing(4206920,(-32,2848,128),270,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
AddThing(4206920,(160,2848,128),270,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Hexen MAP40
case '2A6C4235B942467D25FD50D5B313E67A':
case '1C5DE5A921DEE405E98E7E09D9829387':
case 'EFAFE59092DE5E613562ACF52B86C37F':
// place a final Chancebox behind the player start
AddThing(4206920,(2912,256,-112),180,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Kinsie's Test Map
case 'E43C1797DFD9443D1B4C035327743588':
SetThingID(323,6666); // so this boss brain can have a healthbar
case '81033F4F11F652E9CA875CED06C7AF8C':
case '0D1CAD582F63A179BF8A5E47C12D10C6':
// add collectibles
for ( int i=0; i<13; i++ )
AddThing(4206900+i,(1472+64*i,640,0),0,SKILLS_ALL,MTF_SINGLE|MTF_COOPERATIVE);
break;
// Eviternity 2 MAP01
case '8EB38D5289C47BB68D64F2832EFA096D':
// special trigger for a bunch of dialogues
AddThing(4206931,(0,0,0));
break;
// Eviternity 2 MAP26
case '0E61C7B0E0118304B9AE74F63C11CAEC':
{
// add a "sector actor hits floor" action for going down into the hole™
// and make it trigger a dialogue
uint nt = AddThing(9999,(-576,1344,-352));
SetThingFlags(nt,MODES_ALL|MTF_STANDSTILL); // trigger once
SetThingSpecial(nt,Thing_Activate);
int tiddy = level.FindUniqueTid(9999);
SetThingArgument(nt,0,tiddy);
nt = AddThing(4206932,(0,0,0));
SetThingID(nt,tiddy);
break;
}
}
switch ( checksum )
{
// ALL of Legacy of Rust
case '4F9E705F55E45C1047FABF8BDF2B2399':
case '5FB5010F988FFAE2679A9BDD57460473':
case '7CABD8B043B69996D9777F7070C8BCCE':
case '7F00D2FAA5F0B10A6028BE2FC5530EC9':
case '8A2C0869EAA69FB7B441CD2B648978D0':
case '95B94864754AC50446A456A88DA3E052':
case '867B6AD67389A077CE3C9E3CC896F484':
case '1283C3288A2F51B7455D817C5B7FCFAD':
case '1699E255B8C0DB86EBB00E5B3C44B4AA':
case 'A3F7A58FC08C369F1360741A99F1497C':
case 'B6447217725A2A709D6D021CDE15FE10':
case 'BF34C34C5DFC8BB47228CC304F9A6748':
case 'C745F8D0D8824A1910F9DC8B7AB16AA2':
case 'E2D2886FD22DC4354939E6E51690C34B':
case 'F5AED83945C8BDE642E55E72FE0D92AA':
// we need to replace the dehacked things with the
// ones defined in zscript internally, for the sake of
// script compatibility and whatnot
for ( uint i=0; i<GetThingCount(); i++ )
{
int ednum = GetThingEdNum(i);
if ( ((ednum >= 3007) && (ednum <= 3014))
|| ((ednum >= 3100) && (ednum <= 3142)) )
SetThingEdNum(i,ednum+4204000);
}
break;
case 'F206766043C4D9BA2C36F76106F96279':
case 'FCF009C63BBA5F8CEE71ED5EC0B02CDA':
// ALL of Equinox
case '9705315427A2F951A538B23C39199236':
case '54E9953A3C1A88641E00AA353BAF46E9':
case 'DD3986E184829DAB73160F4C122155F9':
case 'B3E6CAE9983EA1DC4D9544DA26118569':
case '3E4DFC55EAE85A7FE02DD21ED33AABCA':
case 'ECCB69F1BBF91D8F67D8583EA2546863':
case 'E66BCCFAD7AC40EFB21E2A19131E1522':
case 'A0B6B83DC8BD50FC84170572840DE585':
case '9BA1ACB72D878AFA3CB22B810D6CCD9A':
case 'A26749D9B9CD70ECED5C7B6BAB6D859E':
case '3805A661D5C4523AFF7BF86991071043':
case 'F91E3FE225F10EECBE21486E1BB14834':
case '838BA30EB0B003C070414093BFDFA72A':
// replace certain animated flats with duplicates
// this avoids unintended TERRAIN defs from applying to them
level.ReplaceTextures("SLIME01","EQNXSL01",0);
level.ReplaceTextures("SLIME02","EQNXSL02",0);
level.ReplaceTextures("SLIME03","EQNXSL03",0);
level.ReplaceTextures("SLIME04","EQNXSL04",0);
level.ReplaceTextures("SLIME09","EQNXSL09",0);
level.ReplaceTextures("SLIME10","EQNXSL10",0);
level.ReplaceTextures("SLIME11","EQNXSL11",0);
level.ReplaceTextures("SLIME12","EQNXSL12",0);
level.ReplaceTextures("BLOOD1","EQNXBLD1",0);
level.ReplaceTextures("BLOOD2","EQNXBLD2",0);
level.ReplaceTextures("BLOOD3","EQNXBLD3",0);
level.ReplaceTextures("RROCK05","EQNXRR05",0);
level.ReplaceTextures("RROCK06","EQNXRR06",0);
level.ReplaceTextures("RROCK07","EQNXRR07",0);
level.ReplaceTextures("RROCK08","EQNXRR08",0);
break;
// ALL of Doom Vacation
case 'D07842872226058F93D0957EA46ED782':
case 'F286BABF0D152259CD6B996E8920CA70':
case '7E2707328B6BCF0ACDC2E80049E21167':
case '8AA3E9B8E816E72A04368404402DD8E3':
case '8B28736D01492F3701CCD736C97EF125':
case '10D3C12050518E806801B12057437403':
case '48A7FC1AF2D1CCBFE7C6EFB4EEE97A50':
case '73B317A0DA2C75BD903E895A27EEEDB9':
case '62158F76FC56B62007C1F167A7921304':
case '0D33878E4C8164A792AECCDA56F08D60':
case 'A52BD2038CF814101AAB7D9C78F9ACE2':
case 'F6413AFAEB73B3848A82F70C2A01E47D':
case 'F8CBDC96A7E08CAFC5D7C0E711551E40':
case '3E821CC90C38B7D71DDEB0324D3900CC':
case '05D0AA06742B3C7DCD79E5F659267656':
case '8F6710E3570C2056FDCA591EF89B31A9':
case '382E99BBFA9301110630CD5F8F8056DA':
case '480F6AD2D2E266DA745FD8FA75EC327D':
case '968D97F5952E55DB2464274A8EE5F529':
case '5669E396BEDDEA6D90EF5AF5EC892811':
// get rid of these dumb skulltag ctf actors
for ( uint i=0; i<GetThingCount(); i++ )
{
int ednum = GetThingEdNum(i);
if ( (ednum == 5130) || (ednum == 5131)
|| (ednum == 5080) || (ednum == 5081) )
SetThingEdNum(i,0);
}
// get rid of moan switches
level.ReplaceTextures("SW1ZIM","-noflat-",0);
level.ReplaceTextures("SW1TEK","-noflat-",0);
break;
}
// [Heretic] override mace spawner behavior to always guarantee
// one spawn per map
if ( gameinfo.gametype&GAME_Heretic )
{
Array<uint> Maces;
Maces.Clear();
for ( uint i=0; i<GetThingCount(); i++ )
{
if ( GetThingEdNum(i) != 2002 ) continue;
Maces.Push(i);
}
int chosen = Random[Replacements](0,Maces.Size()-1);
for ( int i=0; i<Maces.Size(); i++ )
{
if ( i == chosen ) SetThingEdNum(Maces[i],4206999);
else SetThingEdNum(Maces[i],0);
}
}
// [Hexen] force Mystic Ambit Incants to spawn outside coop
if ( gameinfo.gametype&GAME_Hexen )
{
for ( uint i=0; i<GetThingCount(); i++ )
{
if ( GetThingEdNum(i) != 10120 ) continue;
uint flg = GetThingFlags(i);
SetThingFlags(i,flg|MTF_SINGLE);
}
}
}
}