- For Tutorials specifically
- void Dialogue_AutoDismiss(void)
- Dismisses the current dialogue (including from other threads).
- str CheckTutorialChallenge(void)
- Returns special values depending on state relevant to the Tutorial Challenge.
- Returns a blank string in netgames, or if none of the following are true.
- Returns "Active" if the skip is in progress.
- Returns "Failed" if the skip was just failed.
- Returns "Locked" if not available with this gamedata.
- Other tiny check functions
- bool PositionStart(void)
- Returns true if leveltime < starttime.
- bool FreePlay(void)
- Returns true if in Free Play.
If some dialogue needs to be never-missable, that's the mapper's responsibility - but now they won't get randomly interleaved if multiple are activated just by regular free driving, which was the worst kind of default
A first pass in attempts to fix crashes when ACS causes map changes.
Frustratingly still got a crash, but I think this is definitely the right foundation to work with.
Returns bot status of activating player
ZDoom had a bot status function that could be mimiced... but it used a passed player number, when all we need to check for is the activator.
To this end, has a different name (the ZDoom version was "PlayerIsBot")
- If netgame or no Spray Can has been grabbed on this map, return 0
- If all Spray Cans have been grabbed in other maps, return "_Completed"
- Otherwise, return the name for the Spray Can color attached to this map
SRB2 uses a LOT of mapthing args compared to Hexen (which has none) and ZDoom (which only has them on objects that will never ever activate scripts). So we really badly needed to separate the two if we want attaching scripts to things to be useful.
- ThingCount has an extra argument for sector tag.
- CountEnemies and CountPushables have an extra argument for thing tag.
- Sector tag 0 for CountEnemies and CountPushables now redirects to activator sector.
An immediate level change on command, to the specified level (via string).
Utilises the existing nextmapoverride and skipstats system, but with skipstats assumed to be the default.
Map things are writeable in Lua, which I am pretty certain is a mistake because mapthings are not sent over the network at all. I considered making them net-synced (it would be relatively easy), but it also aligns with another, more "philosophical" issue: Doom generally copies over properties from mapthing_t into mobj_t, and then only refers to it again when needing to respawn an object -- mapthing_t is not really intended to be referred to very often at runtime. At best it's slightly annoying since some objects rely on a spawnpoint for behavior changes, at worst it may make ACS more confusing in the future since Thing and Mobj tags are mixed together or less useful since they wouldn't be able to modify behaviors of objects that are based on args.
So I decided to solve these two issues at the same time; just treat mapthing_t as something to copy values from, like OG Doom does it. This basically just means that special and args are also part of the mobj now instead of the mapthing, which should fill any desire to edit this stuff from Lua, and reduces the number of instances where objects need to check for their spawnpoint to function properly.
Lines, sides, sectors, and things now all support the "Custom" tab properly. Label a property as `user_[whatever you want]` in this tab, and it will be added to the structure. ACS will then be able to retrieve it using the `Get[x]UserProperty()` function.
stringarg[0] and stringarg[1] are now are used as doubles of arg[0] and arg[1]. Specials that use both string args and regular args need to shift their args up to accomedate. This makes the behavior align more closely with the other Doom ports and removes a dumb manual string arg amount thing in callSpecImpl.
I only adjusted the specials that can be called from ACS. I did not mess with level load specials or thing types, since it's not as important. It would be nice to clean them up before release for consistency, though.
SetLineRenderStyle(int tag, int blend, int alpha)
Changes the blend mode and transparency of a linedef. Requires new compiler config for the blend mode constants.