I'm afraid the plans for strife support have been cancelled.

This commit is contained in:
Mari the Deer 2021-03-21 16:22:26 +01:00
commit 8c47601d90
38 changed files with 66 additions and 388 deletions

View file

@ -1,2 +0,0 @@
// TODO crimes_m dialogue system
// To be implemented once Strife support is a thing

View file

@ -1,20 +0,0 @@
// Strife compatibility code
// TODO hijack vanilla dialogues and hook in crimes_m dialogue menu for them
Class SWWMConversationMenu : ConversationMenu
{
override int Init( StrifeDialogueNode CurNode, PlayerInfo player, int activereply )
{
return Super.Init(CurNode,player,activereply);
}
}
// TODO Sigil key item, replaces the drops from bosses
Class SWWMCompatSigil : Inventory
{
}
// TODO base class for all vanilla Strife item replacements that just get swapped out for cash
Class SWWMLootable : Inventory
{
}

View file

@ -111,7 +111,7 @@ extend Class SWWMHandler
{
if ( !lastcombat || (gametic > lastcombat+40) )
{
if ( (e.Thing.IsFriend(e.DamageSource) || SWWMUtility.IsCivilian(e.DamageSource)) )
if ( e.Thing.IsFriend(e.DamageSource) )
lastcombat = AddOneliner("friendhit",1,10);
else if ( (!lastcombat || (gametic > lastcombat+100)) && !Random[DemoLines](0,e.DamageSource.bBOSS?2:4) && !SWWMHDoomHandler.IsCuteGirl(e.DamageSource) ) // [HDoom] don't shout at the girls
lastcombat = AddOneliner("gethit",1,15);
@ -122,7 +122,7 @@ extend Class SWWMHandler
if ( (e.DamageSource == players[consoleplayer].mo) && (e.Thing.bISMONSTER || e.Thing.player || (e.Thing is 'ScriptedMarine')) && (e.Thing.Health > 0) )
{
// make sure it's not a moth, because otherwise they won't shut up about accidentally hurting them (it happens a lot)
if ( (e.Thing.IsFriend(e.DamageSource) || SWWMUtility.IsCivilian(e.Thing)) && !(e.Thing is 'LampMoth') )
if ( e.Thing.IsFriend(e.DamageSource) && !(e.Thing is 'LampMoth') )
{
if ( !lastcombat || (gametic > lastcombat+40) )
lastcombat = AddOneliner("hitfriend",1,10);
@ -150,7 +150,7 @@ extend Class SWWMHandler
highesttic = gametic;
if ( !lastcombat || (gametic > lastcombat+40) )
{
if ( e.Thing.IsFriend(src) || SWWMUtility.IsCivilian(e.Thing) )
if ( e.Thing.IsFriend(src) )
lastcombat = AddOneliner("friendkill",1,5);
else if ( (!lastcombat || (gametic > lastcombat+100)) && !Random[DemoLines](0,e.Thing.bBOSS?2:5) && !SWWMHDoomHandler.IsCuteGirl(e.Thing) ) // [HDoom] don't shout at the girls
lastcombat = AddOneliner("scorekill",1,15);

View file

@ -72,19 +72,14 @@ extend Class SWWMHandler
l.DirectAdd("Gods");
l.DirectAdd("SUSAN");
}
if ( gameinfo.gametype&(GAME_Raven|GAME_Strife) )
if ( gameinfo.gametype&GAME_Raven )
{
l.DirectAdd("Parthoris");
l.DirectAdd("SerpentRiders");
l.DirectAdd("Sidhe");
}
if ( gameinfo.gametype&(GAME_Hexen|GAME_Strife) )
if ( gameinfo.gametype&GAME_Hexen )
l.DirectAdd("Cronos");
if ( gameinfo.gametype&GAME_Strife )
{
l.DirectAdd("TheOrder");
l.DirectAdd("TheFront");
}
// starting weapons (if owned)
if ( p.mo.FindInventory('DeepImpact') )
l.DirectAdd("DeepImpact");

View file

@ -16,44 +16,41 @@ extend Class SWWMHandler
SWWMStats s;
while ( s = SWWMStats(ti.Next()) )
{
if ( !(gameinfo.gametype&GAME_STRIFE) )
int clust = 0;
bool secret = false;
if ( SWWMUtility.IsEviternity() )
{
int clust = 0;
bool secret = false;
if ( SWWMUtility.IsEviternity() )
// we have to do some heavy lifting here because episodes don't match clusters
if ( level.levelnum <= 5 ) clust = 1;
else if ( level.levelnum <= 10 ) clust = 2;
else if ( level.levelnum <= 15 ) clust = 3;
else if ( level.levelnum <= 20 ) clust = 4;
else if ( level.levelnum <= 25 ) clust = 5;
else if ( level.levelnum <= 30 ) clust = 6;
else if ( level.levelnum <= 32 )
{
// we have to do some heavy lifting here because episodes don't match clusters
if ( level.levelnum <= 5 ) clust = 1;
else if ( level.levelnum <= 10 ) clust = 2;
else if ( level.levelnum <= 15 ) clust = 3;
else if ( level.levelnum <= 20 ) clust = 4;
else if ( level.levelnum <= 25 ) clust = 5;
else if ( level.levelnum <= 30 ) clust = 6;
else if ( level.levelnum <= 32 )
{
secret = true;
if ( level.levelnum <= 31 ) clust = 7;
else clust = 8;
}
}
else
{
if ( (gameinfo.gametype&GAME_DOOM) && ((level.cluster == 9) || (level.cluster == 10)) )
secret = true;
clust = level.cluster;
}
int csiz = s.clustervisit.Size();
if ( csiz == 0 )
{
s.clustervisit.Push(clust);
s.secretdone.Push(secret);
}
else if ( s.clustervisit[csiz-1] != clust )
{
s.clustervisit.Push(clust);
s.secretdone.Push(secret|s.secretdone[csiz-1]);
secret = true;
if ( level.levelnum <= 31 ) clust = 7;
else clust = 8;
}
}
else
{
if ( (gameinfo.gametype&GAME_DOOM) && ((level.cluster == 9) || (level.cluster == 10)) )
secret = true;
clust = level.cluster;
}
int csiz = s.clustervisit.Size();
if ( csiz == 0 )
{
s.clustervisit.Push(clust);
s.secretdone.Push(secret);
}
else if ( s.clustervisit[csiz-1] != clust )
{
s.clustervisit.Push(clust);
s.secretdone.Push(secret|s.secretdone[csiz-1]);
}
s.AddLevelStats();
s.lastcluster = level.cluster;
}

View file

@ -95,12 +95,6 @@ extend Class SWWMHandler
if ( (a.Health <= 0) || a.bKILLED || a.bCORPSE ) continue;
// ignore friends
if ( a.IsFriend(players[consoleplayer].mo) ) continue;
// [Strife] ignore if not in combat
if ( (gameinfo.gametype&GAME_Strife) && !a.bINCOMBAT && !a.bJUSTATTACKED ) continue;
// [Strife] ignore certain classes
if ( (a is 'RatBuddy') || (a is 'Peasant') || (a is 'Beggar') ) continue;
// [Strife] ignore Oracle's spectre while it's inactive
if ( (a is 'AlienSpectre3') && a.InStateSequence(a.CurState,a.FindState("Spawn")) ) continue;
// ignore if not targetted or player can't see it
if ( (a.target != players[consoleplayer].mo)
|| !SWWMUtility.InPlayerFOV(players[consoleplayer],a) ) continue;

View file

@ -14,8 +14,7 @@ Class SWWMCollectible : Inventory abstract
// minimum gametype requirements
enum EAvailability
{
AVAIL_Strife = GAME_Strife,
AVAIL_Hexen = AVAIL_Strife|GAME_Hexen,
AVAIL_Hexen = GAME_Hexen,
AVAIL_Heretic = AVAIL_Hexen|GAME_Heretic,
AVAIL_All = AVAIL_Heretic|GAME_DoomChex
};

View file

@ -724,7 +724,7 @@ Class Chancebox : Actor
// no candidates? just burst into treats
if ( Random[Chancebox](0,1) )
{
let a = Spawn(!Random[Chancebox](0,2)?"GoldShell":(Random[Chancebox](0,1)||(gameinfo.gametype&GAME_Strife))?"GrilledCheeseSandwich":"YnykronAmmo",pos);
let a = Spawn(!Random[Chancebox](0,2)?"GoldShell":Random[Chancebox](0,1)?"GrilledCheeseSandwich":"YnykronAmmo",pos);
a.bDROPPED = false;
a.bNOGRAVITY = false;
a.vel.z = FRandom[Chancebox](2,4);

View file

@ -2123,7 +2123,7 @@ Class MykradvoTendril : Actor
}
for ( int i=0; i<t.hitlist.Size(); i++ )
{
if ( t.hitlist[i].hitactor.IsFriend(target) || SWWMUtility.IsCivilian(t.hitlist[i].hitactor) ) continue;
if ( t.hitlist[i].hitactor.IsFriend(target) ) continue;
if ( (t.hitlist[i].hitactor == tracer) && bMISSILEMORE ) bMISSILEEVENMORE = true; // we split
int dmg = t.hitlist[i].hitactor.bBOSS?(GetMissileDamage(0,0)*4):max(t.hitlist[i].hitactor.Health,GetMissileDamage(0,0));
SWWMUtility.DoKnockback(t.hitlist[i].hitactor,-t.hitlist[i].x+(0,0,.5),((t.hitlist[i].hitactor.Health-dmg)<=0)?60000:8000);
@ -2589,7 +2589,7 @@ Class Mykradvo : Inventory
// must be an active, shootable live monster
if ( !a.bISMONSTER || !a.bSHOOTABLE || a.bDORMANT || (a.Health <= 0) ) continue;
// skip non-hostiles
if ( !a.IsHostile(t) || SWWMUtility.IsCivilian(a) ) continue;
if ( a.IsFriend(t) ) continue;
// is targetting us and is within 10m
// or
// is visible and is within 100m

View file

@ -246,13 +246,6 @@ Class DemolitionistMenu : GenericMenu
missionbacklog.Push(xstr);
}
}
else if ( gameinfo.gametype&GAME_Strife )
{
missionstr = players[consoleplayer].logtext; // just show the quest log
int csiz = stats.questbacklog.Size();
for ( int i=csiz-1; i>=0; i-- )
missionbacklog.Push(stats.questbacklog[i]);
}
else missionstr = "$SWWM_MISSION_NONE";
if ( gameinfo.gametype&GAME_Heretic )
{
@ -283,17 +276,6 @@ Class DemolitionistMenu : GenericMenu
c_minute = 28;
}
}
else if ( gameinfo.gametype&GAME_Strife )
{
// September 13th 2173, 11:26 JST
// Epoch: 6425490360
c_year = 2173;
c_month = 7;
c_day = 12;
c_hour = 11;
c_minute = 26;
c_tz = "JST";
}
else if ( SWWMUtility.IsEviternity() )
{
// June 10th 2150, 20:09 +09
@ -2270,8 +2252,6 @@ Class DemolitionistMenu : GenericMenu
if ( !type ) continue;
// no collectibles
if ( type is 'SWWMCollectible' ) continue;
// no Ynykron in strife (unless selling)
if ( (gameinfo.gametype&GAME_Strife) && (type is 'Ynykron') && !sub ) continue;
// can't sell candygun spares
if ( sub && (type is 'CandyGunSpares') ) continue;
let cur = players[consoleplayer].mo.FindInventory(type);
@ -3473,7 +3453,7 @@ Class DemolitionistMenu : GenericMenu
}
else if ( tabs[curtab] == TAB_SECRET )
{
if ( gameinfo.gametype&(GAME_Strife|GAME_Hexen) )
if ( gameinfo.gametype&GAME_Hexen )
{
Screen.DrawTexture(Drawing[2],false,origin.x+20,origin.y+40,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true);
str = StringTable.Localize("$SWWM_KIRINPOEM");

View file

@ -139,7 +139,6 @@ Class SWWMHelpMenu : GenericMenu
hdr = StringTable.Localize("$SWWM_HELP_STORY");
if ( gameinfo.gametype&GAME_Heretic ) txt = StringTable.Localize("$SWWM_HELP_STORYHERETIC");
else if ( gameinfo.gametype&GAME_Hexen ) txt = StringTable.Localize("$SWWM_HELP_STORYHEXEN");
else if ( gameinfo.gametype&GAME_Strife ) txt = StringTable.Localize("$SWWM_HELP_STORYSTRIFE");
else if ( SWWMUtility.IsEviternity() ) txt = StringTable.Localize("$SWWM_HELP_STORYEVITERNITY");
else txt = StringTable.Localize("$SWWM_HELP_STORYDOOM");
break;

View file

@ -45,7 +45,7 @@ Class SWWMHandler : EventHandler
{
LangRefresh();
QueueMaintenance();
if ( !(gameinfo.gametype&GAME_STRIFE) && !mnotify && (level.maptime >= 5) )
if ( !mnotify && (level.maptime >= 5) )
{
mnotify = true;
let ti = ThinkerIterator.Create("SWWMStats",Thinker.STAT_STATIC);

View file

@ -308,8 +308,6 @@ Class Demolitionist : PlayerPawn
{
let type = (class<Weapon>)(AllActorClasses[i]);
if ( !type || (type == "Weapon") ) continue;
// no Ynykron in Strife
if ( (gameinfo.gametype&GAME_Strife) && (type is 'Ynykron') ) continue;
// Don't give already owned weapons
let owned = FindInventory(type);
if ( owned && (owned.Amount >= owned.MaxAmount) ) continue;
@ -333,7 +331,7 @@ Class Demolitionist : PlayerPawn
{
let type = (class<Inventory>)(AllActorClasses[i]);
if ( !type ) continue;
if ( !(gameinfo.gametype&(GAME_Hexen|GAME_Strife)) && (type is 'AmmoFabricator') ) continue; // no fabricators before hexen
if ( !(gameinfo.gametype&GAME_Hexen) && (type is 'AmmoFabricator') ) continue; // no fabricators before hexen
// Don't give maxed items
let owned = FindInventory(type);
if ( owned && (owned.Amount >= owned.MaxAmount) ) continue;
@ -813,14 +811,6 @@ Class Demolitionist : PlayerPawn
if ( swwm_singlefirst != oldsinglefirst )
WeaponSlots.SetupWeaponSlots(self);
oldsinglefirst = swwm_singlefirst;
// strife thing
if ( mystats.oldlogtext == "" )
mystats.oldlogtext = player.logtext;
else if ( player.logtext != mystats.oldlogtext )
{
mystats.questbacklog.Push(mystats.oldlogtext);
mystats.oldlogtext = player.logtext;
}
// overheal fading
if ( !isFrozen() && !(player.cheats&CF_TOTALLYFROZEN) )
{

View file

@ -449,15 +449,12 @@ Class SWWMCombatTracker : Thinker
}
if ( (mytarget.bISMONSTER || mytarget.player) && !mytarget.bINVISIBLE && !mytarget.bCORPSE )
{
bool straifu = false;
if ( (gameinfo.gametype&GAME_Strife) && (!mytarget.bINCOMBAT && !mytarget.bJUSTATTACKED) || (mytarget is 'Beggar') || (mytarget is 'Peasant') )
straifu = true;
// players (but not voodoo dolls), always visible
if ( mytarget.player && (mytarget.player.mo == mytarget) ) updated = level.maptime+35;
// friendlies within a set distance
else if ( mytarget.bFRIENDLY && ((mxdist <= 0) || (mytarget.Vec3To(players[consoleplayer].Camera).length() < mxdist)) && players[consoleplayer].Camera.CheckSight(mytarget,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) updated = level.maptime+35;
// enemies within a set distance that have us as target
else if ( !straifu && mytarget.target && (mytarget.target.Health > 0) && (mytarget.target.player == players[consoleplayer]) && ((mxdist <= 0) || (mytarget.Vec3To(players[consoleplayer].Camera).length() < mxdist)) && players[consoleplayer].Camera.CheckSight(mytarget,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) updated = level.maptime+70;
else if ( mytarget.target && (mytarget.target.Health > 0) && (mytarget.target.player == players[consoleplayer]) && ((mxdist <= 0) || (mytarget.Vec3To(players[consoleplayer].Camera).length() < mxdist)) && players[consoleplayer].Camera.CheckSight(mytarget,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) updated = level.maptime+70;
// any visible enemies within one quarter of the set distance
else if ( ((mxdist <= 0) || (mytarget.Vec3To(players[consoleplayer].Camera).length() < (mxdist/4))) && players[consoleplayer].Camera.CheckSight(mytarget,SF_IGNOREVISIBILITY|SF_IGNOREWATERBOUNDARY) ) updated = level.maptime;
}

View file

@ -41,9 +41,6 @@ Class SWWMStats : Thinker
// these two are used for mission updates
Array<int> clustervisit;
Array<bool> secretdone;
// [Strife] preserve previous mission logs
String oldlogtext;
Array<String> questbacklog;
// hackaround for stuff getting lost
Array<Class<SWWMCollectible> > ownedcollectibles;
// for pistol start info (to avoid it within hubs)
@ -360,24 +357,19 @@ Class SWWMLoreLibrary : Thinker
static bool PreVerify( String ref )
{
// restrictions
if ( !(gameinfo.gametype&(GAME_Raven|GAME_Strife)) )
if ( !(gameinfo.gametype&GAME_Raven) )
{
if ( ref ~== "Parthoris" ) return true;
if ( ref ~== "Sidhe" ) return true;
if ( ref ~== "SerpentRiders" ) return true;
}
if ( !(gameinfo.gametype&(GAME_Hexen|GAME_Strife)) )
if ( !(gameinfo.gametype&GAME_Hexen) )
{
if ( ref ~== "Cronos" ) return true;
if ( ref ~== "Kirin" ) return true; // not met
if ( ref ~== "Fabricator" ) return true; // not yet introduced
if ( ref ~== "Administrators" ) return true; // not met
}
if ( !(gameinfo.gametype&GAME_Strife) )
{
if ( ref ~== "TheOrder" ) return true;
if ( ref ~== "TheFront" ) return true;
}
// check if entry is for a collectible
for ( int i=0; i<AllActorClasses.Size(); i++ )
{
@ -421,14 +413,7 @@ Class SWWMLoreLibrary : Thinker
String text = String.Format("SWWM_LORETXT_%s",ref);
String assoc = String.Format("SWWM_LOREREL_%s",ref);
// redirects
if ( gameinfo.gametype&GAME_Strife )
{
if ( text ~== "SWWM_LORETXT_KIRIN" )
text = "SWWM_LORETXT_KIRIN2"; // married alakir
else if ( text ~== "SWWM_LORETXT_SERPENTRIDERS" )
text = "SWWM_LORETXT_SERPENTRIDERS3"; // all riders gone
}
if ( gameinfo.gametype&(GAME_Hexen|GAME_Strife) )
if ( gameinfo.gametype&GAME_Hexen )
{
if ( text ~== "SWWM_LORETXT_SAYA" )
text = "SWWM_LORETXT_SAYA3"; // married kirin
@ -457,7 +442,7 @@ Class SWWMLoreLibrary : Thinker
else if ( text ~== "SWWM_LORETXT_GODS" )
text = "SWWM_LORETXT_GODS2"; // beyond gods
}
if ( gameinfo.gametype&(GAME_Raven|GAME_Strife) )
if ( gameinfo.gametype&GAME_Raven )
{
if ( text ~== "SWWM_LORETXT_SAYA" )
text = "SWWM_LORETXT_SAYA2"; // dating demo

View file

@ -360,39 +360,6 @@ Class SWWMUtility
return SWWMCachedLockInfo.GetLockColor(l);
}
// wheeeeeeee, let's play a game of "who is who"
static clearscope bool IsCivilian( Actor a )
{
if ( a is 'Beggar' )
{
if ( (a.level.mapname ~== "MAP32") && (a is 'Beggar1') )
return false; // Prisoner (sorry but we have to)
return true;
}
if ( a is 'Peasant' )
{
// exclude certain key NPCs
if ( (a.level.mapname ~== "MAP01") && (a is 'Peasant9') )
return false; // Beldin (sorry but we have to)
if ( (a.level.mapname ~== "MAP02") && (a is 'Peasant22') )
return false; // Mourel (fuck that guy)
if ( (a.level.mapname ~== "MAP02") && (a is 'Peasant4') )
return false; // Harris (also fuck that guy)
if ( (a.level.mapname ~== "MAP04") && (a is 'Peasant5') )
return false; // Derwin (fat bastard)
if ( (a.level.mapname ~== "MAP04") && (a is 'Peasant7') )
return false; // Ketrick (THIS IS GARBAGE)
if ( (a.level.mapname ~== "MAP05") && (a is 'Peasant7') )
return false; // Montag (gimme the damn key)
if ( (a.level.mapname ~== "MAP05") && (a is 'Peasant8') )
return false; // Wolenick (gimme a hand)
if ( (a.level.mapname ~== "MAP33") && (a is 'Peasant5') )
return false; // Harris (also fuck that guy)
return true;
}
return false;
}
// Thanks to ZZYZX and Nash
static play void SetToSlopeSpecific( Actor a, double dang, SecPlane plane, bool flipnorm )
{
@ -1782,8 +1749,7 @@ Class SWWMUtility
}
static Class<Inventory> PickSWWMSlot0()
{
/*if ( gameinfo.GameType&GAME_Strife ) return 'GrandLance';
return PickPair('Ynykron','GrandLance');*/
//return PickPair('Ynykron','GrandLance');
return 'Ynykron';
}
static Class<Inventory> PickDoomSlot6()

View file

@ -354,7 +354,7 @@ Class BusterWall : Thinker
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("ASHWALL",TexMan.Type_Any);
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("LOOSERCK",TexMan.Type_Any);
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("WASTE03",TexMan.Type_Any);
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("SCHWAL01",TexMan.Type_Any); // Strife has a dedicated "destroyed wall" texture, nice
if ( !rubble.IsValid() ) rubble = TexMan.CheckForTexture("-noflat-",TexMan.Type_Any); // an unfortunate fallback should none of those exist
// activate all shoot/use specials (not locked) associated with this sector's two-sided lines
for ( int i=0; i<hs.Lines.Size(); i++ )
{

View file

@ -433,18 +433,9 @@ Class Ynykron : SWWMWeapon
XZW3 EFGHI 2;
XZW2 A 0
{
if ( gameinfo.gametype&GAME_Strife )
{
A_StartSound("ynykron/locked",CHAN_WEAPON,CHANF_OVERLAP);
if ( player == players[consoleplayer] )
Console.Printf(StringTable.Localize("$SWWM_YNYKRONLOCKED"));
}
else
{
invoker.chargestate = CS_CHARGING;
invoker.ventcooldown = Random[Ynykron](6,15);
A_StartSound("ynykron/ready",CHAN_WEAPONEXTRA2,CHANF_LOOP,.01,2.);
}
invoker.chargestate = CS_CHARGING;
invoker.ventcooldown = Random[Ynykron](6,15);
A_StartSound("ynykron/ready",CHAN_WEAPONEXTRA2,CHANF_LOOP,.01,2.);
}
Goto Ready;
Reload: