From cd9802a70525fc1d250f070dd50f40920d99c5f6 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Thu, 18 Feb 2021 00:55:57 +0100 Subject: [PATCH] DRLA Monsters compatibility. --- cvarinfo.txt | 1 + language.def_menu | 10 ++ language.es_menu | 10 ++ language.version | 4 +- menudef.txt | 12 ++ zscript/swwm_handler.zsc | 283 +++++++++++++++++++++++++++++++++++++++ zscript/swwm_menus.zsc | 10 +- 7 files changed, 323 insertions(+), 7 deletions(-) diff --git a/cvarinfo.txt b/cvarinfo.txt index 0f1958302..31cfa5598 100644 --- a/cvarinfo.txt +++ b/cvarinfo.txt @@ -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 diff --git a/language.def_menu b/language.def_menu index 087fb5acc..9892da47a 100644 --- a/language.def_menu +++ b/language.def_menu @@ -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"; diff --git a/language.es_menu b/language.es_menu index a580cfc35..1263454c6 100644 --- a/language.es_menu +++ b/language.es_menu @@ -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"; diff --git a/language.version b/language.version index bcc332560..0d4e54b69 100644 --- a/language.version +++ b/language.version @@ -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-"; diff --git a/menudef.txt b/menudef.txt index d3ceb93f0..32453dbb0 100644 --- a/menudef.txt +++ b/menudef.txt @@ -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 " " diff --git a/zscript/swwm_handler.zsc b/zscript/swwm_handler.zsc index d5f0e50a7..5cf4700a6 100644 --- a/zscript/swwm_handler.zsc +++ b/zscript/swwm_handler.zsc @@ -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 GetDRLAReplacement( Class 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 purplepool[] = {"PurpleShell","PurpleShell2","PurpleShell4"}; static const Class bluepool[] = {"BlueShell","BlueShell2","BlueShell4"}; static const Class 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'; diff --git a/zscript/swwm_menus.zsc b/zscript/swwm_menus.zsc index e2d3bbecb..ab36bc2bf 100644 --- a/zscript/swwm_menus.zsc +++ b/zscript/swwm_menus.zsc @@ -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