-
Notifications
You must be signed in to change notification settings - Fork 94
get_group_template_with_flags
Ryzom Core Wiki edited this page Jul 8, 2024
·
3 revisions
title: Get Group Template With Flags description: published: true date: 2023-03-16T23:07:18.109Z tags: editor: markdown dateCreated: 2023-03-16T22:23:57.403Z
The getGroupTemplateWithFlags native AI script function returns the name of a randomly chosen group template that matches a set of specified flags.
(GroupTemplate: s)getGroupTemplateWithFlags(OneOf: s, Mandatory: s) // getGroupTemplateWithFlags_ss_s
(GroupTemplate: s)getGroupTemplateWithFlags(OneOf: s, Mandatory: s, ExceptFlags: s) // getGroupTemplateWithFlags_sss_s
- OneOf (string): A pipe-separated list of flags. At least one of these flags must match the group template.
- Mandatory (string): A pipe-separated list of flags. All of these flags must match the group template.
- ExceptFlags (string, optional): A pipe-separated list of flags. None of these flags can match the group template. This argument is optional.
- GroupTemplate (string): The name of a randomly chosen group template that matches the specified flags.
($group)getGroupTemplateWithFlags("food|rest", "invasion|outpost"); // Returns a group template that matches 'invasion', 'outpost' and either 'food' or 'rest' flags.
($group)getGroupTemplateWithFlags("food|rest", "invasion|outpost", "dungeon"); // Returns a group template that matches 'invasion', 'outpost' and either 'food' or 'rest' flags, but does not match the 'dungeon' flag.
- The function randomly selects a group template from the list of all available group templates that match the specified flags.
- The flags are defined in the group template files.
- The function can be used to dynamically spawn groups that match specific criteria.