Skip to content

Commit

Permalink
Cherry-pick upstream's master (#130)
Browse files Browse the repository at this point in the history
* Make skinset keyvalue description a bit more clear

* Switch these VTFs to the earlier 7.2 version

* Add 'keyvalue' option for comp_scriptvar_setter

This reads an entity keyvalue, and converts it to the appropriate Squirrel type.

* #130: Add back appearance and inputs to light_environment

* Add the alternate classname for static props

* Improve rope slack computation with many segments

* Fix geo hole in dustpuff model

* func_portal_orientation corrections, and note how to fix it in P2

* Add Hover Turret FGDs

* Fix #89: Duplicated model helpers on some entities

* Hover turrets have a field of view

* Flag point_teleport's model keyvalue as non-engine

* Clean up vehicle FGDs

- Rearrange some keyvalues between the base classes
- Slight keyvalue name/description tweaks
- Add ExitVehicle input to airboat (fixes #109)
- Correct default script for cannon
- Correct default script for crane and add model keyvalue

* Clean up jeep FGD

* Sorta fix #98

The frustum helpers now rotate correctly, but they're still bugged in a bunch of other ways.

* Move generic_actor out of a folder

* Actually fix prop_portal_stats_display's doubled rotation

* Refer to players as "they" in keyvalue descriptions

NPCs as well in some cases

* Helicopters are genderless inanimate objects

* Better info_paint_sprayer defaults

These are equivalent to a Heavy puzzlemaker dropper with streaks off

* Add a unique decal helper model

* Include and use a copy of the cube overlay helper

Some older games use a flat one which is annoying on walls and ceilings

* More frustum helper fixes

* Clean up info_player_ping_detector sprite a bit

* Remove the instancing tag

This is no longer used

* Change env_portal_laser "start off" to "start disabled"

This is more consistent with other ents

* Better document what Terminal Point does

* Start as an Box

* Default monster boxes to allowing SilentDissolve

* More his/him swaps

* Fix #94: env_steam editor preview

* Fix #88: Point_bonusmap_accessor sprite

* Fix typo

* Add propcombine tool texture

* Add comp_propcombine_volume

* Update geocable code for changes in bsp module

* fixed grammar error and removed the first step

* added all postcompiler entities

* removed vactube guide (added to wiki)

* Update README.md

* Switch this to use Angle class

* Correctly display the actual total of vactube objects

* Update comp_trigger_p2_goo for BSP module changes

* Don't include target keyvalue in CBaseEntity - we can't know how to treat it.

* Add propcombine volumes to the tool brushes visgroup

* Ensure kv_setters run before comp_relay

* Make propcombine use version 7.2

* Convert geocable classes to uses attrs

* Update to parsedlump syntax for props

* Add 'bunting' support to prop ropes, allowing placing models along the rope.

* We no longer need to context manage the filesystem object.

* Update portal_race_checkpoint entity with some additional info

* Add support for having bunting skip segments, and pitch+yaw orient mode

* Add FGD for comp_vactube_spline

* Parse comp_vactube_spline and produce a preset configurations

* Fix FGD syntax

* Mark vactubes, no longer generate caps for them

* Switch this to an iterator

* Begin generating vactube beams, first side

* Flip orientation

* Generate vactube outer side

* Generate other vactube side

* Generate last beam side

* Generate expanded collisions for vactubes

* Set $mostlyopaque on vactubes

* Allow generated vactubes to animate.

* Fix cached rope models never matching to new compiles

NodeEnt.pos needs to be treated as immutable, we can't edit inplace.

* Implement ability to disable vactube collisions

* Add source file for vactube rings

* Merge together these three comprehensions

* Add some helper functions to reduce the redundancy here.

* We don't need to convert these to Vecs ourselves.

* Reorder beams so that the repeated one is on different sides.

* Place vactube rings a specific distance apart.

* Fix #125: Add ability to set a rotation seed for vactubes

* Switch these to proper annotations

* Add spline vactubes to their visgroup

* Update readme with new entity info

* Fix typo

* Fix incorrect copied choices in comp_entity_finder

* Add ability for comp_scriptvar_setter to assign to the global scope.

* Clarify why info_null is used

* Add ability to have a keyvalue add extra delays to comp_relay

* Add FGD for comp_sequential_call

* Implement comp_sequential_call transform

* This should be the target not output

* Round delay values

* Make this !name more recognisable.

* Add description to readme

* Add warning if no OnSeq outputs provided (very likely a mistake).

* Add icon for sequential call

* Add inner radius to point_push

* Add ability to make sequential call run in reverse, fix sequential + total time breaking

* Add futbol physics to paint bomb editor model

* Add input to P2 antline entities for manually setting the antline frame.

* New comp_flicker entity, for automatically generating flicker sequences

* Add icon for comp_flicker

* Move game_text default positions down to not block crosshair.
This fixes #85.

* Fix "interval" mode not working on sequential call

* Allow using the specified target ent instead of !seq

* Extract this logic out into a function

This allows Desolation to override the behaviour.

* Fix #155: Wrong type for point_viewproxy's attachment point keyvalue

* Tweak logic_register_activator descriptions

* Fix dropper instances using a custom material

* Add safeguards so comp_relays still run if ctrl_type or value is missing.

This fixes BEEmod/BEE2-items#4044.

* Update readme

* npc_clawscanner is in HL2, and switch to studioprop

* Add hammer model keyvalue to npc_cscanner and add mine inputs

* chore: remove BMBaseHelicopter

Looks like a Mesa base, and it is not used by anything

Co-authored-by: TeamSpen210 <[email protected]>
Co-authored-by: Luke18033 <[email protected]>
Co-authored-by: David Losantos <[email protected]>
  • Loading branch information
4 people authored Jun 30, 2022
1 parent 2974525 commit caec941
Show file tree
Hide file tree
Showing 143 changed files with 4,231 additions and 1,011 deletions.
105 changes: 59 additions & 46 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,71 @@
|---------------------------|
| TeamSpen's Hammer Addons |
|---------------------------|

# Features

* Auto-packing - filtered based on search paths in gameinfo, and based on a FGD database + `comp_pack` entities.
* Static prop combining - merges together adjacent props to allow them to be efficently drawn in batches.
* A unified FGD database allowing keyvalues to be shared among games, and accurately defining when features were added and removed.
* Many many upgrades to entity options and layouts.
* New sprites for almost all entities, both custom made and from a number of sources:
* [The TF2 Ultimate Mapping Resource Pack][tf2]
* [ZPS: Supplemental Hammer Icons][zps]
* [ts2do's HL FGDs][ts2do]
<div align="center">
<img src="logo/icon_256.png" alt="Hammer Addons" height="200" />
<br>
<br>
<p> <b>Teamspen's Hammer Addons </b></p>
</div>

<hr>

## Features

* Auto-packing - Automatically packs non-stock game files into the bsp. Filtered based on search paths in the included custom gameinfo and FGD database. Assets can also be packed manually with `comp_pack` entities.
* Static prop combining - merges together adjacent props to allow them to be efficently drawn in batches. To use, specify studioMDL's path then place `comp_propcombnine_volume` or `comp_propcombine_set` entities.
* A [unified FGD database][unifiedfgd], allowing keyvalues to be shared among games, and accurately defining when features were added and removed.
* Many more entity options, and an improved editor layout.
* New sprites for almost all entities, both custom made and from a number of [other sources](#development).
* Adds lots more AutoVisgroups for easily hiding entities.
* Several `comp_` entities with additional features. These are mainly intended for use in instances, allowing modifying entities outside of the instance to conform or doing normally impossible things like positioning things in the void.
To use, decompile props and configure the folder & studioMDL's path then place `comp_propcombine_set` entities.
* For games supporing VScript:
* Improvements for games supporting VScript:
* In any `RunScriptCode` input, backticks can be used for string literals, instead of the disallowed `"` character.
* In addition to the normal `Entity Scripts` section, a new `Init Code` field can be used to write code that's packed and added to those scripts. Useful for setting configuration options etc. Backticks can be used here too.
* New `comp_` entities. These are mainly intended for use in instances, allowing modifying entities outside of the instance to conform or doing normally impossible things like positioning things in the void.
Below are short explanations, see the "Help" display on the entity properties in Hammer for detailed functionality.:

# Installation

* Download the release from the [releases tab][releases].
* Use the provided FGD instead of the vanilla one. (Issues/PRs welcome for any entity improvements.)
* Add the `hammer/` folder to gameinfo.txt, to provide sprites for the compiler.
* Add the postcompiler to the compile commands:
1. Create a new command after VBSP, using the "Executable" type and
choosing the postcompiler EXE.
2. In the parameters, enter `--propcombine $path/$file`.
* Compile a map once, which should produce the config file `Game Folder/srctools.vdf` (this can be placed in any parent folder of the VMF).
* Configure the file as desired, then compile your maps to apply the changes.
* If using BEEMOD2.4, change Hammer -> Options -> Build Programs to use `vrad_original.exe`.
| Entity | Description |
|----------------------------------------------------|-------------|
`comp_flicker` | Fires on/off and skin inputs repeatedly to simulate a flicker-on effect. |
| `comp_choreo_sceneset` | Chains a set of choreographed scenes together. |
| `comp_entity_finder` | Finds the closest entity of a given type, then applies various transformations. Outputs from this entity will be moved to the found entity. Further keyvalues can be set manually with SmartEdit off. |
| `comp_entity_mover` | Shift an entity by a given amount. This is useful to place entities into the void, for example. |
| `comp_kv_setter` | Sets a keyvalue on an entity to a new value. This is useful to compute spawnflags, or to adjust keyvalues when the target entity's options can't be set to a fixup variable. |
| `comp_numeric_transition` | When triggered, animates a keyvalue/input over time with various options. |
| `comp_pack` | Explicitly identify resources to pack into the map, in addition to automatic detection. |
| `comp_pack_rename` | Pack a file into the BSP, under a different name than it starts with. |
| `comp_pack_replace_soundscript` | Replace a soundscript with a different one. |
| `comp_precache_model` | Force a specific model to load, for runtime switching. Duplicates will be removed. |
| `comp_precache_sound` | Force a specific sound to load, for runtime switching. Duplicates will be removed. More keyvalues can be added. |
| `comp_prop_cable`/`comp_prop_rope` | Generates 3D cables using a static prop. |
| `comp_prop_cable_dynamic`/`comp_prop_rope_dynamic` | Modifies the above to generate a dynamic prop, instead. |
| `comp_propcombine_set`/`comp_propcombine_volume` | Specifies a group of props that will be combined together, so they more efficiently render. |
| `comp_relay` | Simplified version of `logic_relay` which is able to be optimised away by the compiler. The various inputs and outputs are useful for bundling commands together, or using more appopriate verbs. Inputs only work if given directly from entities (or via instance redirection), not in-game or dynamically. All inputs/outputs may pass through any parameter, if no override is specified. |
| `comp_scriptvar_setter` | Assigns data or a group of data to a variable in an entity's VScript scope on spawn. To set an array, provide an index in the variable name in the form `varname[4]`. All the comp_scriptvars pointing to that variable will be collected into a single array literal, with holes filled by *null*. If the brackets are empty, these values will fill those holes and then append to the end in an arbitrary order. |
| `comp_sequential_call` | Finds a sequence of entities (by distance or numeric suffix), then fires inputs delayed in order. |
| `comp_vactube_end` | Marks the end point of a vactube. Objects reaching here will be cleaned up. |
| `comp_vactube_junction` | Marks a junction in a vactube, where they're forced to change direction. Scanner models near straight nodes will be detected automatically. |
| `comp_vactube_spline` | Generates a dynamic vactube model following a set of points. |
| `comp_vactube_object` | Registers objects that can appear in the tubing. |
| `comp_vactube_start` | Marks the start point of a vactube. This is where they spawn. |

[releases]: https://github.com/TeamSpen210/HammerAddons/releases
[skotty]: http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=507
[tf2]: http://forums.tf2maps.net/showthread.php?t=4674
[ts2do]: http://halflife2.filefront.com/file/HalfLife_2_Upgraded_Base_FGDs;48139
[zps]: http://www.necrotalesgames.com/tools/index.php

## Installation

## Vactubes (Portal 2 only)
* Follow [this guide][installationwiki].
* If using BEEMOD2.4, change Hammer -> Options -> Build Programs to use `vrad_original.exe`.

This implements a dynamic vactube system in a similar way to Valve's system, including randomised objects, complex junctions and dropper support.

* To use, place and configure `comp_vactube_object` entities to specify which items can appear in tubes.
* To build paths a comp_vactube_start entity at the beginning of the track, and a `comp_vactube_end` at the end.
* Then at each corner/junction place a `comp_vactube_junction` ent, picking the appropriate type. These all need to be rotated appropriately so the arrows point in the correct direction to be matched up by the compiler.
* To split a path into multiple tubes, you'll need to use one of the "splitter" junction types.
* To join multiple back into a single pipe, simply overlap two junctions such that their outputs both point down the same route.
* For droppers, simply place the supplied `instances/cubedropper/dropper_vactube.vmf` instance, and run a path up to the vactube end entity in the top. Place a `prop_weighted_cube` inside the dropper to specify which cube type it will spawn. The specific route leading to the dropper will be detected and only replacement cubes will be sent this way. You'll want to add a splitter just before the dropper, so the tube can have decorative items flowing through it constantly.
* To place the vactube scanner TVs, simply add a "straight"-type junction inside the model, then place the `prop_dynamic`s for the screen and optionally the spinner. The screen will need the supplied `_new` model, so both orientations have all the skins. They will automatically be detected and flash on when objects pass.
* To avoid visual collisions, you may want to turn off the automatic spawning on one or more spawn points, then use the outputs on a junction to manually spawn objects in sync with another path.

## Development

# Development
* Mapbase's FGDs have been imported as a submodule.
* Some entity sprites are taken from:
* [The TF2 Ultimate Mapping Resource Pack][tf2]
* [ZPS: Supplemental Hammer Icons][zps]
* [ts2do's HL FGDs][ts2do]

* Mapbase's FGDs have been imported as a submodule, to track which version has been merged into this repo.
[releases]: https://github.com/TeamSpen210/HammerAddons/releases
[installationwiki]: https://github.com/TeamSpen210/HammerAddons/wiki/Installation
[unifiedfgd]: https://github.com/TeamSpen210/HammerAddons/wiki/Unified-FGD
[skotty]: http://forums.thinking.withportals.com/downloads.php?view=detail&df_id=507
[tf2]: http://forums.tf2maps.net/showthread.php?t=4674
[ts2do]: http://halflife2.filefront.com/file/HalfLife_2_Upgraded_Base_FGDs;48139
[zps]: http://www.necrotalesgames.com/tools/index.php
4 changes: 3 additions & 1 deletion fgd/base_entity.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

targetname(target_source) : "Name"
hammerid(integer) : "Hammer ID"
target(target_destination) : "Target"
// Defined here, but don't include - it's treated as
// many different types.
// target(target_destination) : "Target"
spawnflags(flags) = []


Expand Down
39 changes: 0 additions & 39 deletions fgd/bases/BMBaseHelicopter.fgd

This file was deleted.

9 changes: 6 additions & 3 deletions fgd/bases/BaseDriveableVehicle.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
appliesto(+USE_VEHICLES)
= BaseDriveableVehicle
[
vehiclelocked(boolean) : "Start locked" : 0
vehiclelocked(boolean) : "Start locked" : 0 : "Whether to start the vehicle locked. A locked vehicle cannot be entered or exited."

// Inputs
input HandBrakeOn(void) : "Turns the handbrake on"
input HandBrakeOff(void) : "Releases the handbrake"
input TurnOn(void) : "Turn on: Start engine & enable throttle"
input TurnOff(void) : "Turn off: Stop engine, disable throttle, engage brakes."
input Lock(void) : "Prevent the player from entering or exiting the vehicle."
input Unlock(void) : "Re-allow the player to enter or exit the vehicle."
// EnableGun is part of CPropVehicleDrivable, but it only has an effect on specific vehicles so it's not included here.

// Outputs
output PlayerOn(void) : "Player entered the vehicle"
Expand Down
10 changes: 5 additions & 5 deletions fgd/bases/BaseHelicopter.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ line(255 255 255, targetname, target) = BaseHelicopter
input ChangePathCorner(target_destination) : "Tell the helicopter to move to a path corner on a new path."
input SelfDestruct(void) : "Self Destruct."
input Activate(void) : "Activate. Use to wake up a helicopter that spawned with the 'Await Input' spawnflag on."
input SetTrack(target_destination) : "Set a track for the helicopter to adhere to. The helicopter will do nothing if he's on the same path, and will move to the closest point on the specified track if he's on a different path."
input FlyToSpecificTrackViaPath(target_destination) : "The helicopter will first fly to the closest point on the path if he's on a different path. Then he'll fly along the path to the specified track point."
input SetTrack(target_destination) : "Set a track for the helicopter to adhere to. The helicopter will do nothing if it's on the same path, and will move to the closest point on the specified track if it's on a different path."
input FlyToSpecificTrackViaPath(target_destination) : "The helicopter will first fly to the closest point on the path if it's on a different path. Then it'll fly along the path to the specified track point."
input StartPatrol(void) : "Start patrolling back and forth along the current track."
input StopPatrol(void) : "Stop patrolling back and forth along the track. This will cause the helicopter to come to rest at the track which he's currently flying toward."
input StopPatrol(void) : "Stop patrolling back and forth along the track. This will cause the helicopter to come to rest at the track which it's currently flying toward."
input ChooseFarthestPathPoint(void) : "When tracking an enemy, choose the point on the path furthest from the enemy, but still in firing range."
input ChooseNearestPathPoint(void) : "When tracking an enemy, choose the point on the path nearest from the enemy."
input StartBreakableMovement(void) : "The helicopter is now allowed to disobey direct commands to go to particular points if he senses an enemy. He will move to the closest point (or farthest point, if ChooseFarthestPathPoint is used), on the path if he senses an enemy."
input StopBreakableMovement(void) : "The helicopter can not disobey direct commands. He will continue to fly along his patrol path or to his specified target even if he senses an enemy."
input StartBreakableMovement(void) : "The helicopter is now allowed to disobey direct commands to go to particular points if it senses an enemy. It will move to the closest point (or farthest point, if ChooseFarthestPathPoint is used), on the path if it senses an enemy."
input StopBreakableMovement(void) : "The helicopter can not disobey direct commands. It will continue to fly along its patrol path or to its specified target even if it senses an enemy."
]
8 changes: 4 additions & 4 deletions fgd/bases/BaseVehicle.fgd
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

// Inputs
input Action(float) : "Set the speed of the action animation"
input TurnOn(void) : "Turn on: Start engine & enable throttle"
input TurnOff(void) : "Turn off: Stop engine, disable throttle, engage brakes."
input Lock(void) : "Prevent the player from entering or exiting the vehicle."
input Unlock(void) : "Re-allow the player to enter or exit the vehicle."
input HandBrakeOn(void) : "Turns the handbrake on"
input HandBrakeOff(void) : "Releases the handbrake"
input Steer(float) : "Steer the vehicle +/-1"
input Throttle(float) : "Throttle +/-1"
]
Loading

0 comments on commit caec941

Please sign in to comment.