Skip to content

Attaching Programs to Entities

To attach a program to an entity:

  1. Find Program ID: Get the resource ID of the registered system. The easiest way to find it is to look in the MUD codegenerated system library. For example, this is where you would find the resource ID of the default program.
  2. Be in proximity: Move close to the smart entity with a player that has access to upgrade the smart entity's program. By default the player who placed the smart entity has access to update its program.
  3. Find the smart entity's ID: The easiest way to find it is to right click the smart entity in the client to open its UI, then click on the small square next to the window title. From there you can select the truncated hex after "Entity" (i.e. Entity: 0x0300...0000) and press CTRL+C to copy it. Despite the truncation, it will copy the entire ID. EntityId
  4. Call the world.updateProgram function: You need to call it from the account of the player standing close to the smart entity. The easiest way to do this is to connect the player's account to the MUD World Explorer and call the function from there.
world.updateProgram(
  entityId,    // ID of the smart entity, i.e. chest
  programId,   // MUD system ID of the program
  ""           // optional extra data
);