accept_crew_invite
$user.accept_crew_invite(user: User)Accept the given user's crew invite.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to accept the invite from. |
Users: the people playing, their names, their players.
168 natives. Read-only natives only look things up; the rest change something. Parameter types use the language's names (Types).
$user.accept_crew_invite(user: User)Accept the given user's crew invite.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to accept the invite from. |
$user.accept_crew_join_request(user: User)Accept the given user's join request.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to accept the request of. |
$user.accept_first_party_friend_request(user: User)Accept the first party friend request from the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the request. |
$user.accept_first_party_group_invite(user: User)Join the group and remove the invite from the given first party user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the invite. |
$user.accept_friend_request(user: User)Accept the friend request from the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the request. |
$user.accept_group_invite(user: User, merge: bool)Join the group and remove the invite from the given user. Optionally, bring the existing group along with you (only a group leader joining an open group can do this)
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the invite. |
merge | bool | True if we should try to merge the groups. |
$user.activity_availability_changed(mode: string, available: list, unavailable: list)Notifies the platform that the availability of the activities has changed.
| Parameter | Type | Meaning |
|---|---|---|
mode | string | The update mode: if 'full' then all availability values in the state are updated, if 'delta' then the system calculates the difference and add/removes from the state. |
available | list | List of available activites. |
unavailable | list | List of unavailable activities. |
$user.activity_terminate()Notify the platform to terminate all activities and reset their state to default.
$user.add_default(gamepad: int)Enqueues the addition of the default user on the local system.
| Parameter | Type | Meaning |
|---|---|---|
gamepad | int | The gamepad index. |
$user.add_droid(name: string)Enqueues the addition of a droid user on the local system.
| Parameter | Type | Meaning |
|---|---|---|
name | string | The name to use for the droid. |
$user.add_dummy(client_index: int, gamepad: int)Enqueues the addition of a dummy remote user on the local system.
| Parameter | Type | Meaning |
|---|---|---|
client_index | int | The remote client index. |
gamepad | int | The gamepad index. |
$user.add_guest(gamepad: int)Enqueues the addition of a guest user on the local system.
| Parameter | Type | Meaning |
|---|---|---|
gamepad | int | The gamepad index. |
$user.add_recent_players()Add all users on the server as recent players for the local user.
$user.add_recent_players_first_party()Add all users on the server on the same platform as first party recent players for the local user.
$user.add_user_reputation_xp(user: User, xp: int)Add reputation XP for a given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
xp | int | The xp value to add. |
$user.add_with_selector(gamepad: int)Enqueues the selection of a user on the local platform. Note on some platforms this starts an async process that will eventually result in a user being added (assuming the process isn't canceled by the user input)
| Parameter | Type | Meaning |
|---|---|---|
gamepad | int | The gamepad index. |
$user.block_player(user: User)Block the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to block. |
$user.cache_bootable_invite()Cache a bootable invite from the first party.
$user.compare_users(user1: User, user2: User) -> intGet the name (gamertag) for a user.
| Parameter | Type | Meaning |
|---|---|---|
user1 | User | The first user handle. |
user2 | User | The second user handle. |
Returns int: 0 if the user values are equal.
$user.consume_accepted_invite()Consume an invite we've accepted at a first-party level and try to join the user's group.
$user.consume_pending_game_intent()Consumes the pending game intent thereby removing it from the system. The game code needs to act upon the intent.
$user.create_crew(name: string)Create a new crew. Must currently not be in a crew.
| Parameter | Type | Meaning |
|---|---|---|
name | string | The crew name. |
$user.display_igo_profile(user: User, name: string)Display the given user in the first party overlay.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to display. |
name | string | The name of the user. |
$user.end_activity(activity: string, outcome: string)Notifies the platform that the user has ended the specified activity.
| Parameter | Type | Meaning |
|---|---|---|
activity | string | The name of the activity |
outcome | string | The outcome of the activity: 'completed', 'failed', or 'abandoned' |
$user.get_all_friends_on_server() -> listGet a list of all friends on server.
Returns list: List of friends.
$user.get_all_users() -> listGet a list of all users.
Returns list: List of users.
$user.get_blocked_player_count() -> intGets the number of players blocked by the local user.
Returns int: The number of blocked players.
$user.get_blocked_players(sort_by_name: bool) -> listGet the local user's blocked players list.
| Parameter | Type | Meaning |
|---|---|---|
sort_by_name | bool | Whether or not to sort the results by name. |
Returns list: The blocked list.
$user.get_blocked_players_first_party(sort_by_name: bool) -> listGet the local user's blocked players list from the first party.
| Parameter | Type | Meaning |
|---|---|---|
sort_by_name | bool | Whether or not to sort the results by name. |
Returns list: The first party blocked list.
$user.get_cohort_for_experiment(user: User, experiment: string) -> stringGet the cohort for a user for a given experiment based on their user id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
experiment | string | The vuser_ab_experiment. |
Returns string: The user cohort. Do not cache this string.
$user.get_combined_friend_presence_counts() -> listGets a list of counts for all combined friend presences.
Returns list: Index 0 = in game friend count, 1 = online friend count, 2 = offline friend count.
$user.get_connection(user: User) -> intGet the network connection associated with a user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns int: The network connection.
$user.get_crew_captain(user: User, guid: string) -> UserGet the crew's captain by a user or by a crew id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns User: The crew captain
$user.get_crew_code(user: User, guid: string) -> intGet the crew's name code by a user or by crew id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns int: The crew's name code.
$user.get_crew_guid(user: User) -> stringGet the crew's unique identifier.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
Returns string: The crew's unique identifier.
$user.get_crew_invites() -> listGet a list of users who have sent crew invites.
Returns list: List of online ids for users who sent crew invites.
$user.get_crew_join_requests() -> listGet a list of users who have sent crew join requests.
Returns list: List of online ids for users who sent crew join requests.
$user.get_crew_member_count() -> intGets the total number of users in the crew.
Returns int: The total number of crew members.
$user.get_crew_members(guid: string, start_index: int, count: int, sort_members: bool) -> listGet a list of users in the crew by user or by crew id. Includes the crew captain.
| Parameter | Type | Meaning |
|---|---|---|
guid | string | (optional) The crew guid to search by. If null, will return the local users crew members. |
start_index | int | The offset in the crew member list to start retrieving members at. |
count | int | The total number of crew members to retrieve. Will cap at the max list length. |
sort_members | bool | If true the members will be sorted with the crew captain first, then alphabetically. |
Returns list: List of online ids for users in the crew.
$user.get_crew_name(user: User, guid: string) -> stringGet the crew's name by a user or by crew id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns string: The crew's name.
$user.get_crew_name_platform_valid(name: string) -> boolCheck if the given crew name is valid on the current platform.
| Parameter | Type | Meaning |
|---|---|---|
name | string | The crew_name. |
Returns bool: True if the name is valid.
$user.get_crew_name_profanity_checked(user: User, guid: string) -> boolGet the status of the crew name profanity filtering.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns bool: The state of the profanity filtering.
$user.get_crew_name_unfiltered(user: User, guid: string) -> stringGet the crew's unfiltered name by a user or by crew id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns string: The crew's name.
$user.get_crew_namer(user: User, guid: string) -> UserGet the user id of the player that named the crew.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
guid | string | The crew guid to search by. |
Returns User: The namer of the crew.
$user.get_crew_presence_counts() -> listGets a list of counts for crew member presences. This will exclude the crew leader.
Returns list: Index 0 = in game crew member count, 1 = online crew member count, 2 = offline crew member count.
$user.get_crew_search_results(users: list) -> listGet a list of crews returned by the search function.
| Parameter | Type | Meaning |
|---|---|---|
users | list | The users to request the crews for |
Returns list: List of crew guids.
$user.get_first_party_friend_count() -> intGets the total number of first-party friends for the local user.
Returns int: The total number of first-party friends.
$user.get_first_party_friend_requests() -> listGet a list of users who have sent first party friend requests.
Returns list: List of ids.
$user.get_first_party_friends(sort_by_name: bool, start_index: int, count: int) -> listGet a list of all first party friends for the local user.
| Parameter | Type | Meaning |
|---|---|---|
sort_by_name | bool | Whether or not to sort the results by name. |
start_index | int | The offset in the friends list to start retrieving friends at. |
count | int | The total number of friends to retrieve. Will cap at the max list length. |
Returns list: List of first party friend user ids.
$user.get_first_party_group_invites() -> listGet a list of users who have sent first party group invites.
Returns list: List of ids.
$user.get_first_party_rich_presence_string(user: User) -> stringGet the user's rich presence string from the first party.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
Returns string: The user's rich presence string.
$user.get_first_party_user(user: User) -> UserGiven a velan user, return their first party user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns User: The first party user.
$user.get_friend_count() -> intGets the total number of Velan friends for the local user.
Returns int: The total number of Velan friends.
$user.get_friend_requests() -> listGet a list of users who have sent friend requests.
Returns list: List of ids.
$user.get_friends(sort_by_name: bool, start_index: int, count: int) -> listGet a list of all friends for the local user.
| Parameter | Type | Meaning |
|---|---|---|
sort_by_name | bool | Whether or not to sort the results by name. |
start_index | int | The offset in the friends list to start retrieving friends at. |
count | int | The total number of friends to retrieve. Will cap at the max list length. |
Returns list: List of friend user ids.
$user.get_friends_crew_captains(include_first_party: bool) -> listGet a list of crew captains for the crews your friends are in.
| Parameter | Type | Meaning |
|---|---|---|
include_first_party | bool | If true, first party friend's crew captains are returned as well. |
Returns list: List of crew captains of your friend's crews.
$user.get_gamepad(user: User) -> intGet the gamepad associated with a user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns int: The gamepad index.
$user.get_group() -> listGet a list of users in the group. Includes the group leader.
Returns list: List of online ids for users in group.
$user.get_group_invites() -> listGet a list of users who have sent group invites.
Returns list: List of ids.
$user.get_group_invites_combined() -> listGet a combined list of users who have sent group invites via velan or first party platforms.
Returns list: List of ids.
$user.get_group_leader() -> UserGet the group leader for the current user, including remote index and gamepad index
Returns User: The group leader.
$user.get_group_leader_by_user(user: User) -> UserGet the group leader for the given user on server. Always return null user on client.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns User: The group leader.
$user.get_group_leader_user_id() -> UserGet the user id of the group leader for the current user.
Returns User: The group leader user id.
$user.get_local_index(user: User) -> intReturns the index of a user on its client. If not found, returns -1.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns int: User index on its client, or -1 if not found
$user.get_local_users() -> listGet a list of all local users.
Returns list: List of users.
$user.get_lowest_id_user(users: list) -> UserReturns the user with the lowest internal ID from a list.
| Parameter | Type | Meaning |
|---|---|---|
users | list | A list of users. |
Returns User: The user with the lowest ID.
$user.get_name(user: User, publisher: bool) -> stringGet the name (gamertag) for a user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
publisher | bool | True if requesting the publisher username. |
Returns string: The user name.
$user.get_name_profanity_checked(user: User) -> boolGet the status of the user name profanity filter.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: The status of the profanity filter.
$user.get_pending_game_intent_activity_id() -> stringReturns the activity id of any pending game intent.
Returns string: The activity ID of the pending game intent
$user.get_pending_game_intent_type() -> intReturns the type of any pending game intent.
Returns int: The vonline_game_intent_type_t of the pending game intent
$user.get_platform_family(user: User) -> intGet the platform family for the given user
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The vplatform_family_t value for the user if it is possible to determine, k_platform_family_invalid if not.
$user.get_platform_string(user: User) -> stringGet the platform string for the given user from their persona id.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns string: The user's platform string.
$user.get_platform_user_kind(user: User) -> intGet the first party platform user kind for the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's platform.
$user.get_presence_state(user: User) -> intDetermine the user's current online state.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
Returns int: The user's online state.
$user.get_primary() -> UserDetermine the primary user on the calling system.
Returns User: Primary user.
$user.get_publisher_username_code(user: User) -> intGet the #1234 suffix for a user's publisher username.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns int: The code.
$user.get_ranked_skill_by_playlist(match_def: Reference) -> listGet the ranked skill data for the user from the specified playlist
| Parameter | Type | Meaning |
|---|---|---|
match_def | Reference | The playlist definition to lookup skill for |
Returns list: The user's skill data, null if not found. List ordered as tier, division, division_progress, mmr, volatility, win_streak, skill_rating, skill_rating_decayed. See vonline_matchmaking_skill_t.
$user.get_recent_players() -> listGet the recent players to the local first party user.
Returns list: The recent players for the user.
$user.get_rich_presence_state(user: User) -> intDetermine the user's current rich presence state.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
Returns int: The user's online state.
$user.get_sim_frame_time_scale_for_user(user: User) -> floatReturns the time scale used by the given user's client. For instance, a Switch client will return 2.0..
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns float: The time scale of the given user.
$user.get_thank_you_bonus_display_season_number() -> intServer Only - Get the season number when the thank you bonus rewards were granted.
Returns int: The season number for the thank you bonus.
$user.get_unranked_skill() -> listGet the quickplay skill data for the user
Returns list: The user's quickplay skill data, null if not found. List ordered as tier, division, division_progress, mmr, volatility, win_streak. See vonline_matchmaking_skill_t.
$user.get_user_by_client_index(index: int, gamepad: int) -> UserReturn the user at the given netrep client index.
| Parameter | Type | Meaning |
|---|---|---|
index | int | The client index. |
gamepad | int | The gamepad index. |
Returns User: The user at the client connection index.
$user.get_user_by_index(index: int) -> UserReturn the user at the given index.
| Parameter | Type | Meaning |
|---|---|---|
index | int | The user index. |
Returns User: The user indexed in the 'get_all_users' array
$user.get_user_games_played(user: User) -> intGet the total number of games played from skill data for the given user. Server Only.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's total number of games played from skill data, -1 if not found. It will return quickplay games in hideout.
$user.get_user_group_size(user: User) -> intGet the group size for a given user. This is tied to presence and are not guaranteed to update for local group members. user.get_group().length is preferred for getting local group size.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's group size.
$user.get_user_index(user: User) -> intReturns the index into the array returned by 'get_all_users' for the given user. If not found, returns -1. Don't store this across frames, as the array can change!
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns int: User index into 'get_all_users' array, or -1 if not found
$user.get_user_kind(user: User) -> intGet the user kind of the provided user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's kind.
$user.get_user_reputation_xp(user: User) -> intGet the reputation XP for a given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's xp.
$user.get_user_skill(user: User) -> listGet the skill data for the given user for the current match. Server Only.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns list: The user's skill data, null if not found. List ordered as tier, division, division_progress, mmr, volatility, win_streak. See vonline_matchmaking_skill_t.
$user.get_user_wins(user: User) -> intGet the wins from skill data for the given user for the current match. It will return quickplay wins in hideout. Server Only.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns int: The user's wins from skill data, -1 if not found. It will return quickplay wins in hideout.
$user.get_velan_id_from_first_party_id(first_party_id: User) -> UserGiven a first party id, attempt to retrieve the user's velan id.
| Parameter | Type | Meaning |
|---|---|---|
first_party_id | User | The first party user. |
Returns User: The velan user.
$user.get_velan_user_hash(user: User, salt: int) -> intGet a 32-bit hash for a Velan user. The user kind must be k_vuser_kind_velan. This does NOT take gamepad or user-type into consideration.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The Velan user. |
salt | int | A number to hash in with the player. |
Returns int: A hash of the user and the salt value.
$user.get_visibility(user: User) -> intGet the given user's group visibility. Only relevant when they're the group leader.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to get the visibility state for. |
Returns int: The user's visibility state
$user.get_xbox_default_user_name() -> stringGet the name (gamertag) for the default Xbox user.
Returns string: The name of the default Xbox user.
$user.invite_to_group(user: User, message: string)Invite the given user to the group.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to invite. |
message | string | A message to attach to the invite. |
$user.invite_to_group_first_party(user: User, message: string)Send a first party game into to the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to invite. |
message | string | A message to attach to the invite. |
$user.is_blocked(user: User) -> boolChecks to see if the given user is blocked.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns bool: Whether or not the given user is blocked.
$user.is_blocked_velan(user: User) -> boolChecks to see if the given user is blocked_velan.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. Requires a velan user kind. |
Returns bool: Whether or not the given velan user is KO City ID blocked.
$user.is_child(user: User) -> boolDetermine if a user is underage.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if child.
$user.is_commerce_allowed() -> boolGet whether a user is allowed to access commerce.
Returns bool: True if the local user is allowed to access commerce.
$user.is_crossplay_allowed(refresh_if_disabled: bool) -> boolGet whether crossplay is currently allowed.
| Parameter | Type | Meaning |
|---|---|---|
refresh_if_disabled | bool | True to force a refresh of the privilege if currently disallowed. May trigger a system dialog. |
Returns bool: True if crossplay is allowed.
$user.is_crossplay_visible(user: User) -> boolGiven a velan user and the current crossplay settings, is that user visible.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
Returns bool: True if the user is crossplay visible.
$user.is_dummy() -> boolDetermine if the owning user is a dummy.
Returns bool: True if the owning user is a dummy.
$user.is_first_party_friend(user: User) -> boolChecks to see if the given user is a first-party friend.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns bool: Whether or not the given user is a first-party friend.
$user.is_first_party_invite(invite: User) -> boolCheck if a given invite is from the platform.
| Parameter | Type | Meaning |
|---|---|---|
invite | User | The invite. |
Returns bool: True if the invite is a platform invite.
$user.is_first_party_network_up() -> boolDetermine if the first party network is accessible.
Returns bool: True if the first party network is accessible.
$user.is_friend(user: User) -> boolChecks to see if the given user is a Velan / KO ID friend.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns bool: Whether or not the given user is a Velan / KO ID friend.
$user.is_group_leader() -> boolDetermine if this user is the group leader.
Returns bool: True if the group leader.
$user.is_guest(user: User) -> boolDetermine if a user is a guest on its system.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if guest.
$user.is_igo_visible() -> boolGet whether the platform IGO is visible or not.
Returns bool: True if the platform IGO is visible.
$user.is_in_crew(user: User) -> boolGet whether the user is in a crew.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id. |
Returns bool: True if the user is in a crew.
$user.is_input_extrapolated() -> boolDetermine if the input for the owning user of the current component is being extrapolated.
Returns bool: True if the owning user's input is extrapolated.
$user.is_local(user: User) -> boolDetermine if a user is local to the current machine.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if specified user is local.
$user.is_predicted() -> boolDetermine if the owning user of the current component is predicted by default. That is, the owning user is local or being simulated on the server. Always returns true on the server.
Returns bool: True if the owning user is local or being simulated on the server.
$user.is_primary(user: User) -> boolDetermine if a user is the primary user on its system.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if primary.
$user.is_social_allowed() -> boolGet whether a user is allowed to access social features.
Returns bool: True if the local user is allowed to access social features.
$user.is_telemetry_allowed() -> boolGet whether the local user allows telemetry.
Returns bool: True if the local user allows telemetry.
$user.is_ugc_allowed(refresh_if_disabled: bool) -> boolGet whether a user is allowed to access user-generated content.
| Parameter | Type | Meaning |
|---|---|---|
refresh_if_disabled | bool | True to force a refresh of the privilege if currently disallowed. May trigger a system dialog. |
Returns bool: True if the local user is allowed to access UGC.
$user.is_underage() -> boolGet whether the local user is underage.
Returns bool: True if the local user is underage.
$user.is_user_droid(user: User) -> boolDetermine if the given user is a droid.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if the given user is a droid.
$user.is_user_dummy(user: User) -> boolDetermine if the given user is a dummy.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if the given user is a dummy.
$user.is_user_input_extrapolated(user: User) -> boolDetermine if the input for the given user is being extrapolated.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if the given user's input is extrapolated.
$user.is_user_predicted(user: User) -> boolDetermine if the given user is predicted by default. That is, the owning user is local or being simulated on the server.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
Returns bool: True if the given user is local or being simulated on the server.
$user.is_velan_user_test_group_odd(user: User) -> boolReturns true if a velan user id is odd. Intended for A/B testing
| Parameter | Type | Meaning |
|---|---|---|
user | User | The Velan user. |
Returns bool: True if userid value is odd.
$user.join_group(user: User, from_invite: bool)Try to join the given user's group.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to join. |
from_invite | bool | If true, the join originates from an invite. |
$user.kick_from_crew(user: User)Kick the given user from the crew. Only succeeds for the crew captain.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to kick. |
$user.kick_from_group(user: User)Kick the given user from the group. Only succeeds for the group leader.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to kick. |
$user.leave_crew()Leave the crew.
$user.leave_group()Leave the current group we're in.
$user.merge_group(user: User)Try to join the given user's group, and bring your current group with you.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to join. |
$user.presence_request(username: string)Partial name presence request for velan presence. When users have been found, they can be queried with user.presence_search. Note: This is a one-time request, and won't subscribe the client to presence updates about the user.
| Parameter | Type | Meaning |
|---|---|---|
username | string | The (partial) username to request presence for. |
$user.presence_search(username: string, sort_by_name: bool) -> listPartial name presence lookup for velan presence.
| Parameter | Type | Meaning |
|---|---|---|
username | string | The (partial) username to get presence for. |
sort_by_name | bool | Will sort list alphabetically if set to true. |
Returns list: A list of user id's whose username (partially) match the given string.
$user.promote_group_leader(user: User)Promote a user to the group leader.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to promote. |
$user.promote_to_captain(user: User)Promote the given user to crew captain. Only succeeds for the crew captain.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to promote. |
$user.reject_crew_invite(user: User)Reject the given user's crew invite.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to reject the invite from. |
$user.reject_crew_join_request(user: User)Reject the given user's join request.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to reject the request of. |
$user.reject_first_party_friend_request(user: User)Reject the friend request from the given first party user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the request. |
$user.reject_first_party_group_invite(user: User)Remove the group invite from the given first party user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the invite. |
$user.reject_friend_request(user: User)Reject the friend request from the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the request. |
$user.reject_group_invite(user: User)Remove the group invite from the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id who sent the invite. |
$user.remove(user: User)Enqueues the logout and removal of a user on the local system.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user handle. |
$user.remove_all_droids()Enqueues the removal of all droid users. Should only be called on the server.
$user.remove_friend(user: User)Remove the user as a friend.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to remove. |
$user.rename_crew(name: string)Rename the crew. Only succeeds for the crew captain.
| Parameter | Type | Meaning |
|---|---|---|
name | string | The new crew name. |
$user.request_add_friend(user: User)Send the user a friend request.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to add. |
$user.request_crews(users: list)Request the crews for a set of arbitrary users.
| Parameter | Type | Meaning |
|---|---|---|
users | list | The users to request the crews for |
$user.request_presence_for_friends()Request presence for velan friends - this should be when the friends list is open. vonline will handle rate-limiting the message.
$user.resume_activity(activity: string)Notifies the platform that the user has resumed the specified activity.
| Parameter | Type | Meaning |
|---|---|---|
activity | string | The name of the activity |
$user.send_crew_invite(user: User)Send the given user a crew invite.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to invite. |
$user.send_crew_join_request(user: User)Request to join a given user's crew.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to send the request to. |
$user.set_crew_invite_permissions(allowed: bool)Set whether a user can receive crew_invites.
| Parameter | Type | Meaning |
|---|---|---|
allowed | bool | The value to set. |
$user.set_crew_invite_request_permissions(allowed: bool)Set whether a user can receive crew_invite_requests.
| Parameter | Type | Meaning |
|---|---|---|
allowed | bool | The value to set. |
$user.set_crossplay_permissions(enabled: bool)Set whether a user has enabled crossplay.
| Parameter | Type | Meaning |
|---|---|---|
enabled | bool | True if the user is allowed to play crossplay |
$user.set_friend_request_permissions(allowed: bool)Set whether a user can receive friend_requests.
| Parameter | Type | Meaning |
|---|---|---|
allowed | bool | The value to set. |
$user.set_group_invite_permissions(allowed: bool)Set whether a user can receive group invites and join requests.
| Parameter | Type | Meaning |
|---|---|---|
allowed | bool | The value to set. |
$user.set_presence(state: int, rich_presence: int, rich_presence_string: string, args: list)Set the rich presence of the local user.
| Parameter | Type | Meaning |
|---|---|---|
state | int | The new presence state. |
rich_presence | int | The new rich presence state. |
rich_presence_string | string | The new rich presence string, needed for first party presence. |
args | list | Arguments for the rich presence string. |
$user.set_replicate_input(user: User, replicate: bool)Set if replication should forward input for this user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user. |
replicate | bool | Whether or not to replicate input for the user. |
$user.set_telemetry_allowed(opt_in: bool)Set if the given user is allowing data sharing.
| Parameter | Type | Meaning |
|---|---|---|
opt_in | bool | Are we allowed to share this user's data? |
$user.set_thank_you_bonus_displayed(user: User)Server Only - Send a request to backend to set thank you bonus displayed for a given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to mark. |
$user.set_visibility(visibility_state: int)Set the local user's group visibility. Only relevant when they're the group leader (but it will still be saved if they are not.)
| Parameter | Type | Meaning |
|---|---|---|
visibility_state | int | The state to set the group's visibility to. See vonline_group_visibility_t. |
$user.should_consume_accepted_invite() -> boolGet whether the user has accepted an invite at the first party level.
Returns bool: True if the user has accepted a first party invite from the platform level.
$user.should_display_crossplay_popup(elapsed_time: float, manual_regional_override: bool) -> boolGet whether crossplay enable popup should be shown.
| Parameter | Type | Meaning |
|---|---|---|
elapsed_time | float | How long has this use been matchmaking |
manual_regional_override | bool | Is the region override enabled for this user |
Returns bool: True if popup should be shown.
$user.should_display_thank_you_bonus(user: User) -> boolServer Only - Get whether we should display thank you bonus notification for a given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns bool: True if we should display it.
$user.start_activity(activity: string)Notifies the platform that the user has started the specified activity.
| Parameter | Type | Meaning |
|---|---|---|
activity | string | The name of the activity |
$user.unblock_player(user: User)Unblock the given user.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user id to unblock. |
$user.will_all_users_run_this_frame() -> boolChecks to see if all users will simulate the current frame.
Returns bool: Whether or not all users will run on this frame.
$user.will_run_this_frame(user: User) -> boolChecks to see if the given user will simulate the current frame. Intended be called on remote users.
| Parameter | Type | Meaning |
|---|---|---|
user | User | The user to check. |
Returns bool: Whether or not the given user's client will run on this frame.