CASTLE
ATTRIBUTES
(CA)
RECEIVER
Used to check or modify the attributes of a town, including name, owner, available creatures and internal structures.
!!CAx/y/l:XXXX; |
Town settings for town at x/y/l coordinates. (Towns are Type 98. See Format T) |
!!CA#:XXXX; |
Indirect reference to town at x=v[#], y=v[#+1], l=v[#+2] (Towns are Type 98. See Format T) |
!!CA-1:XXXX; |
The current town. Be careful for you can use it only in Town screen. |
OPTIONS
B1/#; | Build the # structure (see Building list) |
B2/#; | Demolish the # structure (see Building list) |
B3/#; | Check if the # structure built (in flag 1) (see Building list) |
B3/#/1; | checks if the # structure is built with respect to upgrades (in flag 1) (see Building list) Example: !!CA-1:B3/30/1; !!IF&1:M^Dwelling 1 is built^; This will work even if you build the upgraded dwelling, or horde dwelling. |
B3/#/2; | Check if the # structure is enabled (in flag 1) (see Building list) |
B4/#; | Enable to build the # structure (see Building list) |
B5/#; | Disable to build the # structure (see Building list) |
B6/#;![]() |
Build in town using an internal function
(see
Building list) Builds a building in a town using an internal function. The syntax and the meaning is the same as for CA:B1/# but because it uses an internal function, buildings with multiple levels will be built correctly, and mage guilds will have spells automatically added (although you can still change them). |
G$; | Set/get/check a level of magic guild (in spells screen) |
G$1/$2; | Set/get/check a number of available spells ($2) in $1 level |
G$1/$2/$3; | Set/get/check a specific spell ($3) in slot $2, level
$1. See Format SP. |
H#/$; | Set/get/check
heroes in Town garrison or visitor # = 0 - hero in the town garrison # = 1 - hero - a town visitor $ - the number of hero (-1 = no one). See Format H You can get/check or set heroes. If you set it, do not forget to move the previous to somewhere. Note: one should be careful with the H command, for checking garrison heroes- if there isn't a specific check for whether it returns -1 or not, and just a check on something else on the hero, it will check the current hero, which might not be to good |
I#;
![]() |
Set the external appearance
of a town Command Syntax: !!CA:I# - sets the external town appearance. You can use only set syntax. Others make no sense. Values for #: 0 = default (synchronizes the look with built structures, e.g., a Fort or Capitol) -1 = completely destroyed 1 = destroyed a bit 2 = destroyed more 3 = destroyed a lot |
M1/$1/$2/$3; | Set/get/check a number of available monsters ($2- not upgraded creature and $3- upgraded) of level $1. See Below |
M2/$1/$2/$3; | Set/get/check a number of guards $1 - Position $2 - Type (-1=none) (See Format C) $3 - Number |
M3/$1/$2; | Set type and count of creatures in Portal of Summoning $1 - Type, -1 for no monster. (See Format C) $2 - Count. It may be anything if Type is -1. Note that the monster isn't defined on game start until you enter the town screen or the new week starts. This is a bug of SoD. For example, start a game with a couple of dwellings and a Portal of Summoning in one of your castles. Save game. Enter the castle to see which type of creature is summoned. Then load the game and do the same. You may see a different creature there. |
M4/#/?$; | Get/check monster growth per week # - Tier of monster (0..6) ?$ - Variable to store monster growth If dwelling of given tier is NOT built, 0 is returned. |
N^text^, NzVar | Set/get a name of a Town. |
O$; | Set/get/check an owner. See Format E1 Note: that if you want to set/get/use neutral as owner, see that neutral value is -1 To check if the owner is neutral, use !!CAx/y/l:O?variable; or !!CA#:O?variable; and check if variable is -1 (replace variable with ERM variable type. See Flag&Variable, VR and FU sections. Note: Please note that if owner is neutral (value for object owner is -1), there is no need to get alliance team. If however you do so, the resulted team number is shown as 0 (which in most cases is the same alliance number for human red player) |
P?$1/?$2/?$3; | Get/check a Town position. $1 = x $2 = y $3 = Level |
R$;
![]() |
Control town building flag. Check or set if a player can build this turn in a town. !!CA...:R$; $ = 0 if player/AI may build this turn $ = 1 if player/AI may not build this turn (already did) Comments: You may use R0 any number of times during the turn and thus build any number of buildings in a town. |
S?$; | Get/check town income ?$ - Variable to store town income Almost no documentation for that one. Need to test things out. |
T$; | Set/get/check a type of a Town (only inside).
See Format T. |
U$; | Get/check
the number of a Town on the map list (not hero list). You can also set it but I do not recommend :-) |
Comments:
For M1. If you have an upgraded building, the $3 is used, otherwise $2.
List of all buildings
Additions to "List of all buildings" in CA. (Don't quite undestand that yet) 20 Shipyard with a ship in it 22 Also: Decorations, always present (8). 23 Also: Decorations. For Village hall (1, 4, 8) or always present (0, 7). 27 Decorations. For Town Hall (1, 4, 8) or always present (6). 28 Decorations for City Hall (1, 4, 8) 29 Decorations for Capitol (1, 4, 8)