Execute_AddRepeatingSocialEvent
Description
Registers a weekly repeating social event subscription hosted by BaseObject, with the context NonBaseObject joining as a fixed member. The upcoming occurrence is created right away in most cases, so the event shows up on that weekday of the schedule immediately. When the weekday and hour have already passed today the first occurrence lands a full week out, and creation is deferred to the midnight hook, so nothing appears on the schedule until the next day. Only templates flagged IsRepeatable are accepted. Place this on the acceptance script of an invitation or opportunity card.
Registration is skipped when the host or the possessed character already has a weekly subscription overlapping the same weekday and time range. Nothing is created and no message is shown on this path, so check B2LogSiteEvent when a repeat does not appear.
Parameters
| Parameter | Description |
|---|---|
| BaseObject | The character who hosts the repeating event. |
| S1 | SocialEventTemplateTable row ID identifying the event template. |
| S2 | Site ID where the event repeats. Falls back to the template default site if None. |
| F1 | The weekday the event repeats on (Mon=0 … Sun=6). |
| F2 | The hour of day at which the event starts. Whole hours only (0 ~ 23). |
The occurrence length comes from the template DurationHour and is clamped so the occurrence ends before midnight. Registration fails when the start hour leaves less than an hour before midnight.
Examples
| Description | BaseObject | Command |
|---|---|---|
| Repeat the game dev club every Monday at 14:00 | Self | AddRepeatingSocialEvent |
| Repeat a weekend brunch at a fixed cafe every Saturday | Self | AddRepeatingSocialEvent |