DayZ Standalone - New Scripting Commands

Posts 1–15 of 23 · Page 1 of 2
DayZ Standalone - New Scripting Commands

Okay so I was looking at the latest patch for DayZ standalone and wanted to make some new scripts. I spent a lot of time digging through the games memory and testing to see what worked and what didn't.

Note: These are notes taken from the games memory.
Some commands may not work.
Some commands may only work on the server
Some commands do not have their parameters displayed

I will work on these commands for the next day or so and will update as needed. (If a minion could update this thread with my changes after this post is locked that would be great )

Code:
//DayZ Scripting Engine Notes
//Note: Some Scripts May Or May Not Work
//Note: Some Scripts May Work on the Server Only!

playerTarget ID //On server machine, find the object pointed to by a player (Seems to only return OBJNULL)
brakelegs OBJECT //Damages legs so that it is no able to stand (Seems to not work!)
isInThrowProcess player //Return true if the player is in process of throwing item (Working but not sure any uses!)
jLoad //Loads the file .class from the scripts locations and return a handler used to call its methods.
jExecFSM //Creates a JVM object representing a FSM and register it for execution.
sendAUMessage [[dpnid1, dpnid2], "ConnectTo: 192.168.1.66"] //Send the command to the list of clients or some count of clients.
playerAction //Control animation of the local player, similar to what playAction does on the server.
enableSimulWeather BOOLEAN;//Enables/Disables simul weather
setSimulWeatherRenderMode INT;//Sets rendering mode of simul weather (0=primitiveUP, 1=vertex buffer, 2=vertex buffer async
simulInClouds POS; //Returns if given position is in clouds.
simulCloudDensity POS;//Returns density of clouds at given position.
simulCloudOcclusion [position1, position2] //Returns clouds occlusion between two given points (0 = no clouds, 1 = full clouds).
SimulSetCloudWidth
SimulSetCloudLength
SimulSetCloudHeight
SimulSetHumidity
SimulSetCentreX
SimulSetCentreY
SimulSetCloudBaseZ
SimulSetGridLength
SimulSetGridWidth
SimulSetGridHeight
SimulSetRandomSeed
SimulSetNoiseResolution
SimulSetNoiseOctaves
SimulSetNoisePersistence
SimulSetNoisePeriod
SimulSetOpticalDensity
SimulSetFractalAmplitude
SimulSetFractalWavelength
SimulSetAlphaSharpness
SimulSetExtinction
SimulSetLightResponse
SimulSetAmbientLightResponse
SimulSetSecondaryLightResponse
SimulSetSelfShadowScale
SimulSetLightDetail
SimulSetMieAsymmetry
SimulSetMinimumLightElevationDegrees
SimulSetDiffusivity
SimulSetAtmosphereThickness
SimulSetHaze
SimulSetHazeScaleHeightKm
SimulSetHazeBaseHeightKm
SimulSetMieEccentricity
SimulSetOvercast
SimulSetOvercastBaseKm
SimulSetOvercastRangeKm
SimulSetHelperNearCloudFade
SimulSetWrap
SimulSetThinLayer
SimulSetHelperGrid
SimulSetHelperDetail
SimulSetFog
players //List of all players on the server.
exitGame // Exit Game
diag_fps //Returns average framerate over last 16 frames.
cursorDirection //Direction of a player's cursor. [x,y,z]
hasPower //Returns true when power is available for the item
isOn //Returns true when inventory item is switched on.
displayName player //Returns the user friendly name of the object's type. (not the same as name player)
lineHit [begPos, endPos, geometryType (default FIRE), withObj (default objNull), ignoreObj (default objNull)[, radius] ] //Returns object, selection and animated position of a first hit of line.
itemsInInventory player //Returns the list of items in the inventory.
spawnTest //Spawn all available objects at define position. Pos may be using format [x,y,z, ["type",...], limit] or [object, limit, radius].
spawnLoot //^^^
spawnProxies //^^^
selectPlayer OBJECT //Seems to still be in the game :D 
pullOutProjectiles player//Pulls out all the arrow-type projectiles stuck in the body
setShadowDistance 1000 //	Sets the shadows rendering distance.
getShadowDistance //Get the shadows rendering distance
setObjectViewDistance//Sets the rendering distance of objects
powerOn//Switch inventory item On/Off. One cannot powerOn an item with no power supplies left.
setObjectMaterial [index, name]
synchronizeVariable[name, importance]//Subscribe variable for synchronization.
moveToDirect//Low level command to person to move directly (no pathplanning) to  given position. Position is expected to be in ATL format
_person moveToHands _item //Take given item to hands.
item = player itemInSlot "Headgear" //Return an item in person's slot.
weapon createWeaponAttachment magazineName//Create an item attached to weapon.
player takeInHands item//Move an item directly into the persons hand slot
vehicle moveToCargo item//Move an item to the cargo space of the entity
player moveToInventory item//Move an item to the person's inventory.
vehicle createInCargo "pipeBomb"//Create an item in the cargo space of the entity
player createInInventory "pipeBomb"//Create an item in person's inventory
spawnForPlayer//Execute given code on a client
spawnForClient// ^^^
itemInHands player// returns object of the item in the players hands
 _item addQuantity 4//Change quantity by given value in the variable space of given obj
 setQuantity//Set quantity to given value in the variable space of given object
 "NAME" spawnProxyVehicle [P,O,S] //Creates an vehicle of the given type and then process it through typical proxy spawn in order to create randomized loot.
 playAction ['ACTION',{code after completed}]
 requestDamage//Request server to damage the object. Damage is [owner,position,ammo,component]

These are not all of the commands, just the new commands that I noticed while taking a quick glance at the games memory.
Commands From Arma 2 and Arma 3 are also in the game (A3 Wiki, A2 Wiki)

Got any idea what the new World Base address is for the .49 experimental?
Good stuff, thankyou Lystic
Good work! I've been noticing new commands here and there, but never had time to properly test them. This would be great if this list eventually grows into full list of Dayz SA commands, with all the commands it takes from other games as well (Arma 2, Arma 3, Take on helicopters), with syntax, locality parameters and examples too.

My knowledge is a bit outdated, I haven't tried anything past 0.46, but I don't think It has changed that much, so I'll contribute a little bit:

Some commands you've missed:

1)
Code:
itemInHands _unit; 
hint str itemInHands player; // Example, displays name of the item you're holding as hint
Returns the class name of the item a player is holding.

2)
Code:
statusChat ["Text", "Colour"];
Text - string.
Colour - colour name. For some reason they didn't give colours normal names like green or red, gotta search for them. colorFriendly is green if I'm correct. There is White, Green, Red and Yellow as far as I know
statusChat ["testing 1 2 3",""]; // Example, displays white text
Basicly a nice alternative to systemchat, that can have different colours.

3)
Code:
_array spawnForClient code;
_array - id and some other stuff.
code - your function or code.
Spawns function or code for client. This appears to work like spawnForPlayer, except this command seems to be used before player has spawned. I wish I could use them, they would simplify the process of executing commands on other players. Anyway as of now both spawnForClient and spawnForPlayer won't work because they require remote execution.

There's more, but I can't remember right now.

Regarding some of them that you've posted:

Code:
selectPlayer OBJECT
Doesn't seem to work, seems like it has become server command.

Code:
player createInInventory "item"
Same here, seems to be server command as well. CreateVehicle was made one just like that some time ago.

Code:
sendAUMessage [[dpnid1, dpnid2], "ConnectTo: 192.168.1.66"] //Send the command to the list of clients or some count of clients.
Since you've mentioned sending commands to clients, is that a some sort of remote execution? What's dpnid1 and dpnid2?

Code:
jLoad //Loads the file .class from the scripts locations and return a handler used to call its methods.
What's class file? Never heard of them. Do you mean classes from resource cpps or bins?

Code:
jExecFSM //Creates a JVM object representing a FSM and register it for execution.
I'm not familiar with FSM, I've read that it's used for AI, is there any kind of benefit that can be taken from that?
Quote Originally Posted by d1spenser View Post
Good work! I've been noticing new commands here and there, but never had time to properly test them. This would be great if this list eventually grows into full list of Dayz SA commands, with all the commands it takes from other games as well (Arma 2, Arma 3, Take on helicopters), with syntax, locality parameters and examples too.

My knowledge is a bit outdated, I haven't tried anything past 0.46, but I don't think It has changed that much, so I'll contribute a little bit:

Some commands you've missed:

1)
Code:
itemInHands _unit; 
hint str itemInHands player; // Example, displays name of the item you're holding as hint
Returns the class name of the item a player is holding.

2)
Code:
statusChat ["Text", "Colour"];
Text - string.
Colour - colour name. For some reason they didn't give colours normal names like green or red, gotta search for them. colorFriendly is green if I'm correct. There is White, Green, Red and Yellow as far as I know
statusChat ["testing 1 2 3",""]; // Example, displays white text
Basicly a nice alternative to systemchat, that can have different colours.

3)
Code:
_array spawnForClient code;
_array - id and some other stuff.
code - your function or code.
Spawns function or code for client. This appears to work like spawnForPlayer, except this command seems to be used before player has spawned. I wish I could use them, they would simplify the process of executing commands on other players. Anyway as of now both spawnForClient and spawnForPlayer won't work because they require remote execution.

There's more, but I can't remember right now.

Regarding some of them that you've posted:

Code:
selectPlayer OBJECT
Doesn't seem to work, seems like it has become server command.

Code:
player createInInventory "item"
Same here, seems to be server command as well. CreateVehicle was made one just like that some time ago.

Code:
sendAUMessage [[dpnid1, dpnid2], "ConnectTo: 192.168.1.66"] //Send the command to the list of clients or some count of clients.
Since you've mentioned sending commands to clients, is that a some sort of remote execution? What's dpnid1 and dpnid2?

Code:
jLoad //Loads the file .class from the scripts locations and return a handler used to call its methods.
What's class file? Never heard of them. Do you mean classes from resource cpps or bins?

Code:
jExecFSM //Creates a JVM object representing a FSM and register it for execution.
I'm not familiar with FSM, I've read that it's used for AI, is there any kind of benefit that can be taken from that?

Thats great information that I missed.

jLoad and jExecFMS is for JVM objects. It typically is only used by the engine. They used Java .Class objects
sendAUMessage is not covered on the BI wiki very well. I beleive dpnid would be the clients ID but I am unsure.
Nice! :P I reckon there is more than that though...that is allot but theyre must be more
Quote Originally Posted by TheJamesp55 View Post
Nice! :P I reckon there is more than that though...that is allot but theyre must be more
There is only a few more. I Mean these are only new ones, there are others from arma 2 and arma 3
Lystic, that is some great work. This will be put to good use. Good Work
how to spawn helmets/hats?
Quote Originally Posted by Jme View Post
how to spawn helmets/hats?
LOL, "spawn". learn standalone again m8. You can't spawn items.

Now if you want hats just use HatBase as the item type you are scanning for
Quote Originally Posted by Lystic View Post
LOL, "spawn". learn standalone again m8. You can't spawn items.

Now if you want hats just use HatBase as the item type you are scanning for
Thanks for these. Useful for beginners!
Quote Originally Posted by janjaaps View Post
Hmm it works for me
What exactly "works for you" ?
Posts 1–15 of 23 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us