Page 1 of 1

Variables for !promote messages

Posted: 08 Apr 2023, 13:44
by raaar
According to the spads settings, promote messages allow these variables:

%u is replaced by the user performing !promote command
%p is replaced by the number of needed players for current expected battle structure (nbTeams x teamSize x nbPlayerById)
%b is replaced by the battle name
%o is replaced by the mod name
%a is replaced by the map name

default msg: %pplayer(s) needed for battle "%b" [%o, %a] (%u)


Are there other variables which can be used? I'd be interested in having
- current number of players
- current number of spectators

Re: Variables for !promote messages

Posted: 09 Apr 2023, 08:39
by bibim
No, the only placeholders available for the "promteMsg" global setting are the ones described in the documentation.
But I just added %P, %S and %U as requested in SPADS 0.13.6 (cf promoteMsg global setting documentation).

Re: Variables for !promote messages

Posted: 09 Apr 2023, 18:16
by raaar
That's nice, thanks.

I'm still using SPADS 0.12.54, but i'll try to update soon.

Re: Variables for !promote messages

Posted: 18 Apr 2023, 20:46
by raaar
I've updated to spads 0.13.9 and the new variables work fine, thanks.

NOTE:
I followed the instructions to update from 0.12.x to 0.13.9.

They worked except point 4. Spads wouldn't start after removing the extra ":" from users.conf :

20230416164545 - ERROR - [SPADS] Unable to parse fields in following configuration data "|140"
20230416164545 - ERROR - [SPADS] Invalid configuration line in file "/spring/spads/etc/users.conf" (:raaar:::::|140)
20230416164545 - ERROR - [SPADS] Unable to load commands, help and permission system

it's starting properly with these on users.conf

:raaar::::::|140
:::::1::|110
:::::7::|80
:::::6::|70
:::::5::|60
:::::4::|50
(...)

Re: Variables for !promote messages

Posted: 18 Apr 2023, 21:41
by bibim
raaar wrote: 18 Apr 2023, 20:46 I followed the instructions to update from 0.12.x to 0.13.9.

They worked except point 4. Spads wouldn't start after removing the extra ":" from users.conf :

20230416164545 - ERROR - [SPADS] Unable to parse fields in following configuration data "|140"
20230416164545 - ERROR - [SPADS] Invalid configuration line in file "/spring/spads/etc/users.conf" (:raaar:::::|140)
20230416164545 - ERROR - [SPADS] Unable to load commands, help and permission system

it's starting properly with these on users.conf

:raaar::::::|140
:::::1::|110
:::::7::|80
:::::6::|70
:::::5::|60
:::::4::|50
(...)
Are you sure you followed the first part of point 4 ?
the template declaration line (usually the first line of the file) must be replaced:
Old line: #?accountId:name:country:cpu:rank:access:bot:auth|level
New line: #?accountId:name:country:rank:access:bot:auth|level (the cpu field has been removed)

Re: Variables for !promote messages

Posted: 19 Apr 2023, 16:36
by raaar
You're right, I missed that one. Now it works.