Skip to content

grant_templates

test edited this page Aug 14, 2024 · 17 revisions

NOT PUBLICLY AVAILABLE. The documentation below applies to a feature currently in development, and not yet available for public use

  • Create grant templates for specified changes to a nation.
  • Set which nations can receive a grant for a template, using any nation filter
  • Default restrictions to prevent repeated or unnecessary grants
  • Configurable roles needed to grant a template to others, or themselves
  • Absolute and time based global and per template grant allowances.
  • Configurable grant expiry and tax account

Template Types

  • CITY
  • PROJECT
  • INFRA
  • LAND
  • BUILD
  • WARCHEST
  • RAWS

Creating a template

Created templates are disabled by default Use nation filters to specify who can receive a template:

Specify a role to choose who can grant this template

Note: Grant limits are per template.

📚 Create a new city grant template
/grant_template create city

Create a new city grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
<minCity> - Integer
The minimum city range allowed to receive grants
(A whole number)
<maxCity> - Integer
The maximum city allowed to grant up to
(A whole number)
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-f force] - boolean


📚 Create a new build grant template
/grant_template create build

Create a new build grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
[-c build] - CityBuild
Only grant this specific city build
Defaults to allow any city build
(City build json or url)
[-m mmr] - MMRInt
The MMR required for grants via this template
(4 whole numbers representing barracks,factory,hangar,drydock)
[-o only_new_cities] - boolean
Only allow granting builds for new cities
(Past 10 days)
[-t allow_after_days] - Integer
Allow grants to cities that have not received a build in the past X days
Defaults to no limit
(A whole number)
[-a allow_after_offensive] - boolean
Allow sending to cities after the receiver has had an offensive war
e.g. For for switching builds after a counter
Defaults to False
[-i allow_after_infra] - boolean
Allow sending to cities where infrastructure has been damaged
Defaults to False
[-aa allow_all] - boolean
Always allow granting (even if they have received another city build grant)
[-lp allow_after_land_or_project] - boolean
Allow granting after purchasing land or a project
Defaults to False
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-repeat repeatable_time] - Long[Timediff]
If the template can be sent to the same receiver multiple times
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-f force] - boolean


📚 Create a new infra grant template
/grant_template create infra

Create a new infra grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
<level> - Integer
The infra level allowed to grant to
(A whole number)
[-n onlyNewCities] - boolean
Only allow grants to new cities (past 10 days)
Defaults to false
[-o requireNOffensives] - Integer
Require N offensive wars before allowing infra grants
(A whole number)
[-a allowRebuild] - boolean
Allow granting infra to cities that have received a grant in the past provided it has received damage
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-repeat repeatable_time] - Long[Timediff]
If the template can be sent to the same receiver multiple times
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-f force] - boolean


📚 Create a new land grant template
/grant_template create land

Create a new land grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
<level> - Integer
The land level to grant up to (inclusive)
(A whole number)
[-n onlyNewCities] - boolean
Only allow grants to new cities (past 10 days)
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-repeat repeatable_time] - Long[Timediff]
If the template can be sent to the same receiver multiple times
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-f force] - boolean


📚 Create a new project grant template
/grant_template create project

Create a new project grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
<project> - Project
The project to grant
(A project name. Replace spaces with _. See: https://politicsandwar.com/nation/projects/)
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-f force] - boolean


📚 Create a new raws grant template
/grant_template create raws

Create a new raws grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
<days> - long
Allow disbursing raw resources to run cities for up to a number of days
(A whole number)
[-o overdrawPercent] - Long
Allow oversupply of resources by a certain percent
Defaults to: 20 (percent)
(A whole number)
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-repeat repeatable_time] - Long[Timediff]
If the template can only sent to the same receiver once
Defaults to 1d
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-f force] - boolean


📚 Create a new warchest grant template
/grant_template create warchest

Create a new warchest grant template

Arguments:

<name> - String
The name of the template
Alphanumerical
(A single line of text)
<allowedRecipients> - NationFilter
A filter for nations allowed to receive this grant
Use your alliance link for all nations
See: https://github.com/xdnw/locutus/wiki/nation_placeholders
(A comma separated list of filters (can include nations and alliances))
[-a allowancePerCity] - Map<ResourceType, Double>
The warchest allowed to grant (per city)
Defaults to the guild setting: WARCHEST_PER_CITY
(A comma separated list of resources and their amounts)
[-t trackDays] - Long
Allow granting warchest if they have not received it in the past number of days
(A whole number)
[-c subtractExpenditure] - boolean
Allow granting warchest that has been consumed in war
[-o overdrawPercent] - Long
Allow granting a certain percent above the allowance to account for unintended losses (e.g. looting)
Defaults to 0 (percent)
(A whole number)
[-e econRole] - Role
The role that can grant this template to others
Defaults to the ECON role (see {prefix}role setalias)
(A discord role name or mention)
[-s selfRole] - Role
The role that can grant this template to itself
Defaults to disabled
(A discord role name or mention)
[-b bracket] - TaxBracket
The tax bracket account to use for withdrawals
e.g. For a growth circle
Defaults to None
See: https://github.com/xdnw/locutus/wiki/tax_automation#tax-bracket-accounts
(A tax id or url)
[-r useReceiverBracket] - boolean
If the receiver's tax bracket is used as the tax bracket account
Defaults to false
Alternative to bracket
[-mt maxTotal] - Integer
Global grants allowed for this template
Defaults to unlimited
(A whole number)
[-md maxDay] - Integer
Grants allowed for this template per day
Defaults to unlimited
(A whole number)
[-mgd maxGranterDay] - Integer
Grants allowed for this template per day by the same sender
Defaults to unlimited
(A whole number)
[-mgt maxGranterTotal] - Integer
Grants allowed for this template by the same sender
Defaults to unlimited
(A whole number)
[-expire expireTime] - Long[Timediff]
Add a default expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-decay decayTime] - Long[Timediff]
Add a default decaying expiry time to grants sent via this template
e.g. 60d
The granter can specify an expiry shorter than this value
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-ignore allowIgnore] - boolean
Do not include grants in member balances by default
Defaults to false
[-repeat repeatable_time] - Long[Timediff]
If the template can be sent to the same receiver multiple times
Defaults to 1d
(A time difference or unix timestamp which will resolve as a difference relative to the current date)
[-f force] - boolean


Enabling or disabling a template

Templates are disabled by default

📚 Set a disabled grant template as enabled
/grant_template enable

Set a disabled grant template as enabled

Arguments:

<template> - AGrantTemplate
The name of a created grant template


📚 Set an active grant template as disabled
/grant_template disable

Set an active grant template as disabled

Arguments:

<template> - AGrantTemplate
The name of a created grant template
[-f force] - boolean


Listing your template

📚 List all grant templates for the specified category
/grant_template list

List all grant templates for the specified category

Arguments:

[category] - TemplateTypes
The category of templates to list
Defaults to all categories
(A category for a grant template)
[-d listDisabled] - boolean
List the disabled grant templates


Viewing, copying and editing a template

📚 Full information about a grant template
/grant_template info

Full information about a grant template

Arguments:

<template> - AGrantTemplate
The name of a created grant template
[receiver] - DBNation
View additional info related to granting the template to this nation
Such as cost/eligability
(nation id, name or url)
[value] - String
The value to provide to the grant template
Such as:

  • Number (infra, land, grant, city, raws)
  • City build json (build)
  • Resources (warchest)
    (A single line of text)
    [-e show_command] - boolean
    Show the command used to create this template
    i.e. If you want to copy or recreate the template

Copying or Editing a template

Use the show_command: True argument to get the creation command

Modify the command to edit, use a new template name to create a copy.

/grant_template info template: YOUR_TEMPLATE show_command: True

Deleting a template

📚 Delete a grant template
/grant_template delete

Delete a grant template

Arguments:

<template> - AGrantTemplate
The name of a created grant template
[-f force] - boolean


Requirements

The following is a list of requirement messages for each grant type.

  • Default requirements apply to all grant templates
  • [Optional] Requirements act as warnings, and can be sent after confirmation
Default Requirements
  • Nation must match: {filter}
  • Grant template must NOT be disabled: </grant_template enable:1127822256077275177>
  • Must NOT exceed grant limit of: {max_total} total grants for this template
  • Must NOT exceed grant limit of: {max_day} grants per day for this template
  • Must NOT exceed grant limit of: {max_granter_total} total grants sent from sender
  • Must NOT exceed grant limit of: {max_granter_day} grants per day sent from sender
  • Nation must NOT receive a grant template twice (when repeatable: false)
  • Nation must be verified: </register:1015168434713149531>
  • Nation must be in an alliance
  • Nation must be a member of an alliance
  • Nation must NOT be in VM
  • Nation must NOT be gray
  • Nation must be in the alliance id: {allianceids}
  • Nation must NOT be added to setting: GRANT_TEMPLATE_BLACKLIST
  • Nation must be active in past 24h
  • Nation must have 10d seniority
  • [Optional] Nation must NOT be close to being beiged (<30 resistance after attacks)
  • Nation must NOT be blockaded
  • Nation must NOT receive a transfer whilst this grant is being sent. Please try again
CITY Requirements
  • Nation must match: {filter}
  • Grant template must NOT be disabled: </grant_template enable:1127822256077275177>
  • Must NOT exceed grant limit of: {max_total} total grants for this template
  • Must NOT exceed grant limit of: {max_day} grants per day for this template
  • Must NOT exceed grant limit of: {max_granter_total} total grants sent from sender
  • Must NOT exceed grant limit of: {max_granter_day} grants per day sent from sender
  • Nation must NOT receive a grant template twice (when repeatable: false)
  • Nation must be verified: </register:1015168434713149531>
  • Nation must be in an alliance
  • Nation must be a member of an alliance
  • Nation must NOT be in VM
  • Nation must NOT be gray
  • Nation must be in the alliance id: {allianceids}
  • Nation must NOT be added to setting: GRANT_TEMPLATE_BLACKLIST
  • Nation must be active in past 24h
  • Nation must have 10d seniority
  • [Optional] Nation must NOT be close to being beiged (<30 resistance after attacks)
  • Nation must NOT be blockaded
  • Nation must NOT receive a transfer whilst this grant is being sent. Please try again
PROJECT Requirements
  • Must NOT have a project timer
  • Must not have received a transfer for {project} already
  • Has NOT received a project grant in the past 10 days
  • Nation does NOT have the project {project}
  • Requires the projects: {required_projects}
  • Project requires at most {max_cities} cities
  • Project requires at least {min_cities} cities
  • [Optional] Domestic policy must be TECHNOLOGICAL_ADVANCEMENT
INFRA Requirements
  • Infra granted must NOT exceed: {level}
  • Requires 0 wars against nations stronger or with NRF/MLP
  • [Optional] Requires the project: CENTER_FOR_CIVIL_ENGINEERING
  • [Optional] Requires the project: ADVANCED_ENGINEERING_CORPS
  • Requires domestic policy to be URBANIZATION
  • [Optional] Nation must have purchased a city in the past 10 days (when onlyNewCities: True)
LAND Requirements
  • Land granted must NOT exceed: {level}
  • [Optional] Requires the project: ARABLE_LAND_AGENCY
  • [Optional] Requires the project: ADVANCED_ENGINEERING_CORPS
  • [Optional] Must have purchased a city in the past 10 days (when onlyNewCities: True)
  • [Optional] Requires domestic policy to be RAPID_EXPANSION
BUILD Requirements
  • Build must NOT have more than 80 buildings (4k infra)
  • [Optional] Must have purchased a city in the past 10 days (when onlyNewCities: True)
  • Nation must NOT have received a new city build grant (when repeatable: False)
  • Cannot build in {continent}
WARCHEST Requirements
  • Amount must NOT be negative: {amount}
  • Amount must NOT exceed remaining allowance: {amount} > {allowance_remaining}
RAWS Requirements
  • Days granted must NOT exceed: {days}
Clone this wiki locally