A base mod for Source 2013 which expands and improves the toolset available to modders, augmenting other maps and mods for development purposes. It contains new logic entities, new I/O and keyvalues, a custom implementation of VScript, custom shaders, countless fixes, and enhanced FGDs all in one single package. Mappers would create their maps based off of this mod and larger mods with their own unique changes would draw from Mapbase's code and assets.

Report RSS Mapbase v6.0 released

Mapbase's v6.0 update has been released. This update includes several major changes which would be expected from a full-version update like this, including console groups, particle rain, and a myriad of new VScript features.

Posted by on

Mapbase Version 6.0


Mapbase v6.0 Release Build

Mapbase Release Build


Changelist:

Game:

- Fixed path_track paths saving as pointers instead of handles (reported by Cvoxulary)
- Fixed player animations not falling to base class correctly
- Fixed logic_externaldata creating garbage in trailing spaces (reported by Shalashaska)
- Added "SetHandModelSkin" input
- Added unique colors for various types of console message, adjustable via convars (prompted by samisalreadytaken)
- Added the ability to use map-specific weapon scripts
- Added a way to display (placeholder) text entirely from Faceposer scenes
- Added "autobreak" keyvalue to game_text, which automatically breaks long text into different lines
- Added LightToggle input to point_spotlight (suggested by Kralich)
- Added Enable/DisableSprites on npc_manhack (suggested by Gameboy555)
- Added ai_goal_police behavior from metrocops to Combine soldiers and citizens
- Added func_precipitation particle rain systems from the Alien Swarm SDK (assisted by 95Navigator)
- Added new func_precipitation spawnflags for controlling behavior in particle types
- Added "mapbase_version" cvar which shows the version of Mapbase a mod might be running on (suggested by Iridium77)
- Fixed an oversight with NPC crouch activities which was causing npc_metropolice to stop firing in standoffs (reported by iohnnyboy)
- Added toggleable patches to npc_combine AI which make soldiers less likely to stand around without shooting or rush to melee when not needed (contributed by iohnnyboy)
- Added key for custom logo font on env_credits scripts
- Added SetSpeed and SetPushDir inputs for trigger_push
- Added a bunch of I/O/KV to func_fish_pool to allow for more control over the fish (suggested by alex_mmc)
- Added OnLostEnemy/Player support for npc_combine_camera (prompted by Dana Cief)
- Fixed hardware shadow filtering on projected textures (contributed by RoyaleNoir)
- Added enhanced save/restore for the Response System, toggleable via convar
- Added a convar which allows users to disable weapon autoswitching when picking up ammo

Files/Scripts:

- Added particle manifest and assets for particle precipitation

VScript:

- Added functions for game event listening based on documentation from later Source/Source 2 games (contributed by samisalreadytaken)
- Added functions for save/restore tables based on documentation from later Source/Source 2 games (contributed by samisalreadytaken)
- Added functions for file read/write based on documentation from later Source/Source 2 games (contributed by samisalreadytaken)
- Added singleton for user messages based on documentation from later Source/Source 2 games (contributed by samisalreadytaken)
- Added functions for I/O instancing on documentation from later Source/Source 2 games (contributed by samisalreadytaken)
- Fixed EntitiesInBox, etc. not working when entities have identical names (contributed by samisalreadytaken)
- Optimized various VScript code to run faster and have more utility (contributed by samisalreadytaken)
- Split VScript base script into its own file
- Added VScript descriptions for NPC squads and the manager class which handles them
- Moved several classes, functions, etc. to the VScript library itself for future usage in other projects, like VBSP
- Made some VScript documentation more clear due to deprecation of online documentation
- Added VScript "hook" registration, creating a standardized system which shows up in script_help documentation
- Added VScript-driven custom weapons
- Added clientside VScript scopes
- Added a bunch of weapon-related VScript functions
- Split a bunch of cluttered VScript stuff into different files
- Added VScript functions for "following" entities/bonemerging
- Added VScript functions for grenades
- Added a few more VScript trigger functions
- Added OnDeath hook for VScript
- Fixed documentation for aliased functions in VScript

Shaders:

- Fixed $bumpmask not working on SDK_LightmappedGeneric (reported by beefbacon)
- Made vertex blend swapping in Hammer use a constant instead of a combo (makes it easier to compile the shader, especially for $bumpmask's sake)
- Fixed brush phong, etc. causing SDK_WorldVertexTransition to stop working (reported by THS2121966)
- Added limited support for $envmapmask in the bumpmapping shader (prompted by Shift)

Compile Tools:

- Added VScript to VBSP with basic map file interfacing
- Fixed more issues with parallax corrected cubemaps and instances (reported by THS2121966)
- Made instance variable recursion consistent with VMFII (prompted by 1upD)

FGD:

- Modified Template NPC flag description to make it more clear it's for entities like npc_template_maker, not point_template
- Added a frustum to env_zoom which displays the specified FOV
- Added a frustum to point_viewcontrol which displays the specified FOV
- Made "Max distance" keyvalue in light_spot use a proper distance sphere
- Emphasized the existence of matchers on entities like logic_case or logic_compare
- Changed the "Walk Easy" keyvalue on npc_combine_s to be more clear about its function

"Prompted by" means a change was prompted by something someone said or did, but it wasn't directly suggested or reported as a Mapbase change.


Like many full version updates, this update started development as v5.2, but it quickly turned into v6.0 as more features were added, especially after Sam opened another VScript pull request.

Due to IRL circumstances, I haven't responded to many messages and I haven't done much public stuff (e.g. announcements or wiki changes) related to Mapbase these past few months, so I've felt kind of unresponsive to the community lately. I'm hoping to be more active after this update is released and I have plans to make Mapbase's operations a bit more generalized so they don't have to hinge on me so much.


Mapbase v6.0's largest changes involve Mapbase's custom implementation of VScript. This update will add a new weapon which is entirely VScript-driven, a launch parameter in VBSP which runs a VScript VM, several new functions inspired by VScript documentation from later Source/Source 2 games, and an expansion of in-game VScript documentation in Mapbase.

Many of these changes were created or prompted by Sam/samisalreadytaken, who had previously submitted a VScript pull request for Mapbase v5.1. He later submitted another pull request which is now being included in this update. The page for that pull request can be found here. It goes into detail about how to use some of the features he added, many of which are great at taking advantage of the capabilities of Squirrel.

The VScript-driven custom weapon is a bit of an experiment which has never really seen before in VScript. It takes almost every single function normally used to create weapons in the code (primary attack handling, etc.) and connects them to VScript hooks which can be overridden in the script. This means weapons can be created in VScript almost as well as they could be created in the code. The default custom weapon code also starts at a very basic level, so a lot of work needs to be done to make it function as, say, a gun. We are planning on adding templates/base classes in Mapbase's VScript samples to make it easier to use it and understand how it works.

Custom VScript Weapon

This update will also embed the VScript library into VBSP and allow it to run a VScript VM when using the "-scripting" parameter. It will seek out a "<mapname>_vbsp.nut" file in the same directory as the VMF. This is a work-in-progress and is mainly limited to a few base functions and entity lump operations at the moment, but it could be the start of something very complex and flexible in the future, especially if we can allow VScript to read or modify visleaves.

Msg("Helloooo!! VScript calling!\n")

vecTest <- Vector(5,23,41)
Msg("Here's a vector for your troubles: " + vecTest + "\n")

randTool <- "something"
switch (RandomInt(1,3))
{
case 1:
randTool = "carve";
break;
case 2:
randTool = "Hammer";
break;
case 3:
randTool = "Source";
break;
}

Warning("Don't use " + randTool + "\n")

VScript in VBSP


Mapbase v6.0 will introduce "console groups", a feature inspired by later versions of Source/Source 2 which categorizes console messages into specific groups and gives them unique colors in the console.

Console Groups

This has been requested in the past, but I didn't consider it important until Sam made VScript print statements and I/O messages use unique colors in his pull request. I realized it has some serious utility in making it easier to distinguish heavily verbose messages from each other.

Each color can be adjusted with convars which use the "con_group_" prefix. There aren't many groups so far, but a list of them can be printed with the "con_group_list" command. This feature will most likely be expanded in future updates.

Console Group List



Mapbase v6.0 will add heavily requested particle system types for func_precipitation. These were ported from the Alien Swarm SDK with the assistance of 95Navigator. They use the newer particle framework introduced with EP2, so they tend to look better and might run faster than the original 2004-era particle framework used by the regular precipitation types.

Mapbase ports four particle types: Particle Rain, Particle Ash, Particle Rainstorm, and Particle Snow. Aside from Particle Rainstorm, each of these might appear to be intentional counterparts for regular precipitation types, but they all look completely different and were designed for different settings. For example, Ash was created for EP1's ruined City 17 setting, but Particle Ash was created for the burning city in L4D1's Dead Air.

Rain Comparison

Particle Precipitation Types

Unlike regular precipitation, particle types follow the player’s view as they move through or close to the precipitation brush. Rain slowly fades out around the player as they get farther away from the brush. This might make particle rain sound annoying to use since you can't control exactly where it will be cut off, but this is acceptable in later games because mappers could just block precipitation where it's not supposed to appear. However, due to engine limitations, func_precipitation_blocker, the entity which blocks precipitation from particle types, cannot be ported to Mapbase. The fact it cannot be used is a huge problem, as it’s the only thing which would prevent particle precipitation from doing things like falling through buildings and it's hard for mappers to control precipitation without it.

Mapbase has a workaround in the form of two new spawnflags:

  • A flag which clamps precipitation to the brush volume. This makes the precipitation stop following the player when the player goes outside of the trigger, leaving the particles behind within the trigger until the player gets far enough away for them to disappear naturally. This also means players can view the particle system from afar.
  • A flag which suppresses the “outer” particle. This is mainly recommended for when clamping is enabled. The outer particle creates subtle rain particles in a much larger area, which limits the viability of clamping. This flag prevents it from being created.

Together, these spawnflags make particle types act more like the original precipitation types, making them spatially visible when viewed from outside of the brush. This effect is seen in the picture below.

Particle Rain Clamping

This workaround is not perfect; With the particle system being visible from afar, the illusion can be exposed that it’s only raining in a small area. This can be made even more visible without the outer particle. If you want to use particle rain, please remain vigilant of these issues.


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

Post comment Comments
RocketSurgery
RocketSurgery - - 181 comments

very good blixi

Reply Good karma Bad karma+1 vote
Cvoxalury
Cvoxalury - - 1,287 comments

Mapbase is getting too powerful. It can't be contained! Waargh!
Awesome stuff, Volume 6.

Reply Good karma Bad karma+2 votes
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: