Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-pick upstream's master #130

Merged
merged 109 commits into from
Jun 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
e735cbe
Make skinset keyvalue description a bit more clear
TeamSpen210 Apr 8, 2021
9f4f125
Switch these VTFs to the earlier 7.2 version
TeamSpen210 Apr 5, 2021
98b8aae
Add 'keyvalue' option for comp_scriptvar_setter
TeamSpen210 Apr 8, 2021
675f359
#130: Add back appearance and inputs to light_environment
TeamSpen210 Apr 19, 2021
a880ce5
Add the alternate classname for static props
TeamSpen210 Apr 20, 2021
f2b4169
Improve rope slack computation with many segments
TeamSpen210 Apr 21, 2021
0dccd39
Fix geo hole in dustpuff model
TeamSpen210 Apr 21, 2021
943bdd4
func_portal_orientation corrections, and note how to fix it in P2
Apr 27, 2021
5ec4604
Add Hover Turret FGDs
Apr 27, 2021
5fc8f9b
Fix #89: Duplicated model helpers on some entities
Apr 29, 2021
687a9e9
Hover turrets have a field of view
Apr 29, 2021
d06f2b0
Flag point_teleport's model keyvalue as non-engine
Apr 29, 2021
78ed05d
Clean up vehicle FGDs
Apr 30, 2021
27f4306
Clean up jeep FGD
Apr 30, 2021
909b1d7
Sorta fix #98
Apr 30, 2021
6d9709c
Move generic_actor out of a folder
Apr 30, 2021
0703bcb
Actually fix prop_portal_stats_display's doubled rotation
Apr 30, 2021
98cdda2
Refer to players as "they" in keyvalue descriptions
May 6, 2021
f0c3840
Helicopters are genderless inanimate objects
May 6, 2021
f20591e
Better info_paint_sprayer defaults
May 9, 2021
aae9aa3
Add a unique decal helper model
May 9, 2021
33f54d0
Include and use a copy of the cube overlay helper
May 9, 2021
907e1df
More frustum helper fixes
May 10, 2021
d86fc3d
Clean up info_player_ping_detector sprite a bit
May 12, 2021
7a6d19d
Remove the instancing tag
May 12, 2021
d90afbc
Change env_portal_laser "start off" to "start disabled"
May 14, 2021
7434485
Better document what Terminal Point does
May 14, 2021
5e04dee
Start as an Box
May 31, 2021
ee1e1db
Default monster boxes to allowing SilentDissolve
May 31, 2021
08a5b33
More his/him swaps
May 31, 2021
f518827
Fix #94: env_steam editor preview
Jun 1, 2021
4ca2d03
Fix #88: Point_bonusmap_accessor sprite
Jun 1, 2021
9bcde81
Fix typo
TeamSpen210 Jun 10, 2021
f0f64e8
Add propcombine tool texture
TeamSpen210 Jun 17, 2021
787ce7d
Add comp_propcombine_volume
TeamSpen210 Jun 17, 2021
7eb1b73
Update geocable code for changes in bsp module
TeamSpen210 Jun 18, 2021
ceb6fe4
fixed grammar error and removed the first step
darvil82 Jun 26, 2021
ebca61b
added all postcompiler entities
darvil82 Jun 26, 2021
7e080a2
removed vactube guide (added to wiki)
darvil82 Jun 27, 2021
5128da2
Update README.md
darvil82 Jun 27, 2021
5dc03dd
Switch this to use Angle class
TeamSpen210 Jun 30, 2021
1e745e4
Correctly display the actual total of vactube objects
TeamSpen210 Jul 5, 2021
44c23f4
Update comp_trigger_p2_goo for BSP module changes
TeamSpen210 Jul 6, 2021
396b16e
Don't include target keyvalue in CBaseEntity - we can't know how to t…
TeamSpen210 Jul 6, 2021
c78243e
Add propcombine volumes to the tool brushes visgroup
TeamSpen210 Jul 18, 2021
555f96b
Ensure kv_setters run before comp_relay
TeamSpen210 Jul 18, 2021
ac4d3e7
Make propcombine use version 7.2
TeamSpen210 Jul 18, 2021
f47d18f
Convert geocable classes to uses attrs
TeamSpen210 Aug 3, 2021
6a06371
Update to parsedlump syntax for props
TeamSpen210 Aug 3, 2021
622fa49
Add 'bunting' support to prop ropes, allowing placing models along th…
TeamSpen210 Aug 3, 2021
8bd3203
We no longer need to context manage the filesystem object.
TeamSpen210 Aug 3, 2021
0c30d52
Update portal_race_checkpoint entity with some additional info
TeamSpen210 Aug 3, 2021
b69c35d
Add support for having bunting skip segments, and pitch+yaw orient mode
TeamSpen210 Aug 4, 2021
ea34006
Add FGD for comp_vactube_spline
TeamSpen210 Aug 4, 2021
eae4fc9
Parse comp_vactube_spline and produce a preset configurations
TeamSpen210 Aug 4, 2021
bb55913
Fix FGD syntax
TeamSpen210 Aug 4, 2021
15a1ecd
Mark vactubes, no longer generate caps for them
TeamSpen210 Aug 4, 2021
730b6ab
Switch this to an iterator
TeamSpen210 Aug 4, 2021
879c964
Begin generating vactube beams, first side
TeamSpen210 Aug 4, 2021
247be6b
Flip orientation
TeamSpen210 Aug 5, 2021
976d7cd
Generate vactube outer side
TeamSpen210 Aug 5, 2021
e396dd1
Generate other vactube side
TeamSpen210 Aug 5, 2021
8b4fb5c
Generate last beam side
TeamSpen210 Aug 5, 2021
0c1a436
Generate expanded collisions for vactubes
TeamSpen210 Aug 5, 2021
71028fc
Set $mostlyopaque on vactubes
TeamSpen210 Aug 5, 2021
a2984d8
Allow generated vactubes to animate.
TeamSpen210 Aug 5, 2021
1535970
Fix cached rope models never matching to new compiles
TeamSpen210 Aug 5, 2021
d48460e
Implement ability to disable vactube collisions
TeamSpen210 Aug 5, 2021
f53a7df
Add source file for vactube rings
TeamSpen210 Aug 5, 2021
f821174
Merge together these three comprehensions
TeamSpen210 Aug 6, 2021
613bcfb
Add some helper functions to reduce the redundancy here.
TeamSpen210 Aug 6, 2021
8fc83b4
We don't need to convert these to Vecs ourselves.
TeamSpen210 Aug 6, 2021
8d07cb6
Reorder beams so that the repeated one is on different sides.
TeamSpen210 Aug 6, 2021
7a6a6fb
Place vactube rings a specific distance apart.
TeamSpen210 Aug 6, 2021
0702c85
Fix #125: Add ability to set a rotation seed for vactubes
TeamSpen210 Aug 6, 2021
6d1468c
Switch these to proper annotations
TeamSpen210 Aug 6, 2021
512f36f
Add spline vactubes to their visgroup
TeamSpen210 Aug 6, 2021
311e395
Update readme with new entity info
TeamSpen210 Aug 6, 2021
42bea3d
Fix typo
TeamSpen210 Aug 7, 2021
6c4a4a2
Fix incorrect copied choices in comp_entity_finder
TeamSpen210 Aug 25, 2021
dc3607b
Add ability for comp_scriptvar_setter to assign to the global scope.
TeamSpen210 Sep 22, 2021
b6d102b
Clarify why info_null is used
TeamSpen210 Sep 23, 2021
e345b75
Add ability to have a keyvalue add extra delays to comp_relay
TeamSpen210 Sep 23, 2021
eae71f2
Add FGD for comp_sequential_call
TeamSpen210 Oct 1, 2021
e6a402e
Implement comp_sequential_call transform
TeamSpen210 Oct 1, 2021
3738c64
This should be the target not output
TeamSpen210 Oct 1, 2021
96b06ca
Round delay values
TeamSpen210 Oct 1, 2021
9a83362
Make this !name more recognisable.
TeamSpen210 Oct 1, 2021
8be39c9
Add description to readme
TeamSpen210 Oct 1, 2021
434e6f3
Add warning if no OnSeq outputs provided (very likely a mistake).
TeamSpen210 Oct 1, 2021
a558098
Add icon for sequential call
TeamSpen210 Oct 2, 2021
6fa6cba
Add inner radius to point_push
TeamSpen210 Oct 7, 2021
11ec625
Add ability to make sequential call run in reverse, fix sequential + …
TeamSpen210 Oct 13, 2021
932531e
Add futbol physics to paint bomb editor model
TeamSpen210 Nov 11, 2021
d5a0927
Add input to P2 antline entities for manually setting the antline frame.
TeamSpen210 Nov 29, 2021
cad0ea5
New comp_flicker entity, for automatically generating flicker sequences
TeamSpen210 Nov 30, 2021
7c4c0ff
Add icon for comp_flicker
TeamSpen210 Dec 1, 2021
63ae461
Move game_text default positions down to not block crosshair.
TeamSpen210 Dec 9, 2021
f8c505c
Fix "interval" mode not working on sequential call
TeamSpen210 Dec 30, 2021
9c94318
Allow using the specified target ent instead of !seq
TeamSpen210 Dec 30, 2021
14b7cee
Extract this logic out into a function
TeamSpen210 Dec 31, 2021
d9e2fdd
Fix #155: Wrong type for point_viewproxy's attachment point keyvalue
TeamSpen210 Jan 1, 2022
7f3955a
Tweak logic_register_activator descriptions
TeamSpen210 Jan 11, 2022
4b69fc9
Fix dropper instances using a custom material
TeamSpen210 Jan 12, 2022
a6d87cc
Add safeguards so comp_relays still run if ctrl_type or value is miss…
TeamSpen210 Jan 13, 2022
6b0df6a
Update readme
TeamSpen210 Jan 13, 2022
8291829
npc_clawscanner is in HL2, and switch to studioprop
May 28, 2021
9745722
Add hammer model keyvalue to npc_cscanner and add mine inputs
May 28, 2021
51554b3
chore: remove BMBaseHelicopter
braem Jun 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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