Skip to content

New Decorate and ACS functions

Evghenii Olenciuc edited this page Sep 11, 2024 · 35 revisions

New Flags in Q-Zandronum

  • +INVISIBLE_TO_TARGET - to make actor invisible to it's target
  • +INVISIBLE_TO_MASTER - to make actor invisible to it's master
  • +INVISIBLE_TO_TRACER - to make actor invisible to it's tracer
  • +SXF_TRANSFERSPRITE - to transfer player's sprite to an item he spawned. The flag is used in A_SpawnItemEx
  • +DONTMEDAL - to not grant medals for attacks caused by this weapon or projectile
  • +NOMORPHLIMITATIONS - removes morph limitations, like not playing land sounds, or not switching weapons, or not being affected by speed powerup. It also keeps player pitch and velocity when morphing.

Decorate ported from Zandronum 3.1 or GZDoom

  • A_SetSpeed(float speed) - Changes the calling actor's speed
  • A_SetSize(float radius, float height, bool testpos) - Changes the calling actor's radius and height
  • Added a second parameter to the Player_SetTeam line special to enable/disable the broadcast message. By default, the message is still printed to the console. (Ported from Zandronum 3.1)
  • Backported A_GiveToChildren, A_TakeFromChildren, A_GiveToSiblings and A_TakeFromSiblings from Zandronum 3.1
  • Backported RGF_NOSIGHT and RGF_MISSILES flags for A_RadiusGive from Zandronum 3.1
  • Backported WRF_ALLOWUSER1, WRF_ALLOWUSER2, WRF_ALLOWUSER3, WRF_ALLOWUSER4 flags for A_WeaponReady from GZDoom
  • Backported +FPF_TRANSFERTRANSLATION flag for A_FireProjectile and A_FireCustomMissile from GZDoom
  • Backported +HITOWNER flag for projectiles from GZDoom
  • Backported RTF_THRUSTZ flag for A_RadiusThrust from GZDoom
  • The A_JumpIfHealthLower function now has the pointer parameter like in GZDoom
  • The A_SetScale function now has the pointer and usezero parameters like in GZDoom
  • The A_SetAngle function now has the pointer parameter like in GZDoom
  • The A_SetPitch function now has the pointer parameter like in GZDoom
  • The A_ChangeVelocity function now has the pointer parameter like in GZDoom
  • The A_ScaleVelocity function now has the pointer parameter like in GZDoom
  • The A_Teleport function now has the pointer parameter like in GZDoom

New Decorate in Q-Zandronum

  • A lot of new movement properties and flags, please refer to Movement changes page for details
  • A lot of new weapon properties and flags, please refer to Weapons changes page for details
  • Added a way to reduce latency effect on gameplay, mostly by unlagging projectile based weapons. The default Doom, Heretic, Hexen and Strife games are supported out of the box by simply turning compat_predictfunctions flag ON. It is not recommended to use that flag in mods as it can break the game. The mod developers need to do specific actions to support it. For details go to How to make your mod feel lagless.
  • Added support for 0 items (via -1) for A_JumpIfInventory and A_JumpIfInTargetInventory

ACS ported from Zandronum 3.1 or GZDoom

  • bool SetCurrentGamemode(str gamemode, bool reset) to switch gamemodes during a game
  • str GetCurrentGamemode() to get the gamemode being played
  • void SetGamemodeLimits(int limit, int value) to change gamemode limits
  • bool SetPlayerClass(int player, str class, bool respawn) to allow changing of a player's class
  • bool SetPlayerChasecam(int player, bool enable) to enable or disable the built-in chasecam for the player
  • bool GetPlayerChasecam(int player) to get chasecam type for the player
  • bool SetPlayerScore(int player, int type, int value) to set the player's score. The type can be either frags, points, wins, deaths, kills, or the item and secret counts.
  • int GetPlayerScore(int player, int type) to get the player's score
  • bool ExecuteClientScript(int script, int player, [int arg0, int arg1, int arg2, int arg3]) to execute a CLIENTSIDE script on the server's end, but only for the specified player as opposed to all of them.
  • bool NamedExecuteClientScript(str script, int player, [int arg0, int arg1, int arg2, int arg3]) works the same as ExecuteClientScript, but used specifically for named scripts.
  • bool SendNetworkString(int script, str message, [int client]) to send strings from the server to the client(s), and vice versa. If client is -1 or unspecified, the string is sent to all clients. Otherwise, using a valid player number sends the string only to that player.
  • bool NamedSendNetworkString(str script, str message, [int client]) works the same as SendNetworkString, but used specifically for named scripts.
  • Backported local argument for ACS PlaySound() from GZDoom

NOTE: If using SendNetworkString and NamedSendNetworkString to send strings from the client to the server, just like with RequestScriptPuke and NamedRequestScriptPuke, there is no guarantee that the server will receive the string from the client. If the packet containing the string is lost, the server will not receive it at all. Modders should anticipate the possibility that a string might not get sent properly to the server, and if necessary, try to rectify the problem (e.g. have the server execute a CLIENTSIDE script telling the client to resend the string if it expects to receive it, but doesn't).

New ACS in Q-Zandronum

  • Using GetPlayerInput() & BT_SPEED now always returns true when the player is running and false when the player is walking, no matter whether he has cl_run ON or OFF and whether he presses the run button or not.
  • bool InDemoMode() - to know if a demo is being played
  • void SetPlayerSkin(int playerNum, str skinName[, bool overrideWeaponSkin]) - to change player skin
  • CheckSolidFooting(int tid, int threshold) - tells if an actor is on ground, on another actor or in the air. The return values can be either 0 aka CSF_INAIR, 1 aka CSF_SOLIDGROUND or 2 aka CSF_SOLIDACTORS.
  • GetNetworkState() - tells whether the script runs in a single player game, a single player botmatch, a multi player client or a multi player server. Possible returns are NETSTATE_SINGLE, NETSTATE_SINGLE_MULTIPLAYER, NETSTATE_CLIENT, NETSTATE_SERVER respectively.
  • SetPlayerWeaponZoomFactor(int tid, float zoom [, int flags]) - does the same as Decorate A_ZoomFactor but in ACS.
  • Added APROP_Translation for SetActorProperty() and GetActorProperty().
  • Added VelIntercept(int tid, int pointer, int speed), which lets you aim actor at another actor based on his speed and your projectile speed.