Skip to Content
Test

Connector simulator

What the internal DROPSZ simulator checks, and the list of what your mod should test, using the dashboard test order.

DROPSZ uses an internal connector simulator: a fake connector that speaks the protocol the way a real mod should, and validates every request and response against the official schemas. The team uses it to prove that the backend accepts what it should accept and refuses what it should refuse.

The simulator is an internal tool

The simulator is part of the DROPSZ backend code and runs against a local backend. It is not distributed to the public, so you do not need it. This page shows what it covers, so you can use it as a checklist for your mod.

To test your mod, use the test order from the dashboard, with the server in sandbox mode, and the protocol examples, which have valid and invalid requests and responses.

What it guarantees on every call

  • Format. Every request and every response goes through the protocol schemas. A deviation becomes an error with the schema and the field.
  • Key. It checks the format of the dzck_ key before calling the API and splits the key into credentialId and credentialSecret.
  • Transport. POST with JSON only, credential in the body and never in the URL, a new nonce on every request (including on retry), and sentAt corrected by serverTime.
  • Transport failure. A status other than 200 becomes a retry with a growing wait, never a refusal of an order.
  • Single execution. Each orderId runs at most once: on redelivery, it resends the last ACK and does not run again.
  • Disk. It stores orders and pending ACKs, as the protocol requires.
  • Local validation. Before running, it checks mode, deadline, action, parameters, limits, and target.

What your mod must prove

Each line below is a scenario that the simulator runs. Reproduce the equivalent in your mod.

Order scenarios

ScenarioWhat happensWhat your mod must do
Happy pathThe order arrives and ends completed.Run it and confirm with an ACK.
FailureThe run fails.End failed with the reason EXECUTION_FAILED.
Local refusalThe action is turned off locally.End rejected with the reason ACTION_DISABLED_LOCALLY.
Lost ACKThe ACK does not reach the backend.Save the ACK to disk. On redelivery, resend the ACK and do not run again.
Offline targetThe player disappears from the heartbeat for a few polls and comes back.Do not lose the order.
Local pauseThe heartbeat goes out with localPause.active.Report the pause. The backend applies the emergency pause.

See the states and idempotency in Orders: states, redelivery and idempotency and the pause in Modes and pause.

Attacks

In these scenarios the simulator tries to break the backend. The proof is the backend refusing. They show how the connector must react to each refusal.

AttackWhat is expected
Repeated nonceThe backend refuses (REPLAY_DETECTED). The connector uses a new nonce on every request.
Clock outside the windowThe backend refuses (CLOCK_SKEW) and returns serverTime. The connector corrects the clock and retries. See Clock.
Invalid credentialCREDENTIAL_INVALID.
Revoked keyCREDENTIAL_REVOKED.
Old and new key during rotationBoth open a session on the same server, with the same lastSeq.
Server outside the applicationSERVER_NOT_IN_APPLICATION.
Invalid sessionSESSION_INVALID (or SESSION_EXPIRED, if the session expired). The connector opens a new session.
Unknown orderThe ACK does not change the order. In the response ackResults, the item comes with result: "rejected" and code: "ORDER_UNKNOWN", without currentStatus.
Invalid transitionIn ackResults, result: "rejected" and code: "INVALID_TRANSITION", with the order's currentStatus.
Order already finalIn ackResults, result: "rejected" and code: "ORDER_ALREADY_FINAL", with the order's currentStatus.
Query string in the URLThe backend refuses (MALFORMED_REQUEST).

The list of codes and what each one asks of the connector is in Reason codes.

A plan for your mod

  1. Open the session with the application's dzck_live_ key, with the server in sandbox mode, and confirm that the dashboard shows Connected.
  2. Send a test order and check that it ends completed.
  3. Cause a failure (a parameter the action does not accept, a turned-off action) and check the failed or rejected with the right reason.
  4. Take the server down in the middle of an order and check that, when it comes back, the mod does not run again the repeated order.
  5. Rotate the key and check that the mod keeps working with the new key, without losing orders.
  6. Revoke the key and check that the mod stops and tells the local admin. Then generate another one and paste it into the mod.

On this page