Post news RSS Mapbase v5.0 released

Mapbase's v5.0 update has been released. This update is one of Mapbase's biggest updates yet, adding tons of new features and even partly changing how Mapbase operates.

Posted by on

Mapbase Version 5.0


Mapbase v5.0 Release Build

Mapbase Release Build


Changelist:

Game:

- Added keyvalue to hl2_gamerules which allows respawning in singleplayer
- Added the game instructor system (including env_instructor_hint) from later Valve games using a VDC tutorial which adjusts the version from the Alien Swarm SDK to FPS rules and a Source 2013 environment; Also added new KV and icons for further control from mappers (tutorial suggested by Maestra Fenix)
- Added L4D/TF2 glows + point_glow entity as an all-purpose SDK-based off-shoot of tf_glow
- Fixed weapon pickup sound not playing (reported by Sl0th and later Cvoxulary)
- Fixed env_projectedtextures not updating on save/load
- Added func_fake_worldportal, a spatial point_camera inspired by linked_portal_door based on SDK code alone (WIP, may be changed a lot in future updates)
- Added option for point_camera and func_reflective_glass to use different render targets, therefore allowing multiple cameras and mirrors to be active at the same time
- Added additional RT camera textures to choose from with a default of 3, but also controllable through a -numcameratextures command line param
- Added adjustable convars for main view NearZ and skybox NearZ (suggested by Klems)
- Fixed map-specific localization files, cleaned up map-specific file code
- Added a new block to gameinfo.txt which allows mods to automatically append their own command line parameters
- Fixed math_lightpattern corruption when setting pattern/style while active
- Fixed the "Touch" input crashing when given no entity
- Added a way to add EFlags via keyvalue (suggested by Niker107)
- Fixed ai_script_conditions not working without a NPC actor (reported by MetroHam)
- Fixed point_radiation_source causing huge problems when intensity is 0, even though it was already advised against (reported by beefbacon)
- Relevant to programmers: Added "Mapbase" header to Mapbase-specific code files
- Fixed an issue with updating sky_camera not obtaining area correctly, causing some entities to not draw in the skybox
- Added "CopyFogController" and "CopyFogControllerWithScale" inputs to sky_camera, which copy fog parameters directly from a fog controller
- Added "SetScale" input to sky_camera for live scale changing
- Added convar to control player crouch speed multiplier (suggested by SellFace and ArtyIF)
- For programmers: Added a ton of fixes for people running the Debug configuration of the codebase (partial credit to stepa2)

Files/Scripts:

- Remade Mapbase's README files in both the codebase and the release build to include a list of external content used in Mapbase, answers to more questions about Mapbase's code, and information which reflects recent stance changes.
- Added a bunch of new dev textures featuring softer colors based on the existing color scale texture
- Added game instructor icons from Alien Swarm for the new game instructor + Added new HL2 icons for HL2 mappers (the latter was inspired by icons from alex_mmc)
- Added tool textures to the glass measure textures to avoid confusion (suggested by White_Red_Dragons)
- Added a new "specular" measure texture
- Added various new monitor and mirror VMTs using different render targets + new "worldportal" materials for func_fake_worldportal
- Changed existing dev RT monitor materials to display "_rt_Camera" in order to avoid confusion with the additional RT materials
- Added instructor sound files and soundscripts to mapbase_shared's assets and game_sounds.txt

VScript:

- Added support for pre-defined enums and constants in VScript, starting with various values from the SDK code (damage types, trace masks, etc.)
- Added limited support for Valve's Quaternion class in VScript
- Added base NPC hooks for AI sensing in VScript (allows control over sight and hearing), also exposed CSound for it
- Added various functions and hooks for VPhysics integration in VScript
- Added VScript-based custom suit devices
- Expanded trace info exposed to VScript to allow plane and surface access (suggested by krassell)
- Added ability to insert localization strings through VScript
- Added various misc. VScript functions with various purposes, including reading/writing EFlags, movetypes, collision groups, etc.

FGD:

- Added bit prefixes to view ID nodraw keyvalue
- Added hidden channels to game_text
- Fixed point_camera SetSkyMode input not allowing an integer parameter

Compile Tools:

- Fixed VBSP not being able to correctly parse parallax corrected cubemaps in maps with instances


This update is not the MP port, but it's a huge update which serves as its own unique milestone for Mapbase, adding tons of new features and attempting to solidify a bunch of questions about what's in Mapbase and how Mapbase should be used.

To elaborate, this update marks the point in which we'll start taking Mapbase's external content and the usage of that content more seriously. Mods using Mapbase will now have to follow content usage guidelines, although they aren't much different from what was already advised. We don't want to put too much pressure on users of Mapbase, but we also want to be more fair to those who originally created things which are now used in Mapbase, as Mapbase represents several parts of the community forming a whole in one big, accessible package.

  • Starting with this update, the Mapbase code repository on GitHub and the release build distributed here on ModDB will contain a list of all external content used in Mapbase, including direct contributions.
  • Mapbase will now maintain content usage guidelines on an easily updated wiki page.
  • All of Mapbase's original code files created specifically for Mapbase (e.g. not from Valve or snippets/open-source repos) will contain a new comment header which makes it clear where the code comes from, which is also important for forks.

These changes have been made in response to several recent events and concerns from many different areas, including (but not limited to) certain projects being worried about whether Mapbase contains leaked content, concerns over how external content and contributions are used and credited by mods using Mapbase, and recent events in the Source modding community unrelated to Mapbase.

These changes aim to prevent potential problems in Mapbase's future and make Mapbase a more transparent and reliable project for everyone.

Even though this is a very serious subject and I consider this the most important part of this update, Mapbase v5.0 also adds a lot of exciting new content which will be covered in the rest of this article.


Mapbase v5.0 will add the Game Instructor, a hint/tutorial system from later versions of Source. It's best-known for its usage in Left 4 Dead 2, Portal 2, and Alien Swarm as a tool for telling players how to play the game, especially in cases where they might have a limited attention span.

mapbase demo030016


Mappers can use it through an entity called env_instructor_hint. Mapbase also adds the ability to choose a sound to play when the hint comes up and a specific position to draw the hint from.

This update was originally going to include HL2-themed instructor icons created by alex_mmc, but we decided to keep the vanilla style since it was getting hard to coordinate the creation of the icons with the update and we also wanted mods to start out fresh with the original style in case that's what they want. alex_mmc's HL2 icons are probably going to be released as a separate package in the near-future.

However, among the HL2-themed icon replacements, alex_mmc also made entirely new icons for a HL2 setting, including icons for frag grenades and bugbait. Inspired by this, Mapbase also adds new HL2-based icons using the vanilla icon style mostly using the fonts in HL2's files.


The Game Instructor was brought to Mapbase thanks to a VDC article which was brought to my attention by Maestra Fénix. It was originally written by Kolesias123 and ports the game instructor files from the Alien Swarm SDK to a Source 2013 environment. It also adjusts the instructor to a FPS setting.

Fun fact: The tutorial has technically existed since 2013, but it was only available in Spanish until 2018, when IS NEW Puddy translated the article to English using Google Translate.


Mapbase v5.0 will also add those "glow outlines" often seen in Left 4 Dead 2 and Team Fortress 2. They can be controlled by the mapper via point_glow, an entity inspired by tf_glow based entirely on SDK code.

mapbase demo030018


Like the Game Instructor, the glows themselves were added via a VDC article, although point_glow is a custom entity intended to serve as a general-purpose version of tf_glow, using I/O/KV from its FGD entry in TF2.


This update is going to make huge changes to Mapbase's implementation of VScript. The most major change is that Mapbase v5.0 will add several pre-defined constants and enums which can be used by various functions:

entity.AddSolidFlags(FSOLID_NOT_SOLID)
entity.SetRenderMode(RenderMode.Color)
TraceLineComplex(vecStart, vecEnd, entity, MASK_SOLID, COLLISION_GROUP_NONE)
CreateDamageInfo(self, self, Vector(0, 0, 100000), Vector(0,0,0), 1000, DMG_BURN)
command.SetButtons( command.GetButtons() | IN.ATTACK | IN.ZOOM )
self.CapabilitiesAdd(bits_CAP_MOVE_JUMP)

This sets Mapbase's custom implementation apart from Valve's original VScript, as the Alien Swarm SDK interfaces did not support anything like this.

The new constants and enums will not be documented on Mapbase's GitHub wiki since there's so many of them and we don't have a way of auto-generating wiki article tables right now. However, all new constants and enums can be found through the "script_help" command, which is used in-game to print information about specific VScript functions, classes, etc. to the console.

Mapbase v5.0 also adds a bunch of other new stuff to VScript:

  • This update adds the ability to access and influence entities' VPhysics objects. This allows for extra control over physics in the game.
  • This update adds support for up to 3 custom VScript-controlled suit devices. This can be used to tie functions in maps to the player's aux power. There will be a sample for using this feature in Mapbase's VScript Samples.
  • This update adds new AI sensing hooks which allow for control over what a NPC can see and what a NPC can hear.

This update also adds limited support for Quaternions in VScript which may be expanded in the future.


Mapbase v5.0 is going to make huge view render-related changes, including the ability to have multiple RT cameras active at the same time by selecting which RT texture they use:

mapbase demo030019


RT (Render Target) textures are special textures created in the code and are usually used by the game to render scenes. For example, high-quality water uses two RT textures: "_rt_WaterReflection" for rendering a reflected version of the scene from the surface and "_rt_WaterRefraction" for rendering a refracted and foggy version of the scene below the surface. point_camera previously just used "_rt_Camera", but this update will allow mappers to select any RT they want, including the aforementioned water RTs.

However, while high-quality water is being rendered, those water RTs are occupied and cannot be used by point_camera, so this update will also add 3 new RT camera textures which can be used at any time with no risk. Mods can also change the number of new RT camera textures through another feature mentioned in another section below.

Since the original monitor textures are designed around the original camera texture and not any of the new ones, this update comes with a bunch of new monitor materials which use the new RTs. The monitor textures in the material browser have been changed to reflect which RT texture they render.


The ability to specify which RT texture to use has also been added to func_reflective_glass, an existing entity which re-uses water reflection code to work like a full-on glass mirror. To help with this, a "Don't refract" keyvalue has been added to completely disable refraction rendering, freeing up "_rt_WaterRefraction" for a second mirror. Some new mirror materials have been added to use different RT textures as well.


Mapbase v5.0 also adds func_fake_worldportal, a prototype/work-in-progress entity which acts as a "spatial point_camera", taking advantage of the code used to render RT cameras, reflective glass, and 3D skyboxes to render a target scene as if you're actually there. It was inspired by Portal 2's world portals, but it's made entirely out of SDK view rendering code and doesn't actually offer any Portal-like interaction with the target scene. It just renders it. Think of it as a "linked_portal_window" as opposed to a "linked_portal_door".

mapbase demo030021


It can also render its own fog or render the target scene at a specific scale, similar to a sky_camera.

Its code is probably going to change dramatically in future updates, so be careful using this entity in its current state.


This update will include a way to add command line parameters directly through gameinfo.txt, allowing mods to append them without having to change the code or make users add them to the mod's launch properties.

"GameInfo"
{
game "Mapbase - HL2 Episodic"
title "HALF-LIFE'"
title2 ""

type singleplayer_only

GameData "bin/halflife2.fgd"

// This is only here as an example; Mapbase - Episodic's gameinfo will not include this table by default
CommandLine
{
-numcameratextures "5"
-numshadowtextures "8"
}

These parameters are only appended on Mapbase game system initialization in the server/client, which is after a lot of the engine initialization processes, so it may not be possible to append many of the regular game startup parameters. It also might not be possible to use this to modify convars (e.g. +convar_name value).

This was mainly added to allow mods to change the number of custom RT camera textures and the number of projected texture shadow depth textures allocated for the game to use. (-numcameratextures is "3" by default and -numshadowtextures is "5" by default)


This update was supposed to be released on August 9th, but it was pushed back to day after several times. It took a really long time to release because it was so difficult to coordinate and document all of these major changes in addition to some other stuff in my life happening at the same time.

If you find any issues with this update, please report them here, on the Discord server, or on the repo's "Issues" page.

Comments
Guest
Guest

Coll mod

Reply Good karma Bad karma+2 votes
BigTinz
BigTinz

This is so cool. Thank you!

Reply Good karma Bad karma+3 votes
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

News
Browse
News
New
Post news
Share
Related Mods
Related Games
Half-Life 2
Half-Life 2 First Person Shooter