<aside> 💾 This update will NOT break saves from previous versions of Mapbase.

</aside>

<aside> 📁 For programmers: This update will NOT include VPC changes.

</aside>




📃 Fully functional VScript NetProps

https://github.com/mapbase-source/source-sdk-2013/pull/260

This is a major new VScript feature (technically a rewrite of an existing feature) called NetProps, contributed by samisalreadytaken.

This might seem a bit complicated if you’re not already familiar with what entities are made of, but if using an entity’s regular VScript functions is like having a conversation with an entity, then using NetProps is like injecting an entity with truth serum. NetProps exposes what entities are made of to VScript in a way that was previously not possible.

NetProps was originally a singleton in Left 4 Dead 2 which allowed an entity’s networked variables (e.g. m_iHealth) to be accessed by VScript. Mapbase had its own version of it, but it had several issues which severely limited its uses.

Sam’s rewritten version of NetProps greatly expands its capabilities. In addition to network tables, this version can also access data and prediction descriptions, nested data tables, and many additional data types.

Examples

<aside> ❕

Note that the following examples only demonstrate printing variables to the console. You can also modify them with the equivalent Set functions, but this is not shown.

</aside>

Accessing data descriptions

Accessing network tables and prediction descriptions

Accessing nested data tables


While there are exceptions, it wouldn’t be an exaggeration to say this version of NetProps will give VScript access to nearly every piece of data an entity contains, and a near-universal ability to manipulate entities in Source.