Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit f8e4c3c

Browse files
authored
Merge pull request #22 from Project-Collapse-Studios/van-dev
Merge upstream changes
2 parents 407ce5c + f52a8df commit f8e4c3c

1,194 files changed

Lines changed: 58152 additions & 17203 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ __pycache__/
6464
*.blend1
6565

6666
# These should never be committed.
67-
srctools_paths.vdf
68-
srctools_*_data.dmx
67+
hammeraddons_paths.vdf
68+
hammeraddons_*_data.dmx
6969

7070
# This shouldn't be shipped, but it is useful to have to allow using studiomdl/vtex.
7171
hammer/gameinfo.txt
@@ -74,8 +74,9 @@ hammer/gameinfo.txt
7474
_version.py
7575

7676
# Ignore config in the examples folder.
77-
examples/srctools.vdf
77+
examples/hammeraddons.vdf
7878

7979
# Random extra things
8080
output.fgd
8181
build_for_testing.bat
82+
reports/

CHANGELOG.md

Lines changed: 78 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,83 @@
1-
# Version Dev
1+
# Version (dev)
22

3-
# Enhancements
3+
## New Features
4+
* Added `comp_movie_fitter`, which calculates UVs for `vgui_movie_display`.
5+
* Added `comp_multi_command`, which allows executing console commands in bulk more conveniently.
6+
7+
## Enhancements
8+
* Upgraded config handling:
9+
* Files have been renamed to `hammeraddons.vdf` etc, instead of `srctools`. Old names are still loaded.
10+
* Config files will no longer be rewitten. Instead any changes will produce a new file, which
11+
should be merged with any comments in the old one, then copied over.
12+
* Plugin scripts can now register their own config options, in addition to builtin ones.
13+
* Searchpaths 'nopack' option now allows wildcards for disabling locations in bulk.
14+
* Moved options specifying the behaviour of the current game branch to a dedicated file,
15+
so users only need to pick from presets.
16+
* Update internal Crowbar to version 0.75. This is used decompile models for propcombine.
17+
* Added 1/16 scale skybox mode for vactube system. You'll need to provide your own models or use prop scaling.
18+
* Added vactube curves 7-16. You'll need to provide your own models though.
19+
* `comp_entity_finder`s can now use `@names` for replace outputs, so they work in HL2.
20+
* Allow `<appid>` references to be used everywhere `|srctools_paths|` references can be used.
21+
* `env_tonemap_controller` options can be set by keyvalues, generating a `logic_auto` automatically.
22+
* Added rotation, scale, animation, and bodygroup keyvalues to `hammer_model`. Some of these require a custom Hammer fork (e.g. Hammer++) to be visible.
23+
* Added a 'version number' to all postcompiler entities. This allows backwards-incompatible changes to occur in the future.
24+
* Added `OnPressedPlayer`/`OnPressedCube` outputs to Portal 2 floor button entities, implemented by spawning a filter entity.
25+
26+
## Bugfixes
27+
* Fix vactube objects appearing to rapidly move from end to start positions in some cases.
28+
* Fix an issue where vactube objects might have the wrong model, overlap each other, etc.
29+
* Improved handling of more complex `gameinfo.txt` files like Mapbase's.
30+
* Automatically remove old generated vactube animation models.
31+
* Fix an issue where prop ropes generated with slight angles on straight sections.
32+
* Fix prop ropes not reusing existing compiled versions.
33+
* Fix `trigger_vphysics_motion`/`trigger_wind` having `OnStartTouch` etc outputs, which they don't have.
34+
35+
-----------------------
36+
37+
# Version 2.6.0
38+
39+
The postcompiler now requires Windows 8+.
40+
41+
## New Features
42+
* Added `comp_vactube_sensor`, which allows detecting the presence of vactube objects.
43+
* Added `comp_piston_platform`, which generates the logic for Portal-style piston platforms.
44+
* Added option to `trigger_hurt` to create the logic for 'forgiving laserfields'.
45+
* Added `hammer_model` entity to allow placing reference models in Hammer that don't appear in-game.
46+
47+
## Enhancements
48+
* Update to Mapbase 7.3.
449
* A new "snippets" system allows FGD files to easily repeat descriptions and other small sections.
550
* Add ability to randomise output delay to `comp_relay` and `comp_adv_output`.
6-
* Added `comp_vactube_sensor`, which allows detecting the presence of vactube objects.
751
* Added a value mode option to `comp_kv_setter` and `comp_adv_output` to more clearly control which key is used.
852
* Added textures for 4 rendertargets (camera, water reflection/refraction, full framebuffer). These give a nice preview in Hammer.
953
* Added three keyvalues to `ambient_generic`, giving a more user friendly interface to the confusing spawnflags. This also allows them to be configured via fixup values easily.
54+
* Added line helpers to `env_microphone`, `scripted_sequence`, `path_track`, and `item_item_crate`.
55+
* Added Source 2013's `SetModelScale` input to all animating entities,
56+
* Added undocumented `ChangeLevelPostFade` input to `point_changelevel`.
57+
* Added Portal: Still Alive features (not currently included in releases, but can be built by including the `PSA` tag),
58+
* Added "singular" and "remove" modes to `comp_kv_setter`.
1059
* Allow `comp_entity_finder` to rotate the target in addition to teleporting.
60+
* `comp_kv_setter`s can now lookup the flags mask based on the name in the FGD.
1161
* Allow configuring various shadow/fast reflection options for vactube object ents.
1262
* Boolean keyvalues (yes/no) can now be set to `!$var`, to invert the value of the variable.
63+
* Consistently seed the RNG for compiler entities, to produce consistency across compiles.
64+
Relevant entities now all have `seed` parameters to further adjust.
1365
* Propcombine will now preserve prop fade distances, by calculating a new distance which encloses the original fade spheres.
14-
* Warn if propcombine or packing was disabled via command line.
66+
* Propcombined models will try and use group names for the filename, if specified.
67+
* Warn in the log if propcombine or packing was disabled via command line, so this is easier to diagnose.
68+
* Add SFX to the Old Aperture cubedropper to simulate the new cube landing.
69+
* Multiple prop ropes with the same shape and configuration will now properly share models.
1570
* Add option to `comp_adv_output` to have it expand target searches itself.
71+
* Refer to the "Gravity Gun" in descriptions instead of physgun/physcannon.
72+
* Floor buttons with `solid=6` will automatically be fixed, since this unintentionally makes them non-solid.
73+
* The postcompiler will now detect and error if a loop of parents/filters is detected. These will just crash the game in a non-obvious manner.
74+
* Included a copy of the "Obsolete" sprite used for missing entities, for games that don't include it by default such as Portal 2.
75+
* Improved `game_text` keyvalue descriptions and added Mapbase's font keyvalue,
76+
* Updated the icon for `skybox_swapper`.
77+
* Removed `info_paint_sprayer` keyvalues which are set in some Valve maps, but don't actually exist.
78+
* Removed Hammer preview from Mapbase's `vgui_text_display` as it did not actually match the in-game appearance.
79+
* Removed `skybox_swapper` in Mapbase as it doesn't actually work.
80+
* Removed `playtest_manager` entity as it doesn't actually exist in-game.
1681

1782
## Bugfixes
1883
* Fix a compile failure if prop ropes were placed in a group with no connections.
@@ -21,6 +86,15 @@
2186
* Fix overlays not functioning with `material_modify_control` parent searching.
2287
* Make RunScriptCode \` handling occur after everything else.
2388
* #274, #277: Force required keyvalue casing for `light_environment`'s `SunSpreadAngle` and `lua_run`'s `Code` keys.
89+
* Fix hammer_notes text size/color parameters being missing for games before CS:GO.
90+
* Fix an issue with `func_instance_io_proxy` and `comp_` entities.
91+
* Fix mismatched numbering between `logic_random_outputs` KVs and inputs.
92+
* Fix `comp_kv_setter`/`comp_adv_output` position keyvalues not getting transformed by instances in Source 2013.
93+
* Fix `comp_adv_output` string keyvalues getting transformed as entity names.
94+
* Fix not being able to scale props with ctrl+scrollwheel in Hammer++.
95+
* Fix turret FOV preview being incorrect - it's 120 degrees, not 90.
96+
* Fix item entities not rotating their hitboxes in Hammer.
97+
* Fix typos in some movie filenames.
2498

2599

26100
--------------------

CREDITS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
- [ZPS: Supplemental Hammer Icons](http://www.necrotalesgames.com/tools/index.php) (some icons)
44
- [ts2do's HL2 FGDs](http://halflife2.filefront.com/file/HalfLife_2_Upgraded_Base_FGDs;48139) (some more icons)
55
- [Ficool2's FGD pack](https://tf2maps.net/downloads/ficool2s-overhauled-fgd-all-entities-documentated-icons.7209/) (several icons)
6+
- Ashanderite (comp\_multi\_command icon)

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
## Features
1111

12+
* A "postcompiler" application which processes BSPs, allowing most of the new features.
1213
* 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.
13-
* 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.
14+
* 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_propcombine_volume` or `comp_propcombine_set` entities.
1415
* A [unified FGD database][unifiedfgd], allowing keyvalues to be shared among games, and accurately defining when features were added and removed.
1516
* Many more entity options, and an improved editor layout.
1617
* New sprites for almost all entities, both custom made and from a number of [other sources](#development).
@@ -24,29 +25,33 @@ Below are short explanations, see the "Help" display on the entity properties in
2425
| Entity | Description |
2526
|----------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
2627
| `comp_adv_output` | Adds a single output to another entity, while allowing instance renaming or `$fixups` to apply to only certain parts. |
27-
| `comp_flicker` | Fires on/off and skin inputs repeatedly to simulate a flicker-on effect. |
2828
| `comp_case` | Version of `logic_case` which is optimised away by the compiler. |
2929
| `comp_choreo_sceneset` | Chains a set of choreographed scenes together. |
3030
| `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. |
3131
| `comp_entity_mover` | Shift an entity by a given amount. This is useful to place entities into the void, for example. |
32+
| `comp_flicker` | Fires on/off and skin inputs repeatedly to simulate a flicker-on or off effect. |
3233
| `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. |
34+
| `comp_multi_command` | Executes console commands in bulk by generating appropriate I/O inputs. |
3335
| `comp_numeric_transition` | When triggered, animates a keyvalue/input over time with various options. |
3436
| `comp_pack` | Explicitly identify resources to pack into the map, in addition to automatic detection. |
3537
| `comp_pack_rename` | Pack a file into the BSP, under a different name than it starts with. |
3638
| `comp_pack_replace_soundscript` | Replace a soundscript with a different one. |
39+
| `comp_piston_platform` | Generates the appropriate logic to sequence a Portal-style piston platform. |
3740
| `comp_player_input_helper` | Fake entity that allows Hammer to autocomplete inputs fired at the special `!player` name (and other similar ones). |
3841
| `comp_precache_model` | Force a specific model to load, for runtime switching. Duplicates will be removed. |
3942
| `comp_precache_sound` | Force a specific sound to load, for runtime switching. Duplicates will be removed. More keyvalues can be added. |
4043
| `comp_prop_cable`/`comp_prop_rope` | Generates 3D cables using a static prop. |
4144
| `comp_prop_cable_dynamic`/`comp_prop_rope_dynamic` | Modifies the above to generate a dynamic prop, instead. |
45+
| `comp_prop_rope_bunting` | Adds additional props or geometry along the 3D cables. |
4246
| `comp_propcombine_set`/`comp_propcombine_volume` | Specifies a group of props that will be combined together, so they more efficiently render. |
4347
| `comp_relay` | Simplified version of `logic_relay` which is able to be optimised away by the compiler. |
4448
| `comp_scriptvar_setter` | Assigns data or a group of data to a variable in an entity's VScript scope on spawn. |
4549
| `comp_sequential_call` | Finds a sequence of entities (by distance or numeric suffix), then fires inputs delayed in order. |
4650
| `comp_vactube_end` | Marks the end point of a vactube. Objects reaching here will be cleaned up. |
4751
| `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. |
48-
| `comp_vactube_spline` | Generates a dynamic vactube model following a set of points. |
4952
| `comp_vactube_object` | Registers objects that can appear in the tubing. |
53+
| `comp_vactube_sensor` | Triggers outputs when a vactube object passes close by. |
54+
| `comp_vactube_spline` | Generates a dynamic vactube model following a set of points. |
5055
| `comp_vactube_start` | Marks the start point of a vactube. This is where they spawn. |
5156

5257

@@ -55,9 +60,7 @@ Below are short explanations, see the "Help" display on the entity properties in
5560
* Follow [this guide][installationwiki].
5661
* If using BEEMOD2.4, change Hammer -> Options -> Build Programs to use `vrad_original.exe`.
5762

58-
59-
60-
## Development
63+
## Credits
6164

6265
* Mapbase's FGDs have been imported as a submodule.
6366
* Some entity sprites are taken from:
@@ -66,6 +69,43 @@ Below are short explanations, see the "Help" display on the entity properties in
6669
* [ts2do's HL FGDs][ts2do]
6770
* Parts of [Allison's Portal 1 FGD edits][p1fgd] have been integrated into the fgds.
6871

72+
## Development
73+
74+
### Installing dependencies
75+
The code requires Python 3.13, and is mainly written on Windows (since that's where Hammer works).
76+
But it should work fine on Linux. To get dependencies:
77+
78+
1. You'll likely want a virtual environment to keep the packages isolated - see Python's `venv` module.
79+
Running `python -m venv some_folder/` will create one, then you can run the
80+
`activate` script inside there to enable the environment.
81+
2. Run `python -m pip install -r requirements.txt` to install neceessary modules.
82+
3. Optionally `python -m pip install -r test-requirements.txt` to run some test code.
83+
84+
### Building FGDs
85+
FGDs are stored as individual files, in a [unified][unifiedfgd] format tagged with games. This
86+
allows appropriate FGDs to be assembled for any Source game. To build an FGD for HL2 (for example):
87+
88+
```shell
89+
cd src
90+
python hammeraddons/unify_fgd.py export hl2 srctools -o "build/hl2.fgd"
91+
```
92+
93+
Consult the lists at the start of the script for available tags. The first is the game/mod, any
94+
additional ones are "features" like `srctools` for postcompiler features, or `propper` for those ents.
95+
96+
### Building from source
97+
98+
Many features require the postcompiler, which is a Python application. Releases have a compiled
99+
build, but for development purposes it may be useful to build locally or run from source. This also
100+
creates the `gen_choreo` utility.
101+
102+
Cd into `src/`, then run `python -m PyInstaller ../postcompiler.spec` to freeze the application.
103+
Optionally pass `--workpath XXX` and `--distpath XXX` to specify a temp folder and the destination
104+
respectively.
105+
106+
The compiler can also be run from source by executing `hammeraddons/postcompiler.py`,
107+
with `src/` in `PYTHONPATH`.
108+
69109
[releases]: https://github.com/TeamSpen210/HammerAddons/releases
70110
[installationwiki]: https://github.com/TeamSpen210/HammerAddons/wiki/Installation
71111
[unifiedfgd]: https://github.com/TeamSpen210/HammerAddons/wiki/Unified-FGD

0 commit comments

Comments
 (0)