/tg/ Station 13 - Modules - Types — Var Details - Proc Details

cyborg_character

Dedicated creator state, and the editor window character setup opens. Catalog/preview work is lazy and has no map registrations.

Vars

context_generationInvalidates frontend actions after slot/model/preset replacement.
dirtyWhether accepted edits still require a successful sidecar write.
draftCanonical session-owned store, isolated from presets and the preference cache.
draft_revisionOrdinary edit revision; never used as a replacement-session token.
draft_slotCharacter slot that owns the draft and every pending callback.
draft_timerStoppable two-second autosave callback.
editor_openWhether the editor's window is open
editor_preferencesThe character preferences the editor sets beside its name, which the window gets the values of
editor_valuesThe editor's preference values the window has, from its static data
editor_values_staleWhether or not a preference may have changed since editor_values were read
encoded_partsThe draft's parts and layouts with their save text from its last encode (see cyborg_layout_encode()). Edits copy a part or layout before changing it, so these still match; raw draft updates drop them.
full_messageWhy the draft would pass its character's or the account's limit, so it stays unstaged until edits shrink it.
gallery_departmentThe department the model gallery shows
gallery_openWhether or not the model gallery is open
preview_arousalThe arousal state the preview shows the parts in
preview_directionThe direction the preview faces
preview_layout_sourceWhich layout the preview shows - active, or the chassis's model_default
preview_modelCatalog id of the chassis the preview shows
preview_movingWhether or not the preview shows the chassis moving
preview_pendingMetadata/gallery work must not interrupt placement against unchanged stage pixels.
preview_poseThe pose the preview shows, like idle or rest
preview_resourcesPer-session private resource payload and its pixel-only dependency key.
rendered_previewBounded view fields keep the old pixels and geometry coherent during a refresh.
resource_body_keyThe chassis, direction, pose and movement the current resources show
resource_catalogThe model catalog the current resources were built from
resource_generationGoes up whenever the resources are cleared, so older waits and timers give up
resource_keyEverything the preview resources were built from, or denied or unsupported while we show none
resource_layer_keysOnly the current six images/metadata are retained; shared FIFO eviction is harmless.
resource_part_keysEach part slot's key in the current resources, so an unchanged part keeps its art
resource_refresh_atThe earliest world.time the next resource build may run, a second after the last one
resource_timerOne latest-state refresh, with a deadline that survives close/reopen and slot changes.
resources_pendingWhether or not newer resources are waiting to be built, which the editor shows
save_errorA retryable write or staging failure, kept across UI close/reopen.
save_requestedWhether the account's next queued save should stage the draft first.
selected_partThe part slot the editor's controls are on
staged_revisionRevision already encoded into the account tree; failed retries do not encode it again.
status_messageWhat the editor tells the player about their last edit, like why it was refused

Procs

DestroyCloses the window, then saves and drops the draft
apply_to_humanA spawn first randomizes what the player asked it to, so we read the editor's values again
begin_draft
begin_sessionStarts editing the active layout, as the window opens.
build_resources
clear_preview_resourcesCancel work and release private pixels immediately, without resetting admission time.
close_editorEnds the editing session and asks for its save. Character setup closing calls it too, so it closes the window as well.
commit_draft
discard_draftReleases draft ownership on explicit replacement or teardown, never on write failure.
edit_layoutChecks a layout edit from the window, runs it through cyborg_layout_action() and takes the result as the draft
editor_preference_valuesThe values of the editor's preferences, as character setup sends them. A preference this character can't have is left out.
flush_timerA stale timer cannot write a replaced draft or an older revision.
get_ui_dataCharacter setup refreshes after every change made there, randomizing included, so we read the editor's values again
on_new_characterCalled when the player switches character slots - resets the view, so the window shows the new slot from the start
open_editorCharacter setup's action - opens the editor's window, or brings it to the front.
post_set_preferenceCalled after a preference changes - puts a new part sprite in the draft, updates the borg's permissions and viewers, then refreshes the window
refresh_editor_valuesReads the editor's preference values again if one may have changed. Returns TRUE when the window's copy is out of date
refresh_resources
refresh_resources_timerThe timer owns no layout snapshots: the next UI update reads the latest accepted draft.
request_saveAsks SScyborg_layout_saves to stage the draft and write the account, which happens outside this action or timer.
save_problemWhat the save status shows, null when everything is saved or on its way.
schedule_draft_saveRearm the save for this context without creating a revision for view-only changes.
set_editor_preferenceSets one of the editor's preferences through character setup's own action, so its checks and every middleware's hooks still run.
set_previewChanges what the preview shows - chassis, direction, pose, arousal, gallery and which layout. Returns FALSE for a stale or bad request
sidecar_write_completedA delayed account write can complete after this editor switched slots or closed.
stage_draft
ui_actSends the window's actions to their handlers - preview changes, layout edits and preference changes
ui_closeCalled when the window closes - ends the session and asks for its save
ui_dataBuilds the window's data - the draft as the window needs it, the preview and the save status. Shared gallery work that may sleep goes first
ui_interactOpens the window and starts the session, or updates the open one, bringing it to the front on an explicit open
ui_stateAlways state, as ui_status() does the checking
ui_static_dataStatic data is private to this window; never register sensitive PNGs globally.
ui_statusOnly the player whose preferences these are can use the window
update_draft

Var Details

context_generation

Invalidates frontend actions after slot/model/preset replacement.

dirty

Whether accepted edits still require a successful sidecar write.

draft

Canonical session-owned store, isolated from presets and the preference cache.

draft_revision

Ordinary edit revision; never used as a replacement-session token.

draft_slot

Character slot that owns the draft and every pending callback.

draft_timer

Stoppable two-second autosave callback.

editor_open

Whether the editor's window is open

editor_preferences

The character preferences the editor sets beside its name, which the window gets the values of

editor_values

The editor's preference values the window has, from its static data

editor_values_stale

Whether or not a preference may have changed since editor_values were read

encoded_parts

The draft's parts and layouts with their save text from its last encode (see cyborg_layout_encode()). Edits copy a part or layout before changing it, so these still match; raw draft updates drop them.

full_message

Why the draft would pass its character's or the account's limit, so it stays unstaged until edits shrink it.

gallery_department

The department the model gallery shows

gallery_open

Whether or not the model gallery is open

preview_arousal

The arousal state the preview shows the parts in

preview_direction

The direction the preview faces

preview_layout_source

Which layout the preview shows - active, or the chassis's model_default

preview_model

Catalog id of the chassis the preview shows

preview_moving

Whether or not the preview shows the chassis moving

preview_pending

Metadata/gallery work must not interrupt placement against unchanged stage pixels.

preview_pose

The pose the preview shows, like idle or rest

preview_resources

Per-session private resource payload and its pixel-only dependency key.

rendered_preview

Bounded view fields keep the old pixels and geometry coherent during a refresh.

resource_body_key

The chassis, direction, pose and movement the current resources show

resource_catalog

The model catalog the current resources were built from

resource_generation

Goes up whenever the resources are cleared, so older waits and timers give up

resource_key

Everything the preview resources were built from, or denied or unsupported while we show none

resource_layer_keys

Only the current six images/metadata are retained; shared FIFO eviction is harmless.

resource_part_keys

Each part slot's key in the current resources, so an unchanged part keeps its art

resource_refresh_at

The earliest world.time the next resource build may run, a second after the last one

resource_timer

One latest-state refresh, with a deadline that survives close/reopen and slot changes.

resources_pending

Whether or not newer resources are waiting to be built, which the editor shows

save_error

A retryable write or staging failure, kept across UI close/reopen.

save_requested

Whether the account's next queued save should stage the draft first.

selected_part

The part slot the editor's controls are on

staged_revision

Revision already encoded into the account tree; failed retries do not encode it again.

status_message

What the editor tells the player about their last edit, like why it was refused

Proc Details

Destroy

Closes the window, then saves and drops the draft

apply_to_human

A spawn first randomizes what the player asked it to, so we read the editor's values again

begin_draft

begin_session

Starts editing the active layout, as the window opens.

build_resources

clear_preview_resources

Cancel work and release private pixels immediately, without resetting admission time.

close_editor

Ends the editing session and asks for its save. Character setup closing calls it too, so it closes the window as well.

commit_draft

discard_draft

Releases draft ownership on explicit replacement or teardown, never on write failure.

edit_layout

Checks a layout edit from the window, runs it through cyborg_layout_action() and takes the result as the draft

editor_preference_values

The values of the editor's preferences, as character setup sends them. A preference this character can't have is left out.

flush_timer

A stale timer cannot write a replaced draft or an older revision.

get_ui_data

Character setup refreshes after every change made there, randomizing included, so we read the editor's values again

on_new_character

Called when the player switches character slots - resets the view, so the window shows the new slot from the start

open_editor

Character setup's action - opens the editor's window, or brings it to the front.

post_set_preference

Called after a preference changes - puts a new part sprite in the draft, updates the borg's permissions and viewers, then refreshes the window

refresh_editor_values

Reads the editor's preference values again if one may have changed. Returns TRUE when the window's copy is out of date

refresh_resources

refresh_resources_timer

The timer owns no layout snapshots: the next UI update reads the latest accepted draft.

request_save

Asks SScyborg_layout_saves to stage the draft and write the account, which happens outside this action or timer.

save_problem

What the save status shows, null when everything is saved or on its way.

schedule_draft_save

Rearm the save for this context without creating a revision for view-only changes.

set_editor_preference

Sets one of the editor's preferences through character setup's own action, so its checks and every middleware's hooks still run.

set_preview

Changes what the preview shows - chassis, direction, pose, arousal, gallery and which layout. Returns FALSE for a stale or bad request

sidecar_write_completed

A delayed account write can complete after this editor switched slots or closed.

stage_draft

ui_act

Sends the window's actions to their handlers - preview changes, layout edits and preference changes

ui_close

Called when the window closes - ends the session and asks for its save

ui_data

Builds the window's data - the draft as the window needs it, the preview and the save status. Shared gallery work that may sleep goes first

ui_interact

Opens the window and starts the session, or updates the open one, bringing it to the front on an explicit open

ui_state

Always state, as ui_status() does the checking

ui_static_data

Static data is private to this window; never register sensitive PNGs globally.

ui_status

Only the player whose preferences these are can use the window

update_draft