mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- added rudimentary support for SVE.wad from the Strife Veteran edition so that the extended single player campaign is usable:
* all new things got either an sctor definition or are explicitly deleted through the 'doomednums' section in MAPINFO. CTC related actors are non-functional! * added a 'noskillflags' option to 'doomednums' so that the lightmap definition things in the maps can be repurposed as dynamic lights. * added the new dagger powerup. * added MAPINFO entries for the added maps.
This commit is contained in:
parent
dcded0e183
commit
050acc9271
11 changed files with 434 additions and 8 deletions
|
@ -88,6 +88,7 @@ struct MapinfoEdMapItem
|
|||
// These are for error reporting. We must store the file information because it's no longer available when these items get resolved.
|
||||
FString filename;
|
||||
int linenum;
|
||||
bool noskillflags;
|
||||
};
|
||||
|
||||
typedef TMap<int, MapinfoEdMapItem> IdMap;
|
||||
|
@ -184,12 +185,18 @@ void FMapInfoParser::ParseDoomEdNums()
|
|||
}
|
||||
memset(editem.args, 0, sizeof(editem.args));
|
||||
editem.argsdefined = 0;
|
||||
editem.noskillflags = false;
|
||||
|
||||
int minargs = 0;
|
||||
int maxargs = 5;
|
||||
FString specialname;
|
||||
if (sc.CheckString(","))
|
||||
{
|
||||
if (sc.CheckString("noskillflags"))
|
||||
{
|
||||
editem.noskillflags = true;
|
||||
if (!sc.CheckString(",")) goto noargs;
|
||||
}
|
||||
editem.argsdefined = 5; // mark args as used - if this is done we need to prevent assignment of map args in P_SpawnMapThing.
|
||||
if (editem.special < 0) editem.special = 0;
|
||||
if (!sc.CheckNumber())
|
||||
|
@ -238,6 +245,7 @@ void FMapInfoParser::ParseDoomEdNums()
|
|||
error++;
|
||||
}
|
||||
}
|
||||
noargs:
|
||||
DoomEdFromMapinfo.Insert(ednum, editem);
|
||||
}
|
||||
else
|
||||
|
@ -275,6 +283,7 @@ void InitActorNumsFromMapinfo()
|
|||
ent.Type = cls;
|
||||
ent.Special = pair->Value.special;
|
||||
ent.ArgsDefined = pair->Value.argsdefined;
|
||||
ent.NoSkillFlags = pair->Value.noskillflags;
|
||||
memcpy(ent.Args, pair->Value.args, sizeof(ent.Args));
|
||||
DoomEdMap.Insert(pair->Key, ent);
|
||||
}
|
||||
|
|
|
@ -358,6 +358,7 @@ struct FDoomEdEntry
|
|||
PClassActor *Type;
|
||||
short Special;
|
||||
signed char ArgsDefined;
|
||||
bool NoSkillFlags;
|
||||
int Args[5];
|
||||
};
|
||||
|
||||
|
|
|
@ -5817,7 +5817,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
|||
}
|
||||
|
||||
mask = G_SkillProperty(SKILLP_SpawnFilter);
|
||||
if (!(mthing->SkillFilter & mask))
|
||||
if (!(mthing->SkillFilter & mask) && !mentry->NoSkillFlags)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -100,10 +100,22 @@ IWad
|
|||
BannerColors = "ff ff 00", "00 c0 00"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "Strife: Veteran Edition"
|
||||
Autoname = "strife.veteran"
|
||||
Game = "Strife"
|
||||
Config = "Strife"
|
||||
Mapinfo = "mapinfo/strife.txt"
|
||||
MustContain = "MAP35", "I_RELB", "FXAA_F"
|
||||
BannerColors = "f0 f0 f0", "6b 3c 18"
|
||||
Required = "Strife: Quest for the Sigil"
|
||||
}
|
||||
|
||||
IWad
|
||||
{
|
||||
Name = "Strife: Quest for the Sigil"
|
||||
Autoname = "strife"
|
||||
Autoname = "strife.strife"
|
||||
Game = "Strife"
|
||||
Config = "Strife"
|
||||
Mapinfo = "mapinfo/strife.txt"
|
||||
|
@ -418,4 +430,5 @@ Names
|
|||
"hacx2.wad"
|
||||
"square1.pk3"
|
||||
"delaweare.wad"
|
||||
"sve.wad"
|
||||
}
|
||||
|
|
|
@ -2807,3 +2807,12 @@ TCMNU_MAGFILTER = "Linear filter when upscaling";
|
|||
TCMNU_MIPMAP = "Use mipmapped textures";
|
||||
TCMNU_DYNLIGHTS = "Dynamic lights";
|
||||
|
||||
// SVE strings:
|
||||
|
||||
TAG_TALISMANRED = "Red Talisman";
|
||||
TAG_TALISMANGREEN = "Green Talisman";
|
||||
TAG_TALISMANBLUE = "Blue Talisman";
|
||||
MSG_TALISMANRED = "You have a feeling that it wasn't to be touched...";
|
||||
MSG_TALISMANGREEN = "Whatever it is, it doesn't belong in this world...";
|
||||
MSG_TALISMANBLUE = "It must do something...";
|
||||
MSG_TALISMANPOWER = "You have super strength!";
|
||||
|
|
|
@ -323,4 +323,12 @@ conversationids
|
|||
341 = QuestItem30
|
||||
342 = QuestItem31
|
||||
343 = SlideshowStarter
|
||||
345 = SVEBlueChalice
|
||||
346 = SVEFlagSpotRed
|
||||
347 = SVEFlagSpotBlue
|
||||
348 = SVETalismanRed
|
||||
349 = SVETalismanGreen
|
||||
350 = SVETalismanBlue
|
||||
351 = SVEOpenDoor225
|
||||
|
||||
}
|
|
@ -323,6 +323,30 @@ DoomEdNums
|
|||
3004 = Peasant1
|
||||
3005 = Crusader
|
||||
3006 = Sentinel
|
||||
|
||||
5080 = none // CTC stuff
|
||||
5081 = none
|
||||
5130 = SVEFlagSpotBlue
|
||||
5131 = SVEFlagSpotRed
|
||||
7957 = none // AltLight for lightmapped geometry.
|
||||
7958 = SVELight7958, noskillflags
|
||||
7959 = SVELight7959, noskillflags
|
||||
7960 = SVELight7960, noskillflags
|
||||
7961 = SVELight7961, noskillflags
|
||||
7962 = SVELight7962, noskillflags
|
||||
7963 = none
|
||||
7964 = SVELight7964, noskillflags
|
||||
7965 = SVELight7965, noskillflags
|
||||
7966 = SVETalismanRed
|
||||
7967 = SVETalismanGreen
|
||||
7968 = SVETalismanBlue
|
||||
7969 = none // Bloom threshold.
|
||||
7970 = SVEBlueChalice
|
||||
7971 = SVELight7971, noskillflags
|
||||
7972 = SVELight7972, noskillflags
|
||||
7973 = SVELight7973, noskillflags
|
||||
7974 = SVELight7974, noskillflags
|
||||
7975 = SVEOreSpawner
|
||||
}
|
||||
|
||||
SpawnNums
|
||||
|
@ -860,6 +884,38 @@ map MAP34 "AREA 3: Movement Base"
|
|||
noallies
|
||||
}
|
||||
|
||||
map MAP35 "AREA 35: Factory: Production"
|
||||
{
|
||||
next = "MAP01"
|
||||
sky1 = "SKYMNT01"
|
||||
music = "D_TRIBAL"
|
||||
cluster = 1
|
||||
}
|
||||
|
||||
map MAP36 "AREA 36: Castle Clash"
|
||||
{
|
||||
next = "MAP37"
|
||||
sky1 = "SKYMNT01"
|
||||
music = "D_MARCH"
|
||||
cluster = 3
|
||||
}
|
||||
|
||||
map MAP37 "AREA 37: Killing Grounds"
|
||||
{
|
||||
next = "MAP38"
|
||||
sky1 = "SKYMNT01"
|
||||
music = "D_STRIKE"
|
||||
cluster = 3
|
||||
}
|
||||
|
||||
map MAP38 "AREA 38: Ordered Chaos"
|
||||
{
|
||||
next = "MAP36"
|
||||
sky1 = "SKYMNT01"
|
||||
music = "D_TRIBAL"
|
||||
cluster = 3
|
||||
}
|
||||
|
||||
cluster 1
|
||||
{
|
||||
hub
|
||||
|
|
|
@ -247,6 +247,8 @@ version "2.5"
|
|||
#include "zscript/strife/weapongrenade.txt"
|
||||
#include "zscript/strife/weaponmauler.txt"
|
||||
#include "zscript/strife/sigil.txt"
|
||||
#include "zscript/strife/svestuff.txt"
|
||||
#include "zscript/strife/svelights.txt"
|
||||
|
||||
#include "zscript/chex/chexmonsters.txt"
|
||||
#include "zscript/chex/chexkeys.txt"
|
||||
|
|
129
wadsrc/static/zscript/strife/svelights.txt
Normal file
129
wadsrc/static/zscript/strife/svelights.txt
Normal file
|
@ -0,0 +1,129 @@
|
|||
// This turns the helper things for creating lightmaps in SVE into actual light sources
|
||||
|
||||
class SVELight : PointLight
|
||||
{
|
||||
override void BeginPlay()
|
||||
{
|
||||
Super.BeginPlay();
|
||||
if (!bSpawnCeiling) AddZ(height);
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7958 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+SPAWNCEILING
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 6;
|
||||
Args 255,255,224,128;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7959 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 6;
|
||||
Args 255,255,224,128;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7960 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+SPAWNCEILING
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 6;
|
||||
Args 255,255,64,100;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7961 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 6;
|
||||
Args 255,255,64,100;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7962 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 8;
|
||||
Args 255,64,16,128;
|
||||
}
|
||||
}
|
||||
|
||||
// 7963 has intentionally been omitted
|
||||
|
||||
class SVELight7964 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+SPAWNCEILING
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 64;
|
||||
Args 200,200,170,160;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7965 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 64;
|
||||
Args 200,200,170,160;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7971 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 80;
|
||||
Args 248,248,224,144;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7972 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+SPAWNCEILING
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 24;
|
||||
Args 168,175,255,128;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7973 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 80;
|
||||
Args 112,112,112,100;
|
||||
}
|
||||
}
|
||||
|
||||
class SVELight7974 : SVELight
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DYNAMICLIGHT.ATTENUATE
|
||||
Height 80;
|
||||
Args 100,100,90,100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
191
wadsrc/static/zscript/strife/svestuff.txt
Normal file
191
wadsrc/static/zscript/strife/svestuff.txt
Normal file
|
@ -0,0 +1,191 @@
|
|||
|
||||
// CTC flag spots. They are not functional and only here so that something gets spawned for them.
|
||||
|
||||
class SVEFlagSpotRed : Inventory
|
||||
{
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FLGR A 1 BRIGHT;
|
||||
FLGR A 0 BRIGHT; // A_FlagStandSpawn
|
||||
FLGR A 1 BRIGHT; // A_FlagStandCheck
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
class SVEFlagSpotBlue : Inventory
|
||||
{
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FLGB A 1 BRIGHT;
|
||||
FLGB A 0 BRIGHT; // A_FlagStandSpawn
|
||||
FLGB A 1 BRIGHT; // A_FlagStandCheck
|
||||
Wait;
|
||||
}
|
||||
}
|
||||
|
||||
class SVEBlueChalice : Inventory
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DROPPED
|
||||
+FLOORCLIP
|
||||
+INVENTORY.INVBAR
|
||||
Radius 10;
|
||||
Height 16;
|
||||
Tag "$TAG_OFFERINGCHALICE";
|
||||
Inventory.Icon "I_RELB";
|
||||
Inventory.PickupMessage "$TXT_OFFERINGCHALICE";
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
RELB A -1 BRIGHT;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
class SVETalismanPowerup : Inventory
|
||||
{
|
||||
}
|
||||
|
||||
class SVETalismanRed : Inventory
|
||||
{
|
||||
Default
|
||||
{
|
||||
+DROPPED
|
||||
+FLOORCLIP
|
||||
+INVENTORY.INVBAR
|
||||
Radius 10;
|
||||
Height 16;
|
||||
Inventory.MaxAmount 1;
|
||||
Inventory.Icon "I_FLGR";
|
||||
Tag "$TAG_TALISMANRED";
|
||||
Inventory.PickupMessage "$MSG_TALISMANRED";
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FLGR A -1 BRIGHT;
|
||||
Stop;
|
||||
}
|
||||
|
||||
override bool TryPickup (in out Actor toucher)
|
||||
{
|
||||
let useok = Super.TryPickup (toucher);
|
||||
if (useok)
|
||||
{
|
||||
if (toucher.FindInventory("SVETalismanRed") &&
|
||||
toucher.FindInventory("SVETalismanGreen") &&
|
||||
toucher.FindInventory("SVETalismanBlue"))
|
||||
{
|
||||
toucher.A_Print("$MSG_TALISMANPOWER");
|
||||
GiveInventoryType("SVETalismanPowerup");
|
||||
}
|
||||
}
|
||||
return useok;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class SVETalismanBlue : SVETalismanRed
|
||||
{
|
||||
Default
|
||||
{
|
||||
+INVENTORY.INVBAR
|
||||
Inventory.Icon "I_FLGB";
|
||||
Tag "$TAG_TALISMANBLUE";
|
||||
Inventory.PickupMessage "$MSG_TALISMANBLUE";
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FLGB A -1 BRIGHT;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
class SVETalismanGreen : SVETalismanRed
|
||||
{
|
||||
Default
|
||||
{
|
||||
+INVENTORY.INVBAR
|
||||
Inventory.Icon "I_FLGG";
|
||||
Tag "$TAG_TALISMANGREEN";
|
||||
Inventory.PickupMessage "$MSG_TALISMANGREEN";
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
FLGG A -1 BRIGHT;
|
||||
Stop;
|
||||
}
|
||||
}
|
||||
|
||||
class SVEOreSpawner : Actor
|
||||
{
|
||||
Default
|
||||
{
|
||||
+NOSECTOR
|
||||
}
|
||||
States
|
||||
{
|
||||
Spawn:
|
||||
TNT1 A 175 A_OreSpawner;
|
||||
loop;
|
||||
}
|
||||
|
||||
//
|
||||
// A_OreSpawner
|
||||
//
|
||||
// [SVE] svillarreal
|
||||
//
|
||||
|
||||
void A_OreSpawner()
|
||||
{
|
||||
if(deathmatch) return;
|
||||
|
||||
bool inrange = false;
|
||||
for(int i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if(!playeringame[i])
|
||||
continue;
|
||||
|
||||
if(Distance2D(players[i].mo) < 2048)
|
||||
{
|
||||
inrange = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!inrange) return;
|
||||
|
||||
let it = ThinkerIterator.Create("DegninOre");
|
||||
Thinker ac;
|
||||
|
||||
int numores = 0;
|
||||
while (ac = it.Next())
|
||||
{
|
||||
if (++numores == 3) return;
|
||||
}
|
||||
Spawn("DegninOre", Pos);
|
||||
}
|
||||
}
|
||||
|
||||
class SVEOpenDoor225 : DummyStrifeItem
|
||||
{
|
||||
override bool TryPickup (in out Actor toucher)
|
||||
{
|
||||
Door_Open(225, 16);
|
||||
GoAwayAndDie ();
|
||||
return true;
|
||||
}
|
||||
|
||||
override bool SpecialDropAction (Actor dropper)
|
||||
{
|
||||
Door_Open(225, 16);
|
||||
Destroy ();
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -40,14 +40,22 @@ class PunchDagger : StrifeWeapon
|
|||
action void A_JabDagger ()
|
||||
{
|
||||
FTranslatedLineTarget t;
|
||||
int damage;
|
||||
|
||||
if (FindInventory("SVETalismanPowerup"))
|
||||
{
|
||||
damage = 1000;
|
||||
}
|
||||
else
|
||||
{
|
||||
int power = MIN(10, stamina / 10);
|
||||
int damage = (random[JabDagger]() % (power + 8)) * (power + 2);
|
||||
damage = (random[JabDagger]() % (power + 8)) * (power + 2);
|
||||
|
||||
if (FindInventory("PowerStrength"))
|
||||
{
|
||||
damage *= 10;
|
||||
}
|
||||
}
|
||||
|
||||
double angle = angle + random2[JabDagger]() * (5.625 / 256);
|
||||
double pitch = AimLineAttack (angle, 80.);
|
||||
|
|
Loading…
Reference in a new issue