Skip to content

Improved custom model support on most NPCs#20

Merged
Blixibon merged 1 commit into
map-labs-source:masterfrom
MaestroFenix:master
Jul 29, 2025
Merged

Improved custom model support on most NPCs#20
Blixibon merged 1 commit into
map-labs-source:masterfrom
MaestroFenix:master

Conversation

@MaestroFenix
Copy link
Copy Markdown

This PR expands custom model capacities on most HL2 ( and Map Labs ) NPCs, by adding support for native custom model support.
Allowing to define custom models before the NPC spawns, evades issues found later when applied post-spawn ( ranging from issues with phymodels or AI schedules not correctly running, to even some hitboxes not updating or even mod crashes ), especially after save-reloading a game.

Some NPCs like the Rollermine, the Antlion Grub or the Crow haven't been updated yet, as they require extra parameters to define the additional models they use ( like a squashed or extended variant ), and kinda would go further than what this commit is aiming to.

Note that this wouldn't solve the issue where a model of a substantial different size is applied to a NPC with a hull that differs in size, leading to attacks "going through" most of the model.
Cvoxalury brought my attention to the entity generic_actor, which possess options to select different hull sizes without having to hardcoding them on the NPC. Such an option would solve this issue and add extra customization, but it needs to be experimented with first.

I have included on the following link a test map ( both VMF and BSP ), showcasing those, as well as updated FGDs to address the change.
These FGDs also solves a minor bug related with the npc_fisherman using the Barney model in Hammer, as well as removing "default model paths" on the custom model fields ( Not only it's redundant as the code will load the default models if no custom model path is passed, it will also solve potential future issues on mods, where they might change the path of a model, but the map would still use the old one ).

Ignoring the Map Labs NPCs, this PR could be rolled into MapBase as well.


Does this PR close any issues?

No.

PR Checklist

  • My PR follows all guidelines in the CONTRIBUTING.md file
  • My PR targets a develop branch OR targets another branch with a specific goal in mind

[Modified] Improved custom model support on most NPCs
@Blixibon Blixibon merged commit 3a9a4b8 into map-labs-source:master Jul 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants