DRLA Monsters compatibility.

This commit is contained in:
Mari the Deer 2021-02-18 00:55:57 +01:00
commit cd9802a705
7 changed files with 323 additions and 7 deletions

View file

@ -99,6 +99,7 @@ user int swwm_numcolor_bonus = 23; // font color for bonus numbers (default: fi
user int swwm_numcolor_dmg = 6; // font color for damage numbers (default: red)
user int swwm_numcolor_hp = 7; // font color for health numbers (default: blue)
user int swwm_numcolor_ap = 3; // font color for armor numbers (default: green)
server int swwm_drlaskill = 3; // [DRLA Monsters] skill setting for monster spawns
server noarchive bool swwm_iseriouslywanttoplaythiswithbd = false; // self-explanatory

View file

@ -196,6 +196,15 @@ SWWM_NUMCOLOR_BONUS = "Score Bonus Color";
SWWM_NUMCOLOR_DMG = "Damage Number Color";
SWWM_NUMCOLOR_HP = "Health Number Color";
SWWM_NUMCOLOR_AP = "Armor Number Color";
SWWM_DRLASKILL = "DRLA Difficulty";
SWWM_DRLASKILL_BABY = "Very Easy";
SWWM_DRLASKILL_EASY = "Easy";
SWWM_DRLASKILL_NORMAL = "Standard";
SWWM_DRLASKILL_HARD = "Moderate";
SWWM_DRLASKILL_NIGHTMARE = "Nightmare";
SWWM_DRLASKILL_TECHNOPHOBIA = "Technophobia";
SWWM_DRLASKILL_ARMAGEDDON = "Armageddon";
SWWM_DRLASKILL_ADAPTIVE = "Adaptive";
TOOLTIP_SWWM_VOICETYPE = "Sets the voice pack for the player.";
TOOLTIP_SWWM_MUTEVOICE = "Control what gets muted, if you'd rather have a more silent protagonist.";
TOOLTIP_SWWM_FLASHSTRENGTH = "Screen flashes usually happen when firing some weapons, you can lower this if these effects are harmful for you.";
@ -285,6 +294,7 @@ TOOLTIP_SWWM_NUMCOLOR_BONUS = "Select the color for bonuses that may accompany s
TOOLTIP_SWWM_NUMCOLOR_DMG = "Select the color for damage numbers.";
TOOLTIP_SWWM_NUMCOLOR_HP = "Select the color for health numbers.";
TOOLTIP_SWWM_NUMCOLOR_AP = "Select the color for armor numbers.";
TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Sets the skill level for enemy spawns.";
// knowledge base
SWWM_COMINGSOON = "(coming soon)";
SWWM_MISSTAB = "Mission";

View file

@ -193,6 +193,15 @@ SWWM_NUMCOLOR_BONUS = "Color de Bónuses de Puntos";
SWWM_NUMCOLOR_DMG = "Color de Números de Daño";
SWWM_NUMCOLOR_HP = "Color de Números de Salud";
SWWM_NUMCOLOR_AP = "Color de Números de Armadura";
SWWM_DRLASKILL = "Dificultad de DRLA";
SWWM_DRLASKILL_BABY = "Muy Fácil";
SWWM_DRLASKILL_EASY = "Fácil";
SWWM_DRLASKILL_NORMAL = "Estándar";
SWWM_DRLASKILL_HARD = "Moderado";
SWWM_DRLASKILL_NIGHTMARE = "Pesadilla";
SWWM_DRLASKILL_TECHNOPHOBIA = "Tecnofobia";
SWWM_DRLASKILL_ARMAGEDDON = "Armagedón";
SWWM_DRLASKILL_ADAPTIVE = "Adaptado";
TOOLTIP_SWWM_VOICETYPE = "Selecciona el pack de voz para el jugador.";
TOOLTIP_SWWM_MUTEVOICE = "Controla lo que se mutea, si prefieres tener un protagonista más silencioso.";
TOOLTIP_SWWM_FLASHSTRENGTH = "Los destellos en pantalla suelen ocurrir al disparar algunas armas, puedes reducirlo si este tipo de efectos te causan malestar.";
@ -282,6 +291,7 @@ TOOLTIP_SWWM_NUMCOLOR_BONUS = "Selecciona el color para las bonificaciones que p
TOOLTIP_SWWM_NUMCOLOR_DMG = "Selecciona el color para los números de daño.";
TOOLTIP_SWWM_NUMCOLOR_HP = "Selecciona el color para los números de salud.";
TOOLTIP_SWWM_NUMCOLOR_AP = "Selecciona el color para los números de armadura.";
TOOLTIP_SWWM_DRLASKILL = "[DRLA Monsters] Elige el nivel de dificultad para spawns de enemigos.";
// knowledge base
SWWM_COMINGSOON = "(próximamente)";
SWWM_MISSTAB = "Misión";

View file

@ -1,3 +1,3 @@
[default]
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r285 \cu(Wed 17 Feb 22:25:41 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r285 \cu(2021-02-17 22:25:41)\c-";
SWWM_MODVER="\chSWWM \czGZ\c- \cw0.9.11b-pre r286 \cu(Thu 18 Feb 00:55:57 CET 2021)\c-";
SWWM_SHORTVER="\cw0.9.11b-pre r286 \cu(2021-02-18 00:55:57)\c-";

View file

@ -61,6 +61,17 @@ OptionValue "SWWMFunTrails"
8, "$SWWM_TRAILS_RAINBOW"
9, "$SWWM_TRAILS_TRANS"
}
OptionValue "SWWMDRLASkill"
{
0, "$SWWM_DRLASKILL_BABY"
1, "$SWWM_DRLASKILL_EASY"
2, "$SWWM_DRLASKILL_NORMAL"
3, "$SWWM_DRLASKILL_HARD"
4, "$SWWM_DRLASKILL_NIGHTMARE"
5, "$SWWM_DRLASKILL_TECHNOPHOBIA"
6, "$SWWM_DRLASKILL_ARMAGEDDON"
7, "$SWWM_DRLASKILL_ADAPTIVE"
}
OptionMenu "SWWMOptionMenu"
{
Class "SWWMOptionMenu"
@ -170,6 +181,7 @@ OptionMenu "SWWMOptionMenu"
StaticText " "
StaticText "$SWWM_MCTITLE", "Blue"
Option "$SWWM_LDSPOIL", "swwm_ldspoil", "YesNo"
Option "$SWWM_DRLASKILL", "swwm_drlaskill", "SWWMDRLASkill"
StaticText " "
StaticText " "

View file

@ -304,6 +304,8 @@ Class SWWMHandler : EventHandler
int iwantdie;
int indoomvacation;
bool hasdrlamonsters;
enum EVanillaMap
{
MAP_NONE,
@ -595,6 +597,13 @@ Class SWWMHandler : EventHandler
iwantdie = -1;
bossmap = -1;
indoomvacation = -1;
// this one can be initialized here easily
for ( int i=0; i<AllActorClasses.Size(); i++ )
{
if ( AllActorClasses[i].GetClassName() != "RLMonster" ) continue;
hasdrlamonsters = true;
break;
}
}
private static Vector3 UseLinePos( Line l )
@ -2423,6 +2432,269 @@ Class SWWMHandler : EventHandler
e.Replacee = 'Sorcerer2';
}
private Class<Actor> GetDRLAReplacement( Class<Actor> a )
{
static const String refpool[] =
{
"Zombieman",
"Shotgunguy",
"Chaingunguy",
"DoomImp",
"Demon",
"Spectre",
"LostSoul",
"Cacodemon",
"HellKnight",
"BaronOfHell",
"Arachnotron",
"PainElemental",
"Revenant",
"Fatso",
"Archvile",
"Cyberdemon",
"SpiderMastermind",
"BossEye",
"BossBrain"
};
static const String babypool[] =
{
"RLFormerHumanPistol",
"RLFormerSergeantShotgun",
"RLFormerCommandoChaingun",
"RLImp",
"RLDemon",
"RLSpectre",
"RLLostSoul",
"RLCacodemon",
"RLHellKnight",
"RLBaronOfHell",
"RLArachnotron",
"RLPainElemental",
"RLRevenant",
"RLMancubus",
"RLArchvile",
"RLCyberdemon",
"RLSpiderMastermindVariantSpawner",
"RLEasyBossEye",
"RLBossBrain"
};
static const String easypool[] =
{
"RLFormerHumanNoArmageddonSpawner",
"RLFormerSergeantNoArmageddonSpawner",
"RLFormerCommandoNoArmageddonSpawner",
"RLImpNoArmageddonSpawner",
"RLDemonNoArmageddonSpawner",
"RLSpectreNoArmageddonSpawner",
"RLLostSoulNoArmageddonSpawner",
"RLCacodemonNoArmageddonSpawner",
"RLHellKnightNoArmageddonSpawner",
"RLBaronOfHellNoArmageddonSpawner",
"RLArachnotronNoArmageddonSpawner",
"RLPainElementalNoArmageddonSpawner",
"RLRevenantNoArmageddonSpawner",
"RLMancubusNoArmageddonSpawner",
"RLArchvileNoArmageddonSpawner",
"RLCyberdemonNoArmageddonSpawner",
"RLSpiderMastermindNoArmageddonSpawner",
"RLBossEye",
"RLBossBrain"
};
static const String normalpool[] =
{
"RLFormerHumanNoArmageddonSpawner",
"RLFormerSergeantNoArmageddonSpawner",
"RLFormerCommandoNoArmageddonSpawner",
"RLImpNoArmageddonSpawner",
"RLDemonNoArmageddonSpawner",
"RLSpectreNoArmageddonSpawner",
"RLLostSoulNoArmageddonSpawner",
"RLCacodemonNoArmageddonSpawner",
"RLHellKnightNoArmageddonSpawner",
"RLBaronOfHellNoArmageddonSpawner",
"RLArachnotronNoArmageddonSpawner",
"RLPainElementalNoArmageddonSpawner",
"RLRevenantNoArmageddonSpawner",
"RLMancubusNoArmageddonSpawner",
"RLArchvileNoArmageddonSpawner",
"RLCyberdemonNoArmageddonSpawner",
"RLSpiderMastermindNoArmageddonSpawner",
"RLBossEye",
"RLBossBrain"
};
static const String hardpool[] =
{
"RLFormerHumanSpawner",
"RLFormerSergeantSpawner",
"RLFormerCommandoSpawner",
"RLImpSpawner",
"RLDemonSpawner",
"RLSpectreSpawner",
"RLLostSoulSpawner",
"RLCacodemonSpawner",
"RLHellKnightSpawner",
"RLBaronOfHellSpawner",
"RLArachnotronSpawner",
"RLPainElementalSpawner",
"RLRevenantSpawner",
"RLMancubusSpawner",
"RLArchvileSpawner",
"RLCyberdemonSpawner",
"RLSpiderMastermindSpawner",
"RLUVBossEye",
"RLBossBrain"
};
static const String nightmarepool[] =
{
"RLEliteFormerHumanSpawner",
"RLEliteFormerSergeantSpawner",
"RLEliteFormerCommandoSpawner",
"RLNightmareImp",
"RLNightmareDemon",
"RLNightmareSpectre",
"RLNightmareLostSoul",
"RLNightmareCacodemon",
"RLNightmareHellKnight",
"RLNightmareBaronOfHell",
"RLNightmareArachnotron",
"RLNightmarePainElemental",
"RLNightmareRevenant",
"RLNightmareMancubus",
"RLNightmareArchvile",
"RLNightmareCyberdemonSpawner",
"RLNightmareSpiderMastermindSpawner",
"RLNightmareBossEye",
"RLNightmareBossBrain"
};
static const String technophobiapool[] =
{
"RLFormerCyborgBattleRifle",
"RLFormerCyborgBattleRifle",
"RLFormerCyborgBattleRifle",
"RLCyberneticImp",
"RLCyberneticDemon",
"RLCyberneticSpectre",
"RLCyberneticLostSoul",
"RLCacodemon",
"RLCyberneticHellKnight",
"RLCyberneticBaronOfHell",
"RLCyberneticArachnotron",
"RLCyberneticPainElemental",
"RLCyberneticRevenant",
"RLCyberneticMancubus",
"RLCyberneticArchvile",
"RLCyberneticCyberdemonSpawner",
"RLCyberneticSpiderMastermindSpawner",
"RLTechnophobiaBossEye",
"RLTechnophobiaBossBrain"
};
static const String armageddonpool[] =
{
"RLFormerAssaultTrooper",
"RLFormerOverwatch",
"RLFormerShocktrooper",
"RLArmageddonImp",
"RLArmageddonDemon",
"RLArmageddonSpectreSpawner",
"RLTheHungrySpawner",
"RLArmageddonCacodemon",
"RLArmageddonHellKnightSpawner",
"RLArmageddonBaronOfHell",
"RLArmageddonArachnotron",
"RLArmageddonPainElemental",
"RLArmageddonRevenant",
"RLArmageddonMancubus",
"RLArmageddonArchvileSpawner",
"RLArmageddonCyberdemonSpawner",
"RLArmageddonSpiderMastermindSpawner",
"RLArmageddonBossEye",
"RLArmageddonBossBrain"
};
static const String adaptivepool[] =
{
"RLAdaptiveFormerHuman",
"RLAdaptiveFormerSergeant",
"RLAdaptiveFormerCommando",
"RLAdaptiveImp",
"RLAdaptiveDemon",
"RLAdaptiveSpectre",
"RLAdaptiveLostSoul",
"RLAdaptiveCacodemon",
"RLAdaptiveHellKnight",
"RLAdaptiveBaronOfHell",
"RLAdaptiveArachnotron",
"RLAdaptivePainElemental",
"RLAdaptiveRevenant",
"RLAdaptiveMancubus",
"RLAdaptiveArchvile",
"RLAdaptiveCyberdemon",
"RLAdaptiveSpiderMastermind",
"RLUVBossEye",
"RLBossBrain"
};
switch ( swwm_drlaskill )
{
case 0:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return babypool[i];
}
break;
case 1:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return easypool[i];
}
break;
case 2:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return normalpool[i];
}
break;
case 3:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return hardpool[i];
}
break;
case 4:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return nightmarepool[i];
}
break;
case 5:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return technophobiapool[i];
}
break;
case 6:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return armageddonpool[i];
}
break;
case 7:
default:
for ( int i=0; i<18; i++ )
{
if ( !(a is refpool[i]) ) continue;
return adaptivepool[i];
}
break;
}
return null;
}
override void CheckReplacement( ReplaceEvent e )
{
// respect final replacements
@ -2434,6 +2706,17 @@ Class SWWMHandler : EventHandler
static const Class<Actor> purplepool[] = {"PurpleShell","PurpleShell2","PurpleShell4"};
static const Class<Actor> bluepool[] = {"BlueShell","BlueShell2","BlueShell4"};
static const Class<Actor> blackpool[] = {"BlackShell","BlackShell2"};
// DRLA Monsters stuff
if ( hasdrlamonsters )
{
let rep = GetDRLAReplacement(e.Replacee);
if ( rep )
{
e.Replacement = rep;
e.IsFinal = true;
return;
}
}
// only replace vanilla blood if no other gore mod is doing it
if ( (e.Replacee == "Blood") && (!e.Replacement || e.Replacement == "Blood") && swwm_blood ) e.Replacement = "mkBlood";
else if ( e.Replacee is 'ItemFog' ) e.Replacement = 'SWWMItemFog';

View file

@ -172,7 +172,7 @@ Class SWWMOptionMenu : OptionMenu
y += fontheight;
if ( mDesc.mSelectedItem == i )
{
cy = y;
cy = y+fontheight;
break;
}
}
@ -182,12 +182,12 @@ Class SWWMOptionMenu : OptionMenu
Font fnt = TewiFont;
if ( lang.GetString() ~== "jp" ) fnt = MPlusFont;
let lines = fnt.BreakLines(ttip,CleanWidth_1-8);
int height = (8+fnt.GetHeight()*lines.Count())*CleanYFac_1;
// draw at the bottom unless the selected option could is covered by the tooltip
int height = (4+fnt.GetHeight()*lines.Count())*CleanYFac_1;
// draw at the bottom unless the selected option could be covered by the tooltip
int ypos = Screen.GetHeight()-height;
if ( cy >= ypos ) ypos = 0;
if ( cy > ypos ) ypos = 0;
Screen.Dim("Black",.75,0,ypos,Screen.GetWidth(),height);
ypos += 4*CleanYFac_1;
ypos += 2*CleanYFac_1;
for ( int i=0; i<lines.Count(); i++ )
{
Screen.DrawText(fnt,Font.CR_WHITE,4*CleanXFac_1,ypos,lines.StringAt(i),DTA_CleanNoMove_1,true);