Skip to main content
Version: v3.1.36

ab-1

ab-1 Helper Variables

ovoNest

References the ovo bot, which contains various tags related to AB eggs.

ab1AUXLoader

References the auxLoader bot, which handles AUX file implementation and file upload interfaces.

ab1InstMemory

References the instMemory bot, which holds on to inst specific data for ab-1 (i.e. ab-1 sleep state, bot snap state, and grid snap state).

ab1LongTermMemory

References the ltm bot, which handles ab-1 record and file uploads.

ab1LongTermMemorySearch

References the searchLTM bot, which handles various aspects of looking up records.

ab1Command

References the command bot, which handles various functions of the ab-1 interface bot.

ab1Publish

References the publish bot, which has several interfaces for initiating uploads via ab-1.

ab1Librarian

References the librarian bot, which handles and manages the asset library interface.

ab-1 Functions

shout("ab1PublishAB", options); || whisper(ab1Publish, "ab1PublishAB", options)

Publishes a file and associates it with the egg addressed to the specified abID. Returns a boolean based on success or failure.

let options: {
/**
* The abID of the egg you would like associated with the app bundle.
*/
ab: string;

/**
* The key used to encrypt/decrypt the file data.
* If omitted, then the file will be unencrypted.
*/
password?: string;

/**
* The bot(s) to publish in the file.
* If omitted, then all non ab-1 bots in the shared space will be used.
*/
target?: Bot[];
};

Examples

Publish an AB via shout
let [myAB] = await Promise.all(shout("ab1PublishAB", {
ab: "myABID"
}));
Publish an encrypted AB via whisper
let myAB = await ab1Publish.ab1PublishAB({
ab: "myABID",
password: "myPassword"
});
Publish a specific bot AB via whisper
let myBot = getBot("myBotTag");

let myAB = await ab1Publish.ab1PublishAB({
ab: "myABID",
target: myBot
});

os.toast(myAB);

shout("ab1AddToFactory", options)

Adds a template bot, while consuming the target bot, to the ab1Factory menu.

let options: {
/**
* The bot to be added as a factory template.
*/
bot : bot;

/**
* The dimension that the target bot should be removed from.
*/
dimension: "string";

/**
* The id that the bot will be listed in the ab1 factory under.
*/
factoryID: "string";
};

Examples

Adding a bot to the factory
let myFactoryTemplate = shout("ab1AddToFactory", {
bot: myBot,
dimension: "home",
factoryID: "myTemplate"
});

shout("ab1CreateFromFactory", options)

Adds a bot from a template in the ab1Factory.

let options: {
/**
* Mods to determine a dimension for the bot to manifest.
*/
position : {
/**
* The dimension that the target bot should be added to.
*/
dimension: "string";

/**
* The x position in the above specified dimension.
*/
x: number;

/**
* The y position in the above specified dimension.
*/
y: number;
}
};

Examples

Creating a bot from a factory
let myFactoryTemplate = shout("ab1CreateFromFactory", {
factoryID: "myTemplate",
position: {
dimension: "home",
x: 0,
y: 0
}
});

whisper(ab1Librarian, "ab1CreateLibrary", options);

Adds a library bot with the given Google spreadsheet. It established a link, but must be updated to be fully functional.

let options: {
/**
* The name that you want the library to be assigned to and referenced with.
*/
libraryName : "string";

/**
* URL of a Google spreadsheet.
* Layout of Sheet should be one column of names and a column of desired URL's to be pointed to.
* Columns should have the the top row set as "ID" and "URL" respectively.
*/
libraryURL: URL;
};

Examples

Add a library using a shout
let myNewLibrary = shout("ab1CreateLibrary",{
libraryName: "myLibrary",
libraryURL: URL
});
Add a library using a whisper
let myNewLibrary = whisper(ab1Librarian,"ab1CreateLibrary",{
libraryName: "myLibrary",
libraryURL: URL
});

whisper(ab1Librarian, "ab1UpdateLibrary", "libraryNameString");

Update a library bot via its target sheet link.

Examples

Update a library using a shout
let myNewLibrary = shout("ab1UpdateLibrary", "myLibrary");
Update a library using a whisper
let myNewLibrary = whisper(ab1Librarian,"ab1UpdateLibrary", "myLibrary");

Updates any library bots associated with that library. To associate a bot with a library, set the tag ab1Asset to true.

Once a bot is associated with the library system, you may call a specific url by setting the tag formAddress as library colon id (i.e. myLibrary:assetID).

shout("ab1LTMSearch", {abID: abID, key: key, autoHatch: boolean, returnType: data/null});

Allows the user to search for and/or hatch an ab.

let options: {
/**
* The ab that you want loaded.
*/
abID : "string";

/**
* Desired key for optional encryption.
*/
key?: "string";

/**
* If set to true, will automatically hatch the ab into the current experience.
*/
autoHatch?: boolean;

/**
* If set to data, will return the ab as data instead of as an egg or bots.
*/
returnType?: "data";
};

Examples

Bring in an egg using a shout
let getEgg = shout("ab1LTMSearch",{
abID: "myABID"
});
Hatch an encrypted egg automatically via whisper
let hatchEgg = whisper(ab1LongTermMemorySearch, "ab1LTMSearch",{
abID: "myABID",
password: "myPassword",
autoHatch: true
});
Return data via a whisper
let abData = whisper(ab1LongTermMemorySearch, "ab1LTMSearch",{
abID: "myABID",
returnType: "data"
});

console.log(abData);

ab-1 Specific Tags

@onEggHatch

A whisper that is sent to any bots that are hatched (whether manually or automatically) from an ab.

Arguments
let that = {
ab: "ab name",
version: "ab version number"
};

@onAbAdded

A shout that occurs anytime an ab is added to the inst.

Arguments
let that = {
ab: "ab name",
version: "ab version number"
};

@onABPublished

A shout sent out when an ab is published.

Arguments
let that = {
ab: "string",
fileAddress: "string"
};

ab1Ignore

Tag that when set to 'true' will not be included in a general publish or download of an inst.

ab-1 Environment Tags

ab1BotSnapState

By default, ab-1 sets an os.addDropSnap (face) on any bot that is being dragged.

This can be turned off/on either through the ab-1 self select or by directly manipulating the variable on ab1InstMemory.

Examples

Remove ab-1 bot snap
ab1InstMemory.tags.ab1BotSnapState = false;
Turn ab-1 bot snap on
ab1InstMemory.tags.ab1BotSnapState = "face";

ab1GridSnapState

By default, ab-1 sets an os.addDropSnap (grid) on any bot that is being dragged.

This can be turned off/on either through the ab-1 self select or by directly manipulating the variable on ab1InstMemory.

Examples

Remove ab-1 grid snap
ab1InstMemory.tags.ab1GridSnapState = false;
Turn ab-1 grid snap on
ab1InstMemory.tags.ab1GridSnapState = true;

ab-1 URL Variables

ab / autoLoad / auxCode

When set as a variable in the URL and opening the inst for the first time, this will automatically load the specified ab from records.

key

When set as a variable in the URL, allows ab/autoLoad/auxCode to open an encrypted ab.

abVersion

Can be used to target a specific version of an ab when using ab/autoLoad/auxCode in the URL.