Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 19

' Shandalar SVE Tool v0.

2 '
' Created by CirothUngol for CCGHQ Shandalar Forums '
' updated July 21, 2015 '
'''''''''''''''''''''''''''''''''''''''''''''''''''''

This little tool allows users to inject cards into the Libraries and Decks of
Shandalar SVE save files, as well as provide easy access to the most common
game settings. Cards are matched by CardName (taken from the appropriate
'cards.dat' file) and should be entered into the editor using the format
'Qty CardName'. If quantity is ommitted, 1 is assumed. All lines in the editor
beginning with a semi-colon (;) will be ignored. All lines in the editor
beginning with a period (.) will have their first word removed. This makes it
compatible with all Shandalar and Manalink DCK files.

SVEtool will recursively search for 'Shandalar.exe' first in it's current


folder, then in it's parent folder. If not found a FileDialog is presented.
All settings are retained in 'SVEtool.ini', delete it to restore defaults.
SVE files are selected with the ComboBox just below the Text Editor. After
choosing a Save Slot, cards my be injected into the Decks/Library thusly:

1) Select the tab you wish to inject into (Library or Deck 1-3). You may click
'Show' to examine current contents and 'Clear Library' to remove all cards.
2) Enter any number of 'Qty CardName' lines into the Text Editor. The 'Load'
and 'Find' buttons are useful here, or you can just type or paste them in.
3) Click 'Check Cards' to verify their availablity in Shandalar. The 'Alpha'
button may be used to help remember cards and find their correct spelling.
If injecting into a Deck, only needed cards will be added to the Library.
4) Make any further adjustments to Gold, Amulets, World Magics, etc and click
'-=> *' to save all Settings and inject Cards into the Library or Deck.
5) Afterwards, click 'Clear' to empty the Text Editor and click 'Show' to
display the contents and verify that the cards were injected properly.

Notes:
------
To save settings without adding cards:
Choose 'Library' Tab, Click 'Clear', Click '-=> Library'
To clear a deck (and save all other settings):
Choose 'Deck 1-3' Tab, Click 'Clear', Click '-=> Deck 1-3'
To select a new Shandalar install:
Choose 'File' menu option, select 'Load Exe'

Here's a brief overview of the widgets:


--------------------------------------------------------------------------------
Load - Loads a Text File into the Editor
Save - Saves the contents of the Editor to a file
Clear - Clears the contents of the Editor
Copy - Copy the contents of the Editor to the Clipboard
Show - Paste contents of current Library or Deck to the Editor
Alpha - Paste all Card Names starting with given letter(s) to Editor
World Magics - Open a DialogBox to select current player's World Magics
Clear Library - Remove all Cards from current player's Library, 500 slots open
Check Cards - Run all routines to modify the SVE file, but don't modify it
-=> Lib/Deck - Run all routines to modify the SVE file, and modify it.
This is the only action that actually modifies the SVE file.
Find with < # - Scan a folder for decks with less than the given number of
Unmatched/Non-coded. If one is found it will be pasted to the
Editor. The button will then read 'Resume', allowing for
review of the deck before Checking, Saving, and/or Resuming
Display IID - If checked will display cards' Internal ID# in the Editor
Display CsvID - If checked will display cards' CSV ID# in the Editor
If both or neither are checked, both or neither are displayed
--------------------------------------------------------------------------------

The 'CSV\Export' Menu Option will create CSV files containing info pulled from
the Shandalar.exe\Magic.exe and MAGIC*.SVE files. These may then be edited
and the changes incorporated by using the 'CSV\Import' Menu Option. The entire
SVE file is extracted to CSV and all of the settings known to this author are
labeled appropriately, else they are labeled as 'Unknown' or by Hex Address.
If 'Shandalar.dll' is present in the program folder (indicating Korath's
version) then 'Magic.exe' is used to create '.Cards.csv', but SVEtool never
alters the file 'Magic.exe' (but WILL import to 'Shandalar.exe'). Simply
remove any CSV files to prevent them from being imported to the SVE\EXE.

Shandalar.exe yields these files:


.Cards.csv - All Cards. Name;ID;Color;Cost;Type;Abilities;P/T;etc
.Enemies.csv - 55 Enemies. Name;Life;Color;Deck;Speed;Ability;Reward;etc

each MAGIC*.SVE yields these files:


.Dungeons.csv - 15 Dungeons\Castles. Cards;MapX/Y;NearTown;Clues;Rules;etc
.Journal.csv - 2000 Log Entries. Log#;LogType;LogContent;MapX;MapY
.OwnedCards.csv - 500 Owned Cards. OC#;CardName;NotInDeck;InDeck#
.Towns.csv - 128 Towns. Name;MapX/Y;Status;Cards;Timers;Visits;etc
.Victories.csv - 1000 Win Entries. Win#;Color;MonsterType
.Wandering.csv - 8 Enemies. WanderType;MapX/Y;Color;Movement;SpawnTimer
.WorldMagics.csv - 12 Magics. WM#;WM Name;Unknown;Price;City#;Duration
.AllElse.txt - 53 Settings. Food;Gold;Amulets;Quests;Magics;Gender;etc

Any labeling of TownNames, CardsNames, MonsterNames, etc in the '*.sve.*.csv'


files are included for readability. Only the leading number is actually used.

SVEtool should be compatible with all versions of Shandalar including


Microprose, Mok, and Korath. It should also be considered alpha software
that could quickly run into compatibility issues as Korath continues to
update Shandalar (like the inhuman machine he is). Tooltips are included
to help explain functionality, so hopefully usage will be a no-brainer.

Special thanks to RyanfaeScotland for his original Shandalar DeckInjector,


whose output data has proved invaluble to the creation of this application.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Below is an exhaustive list of manipulated values and their placement within


the source files. All credit and gratitude goes to Per and Snako for providing
the gratuitously detailed information required to build these functions.

Per's SaveGame Data


-------------------

00001420-00001BEF owned cards (4 bytes per entry)


byte 1-2 card
(note: high nibble of byte 2 is 4 if the card is not in the
current deck, I don't know if this has any significance
in Shandalar)
byte 3 in deck bitmap
1 in deck 1
2 in deck 2
4 in deck 3
0001EA18 ?
0001EA1C deck thingy
(note: always FF FF FF FF; if set to 1, you and your opponent
will split opponent's deck in the next duel; if set to anything
else, will give you no deck, a bugged deck, or a crash)
0001EA20 deck colour bitmap
2 black
4 blue
8 green
10 red
20 white
(note: records the significant colours in your deck for
sideboarding purposes; updates only when you win a duel)
0001EA24 difficulty level
0 apprentice
1 magician
2 sorceror
3 wizard
(note: if you set difficulty higher than 3, monsters will
have more life, the AI will think longer, and it can't be
ruled out that problems or crashes may occur)
0001EA28 ?
0001EA2C-0001EAEB lairs/wandering monsters (24 bytes per entry)
(note: the last slot beginning at 0001EAD4 is used for sieges,
if manually entered the creature will besiege the town
nearest to the given coordinates even if it's a village)
byte 1 type
0 lair
1-36 monster type
(note: FF FF FF FF for none; monsters cannot exist outside
of their own elements)
bytes 5-6 map coordinate
bytes 9-10 map coordinate
byte 13 colour
(note: determines lair type and which wizard gets the mana
tap after a siege)
bytes 17-18 facing/movement
bytes 21-24 respawn timer
(note: when a monster is encountered or a lair explored,
this is set to the current time to prevent it from respawning
too quickly as a creature, though it can still respawn as a
lair; setting all of these to a very high number will result
in a monster-free map as long as you don't explore any of the
lairs that pop up; may also be negative)
0001EAEC current map coordinate (2 bytes)
0001EAF0 current map coordinate (2 bytes)
(note: player and monster coordinates are different from
and more finely scaled than town or journal coordinates,
running roughly from 00 00 to 00 08; x/y axes are tilted
back by 45 degrees with respect to the game view)
0001EAF4 monster timer (4 bytes)
0001EAF8-00021CF7 towns (100 bytes per entry)
byte 1 town type
1 village
2 city (mana link possible)
(note: it is possible to give yourself more than the
ordinary life maximum by converting villages into
cities)
3 city with six cards for sale
(note: normal amount is four for villages, five for
cities)
4 castle
5 ruined castle
(note: setting a castle to ruined sets that
boss to defeated, but setting all five to defeated
means you can't fight Arzakon)
byte 5 map coordinate
byte 9 map coordinate
(note: these run roughly from 00 to 40; changing the
location of towns or dungeons is likely to just make them
disappear because of incompatibility with the map data)
byte 13 city card colour (trading, quest rewards)
0 any
1 colourless
2 black
4 blue
8 green
10 red
20 white
(note: amulet colour is determined by underlying terrain;
this entry does not function as a bitmap)
byte 14 city card type (trading, quest rewards)
0 any
1 land
2 creatures
3 enchantments
4 sorceries
5 fast effects (instants and interrupts)
6 interrupts
7 artifacts
(note: 6 and 7 are not used in the game; 6 will
actually say "Artifacts"; 7 in conjunction with a
colour will let you select "coloured artifacts" -
Mana Batteries and Celestial Prism - but in the
game card type and colour are never specified at
the same time)
byte 17 status bitmap
1 mana link
2 visited
(note: for cities it means they show up in the city
list)
4 failed quest
8 inventory flag
(note: if not set, cards currently in stock will be
randomized; since it's set along with the 2 bit when
you first enter a town and all cards are restocked
anyway at that point the purpose of this bit is
unclear)
byte 18 ruled by wizard
bytes 21-22 card 1
bytes 25-26 card 2
bytes 29-30 card 3
bytes 33-34 card 4
bytes 37-38 card 5
bytes 41-42 card 6
bytes 45-46 card 7
bytes 49-50 card 8
These Card IDs do not match those found in Info.csv.
Instead, they correspond to the order they are found inside
of Shandalar.exe. (e.g. 00 00 is Swamp, 05 00 is Badlands)
bytes 53-56 card 1 restock timer
bytes 57-60 card 2 restock timer
bytes 61-64 card 3 restock timer
bytes 65-68 card 4 restock timer
bytes 69-72 card 5 restock timer
bytes 73-76 card 6 restock timer
bytes 77-80 card 7 restock timer
bytes 81-84 card 8 restock timer
bytes 85-88 quest renewal timer
bytes 89-92 city trade timer
(note: these timers are all originally 18 FC FF FF; once you
purchase a card, accept a quest or enter the amulet trade
interface the corresponding entry will note the current time
according to the 000224B0 timer; after some time has passed
the card will be replaced or a new quest or trade offered
as appropriate)
bytes 93-96 times entered
(note: counts up from -1)
bytes 97-100 time of last visit
(note: uses the timer at 000224B0)
00021CF8-00021D0B current quest (20 bytes)
bytes 1-4 quest type
0 letter for mana link
1 bring card for mana link and amulet
(note: you only get a mana link if destination
is a city)
2 letter for amulet
C9 FF FF FF-FF FF FF FF defeat creature
(note: count backwards to get creature type, e.g.
FF FF FF FF for Witch, C9 FF FF FF for Kiska-Ra)
66 FF FF FF-9B FF FF FF collect reward for creature
(note: count backwards as above; if you enter
65 FF FF FF the townspeople will reward you with
15 amulets for ridding them of the "pesky Arzakon")
byte 5 destination town
(note: reward type and/or amount is mostly defined by
quest type and destination town data; FF FF FF FF for no
ongoing quest)
byte 9 colour (for bring card and/or amulet reward)
bytes 13-16 ?
bytes 17-20 deadline
(note: uses the timer at 000224B0)
00021D0C-00021D1F amulets (4 bytes per entry)
00021D20 gold (4 bytes)
00021D24 food (4 bytes)
00021D28-0002210F duel victories (1 byte per entry)
(note: high nibble specifies colour, low nibble denotes a
monster type as listed below; on Apprentice level two
identical entries will make the corresponding monster(s)
offer you riddles, while three make them flee and/or offer
you tribute; on Magician level you need four and five
entries, respectively; on Sorceror or Wizard level five
entries make them offer you tribute but there are never
any riddles; the ten two-colour monsters set high nibble
and check for scaredness depending on in which terrain
you encounter or fight them and may "overlap" with other
monsters; fights in lairs, mana domes, dungeons or castles
do not create entries)
1 cleric, conjurer, druid, fungus master, sorcerer, warlock
2 elementalist, enchantress, priestess, seer, sorceress,
witch
3 crusader, elvish magi, lord of fate, undead knight
4 ape lord, beastmaster, goblin lord, mind stealer,
paladin, tusk guardian, vampire lord
5 aga galneer, alt-a-kesh, queltosh, saltrem tor
6 merfolk shaman, sedge beast, troll shaman
7 forest dragon, hydra, sea dragon
8 centaur shaman, centaur warchief, dracur, kiska-ra,
mandurang, prismat, whim
9 nether fiend, winged stallion
A arch angel, shapeshifter
B high priest, necromancer, summoner, thought invoker,
war mage
00022110 world magics bitmap 1
1 sleight of hand
2 haggler's coin
4 conjurer's will
8 amulet of swampwalk
10 leap of fate
20 tome of enlightenment
40 quickening
80 fruit of sustenance
00022111 world magics bitmap 2
1 staff of thunder
2 dwarven pick
4 sword of resistance
8 ring of the guardian
00022114-000221D3 world magics data (16 bytes each)
bytes 1-2 ?
(note: like price, this is constant during games and
between games)
bytes 5-8 price
(note: actual price will be half this value; if you insert a
negative price you will get money)
byte 9 city
(note: you can stick all world magics in one city then buy
them one at a time by repeatedly leaving and entering;
Haggler's Coin, Tome of Enlightenment, Fruit of Sustenance
and Ring of the Guardian will not work unless the
corresponding city entry is zero; world magics cannot be
bought from villages)
bytes 13-16 duration
(note: only used for Quickening; if set to a negative
value, e.g. FF FF FF FF, the effect becomes permanent
unless reactivated, even if you don't have Quickening)
000221D4 defeated wizards bitmap
2 black
4 blue
8 green
10 red
20 white
(note: this is used to determine whether wandering monsters
of a certain colour spawn; if set to 3E, you will never
see wandering monsters or lairs, though sieges still occur)
000221D8-000224A7 castles/dungeons (48 bytes each)
bytes 1-2 card 1
bytes 5-6 card 2
bytes 9-10 card 3
These Card IDs do not match those found in Info.csv.
Instead, they correspond to the order they are found inside
of Shandalar.exe. (e.g. 00 00 is Swamp, 05 00 is Badlands)
(note: FF FF FF FF for gold/jewels; you can give cards to
castles, but the third will be replaced by the boss;
dungeons disappear when the card in the first slot is
taken, regardless of whether there are others left)
bytes 13-14 card in effect
(note: FF FF FF FF for none; does correspond to the card
identifiers in Info.csv, e.g. 00 00 is Air Elemental,
while the dungeon cards do not; cards that may help you
include 3D 00 (Demonic Hordes), 64 00 (Gloom), 72 00
(Howling Mine), 86 00 (Karma) or D6 02 (Moat))
byte 17 map coordinate
byte 21 map coordinate
byte 25 town ("North of...")
byte 29 colour
(note: changing the colour of a castle changes the colour
of the boss therein and what free cards you get to pick but
also messes up some statistics)
byte 30 monsters
(note: high nibble is 8 for "large" creatures, 0 for "small",
though the dungeon clues will always read large for castles
and small for dungeons; low nibble unknown, it's always 1
for castles, 2 for dungeons with large creatures, and 3 for
dungeons with small creatures)
byte 33 clues bitmap
1 location
2 creatures
4 rules
(note: having any one will reveal what cards the
location contains and put it on the world map in the case
of dungeons; entering and leaving a dungeon sets this to 6)
byte 37 rules bitmap
1 life carried over
2 remaining life added
10 no cards of dungeon's colour
20 one deck (?)
40 no artifacts
80 no instants or interrupts
bytes 41-44 times entered
(note: counts up from -1)
bytes 45-48 ?
(note: possibly unused, never seems to be anything other
than FF FF FF FF)

000221D8 Castle Necris


00022208 Mysthold
00022238 Wildwood Steading
00022268 Dragon Mount
00022298 Citadel of the Sun
000222C8 The Paths of Chronus
000222F8 Ruins of Su-Chan
00022328 Mound of the Warrior Kings
00022358 Azar's Crypt
00022388 Soulchant Monastery
000223B8 Cave of the Ice Worm
000223E8 Dungeons of Graaz Keep
00022418 Tower of Whim
00022448 Arjonot's Tomb
00022478 Altar of the Cyclops

000224A8 siege timer (4 bytes)


(note: sieges are initiated and - unless dealt with -
completed in accordance with this; goes faster on higher
difficulty levels; the higher this timer, the stronger
creatures you will fight in mana domes)
000224AC number of lairs explored (4 bytes)
(note: as this counter goes up, you will find less lairs
and encounter stronger wandering monsters)
000224B0 quest and restocking timer (4 bytes)
(note: goes about 1/45 as fast as the monster timer)
000224B4 gender
0 female
1 male
000224B8 starting colour
(note: I don't know if this affects anything other than the
coloured box on the character screen)
000224BC extra life in next duel (4 bytes)
(note: count down from FF FF FF FF to get a life penalty, e.g.
FE FF FF FF is -2)
000224C0 card in next duel (2 bytes)
000224C4 current deck
0 deck 1
1 deck 2
2 deck 3
000224C8-0002A1C7 journal (16 bytes per entry)
(note: journal forms the basis of win/loss record and other
statistics, but not life or wizard stats or whether you are
feared by creatures; also it doesn't even work very well in
the game, with entries turning up blank or incomplete)
byte 1 event
1 visited town
2 defeated/lost to
3 entered dungeon
4 entered castle
5 explored lair
(note: if you only find a card, it results in an
"acquired spell" entry instead)
6 bought world magic
7 freed city
8-A acquired spell (defines high byte of card
identifier)
D saved city
F received quest (not displayed)
10 completed quest
11 failed quest (not displayed)
12 used world magic
2 leap of fate
3 quickening
4 staff of thunder
5 sword of resistance
(note: Conjurer's Will is not logged)
13 got dungeon treasure (not displayed)
bytes 5-8 qualifiers (enemy, card, town, quest type etc.)
(note: for won/lost, high nibble 8 means victory; for
card, only the low byte; for using world magic see above)
byte 9 map coordinate
byte 13 map coordinate
0002A1C8 current journal length (2 bytes)
(note: goes to D0 07 - 2000 entries - then stops logging;
in-game journal only reads to the first blank entry)
0002A1CC ?
(note: possibly unused, never seems to be anything other
than FF FF FF FF)
0002A1D0 ?
(note: always seems to be 1)
0002A1D4 your primary colour in last duel
0002A1D8 enemy primary colour in last duel
0002A1DC ?
(note: 0 before your first duel, then seemingly always 2)
0002A1E0-0002A21F name
(note: ends at the first binary zero; name can contain 63
letters even though the game will only let you enter 25
when you start a new game, however if you make it longer
than 55 letters it will crash the game at certain points)
0002A220 siege indicator
(note: will always be 0 when there is no ongoing siege,
changes to 1 when a siege starts; changing it back to 0
does not have any apparent effect, so its purpose is
unclear)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Cards.dat card data, 38 words:


------------------------------

Code: Select all


1 image number
2 big card name string address
3 small card name string address
4 editions
1 not in 4th (not used for "00 0C" cards)
2 antiquities
4 arabian nights
8 astral
10 chronicles
20 the dark
40 4th edition
80 ? (used for: basic lands, assembly worker, control magic,
djinn of the bottle token, mahamoti djinn, morale,
royal assassin, segovian leviathan, sindbad,
sunglasses of urza, tetravite token, wall of ice,
will-o-the-wisp, wasp token, xenic poltergeist)

1 legends
2 promotional
4 restricted (not consistent)
8 unlimited/revised
10 unused
5 colour
1 black
2 blue
3 artifact
4 gold
5 green
6 land
7 red
8 white
6 type
1 artifact
2 enchantment
3 instant
4 interrupt
5 land
6 sorcery
7 creature
8 token
7 subtype (for enchantments and creatures, see Menus.txt)
8 type string address
9 utility category ("life gain" etc., not consistent, probably unused)
0 none
1 ante card
2 card stealing
3 counter
4 direct damage
5 discard
6 card drawing
7 life gain
8 damage prevention
9 land destruction/manipulation
A mana source
B bounce/untap manipulation/nettling/tapping/manabarbs
C pumping
10 rarity
1 common
2 rare
3 dungeon card/astral/promotional
4 uncommon
11-13 casting cost (1st byte colourless, 2nd black, 3rd blue,
4th "brown" (Mishra's Workshop), 5th "gold", 6th green,
7th "land", 8th red, 9th white)
14 unused
15 unused
16 unused
17 artist (see Menus.txt)
18 number of card images
19 unused
20 wvl thingy string address 1
21 wvl thingy string address 2
22 wvl thingy string address 3
23 wvl thingy string address 4
24 unused
25 unused
26 unused
27 unused
28 unused
29 ? (always 1)
30 rules text string address
31 flavour text string address
32 power
33 toughness
34 number of abilities
35-36 abilities
1 banding
2 desertwalk
3 first strike
4 flying
5 forestwalk
6 free action
7 islandwalk
8 legendary landwalk
9 mountainwalk
A plainswalk
B poison
C prot black
D prot red
E prot white
F quick draw
10 rampage
11 regeneration
12 stoning
13 swampwalk
14 trample
15 web
16 gives banding
17 gives first strike
18 gives flying
19 gives forestwalk
1A gives free action
1B gives islandwalk
1C gives mountainwalk
1D gives plainswalk
1E gives prot artifacts
1F gives prot black
20 gives prot blue
21 gives prot green
22 gives prot red
23 gives prot white
24 gives quick draw
25 gives rampage
26 gives regeneration
27 gives stoning
28 gives swampwalk
29 gives trample
2A gives web
37 poison/rampage specs
38 regeneration cost string address
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Magic.exe. and Shandalar.exe card data, 72 words:


-------------------------------------------------

Code: Select all


1 ?
2-15 name
16-36 unused
37-40 ID number (see Info.csv)
41 card type bitmap
1 land
2 creature
4 enchantment
8 sorcery
10 instant
20 interrupt
40 artifact
80 effect (legacy card etc.)
42 special type
0 wall
1 merfolk
2 zombies
3 goblins
4 dwarves
5 efreet
6 djinn
7 rats (plague/bog, probably unused)
8 urza land
9 orcs
A elephant
B mammoth
C dual land
D basic land
FF none
43 colour bitmap (only multiple for dual lands and some mana artifacts)
1 artifact/land
2 black
4 blue
8 green
10 red
20 white
40 "brown" (Mishra's Workshop)
44 coloured casting cost
45 colourless casting cost
46 unused
47-48 power
49-50 toughness
51-52 unused
53-56 code reference (e.g. 50 AA 53 for vanilla creatures in
Magic.exe, 0C 92 54 for creatures that attack without
tapping, etc.; effects may fail partially or completely
if you assign a behaviour to a different sort of
permanent than the original one; also note these are
different in Magic.exe and Shandalar.exe)
57 abilities bitmap 1
1 swampwalk
2 islandwalk
4 forestwalk
8 mountainwalk
10 plainswalk
20 flying
40 banding
80 trample
58 abilities bitmap 2
1 first strike
2 regeneration (needs matching code)
4 web
59 abilities bitmap 3
2 banding when attacking
60 unused
61 card type bitmap 1
1 activated ability/upkeep effect
2 interrupt effects (lifeforce/deathgrip/goblin artisans/
priest of yawgmoth)
4 damage prevention
8 pump power
10 pump toughness
20 counters/power surge/nafs asp
40 copper tablet/disrupting scepter
80 expensive in shandalar
62 card type bitmap 2
1 dungeon card
2 double cost in shandalar
4 lich/most arabian nights/most antiquities
8 not in shandalar card selector
10 mana source
20 interrupt
40 interrupt effects (lifeforce/deathgrip/goblin artisans)
80 animated (only in saves)
63 card type bitmap 3
1 mana launderer
2 some X costs or equivalents
4 bodyguard
8 raging river
10 two-headed giant of foriys
20 lich
40 pay to attack (jade statue/leviathan/brainwash)
80 jade statue
64 card type bitmap 4
1 forced attack (juggernaut, nettling imp, siren's call)
2 raging river
4 attack stopping (akron legionnaire, moat)
8 fellwar stone
10 instill energy/ifh-biff efreet
65 ? (FF for all cards except astral, ghost ship, diabolic machine,
sunglasses of urza, 1-3 for animated and copy cards in saves)
66 when to play bitmap
1 cast pre-combat main
2 cast declare attackers
4 cast declare blockers
8 cast post-combat main
10 use ability pre-combat main + upkeep effect (not
consistently used for upkeep effects)
20 use ability declare attackers
40 use ability declare blockers
80 use ability post-combat main
67 edition bitmap (only 4th and promotional cards are selected for
town inventories)
1 4th edition + tokens
2 unlimited/revised but not in 4th
4 arabian (some) but not in 4th
8 arabian (some)/antiq (some)/dark but not in 4th
10 legends but not in 4th
20 antiq (some) but not in 4th
40 astral
80 promotional
68 unused
69-72 rating (-2 to 3, used to determine card cost in Shandalar and
possibly for card selection in sealed deck and other card
evaluation contexts)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Shandalar.exe monster data, 140 words:


--------------------------------------

Code: Select all


1-10 article
11-60 name singular
61-110 name plural
111 gender
66 female
6D male
112 base life (apprentice level)
(note: apparently the game expects certain
values for life; if you change them, those
monsters probably won't spawn at all)
113 ? (1-3)
(note: 2 for most creatures, affects bribe size
very slightly, no idea if that's all it does)
114 victory type
1 male foot
2 female foot
3 rider
4 fist (ape lord etc.)
5 genie
6 merfolk/troll
7 serpent
8 centaur/dragon
9 fiend/stallion
A angel/shifter
B lieutenant
C boss
D arzakon
115-116 colour bitmap
2 black
4 blue
8 green
10 red
20 white
117-120 deck number
121-124 speed/movement/? bitmap
1 extra fast (fiend/angel/stallion)
2 (necro/shifter/summoner)
4 (war m./mind s./djinn)
8 (c. sham)
10 (merfolk/elem)
20 (ape/c. sham)
40 (sedge/elem)
80 (warchief)

1 invisibility (conjurer/troll s.)


2 (mounted except c. sham)
125-128 ?
1 (warlock/high priest/merfolk/elvish m./sorceress/fungus/warchief)
2 unused
4 (witch/seer/c. sham)
8 (pala/summo/sorc)
10 (cleric)
20 (troll s./sedge)
40 (war mage)
80 (conjurer/ape lord)
129-132 ability
1 have card
2 mind control
4 try this deck
8 first strike
10 unused (swap enemy)
20 (thought invoker - nothing?)
40 have card
80 have card

01 swap enemy
133-136 reward
1 life carry over
2 unused (teleported)
4 win random card
8 extra gold
10 first strike in next duel
20 my card in next duel
40 card of choice (selector)
80 random artifact in next duel

1 random artifact in next duel


2 extra food
4 teleported
8 extra life
10 duplicate card
137-140 card (see Info.csv)
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Other misc tidbits:


-------------------

Code: Select all


Restricted cards:

Deckdll.dll: 30E78
Magic.exe: 178CF8
1-4 card number
5-8 status
1 ante
2 restricted
4 banned

City cards in Shandalar.exe at 18A9F0.


Deckbuilder.csv defines set sorting in the deck editor.
Rarity.csv defines amulet cost in Shandalar.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Snako's SVE Offsets


-------------------
00000000-0000047F
00000480-000010FF

v1 = sub_5030BD(&byte_594208[72 * dword_73C00C], 1152) & 1;


v2 = sub_5030BD(&dword_58D3C8, 3200) & v1;
v3 = sub_5030BD(&dword_77E6CC, 4) & v2;
v4 = sub_5030BD(&dword_74B15C, 4) & v3;
v5 = sub_5030BD(&dword_7658C0, 4) & v4;
v6 = sub_5030BD(&dword_74F1E0, 4) & v5;
v7 = sub_5030BD(&dword_74D26C, 4) & v6;
v8 = sub_5030BD(&dword_74B8B8, 4) & v7;
v9 = sub_5030BD(&dword_74C95C, 4) & v8;
v10 = sub_5030BD(&dword_77E590, 4) & v9;
v11 = sub_5030BD(&dword_765E24, 4) & v10;
v12 = sub_5030BD(&dword_97F1B0, 4) & v11;
v13 = sub_5030BD(&dword_77CF1C, 4) & v12;
v14 = sub_5030BD(&dword_77EDC0, 4) & v13;
v15 = sub_5030BD(&dword_77E058, 4) & v14;
v16 = sub_5030BD(&dword_77F1C4, 4) & v15;
v17 = sub_5030BD(&unk_74C940, 4) & v16;
v18 = sub_5030BD(&dword_7806E8, 4) & v17;
v19 = sub_5030BD(&dword_77CA10, 4) & v18;
v20 = sub_5030BD(&dword_77C57C, 4) & v19;
v21 = sub_5030BD(&dword_74C960, 4) & v20;
v22 = sub_5030BD(&dword_77D170, 64) & v21;
v23 = sub_5030BD(&dword_74C790, 408) & v22;
v24 = sub_5030BD(&dword_74CDC0, 88) & v23;
v25 = sub_5030BD(&dword_7806E0, 8) & v24;
v26 = sub_5030BD(&dword_7806A0, 64) & v25;
v27 = sub_5030BD(&dword_77ED80, 64) & v26;
v28 = sub_5030BD(&X, 4) & v27;
v29 = sub_5030BD(&dword_74C0E8, 4) & v28;
v30 = sub_5030BD(&dword_77F438, 4) & v29;
v31 = sub_5030BD(&dword_77E58C, 4) & v30;
v32 = sub_5030BD(&dword_74CDB4, 4) & v31;
v33 = sub_5030BD(&dword_77E6D0, 4) & v32;
v34 = sub_5030BD(&dword_77E588, 4) & v33;
5152
v35 = sub_5030BD(&deck, 2000) & v34;
v36 = sub_5030BD(&dword_8CA270, 90600) & v35;
v37 = sub_5030BD(&dword_94F3A0, 9664) & v36;
v38 = sub_5030BD(&dword_94D930, 4000) & v37;
v39 = sub_5030BD(&dword_8E0B00, 4000) & v38;
v40 = sub_5030BD(&dword_8A9410, 4000) & v39;
v41 = sub_5030BD(&dword_8E2E10, 128) & v40;
v42 = sub_5030BD(&dword_94E968, 4) & v41;
v43 = sub_5030BD(&dword_93A798, 4) & v42;
v44 = sub_5030BD(&dword_94D46C, 4) & v43;
v45 = sub_5030BD(&dword_939CE8, 4) & v44;
v46 = sub_5030BD(&dword_8E3EC0, 96) & v45;
v47 = sub_5030BD(&unk_7A0228, 8) & v46;
v48 = sub_5030BD(&dword_8E2690, 32) & v47;
v49 = sub_5030BD(&dword_92F414, 4) & v48;
v50 = sub_5030BD(&dword_7BEAA0, 16) & v49;
v51 = sub_5030BD(&dword_8C83EC, 4) & v50;
v52 = sub_5030BD(dword_78E970, 8) & v51;
v53 = sub_5030BD(&dword_78E5E0, 4) & v52;
v54 = sub_5030BD(byte_7BE9F0, 100) & v53;
v55 = sub_5030BD(&dword_8C83F0, 8) & v54;
v56 = sub_5030BD(&Val, 8) & v55;
v57 = sub_5030BD(&dword_94CF68, 8) & v56;
v58 = sub_5030BD(&dword_7BEB10, 16) & v57;
v59 = sub_5030BD(&dword_7A82E0, 4) & v58;
v60 = sub_5030BD(&dword_8E26B8, 4) & v59;
v61 = sub_5030BD(&dword_94D63C, 4) & v60;
v62 = sub_5030BD(&dword_94D464, 4) & v61;
v63 = sub_5030BD(&dword_8C83F8, 4) & v62;
v64 = sub_5030BD(&dword_8CA260, 4) & v63;
v65 = sub_5030BD(&dword_7A04A4, 4) & v64;
v66 = sub_5030BD(&dword_8A93C8, 4) & v65;
v67 = sub_5030BD(&dword_7BE604, 4) & v66;
v68 = sub_5030BD(&dword_8C8274, 4) & v67;
v69 = sub_5030BD(&dword_8E26BC, 4) & v68;
v70 = sub_5030BD(&dword_8C776C, 4) & v69;
v71 = sub_5030BD(&dword_8C7468, 4) & v70;
v72 = sub_5030BD(&dword_8E1AA8, 4) & v71;
v73 = sub_5030BD(&dword_951BDC, 4) & v72;
v74 = sub_5030BD(&dword_8C8F50, 4) & v73;
v75 = sub_5030BD(&dword_8E3824, 4) & v74;
v76 = sub_5030BD(&dword_94E928, 4) & v75;
v77 = sub_5030BD(&dword_8E26B0, 4) & v76;
v78 = sub_5030BD(&dword_7A01E0, 4) & v77;
v79 = sub_5030BD(&dword_8BCF74, 4) & v78;
v80 = sub_5030BD(&dword_8BCF7C, 4) & v79;
v81 = sub_5030BD(&dword_7A009C, 4) & v80;
v82 = sub_5030BD(&dword_7A090C, 4) & v81;
v83 = sub_5030BD(&dword_939E5C, 4) & v82;
v84 = sub_5030BD(&dword_8BCF6C, 4) & v83;
v85 = sub_5030BD(&dword_7BEFF0, 4) & v84;
v86 = sub_5030BD(&dword_93A794, 4) & v85;
v87 = sub_5030BD(&dword_8E2688, 4) & v86;
v88 = sub_5030BD(&dword_8E2674, 4) & v87;
v89 = sub_5030BD(&dword_8E3E70, 4) & v88;
v90 = sub_5030BD(&dword_94D178, 4) & v89;
v91 = sub_5030BD(&dword_7BF4B8, 4) & v90;
v92 = sub_5030BD(&dword_8E2FC4, 4) & v91;
v93 = sub_5030BD(&dword_94F280, 4) & v92;
v94 = sub_5030BD(&dword_930F5C, 4) & v93;
v95 = sub_5030BD(&dword_8C8AFC, 4) & v94;
v96 = sub_5030BD(&dword_7BEFEC, 4) & v95;
v97 = sub_5030BD(&dword_7A0098, 4) & v96;
v98 = sub_5030BD(&dword_8E3820, 4) & v97;
v99 = sub_5030BD(&dword_939BF4, 4) & v98;
v100 = sub_5030BD(&dword_7BFE00, 64) & v99;
v101 = sub_5030BD(&dword_8BCFE4, 4) & v100;
v102 = sub_5030BD(&dword_8E1C30, 8) & v101;
v103 = sub_5030BD(&dword_9300B0, 64) & v102;
v104 = sub_5030BD(&dword_8AA72C, 4) & v103;
v105 = sub_5030BD(&unk_8E2670, 4) & v104;
v106 = sub_5030BD(&dword_78E5D8, 4) & v105;
v107 = sub_5030BD(&dword_951970, 4) & v106;
v108 = sub_5030BD(&dword_7BF4BC, 4) & v107;
v109 = sub_5030BD(&dword_7A81A0, 4) & v108;
v110 = sub_5030BD(&dword_78E5DC, 4) & v109;
v111 = sub_5030BD(&dword_9300F4, 4) & v110;
v112 = sub_5030BD(&dword_8E3310, 64) & v111;
v113 = sub_5030BD(&dword_8E37E0, 64) & v112;
v114 = sub_5030BD(&dword_94D650, 64) & v113;
v115 = sub_5030BD(&dword_8BCE38, 8) & v114;
v116 = sub_5030BD(&dword_8C8468, 8) & v115;
v117 = sub_5030BD(&dword_8C6A30, 4) & v116;
v118 = sub_5030BD(&dword_930640, 4) & v117;
v119 = sub_5030BD(&dword_78E82C, 4) & v118;
v120 = sub_5030BD(&dword_7BE9E8, 8) & v119;
v121 = sub_5030BD(&dword_8C73F0, 48) & v120;
v122 = sub_5030BD(&dword_8C759C, 4) & v121;
v123 = sub_5030BD(&dword_94CF5C, 4) & v122;
v124 = sub_5030BD(&dword_8C89CC, 4) & v123;
v125 = sub_5030BD(&dword_8BD1FC, 4) & v124;
v126 = sub_5030BD(&dword_7BE740, 8) & v125;
v127 = sub_5030BD(&dword_94D2B0, 128) & v126;
v128 = sub_5030BD(&dword_939310, 256) & v127;
v129 = sub_5030BD(&dword_93A940, 256) & v128;
v130 = sub_5030BD(&dword_8A9230, 128) & v129;
v131 = sub_5030BD(&dword_7BE4E0, 128) & v130;
v132 = sub_5030BD(&dword_8C6AE4, 4) & v131;
v133 = sub_5030BD(&dword_8C7420, 4) & v132;
v134 = sub_5030BD(&dword_8E09C4, 4) & v133;
v135 = sub_5030BD(&dword_7A07D4, 4) & v134;
v136 = sub_5030BD(&dword_8E3308, 4) & v135;
v137 = sub_5030BD(&dword_78E838, 4) & v136;
v138 = sub_5030BD(&dword_7BE9AC, 4) & v137;
v139 = sub_5030BD(&dword_8E09C0, 4) & v138;
v140 = sub_5030BD(&dword_94EAB0, 2000) & v139;
v141 = sub_5030BD(&dword_8C9A90, 2000) & v140;
v142 = sub_5030BD(&dword_94D45C, 4) & v141;
v143 = sub_5030BD(&dword_93063C, 4) & v142;
v144 = sub_5030BD(&dword_7A01DC, 4) & v143;
v145 = sub_5030BD(&dword_94D640, 4) & v144;
v146 = sub_5030BD(&dword_8E266C, 4) & v145;
v147 = sub_5030BD(&dword_92E820, 4) & v146;
v148 = sub_5030BD(&dword_93A8C0, 4) & v147;
125464
v149 = sub_5030BD(&dword_591200, 4) & v148;
v150 = sub_5030BD(&dword_591204, 4) & v149;
v151 = sub_5030BD(&dword_591208, 4) & v150;
v152 = sub_5030BD(&dword_78CF04, 4) & v151;
v153 = sub_5030BD(&dword_78DF34, 4) & v152;
v154 = sub_5030BD(&dword_78CE20, 192) & v153;
v155 = sub_5030BD(&dword_5911F8, 4) & v154;
v156 = sub_5030BD(&dword_5911FC, 4) & v155;
v157 = sub_5030BD(&dword_78CF00, 4) & v156;
v158 = sub_5030BD(&dword_789940, 12800) & v157;
v159 = sub_5030BD(&dword_78CE10, 4) & v158;
v160 = sub_5030BD(&dword_5863B0, 4) & v159;
v161 = sub_5030BD(&dword_7894F0, 4) & v160;
v162 = sub_5030BD(&dword_78DF6C, 4) & v161;
v163 = sub_5030BD(&dword_78992C, 4) & v162;
v164 = sub_5030BD(&dword_789910, 20) & v163;
v165 = sub_5030BD(&Gold, 4) & v164;
v166 = sub_5030BD(&dword_5863A8, 4) & v165;
v167 = sub_5030BD(&byte_789500, 1000) & v166;
v168 = sub_5030BD(&dword_78CEE4, 4) & v167;
v169 = sub_5030BD(&Scards, 192) & v168;
v170 = sub_5030BD(&dword_789904, 4) & v169;
v171 = sub_5030BD(&dword_78CB40, 720) & v170;
v172 = sub_5030BD(&dword_59120C, 4) & v171;
v173 = sub_5030BD(&dword_78DF30, 4) & v172;
v174 = sub_5030BD(&dword_73EA20, 4) & v173;
v175 = sub_5030BD(&dword_94D634, 4) & v174;
v176 = sub_5030BD(&dword_73EA88, 4) & v175;
v177 = sub_5030BD(&X, 4) & v176;
v178 = sub_5030BD(&dword_5863B4, 4) & v177;
v179 = sub_5030BD(&currentDeck, 4) & v178;
v180 = sub_5030BD(&dword_7817F0, 32000) & v179;
v181 = sub_5030BD(&dword_789930, 4) & v180;
v182 = sub_5030BD(&dword_930AB0 + 11, 4) & v181;
v183 = sub_5030BD(&dword_930AB0 + 12, 4) & v182;
v184 = sub_5030BD(&dword_8C6A24, 4) & v183;
v185 = sub_5030BD(&dword_931384, 4) & v184;
v186 = sub_5030BD(&dword_8C746C, 4) & v185;
v187 = sub_5030BD("Ned Way the Ratiocinator", 64) & v186;
strcpy(byte_7A0770, "Ned Way the Ratiocinator");
return sub_5030BD(&dword_73EA64, 4) & v187;

You might also like