Resource icon

Medieval Mode w/out tf_logic_medieval Update 6

Yaki

aa
Sep 3, 2018
418
256
Medieval Mode w/out tf_logic_medieval - Force melee mode and strip weapons from players (Advanced)

Wait! Before you dismiss this as a prefab exclusively for the "nightsoil" Medieval Mode, you may want to reconsider.

This prefab can be used to do a lot, like stripping weapons from players, force players in melee (so they don't T-pose), and how to mimic the small HP-kit physics seen in the Ye Olde Mode, among other tricks.

This prefab demonstrates:
  • How to enable Medieval Mode without the entity "tf_logic_medieval",
  • How to use entities to force players to drop medieval-physics health-packs on death,
  • How to create your own custom blacklist for weapons,
  • How to make a resupply cabinet not restore blacklisted weapons,
  • How to force players to switch to melee upon respawn.
Technical Tricks and Tips to Learn from This:
  • How to use "StartTouch" via AddOutput to trigger an OnStartTouch anywhere in the map. (In this prefab, used to send Kill input to weapons without accidentally sending Kill to a player, crashing their client)
  • How to make players respawn any number of times and touch a trigger flawlessly.
  • How "monster_generic" is used to simulate physics of a health kit.
  • How a Half-Life 1 entity is used to detect a player death (in order to trigger a health kit drop). (more info https://developer.valvesoftware.com/wiki/Targetname)

Check the update history for more info.

I'm really eager to share, so I might've forgotten something. Good luck, Medieval (or non-medieval) Mappers!
 
Last edited:

Yaki

aa
Sep 3, 2018
418
256
In addition to this, here's how you could use the logic:
  • Enable more weapons (delete these from the prefab's weapon stripping relay to enable them)
    • Jarate (tf_weapon_jar)
    • Loose Cannon (tf_weapon_cannon)
    • Thermal Thruster (tf_weapon_rocketpack)
    • Gas Passer (tf_weapon_jar_gas)
    • Short Circuit (tf_weapon_mechanical_arm)
    • Rescue Ranger (tf_weapon_shotgun_building_rescue)
  • Engineer's Buildings and Spy Sapper (tf_weapon_pda_engineer_build | tf_weapon_pda_engineer_destroy | tf_weapon_builder)
    • Note: Spy Sapper is tied to tf_weapon_builder
  • Also Spy Sapper Red Tape Recorder (tf_weapon_sapper)
  • For Buildings, simply put a func_nobuild covering the entire map if you don't want sentry guns.
  • Make actual melee-only maps (without Medieval Mode).
  • Make a secondary-only mode (a game without primaries, anyone?)
  • Make power-ups drop like the HP kits do.
  • Use StartTouch to add conditions to players without them being near a trigger.
  • Experiment!
 

Yaki

aa
Sep 3, 2018
418
256
  • Added input to FireUser1 when players respawn.
  • Visgroup'd a missed info node.

Read the rest of this update entry...

EDIT: To anyone that updates their map and doesn't want to reinstall my logic, all you need to do is set an input on all "playerspawn_teleport" brush entities, and add "OnStartTouch !activator FireUser1 0.01 -1" to the I/O system on all.
 
Last edited:

Yaki

aa
Sep 3, 2018
418
256
  • Added filter to not kill players (necessary because Source, but really sometimes the trigger sends the kill input to the player and not the weapons)
  • Updated all logic to support class-specific weapon stripping, instead of sending Kill input to all weapons each and every time.
  • Added a "cheat" locker to prevent weapons from being deleted (while also letting you keep whatever loadout you'd normally have).
    • This works by naming the weapon and filtering that weapon out so it isn't deleted when other players are stripped of their loadouts.
    • Additionally there is a glitch that might occur if someone stays within this prefab's normal resupply locker, then someone touches the "cheat" locker, then that first person walks away from the "normal" locker. This will let that person who didn't touch the cheat locker, to keep their weapons.
  • Added version history and these same update notes to the prefab.

Notes
  • In MvM, you can switch teams of weapons using TeamNum (any team number) and it works. In PvP, however, this does NOT work and is tied to your character's team.
    • Tying into the last point, in PvP you can filter which team loses the weapons based on that character's team. In MvM though, you can still filter the weapon but it isn't tied to your character but rather, the team number of the weapon.
  • In PvP, your weapon will always be tied to your class. So even if you "cheat" by naming your weapon and filtering by non-named weapons, you keep your weapon between lives.

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
418
256
Update 4
  • Removed unneeded condition triggers (75 and 32) from strip logic.
    • Fixes stuttering from third person to first person when touching the resupply locker.
  • Updated resupply lockers
    • More efficiently deletes weapons off characters by using OnAnimationBegun on the resupply lockers.
    • Removes unneeded triggers (75 and 32) and trigger_multiple
  • Generally made the prefab more friendly to navigate.

To-Do
  1. add instance support
  2. change classname of medigun, thermal thruster and sapper
    • This is a fix for Quick-Fix/Thermal Thruster backpacks getting stuck on characters after they're deleted.

Read the rest of this update entry...
 

Yaki

aa
Sep 3, 2018
418
256
Update 5
  • Deleted the teleports in favor of a trigger_multiple with OnTrigger output. (Thanks @Pdan4 !)
    • This reduces the needed entities for this logic by like, 96+.
    • Place this over the spawn room and it'll work as intended.
  • Deleted the relay that strips all weapons at once.
    • This has been organized into triggers that delete weapons per-class basis.
  • Fixed bug where Heavy, Pyro and Engineer would pick up ammo when they didn't have a weapon.
    • Also, added feature to add player attributes to characters on respawn.
  • Fixed bug where Thermal Thruster's and Quick-Fix' backpacks would appear on other characters when sent Kill input
    • Done by sending ClearParent, AddOutput effects 32, and AddOutput classname whatever to said entities.
  • Fixed bug where Sapper would be usable on Spy
    • This happens because the Engineer and Spy share the entity tf_weapon_builder, for their PDA and Sapper, respectively. Renaming the classname for the tf_weapon_builder entity will disable for Spy and not Engineer. (I don't know but it does)
  • Further organized VisGroups.

Read the rest of this update entry...