GamesAnnouncement games.announcement@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
games
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/games/announcement.v1.json

games.announcement@1: what a mod announces through games.world.announce on OpenVibe.Games. Not an HTTP route: the mod runtime binding ModApi.announce(text) (apps/server/src/mods/runtime.ts), driven by the announcements section of the mod's games-content@1 pack (validated strictly: text 1-200 characters, repeated every everySeconds, 60 to 86400). The text is whitespace-collapsed and cut to 200 characters; an empty one is dropped.

Fields

FieldTypeRequiredDescriptionConstraints
textstringyes
  • minLength 1
  • maxLength 200
everySecondsintegeryes
  • minimum 60
  • maximum 86400

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: harbor
{
  "text": "The harbor lights come on at dusk.",
  "everySeconds": 900
}
Rejected: too-often
{
  "text": "spam",
  "everySeconds": 5
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('games.announcement@1', value);   // { valid, errors: [{ path, message }] }