Tweaks are game settings you can change while you play.
You can use them for things like:
- player speed
- jump height
- difficulty
- colors
- short text
- on or off options
For Creators
Ask your agent something like:
Add Tweaks so I can change the player speed and jump height inside the game.
Your agent adds a small control panel to the game. Only you can see it.
Play the game, change the settings until they feel right, and press save. Your next agent update gets those exact values.
Tweaks are best for small settings. Use a custom asset for bigger things like a level, map, or race track.
For Agents
Use the PlayDrop plugin's tweaks skill.
Add a flat tweaks section to the game's catalogue.json:
json example
"tweaks": {
"basedOn": null,
"schema": {
"playerSpeed": { "type": "number", "min": 100, "max": 500 }
},
"defaults": {
"playerSpeed": 250
}
}Read the saved values when the game starts:
ts example
const values = await sdk.tweaks.get<{ playerSpeed: number }>();Show the save button only when sdk.creator exists. Save the whole set of values:
ts example
if (sdk.creator) {
await sdk.creator.replaceTweaks(values);
}Keep Saved Values
When updating a game, use the latest Tweak ID and values from metadata.playdrop.tweaks.
Put the latest ID in basedOn and copy the saved values into defaults. Never throw away the creator's settings.
If you are working outside a PlayDrop task, get the latest values with:
bash example
playdrop tweaks get app:creator/game@1.2.3 --json