Skip to content

Instantly share code, notes, and snippets.

@FreeSlave
Last active December 30, 2023 02:36
Show Gist options
  • Save FreeSlave/42fed9b63c82a43f42158abea0d6ea1a to your computer and use it in GitHub Desktop.
Save FreeSlave/42fed9b63c82a43f42158abea0d6ea1a to your computer and use it in GitHub Desktop.
Sven Co-op lacking features and limitations

These notes were written in the process of porting the Field Intensity campaign to Sven Co-op. The list describes issues I encountered while I was working on the port as well as some other thoughts on improving the game.

  • There's no way to make func_train respect its origin instead of the geometrical center when moving on pack_tracks (I had to manually move the path_tracks to align with the center of the brush model). Look up Origin on paths spawnflag in SoHL.
  • It would be extremely useful to have something like "Fire at the animation start" on scripted_sequences (e.g. scientist playing the retina animation and triggering the retina sequence at the start of the animation).
  • There should be a way to configure whether a button can be pressed through walls or not.
  • It's impossible to configure whether sniper shots ignore the player's armor or not. Should make it a skill cvar or regular cvar.
  • It seems like there's no way to implement a master entity in AngelScript. I tried to make one with FCAR_MASTER ObjectCaps and IsTriggered implemented but it failed to act as a master. Sven Co-op in general needs a better master entity than multisource. Check out env_state from SoHL. It's easier to understand, and it can distinguish between "off" and "on" use types.
  • It's very hard to implement a flying monster that would move on the vertical axis (Z) in AngelScript. It's not possible to override CheckLocalMove, Move and MoveExecture functions. I had to reimplement the whole thinking and path building (BuildPath, FTriangulate) logic in AngelScript to include calls to my own functions when I was porting floaters.
  • Can't override nor access the HearingSensitivity function of monsters in AngelScript.
  • Monsters in Sven Co-op can jump off the ledges. This might break the map if an important monster jumps down and can't get back. It's also not always desirable in general. I had to put additional func_monsterclips to prevent characters from jumping down. This behavior should be controlled by a cvar or world property (like roaming).
  • Monsters in Sven Co-op are prone to run to combat sounds from great distances which basically mean that when fighting starts monsters from nearby rooms run into that. It's different from Half-Life where monsters are not active until the player is close enough. Wait till seen flag is insufficient as it makes monsters ignore players if the player doesn't look at them (basically one can approach going backwards without alerting the monster, abusing the feature). The other workaround is to spawn monsters via monster makers which is just another headache and it has its own nuances. This behavior should be controlled by a cvar or world property (like roaming).
  • There were other minor bugs and oddities. All of them I reported to the bugs channel of the Discord dev server.
  • While Sven Co-op has support for big maps and high numbers of models, the bsp limits like max number of clipnodes or max number of leaves are still the same (at least how I understood it). Some maps I wanted to combine, I couldn't due to the limits, even with optimizations. And others were very hard to combine to fit into limits.
  • The documentation on item_inventory is poor and in some cases plain wrong (e.g. the description of Collection limit parameter) on both sven co-op wiki and svenmanor websites.
  • item_inventory should have 'Pickup sound' parameter. I know it can be simulated via separate ambient_generic, but it just complicates the setup and it can't be made to work the same way as picking up the items in usual way (like sounds of picking up batteries and healthkits).
  • func_button / usable func_door can require an inventory item to operate, but they don't play the Locked sound/Locked sentence when player tries to use them without having the required item.
  • There're some general annoying quirks to monsters' AI. Vortigaunts spinning around, soldiers running aimlessly on the map instead of going to player they're supposed to follow, etc. Basically every time when in Half-Life monsters would stay still, in Sven Co-op they do some batshit. It's probably a result of making monsters "smarter", but in reality it leads to chaos.
  • When an ally monster finishes its scripted_sequence, they often run away too far. I guess it has something to do with their reactions to AI sound. I would suggest clearing these conditions upon entering the scripted state.
  • When a monster finishes its scripted_sequence, there's a delay before they can go to the next scripted_sequence, if the first one targets the second one. Due to this delay the intended events can go unsync. Also monsters tend to run away/spin around during this delay.
  • When the vortigaunt gets resurrected by another vortigaunt, they get only half of their max health. It's probably implemented this way for the balance reasons, but after several resurrections it becomes stupid for vorts to die from any damage. In Field Intensity I also re-implemented this cut feature, and for sake of balance I allow the vort to be resurrected only once, but to the full health. You can adapt this behavior for Sven Co-op, maybe put it under some cvar.
  • There should be cvar to disable the vort revival ability altogether.
  • Scientists often get afraid of something (I guess combat sounds?) and play panic animation instead of following the player. The only way to overcome this is to spam 'Return to me' or 'Move to position' command. I think scientists shouldn't care for combat sounds produced by player. Or it should be configurable.
  • There's an AngelScript function HudCustomSprite to send a HUD sprite to the client. But it seems there's no way to make it so the sprite position on the screen would depend on the world position (WorldToScreen). It would be extremely useful to have, since it would allow to implement mission markers and other cool stuff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment