Jump to content
The Dark Mod Forums

Assign the last 4 weapon slots to null entities the FM can modify to add custom weapons


Recommended Posts

Posted

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. Here's a full example of how my imagined modification would look, curious if this works without breaking anything if anyone can check:

// Placeholder for the last default weapon until one is added
entityDef atdm:weapon_empty
{
    "inherit" "atdm:entity_base"
}

// Empty definitions for custom weapons the FM can override
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"
}
"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 #2787
"def_weapon10" "atdm:weapon_vinearrow" // grayman #2787
"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
  • Like 4
Posted (edited)

I really hope there won't be a complete lack of consistency in the future, with everything FM authors or contributors to coding want to change about the mod the whole time... Some FMs already play as if they were from a parallel universe.

To illustrate the problem: Imagine a new player getting into the mod. He will play The Training mission, and maybe some of the older missions, which don't modify weapon, enemy, or light gem/shadow behavior. Then he gets into some of the new missions, and needs to re-learn in every mission the conditions, because the FM author chose to modify weapons, make the player always visible, change A.I. behavior, or even change or introduce new weapons.

I appreciate the cerativity, and understand that some want to extend the gameplay possibilities. But, it always comes with the, in my eyes, big penalty of making the player adapt to the new conditions, and every single mission, and, some things he can't know, and he'll be very surprised that the mission behaves the way it does.

I really hope FM authors go back to the roots again one day, and don't overwhelm the player with thousands of changes and additions, which make the missions and the Dark Mod unvierse less coherent and uniform, and confuse the player.

Edited by chakkman
Posted

I remember Melchior suggested new weapons once:

"For the weapon system to be built around General Type/Intended Use:

  1. Blackjack / Club / Heavy-Vase / Hammer / Ether & Rag, ect... {Knockout weapons/tools}
  2. Short-Sword / Dagger / Stiletto, Blow-darts, ect... {Killing weapons/tools}
  3. Water  (arrows) / Extinguisher (manual water pump) / Soot (arrows)... {Light Dousing tools}
  4. Fire; 'Explosive' (arrows) / Concussion (arrow) / Incendiary (arrow)... {Explosive weapon/tools}
  5. Rope (arrows) / Vine (arrows) / Grappling-Hook (hook & chain)... {Vertical movement tools}
  6. 'Ether' Gas (arrows) / 'Tear' Gas (arrows) / 'Mustard' Gas (arrows)... {Mixed use gas/vapour tools}
  7. Moss (arrows) / Paint (arrows)  ...{Sound-impact / light absorbing tools}
  8. Glue (arrows) / Flash (arrows) / Noisemaker (arrows) / Fire-crackers... {Distracting / disabling tools}

 

Noting the following are new;

  • Heavy-Vase: used double-handed; a loud single use blackjack that leaves a mess...
  • Dagger, Stilleto: Short range, Can't block - the latter CAN penetrate armour if attacking a weak-point...
  • Blow-Darts: Specialized tool of assassins - useful dealing with multiple guards...or special people (its deadly).
  • Ether-vial & Rag: Used from behind its very effective at disabling. It will evaporate in moments, limited uses.
  • Extinguisher: Ever wanted to just spray some water on a torch? This, does that. That's it. Only close up.
  • Paint Arrows: Permanently covers electric light sources & blinds optical sensors [which WILL trigger them!].
  • Glue Arrows: So, you need to stop charging guards?; Loosing one of these creates a puddle of Ultra-Adhesive capable of binding anything together for a little while. Works against Bi-pedal AND Quadrupedal foes!"
Posted

Yes, this is mainly for new arrows with custom functionalities. I doubt most FM's would add radically different weapons, especially since those are generally hard to do and require new 1st person models.

I also suggested redoing the weapon registration system to get rid of the old engine slots and have them like items, but that's a bigger change and no one's yet announced any plans. So in the meantime the simplest solution seems like at least registering the unused slots so a FM can modify the entities without having to touch the player definition.

You can already modify the existing arrows that way, like how some FM's have a bow that looks a little different and fires faster. But if your FM wants to add an unique arrow without touching existing ones, like say an earthquake causing arrow that alerts a larger area to distract guards, there's currently no entity to bind it to.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • opnode  »  STiFU

      Saw you username pop up, just wanted to say thanks for your recent commits :3
      · 0 replies
    • Petike the Taffer

      I've updated all of the Fan Mission documentation on our TDM wiki. As I've gone to the trouble of documenting every officially known fan mission, we currently have a total of 192 missions (the vast majority of them Single Missions, and a few done in the format of a Campaign). Maybe I should get working on my own again, soon, just to add something to the approaching first two hundred. 
      · 0 replies
    • demagogue

      I saw a let's play video with the indicator that pops up showing the direction for AI barks. This for the record. I hadn't looked into it before and wanted to now, but search terms weren't helping me find info on it in the forum. Could anyone drop a link to a thread or post on it?
      · 2 replies
    • Petike the Taffer

      I think I still have the login details for the Google Account used to log in to The Dark Mod's official YouTube channel. With all the new videos that have been done regarding 2.12 and 2.13, it really feels like it's time for an update. I don't know if logging into another account is going to work, as I've had some issues with it in recent times, but If I manage to do so, I'll do some updating regarding the newer videos.
      · 0 replies
    • The Black Arrow

      New Year Plans:
      Play Thief Gold
      Play Thief 2
      Play Thief 3
      Play Thief Gold...To play "The Black Parade"
      Finally, eat Velvet Cake and...Play The Dark Mod, wooeey!
      · 6 replies
×
×
  • Create New...