View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006609 | The Dark Mod | Def / Setup | public | 01.03.2025 16:16 | 01.03.2025 16:21 |
Reporter | MirceaKitsune | Assigned To | |||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | new | Resolution | open | ||
Platform | Linux | OS | Manjaro | OS Version | Stable |
Product Version | TDM 2.12 | ||||
Summary | 0006609: Assign the last 4 weapon slots to null entities the FM can modify to add custom weapons | ||||
Description | Posting this here as recommended on the forum thread. With the 2.13 Beta around the corner, I wanted to ask about a specific solution to a specific problem regarding custom weapons. A while ago I made a post where I designed a flash arrow which I suggested introducing to vanilla TDM: For various reasons others didn't feel it made sense so the idea went dead. I didn't mind much since at worst I can feature it in my own FM's. But there's one obstacle with that I hated and wished to see removed: You have to change the player definition for the weapon slots, your FM must copy and override the whole player entity just to add a spawnarg pointing to your weapon entity. If atdm:player_base ever changes in core the FM needs to copy and update it, all just for one parameter. From my understanding there should be a quick way around this; Simply add predefined entities for those slots which FM's can override without having to touch the player def itself, authors are given the entity names for those slots and can set them to whatever they desire. The engine has 16 weapon slots and we have 5 unused, I'd reserve 1 just in case and provide the last 4 to FM's since that's a more standard number. The suggested change should be simple: In tdm_defs01.pk4/def/tdm_player_thief.def entitydef atdm:player_base add spawnargs for def_weapon12, def_weapon13, def_weapon14, def_weapon15 and have them point to a named entity by default. If for example we have "def_weapon12 atdm:weapon_custom1" the mission can define a custom arrow just by including its own definition of atdm:weapon_custom1. By default they should be assigned to null entities that don't do anything if placed as is but won't crash the game either. Below is a full example of how I imagined the defs for my modification would look, curious if this works without breaking anything if anyone can check... forum thread for the full discussion: https://forums.thedarkmod.com/index.php?/topic/22664-assign-the-last-4-weapon-slots-to-null-entities-the-fm-can-modify-to-add-custom-weapons | ||||
Additional Information | // Placeholder for the last default weapon until one is added, empty definitions for custom weapons the FM can override entityDef atdm:weapon_empty { "inherit" "atdm:entity_base" } entityDef atdm:weapon_custom1 { "inherit" "atdm:entity_base" } entityDef atdm:weapon_custom2 { "inherit" "atdm:entity_base" } entityDef atdm:weapon_custom3 { "inherit" "atdm:entity_base" } entityDef atdm:weapon_custom4 { "inherit" "atdm:entity_base" } // Changes to the slot spawnargs in atdm:player_base "def_weapon0" "atdm:weapon_unarmed" "def_weapon1" "atdm:weapon_blackjack" "def_weapon2" "atdm:weapon_shortsword" "def_weapon3" "atdm:weapon_broadhead" "def_weapon4" "atdm:weapon_waterarrow" "def_weapon5" "atdm:weapon_firearrow" "def_weapon6" "atdm:weapon_ropearrow" "def_weapon7" "atdm:weapon_gasarrow" "def_weapon8" "atdm:weapon_noisemaker" "def_weapon9" "atdm:weapon_mossarrow" // grayman 0002787 "def_weapon10" "atdm:weapon_vinearrow" // grayman 0002787 "def_weapon11" "atdm:weapon_empty" // reserve this slot in case TDM adds one more default arrow in the future "def_weapon12" "atdm:weapon_custom1" // weapon slot for custom entity that can be defined by the FM "def_weapon13" "atdm:weapon_custom2" // weapon slot for custom entity that can be defined by the FM "def_weapon14" "atdm:weapon_custom3" // weapon slot for custom entity that can be defined by the FM "def_weapon15" "atdm:weapon_custom4" // weapon slot for custom entity that can be defined by the FM | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
01.03.2025 16:16 | MirceaKitsune | New Issue | |
01.03.2025 16:21 | MirceaKitsune | Additional Information Updated |