diff --git a/LOCALIZATION.md b/LOCALIZATION.md index e0a6c903f..7cfe019d4 100644 --- a/LOCALIZATION.md +++ b/LOCALIZATION.md @@ -2,7 +2,7 @@ There are two parts to this: -## Basic language files *(base/menu/mission/voice)* +## Basic language files *(base/dlg/menu/mission/voice)* Just make a copy and change the language code at the top *(the string between brackets)* to whatever language you're translating it to *(don't forget to also set it in the file extension too, for the sake of easier organization)*. diff --git a/MAPPING.md b/MAPPING.md new file mode 100644 index 000000000..2408fccea --- /dev/null +++ b/MAPPING.md @@ -0,0 +1,163 @@ +# Notes for mappers + +### Tokens + +- **Disabling the store:** Give the player `"SWWMStoreDisabler"` item on map load. +- **Disabling revives:** Give the player `"SWWMReviveDisabler"` item on map load. + +**Note:** Tokens are flagged as "unclearable", so they have to be removed directly with `TakeInventory`. + +### Mission log + +- **Adding a new entry:** `CallACS("SWWMMissionLog","AddLog","YOUR TEXT HERE")`. Prefixed LANGUAGE entries are supported. +- **Setting the date and time:** `CallACS("SWWMMissionLog","SetClock",year,month,day,hour,minute,"timezone")`. Note that month and day start counting from zero, not one *(for programming-related reasons)*. + +### Placing items + +**DEMOLITIONIST** does not have standard DoomEdNums assigned to any of its items by default, in order to avoid potential collisions with other custom maps, so you will have to set them yourself. Copy the following to your MAPINFO: + +``` +DoomEdNums +{ + // Weapons + 29001 = "DeepImpact" + 29002 = "ExplodiumGun" + 29003 = "Spreadgun" + 29004 = "Wallbuster" + 29005 = "Eviscerator" + 29006 = "Hellblazer" + 29007 = "Sparkster" + 29008 = "SilverBullet" + 29009 = "CandyGun" + 29010 = "Ynykron" + // DLC Weapons + 29011 = "ItamexHammer" + 29012 = "PlasmaBlast" + 29013 = "PuntzerBeta" + 29014 = "PuntzerGamma" + 29015 = "HeavyMahSheenGun" + 29016 = "Quadravol" + 29017 = "ModernSparkster" + 29018 = "RayKhom" + 29019 = "MisterRifle" + 29020 = "RafanKos" + // Ammo + 29021 = "RedShell" + 29022 = "RedShell2" + 29023 = "RedShell4" + 29024 = "GreenShell" + 29025 = "GreenShell2" + 29026 = "GreenShell4" + 29027 = "BlueShell" + 29028 = "BlueShell2" + 29029 = "BlueShell4" + 29030 = "PurpleShell" + 29031 = "PurpleShell2" + 29032 = "PurpleShell4" + 29033 = "BlackShell" + 29034 = "BlackShell2" + 29035 = "BlackShell4" + 29036 = "GoldShell" + 29037 = "GoldShell2" + 29038 = "GoldShell4" + 29039 = "EvisceratorShell" + 29040 = "EvisceratorShell2" + 29041 = "EvisceratorShell3" + 29042 = "EvisceratorSixPack" + 29043 = "HellblazerMissiles" + 29044 = "HellblazerMissiles2" + 29045 = "HellblazerMissiles3" + 29046 = "HellblazerMissileMag" + 29047 = "HellblazerCrackshots" + 29048 = "HellblazerCrackshots2" + 29049 = "HellblazerCrackshotMag" + 29050 = "HellblazerRavagers" + 29051 = "HellblazerRavagerMag" + 29052 = "HellblazerWarheads" + 29053 = "HellblazerWarheadMag" + 29054 = "SparkUnit" + 29055 = "SparkUnit2" + 29056 = "SilverBulletAmmo" + 29057 = "SilverBulletAmmo2" + 29058 = "SilverBullets" + 29059 = "SilverBullets_2" + 29060 = "SilverBullets_3" + 29061 = "SilverBullets2" + 29062 = "SilverBullets2_2" + 29063 = "SilverBullets2_3" + 29064 = "CandyGunAmmo" + 29065 = "CandyGunBullets" + 29066 = "CandyGunBullets2" + 29067 = "CandyGunBullets3" + 29068 = "YnykronAmmo" + // DLC Ammo + 29069 = "SMW05Ammo" + 29070 = "SMW05Ammo2" + 29071 = "SMW05Ammo3" + 29072 = "SMW05SmallAmmo" + 29073 = "SMW05BigAmmo" + 29074 = "SheenAmmo" + 29075 = "SheenAmmo2" + 29076 = "SheenAmmo3" + 29077 = "SheenSmallAmmo" + 29078 = "SheenBigAmmo" + 29079 = "QuadravolAmmo" + 29080 = "QuadravolAmmo2" + 29081 = "QuadravolAmmo3" + 29082 = "SparksterBAmmo" + 29083 = "SparksterBAmmo2" + 29084 = "SparksterBAmmo3" + 29085 = "SparksterRAmmo" + 29086 = "SparksterRAmmo2" + 29087 = "SparksterRAmmo3" + 29088 = "RayBolt" + 29089 = "RayBolt2" + 29090 = "RayBolt5" + 29091 = "RayAmmo" + 29092 = "MisterRound" + 29093 = "MisterRound2" + 29094 = "MisterRound3" + 29095 = "MisterRound5" + 29096 = "MisterRound10" + 29097 = "MisterAmmo" + 29098 = "MisterGAmmo" + 29099 = "MisterGAmmo2" + 29100 = "UltimatePod" + 29101 = "UltimateAmmo" + // For Hexen + 29102 = "FabricatorTier1" + 29103 = "FabricatorTier2" + 29104 = "FabricatorTier3" + 29105 = "FabricatorTier4" + // Backpack + 29106 = "HammerspaceEmbiggener" + // Health + 29107 = "HealthNuggetItem" + 29108 = "TetraHealthItem" + 29109 = "CubeHealthItem" + 29110 = "RefresherItem" + // Armor + 29111 = "ArmorNuggetItem" + 29112 = "BlastSuitItem" + 29113 = "WarArmorItem" + // Powerups + 29114 = "GrilledCheeseSandwich" + 29115 = "GhostArtifact" + 29116 = "GravitySuppressor" + 29117 = "FuckingInvinciball" + 29118 = "Ragekit" + 29119 = "SWWMLamp" + 29120 = "EBarrier" + 29121 = "Mykradvo" + 29122 = "DivineSprite" + 29123 = "AngerySigil" +} +``` + +**Notes:** + - Embiggeners can be *"merged"* by placing them all in the same exact position. This works for groups of 2, 4, 6 and 8. + - Chanceboxes auto-spawn inside secret sectors as long as there's an unobstructed 32x32x60 space inside them. + - It's possible to manually spawn chanceboxes and even collectibles, but this will have to be done through ZScript in a level postprocessor, as internally they already have DoomEdNums assigned *(in the format 42069xx)*, but they're larger than 16 bits, so *(most?)* map editors can't use it. + - Items have no *"fallback sprites"*, so they're only visible as models in UDB. + - Items with *"shiny"* materials *(e.g. nuggets and health geodesics)* will look dull since UDB can't use their shaders. + - Some multi-skinned models may render incorrectly or have missing parts in UDB due to MODELDEF parsing quirks. This can be noticed from the warnings that will be logged on load. \ No newline at end of file diff --git a/language.def_menu b/language.def_menu index 245665c77..1e6325a70 100644 --- a/language.def_menu +++ b/language.def_menu @@ -431,7 +431,8 @@ SWWM_STORETAB = "Store"; SWWM_STOREFULL = "You can't hold more of that."; SWWM_STOREMUNS = "You don't have enough money."; SWWM_STORESWAP = "You already own a weapon in the same slot: %s."; -SWWM_NOSTORE = "(no items left to buy)"; +SWWM_NOSTORE = "(store is not available)"; +SWWM_NOSTOREBUY = "(no items left to buy)"; SWWM_NOSTORESELL = "(no items to be sold)"; SWWM_CHATTAB = "Messages"; SWWM_NOCHAT = "(message history is empty)"; diff --git a/language.es_menu b/language.es_menu index 467186d2c..28b31ca5d 100644 --- a/language.es_menu +++ b/language.es_menu @@ -390,7 +390,8 @@ SWWM_STORETAB = "Tienda"; SWWM_STOREFULL = "No puedes llevar más de eso."; SWWM_STOREMUNS = "No tienes suficiente dinero."; SWWM_STORESWAP = "Ya posees un arma en la misma ranura: %s."; -SWWM_NOSTORE = "(no queda nada que comprar)"; +SWWM_NOSTORE = "(tienda no disponible)"; +SWWM_NOSTOREBUY = "(no queda nada que comprar)"; SWWM_NOSTORESELL = "(no tienes ítems que vender)"; SWWM_CHATTAB = "Mensajes"; SWWM_NOCHAT = "(historial de mensajes vacío)"; diff --git a/language.version b/language.version index 5c2add19e..ad088a5c7 100644 --- a/language.version +++ b/language.version @@ -1,3 +1,3 @@ [default] -SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r431 \cu(Sat 10 Sep 22:16:22 CEST 2022)\c-"; -SWWM_SHORTVER="\cw1.3pre r431 \cu(2022-09-10 22:16:22)\c-"; +SWWM_MODVER="\cyDEMOLITIONIST \cw1.3pre r432 \cu(Sun 11 Sep 12:02:48 CEST 2022)\c-"; +SWWM_SHORTVER="\cw1.3pre r432 \cu(2022-09-11 12:02:48)\c-"; diff --git a/sndinfo.base b/sndinfo.base index f1b33198e..8954ee4ed 100644 --- a/sndinfo.base +++ b/sndinfo.base @@ -80,7 +80,7 @@ misc/flame1 sounds/general/onfire1.ogg misc/flame2 sounds/general/onfire2.ogg misc/flame3 sounds/general/onfire3.ogg misc/flame4 sounds/general/onfire4.ogg -$random misc/flame { misc/flame1 misc/flame2 smisc/flame3 misc/flame4 } +$random misc/flame { misc/flame1 misc/flame2 misc/flame3 misc/flame4 } $limit misc/flame 32 misc/magitem sounds/general/magitem.ogg $limit misc/magitem 16 diff --git a/sndinfo.misc b/sndinfo.misc index 321c4c036..333e20566 100644 --- a/sndinfo.misc +++ b/sndinfo.misc @@ -47,10 +47,10 @@ $random mashiro/attack { mashiro/attack1 mashiro/attack2 } mashiro/hit1 sounds/mashiro/moth_hit1.ogg mashiro/hit2 sounds/mashiro/moth_hit2.ogg $random mashiro/hit { mashiro/hit1 mashiro/hit2 } -mashiro/flesh1 sounds/mashiro/moth_hitf1.ogg -mashiro/flesh2 sounds/mashiro/moth_hitf2.ogg -mashiro/flesh3 sounds/mashiro/moth_hitf3.ogg -$random mashiro/flesh { mashiro/hitf1 mashiro/hitf2 mashiro/hitf3 } +mashiro/hitf1 sounds/mashiro/moth_hitf1.ogg +mashiro/hitf2 sounds/mashiro/moth_hitf2.ogg +mashiro/hitf3 sounds/mashiro/moth_hitf3.ogg +$random mashiro/hitf { mashiro/hitf1 mashiro/hitf2 mashiro/hitf3 } mashiro/active1 sounds/mashiro/moth_postatk1.ogg mashiro/active2 sounds/mashiro/moth_postatk2.ogg mashiro/active3 sounds/mashiro/moth_postatk3.ogg diff --git a/sndinfo.oldvoice b/sndinfo.oldvoice index a46944bf1..0c76c3087 100644 --- a/sndinfo.oldvoice +++ b/sndinfo.oldvoice @@ -33,7 +33,7 @@ $random voice/legacy/lopain { voice/legacy/lopain1 voice/legacy/lopain2 voice/le $random voice/legacy/pain { voice/legacy/pain1 voice/legacy/pain2 voice/legacy/pain3 voice/legacy/pain4 voice/legacy/pain5 } $random voice/legacy/hipain { voice/legacy/hipain1 voice/legacy/hipain2 voice/legacy/hipain3 voice/legacy/hipain4 voice/legacy/hipain5 } $random voice/legacy/death { voice/legacy/death1 voice/legacy/death2 voice/legacy/death3 voice/legacy/death4 voice/legacy/death5 } -$alias voice/legacy/jump DSEMPTY // no sounds available +voice/legacy/jump DSEMPTY // no sounds available voice/legacy/fightstart1 sounds/voice/legacy/va/demofightstart1.ogg voice/legacy/fightstart2 sounds/voice/legacy/va/demofightstart2.ogg diff --git a/zscript/hud/swwm_hud.zsc b/zscript/hud/swwm_hud.zsc index 3324a7979..6bada9380 100644 --- a/zscript/hud/swwm_hud.zsc +++ b/zscript/hud/swwm_hud.zsc @@ -3249,7 +3249,7 @@ Class SWWMStatusBar : BaseStatusBar xx = int((ss.x-len)/2.); yy = ss.y/2.; Screen.DrawText(mSmallFont,Font.CR_WHITE,xx,yy,str,DTA_VirtualWidthF,ss.x,DTA_VirtualHeightF,ss.y,DTA_KeepRatio,true,DTA_Alpha,alph); - if ( goner || !swwm_revive ) + if ( goner || CPlayer.mo.FindInventory("SWWMReviveDisabler") || !swwm_revive ) return (1.-dimalph); alph = clamp((deadtimer-160)/60.,0.,1.); str = String.Format(StringTable.Localize("$SWWM_URDED3")); diff --git a/zscript/items/swwm_health.zsc b/zscript/items/swwm_health.zsc index 1152c2249..2c0d199b1 100644 --- a/zscript/items/swwm_health.zsc +++ b/zscript/items/swwm_health.zsc @@ -138,7 +138,7 @@ Class TetraHealthItem : SWWMHealth States { Spawn: - XZW1 # -1; + XZW1 A -1; Stop; } } @@ -165,7 +165,7 @@ Class CubeHealthItem : SWWMHealth States { Spawn: - XZW1 # -1; + XZW1 A -1; Stop; } } @@ -213,7 +213,7 @@ Class RefresherItem : SWWMHealth States { Spawn: - XZW1 # -1; + XZW1 A -1; Stop; } } diff --git a/zscript/kbase/swwm_kbasetab_store.zsc b/zscript/kbase/swwm_kbasetab_store.zsc index d0c397cfc..a7dab986c 100644 --- a/zscript/kbase/swwm_kbasetab_store.zsc +++ b/zscript/kbase/swwm_kbasetab_store.zsc @@ -3,6 +3,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab { DemolitionistMenuList invlist[2]; + bool bDisabled; bool bSell; int ofs, maxofs, maxw; double smofs; @@ -70,7 +71,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab override DemolitionistMenuTab Init( DemolitionistMenu master ) { title = StringTable.Localize("$SWWM_STORETAB"); - bHidden = (deathmatch||(G_SkillPropertyInt(SKILLP_ACSReturn)>=4)); + bDisabled = (deathmatch||(G_SkillPropertyInt(SKILLP_ACSReturn)>=4)||players[consoleplayer].mo.FindInventory("SWWMStoreDisabler")); return Super.Init(master); } override void OnDestroy() @@ -148,6 +149,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab override void Ticker() { + if ( bDisabled ) return; // do nothing bool mustsort = false; bool skipsel = false; // only update active list to reduce perf hit @@ -278,6 +280,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab override void MenuInput( int key ) { + if ( bDisabled ) return; // do nothing if ( key == MK_BACK ) { bSell = !bSell; @@ -330,6 +333,7 @@ Class DemolitionistStoreTab : DemolitionistMenuTab } override void MouseInput( Vector2 pos, int btn ) { + if ( bDisabled ) return; // do nothing if ( btn == MB_RIGHT ) { // just toggle buy/sell @@ -377,9 +381,17 @@ Class DemolitionistStoreTab : DemolitionistMenuTab override void Drawer( double fractic ) { + if ( bDisabled ) + { + String str = StringTable.Localize("$SWWM_NOSTORE"); + double xx = int(master.ws.x-master.mSmallFont.StringWidth(str))/2; + double yy = int(master.ws.y-master.mSmallFont.GetHeight())/2; + Screen.DrawText(master.mSmallFont,Font.CR_FIRE,master.origin.x+xx,master.origin.y+yy,str,DTA_VirtualWidthF,master.ss.x,DTA_VirtualHeightF,master.ss.y,DTA_KeepRatio,true); + return; + } if ( !invlist[bSell] || (invlist[bSell].items.Size() <= 0) ) { - String str = StringTable.Localize(bSell?"$SWWM_NOSTORESELL":"$SWWM_NOSTORE"); + String str = StringTable.Localize(bSell?"$SWWM_NOSTORESELL":"$SWWM_NOSTOREBUY"); double xx = int(master.ws.x-master.mSmallFont.StringWidth(str))/2; double yy = int(master.ws.y-master.mSmallFont.GetHeight())/2; Screen.DrawText(master.mSmallFont,Font.CR_FIRE,master.origin.x+xx,master.origin.y+yy,str,DTA_VirtualWidthF,master.ss.x,DTA_VirtualHeightF,master.ss.y,DTA_KeepRatio,true); diff --git a/zscript/swwm_player.zsc b/zscript/swwm_player.zsc index 820ca9c87..c6b806f79 100644 --- a/zscript/swwm_player.zsc +++ b/zscript/swwm_player.zsc @@ -2520,7 +2520,7 @@ Class Demolitionist : PlayerPawn player.playerstate = PST_ENTER; if ( special1 > 2 ) special1 = 0; } - else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 120) && swwm_revive ) + else if ( (player.cmd.buttons&BT_ATTACK) && (deadtimer > 120) && !FindInventory("SWWMReviveDisabler") && swwm_revive ) { // reboot (if possible) if ( !FindInventory("ReviveCooldown") && (((swwm_revivecooldown >= 0) && (G_SkillPropertyInt(SKILLP_ACSReturn) < 4)) || !hasrevived) ) diff --git a/zscript/swwm_player_items.zsc b/zscript/swwm_player_items.zsc index 95670303b..4ab32db1f 100644 --- a/zscript/swwm_player_items.zsc +++ b/zscript/swwm_player_items.zsc @@ -1,5 +1,25 @@ // player-specific item stuff +// tokens for custom maps +Class SWWMStoreDisabler : Inventory +{ + Default + { + +INVENTORY.UNCLEARABLE; + +INVENTORY.UNDROPPABLE; + +INVENTORY.UNTOSSABLE; + } +} +Class SWWMReviveDisabler : Inventory +{ + Default + { + +INVENTORY.UNCLEARABLE; + +INVENTORY.UNDROPPABLE; + +INVENTORY.UNTOSSABLE; + } +} + // lucky collar // made by Ashley Knox, given to you and Ibuki by Saya Class SayaCollar : SWWMArmor