It is currently 14 Aug 2018, 10:50
   
Text Size

Shandalar Deck Injector

MicroProse's Shandalar Campaign Game, now with new cards & a new look!

Moderators: drool66, stassy, BAgate, gmzombie, Aswan jaguar, CCGHQ Admins

Re: Shandalar Deck Injector

Postby Per » 04 Jul 2012, 20:13

CirothUngol wrote:Have you had any luck mapping the rest of the Shandalar .SVE file?
Back in 2007 I mapped almost everything that, as far as I could tell, has any effect on the game state. I don't know how much you have already, but maybe some of it could be of help.

Code: Select all
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
   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
   (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)
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)
(There's one byte, "card in next duel", that I know more about now than when this was written.)
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

Re: Shandalar Deck Injector

Postby RyanfaeScotland » 05 Jul 2012, 07:08

All of a sudden a wild Per appears...!

Well looks like that will have a lot of time!

I've often wondered how much game format information (or info in general) is just sitting about on people's computers whilst others are out searching for it. Is this info posted up anywhere else Per or is this its first appearance?

Thank you very much for sharing, I'll definitely make use of it :)
RyanfaeScotland
Programmer
 
Posts: 38
Joined: 04 Apr 2010, 11:29
Has thanked: 12 times
Been thanked: 6 times

Re: Shandalar Deck Injector

Postby CirothUngol » 05 Jul 2012, 07:51

Per wrote:Back in 2007 I mapped almost everything that, as far as I could tell, has any effect on the game state. I don't know how much you have already, but maybe some of it could be of help.
Well, looky there!
That's the exact kind of info we'd need. Thanx for stepping forward with such a well-notated map.

...and thanx for signing up just to share it with us.
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


My MtG Folder on DropBox, Google Drive, and OneDrive.
User avatar
CirothUngol
Programmer
 
Posts: 429
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 100 times

Re: Shandalar Deck Injector

Postby RyanfaeScotland » 05 Jul 2012, 08:20

CirothUngol wrote:...
...and thanx for signing up just to share it with us.
Oh yeah I noticed that too, love it when people do that!
RyanfaeScotland
Programmer
 
Posts: 38
Joined: 04 Apr 2010, 11:29
Has thanked: 12 times
Been thanked: 6 times

Re: Shandalar Deck Injector

Postby Bog Wraith » 06 Jul 2012, 15:29

RyanfaeScotland wrote:
CirothUngol wrote:...
...and thanx for signing up just to share it with us.
Oh yeah I noticed that too, love it when people do that!
Yes, thank you! =D>
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
User avatar
Bog Wraith
Global Mod 1 (Ret)
 
Posts: 1072
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 385 times
Been thanked: 148 times

Re: Shandalar Deck Injector

Postby Per » 06 Jul 2012, 18:51

RyanfaeScotland wrote:I've often wondered how much game format information (or info in general) is just sitting about on people's computers whilst others are out searching for it. Is this info posted up anywhere else Per or is this its first appearance?
I haven't posted this list anywhere, but I used it to create a couple of small utility programs that I put up here [not being able to post URLs as a new user :P]. (I also posted on the Wizards board years ago to gauge interest in my Shandalar mod - there was none that I could find. This was I think before even the original Manalink 2.0 surfaced, and my impression at the time was that no one cared about the game any more.)

I also mapped most of the card data in cards.dat, magic.exe and shandalar.exe, the creature data in shandalar.exe, city cards in shandalar.exe, and banned/restricted status in deckdll.dll, but I assume you have all of that already. My big disappointment was not being able to find where the game keeps track of which cards.dat slots are considered valid in the deck editor - I had a brief exchange with Mok but at that time he was no longer into modding and didn't remember any specifics except that it was probably compressed in deckdll.dll or somewhere.

CirothUngol wrote:Thanx for stepping forward with such a well-notated map.

...and thanx for signing up just to share it with us.
I've been semi-lurking here for a while, but this was the first time I saw something being requested that I could actually provide. There's actually something I could ask for in return, namely WiSK's old Shandalar bug list, in case anyone has it. Maybe I could start a thread for that.
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

Re: Shandalar Deck Injector

Postby Huggybaby » 06 Jul 2012, 19:21

Start a new thread, necro an old thread, we don't care. Pointless overmoderation and threadlocking is not what we do.

Still, hurry up and reach your five posts so you can start including links and such! Feel free to post any of your other data too, who knows what someone could use. As you can see there is still plenty of interest and life left in good old Shandalar.
User avatar
Huggybaby
Administrator
 
Posts: 3071
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: Shandalar Deck Injector

Postby Per » 06 Jul 2012, 22:47

Well then, here's some more stuff.

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.
Of course, I'd be happy if you can fill me in on anything that you know that's missing or incomplete here.
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

Re: Shandalar Deck Injector

Postby Per » 06 Jul 2012, 22:48

Heinous doublepost for the purposes of postcount++
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

Re: Shandalar Deck Injector

Postby Huggybaby » 06 Jul 2012, 22:54

User avatar
Huggybaby
Administrator
 
Posts: 3071
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: Shandalar Deck Injector

Postby CirothUngol » 09 Jul 2012, 05:14

Great info, man!
Earlier this year, I created a break-down of the Manalink 2.0 CARDS.DAT that I used to write a DAT2CSV Converter into the PlayDeck Analyser. Manalink 2.0 added a lot of stuff to CARDS.DAT, but the base format is still the same, so the DAT2CSV will work on the Microprose originals as well. You can check out the forum thread HERE, if you'd care to take a look.

Were you've mentioned Shandalar.exe Card Data and Monster Data... which file are you reading that from? Also, have you done any investigating into the Shandalar .MAP files? How about the .SPR sprite files, any idea how to read those?

Thanx for sharing more of your tidbits on Shandalar, there're some people here who think that's pretty cool. ^_^
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


My MtG Folder on DropBox, Google Drive, and OneDrive.
User avatar
CirothUngol
Programmer
 
Posts: 429
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 100 times

Re: Shandalar Deck Injector

Postby Per » 10 Jul 2012, 17:44

CirothUngol wrote:Were you've mentioned Shandalar.exe Card Data and Monster Data... which file are you reading that from?
This is all from Manalink 1.3(.2), where the exes held data on how the cards work (mostly), and Cards.dat held info on how the cards look (mostly), and some other files held data on some other things hidden among lots and lots of unused data, and everything was basically an unholy mess. I did all my modding by hexediting the exes and dat and making changes and corrections to the csv and txt files.

CirothUngol wrote:Also, have you done any investigating into the Shandalar .MAP files? How about the .SPR sprite files, any idea how to read those?
Nope, haven't dealt with anything compressed, which I suspect is why I never found that "visible in deck editor" thing (and if anyone knows where that is in 1.3(.2), I'd love to hear).

CirothUngol wrote:Thanx for sharing more of your tidbits on Shandalar, there're some people here who think that's pretty cool. ^_^
You're welcome! I think what you're doing with Manalink 2+ is pretty cool as well, even though I never got around to playing it.

Now that I should be able to post links, here's where I posted those utilities. They were compiled as DOS executables and will not work on 64-bit systems I guess? If I paste the readmes here you should get the general idea of what they do. (When I posted this on the WotC boards the reaction I got was basically "You shouldn't cheat at games".)

Code: Select all
Shandalar Haxxer
----------------

By Per Jorner
v1.0 (May 2008)
v1.1 (July 2009)

MicroProse's Magic: the Gathering is a great game, but did you ever feel that constantly averting sieges in Shandalar was more like a chore than a challenge? Or does it bother you that the non-resetting of your life counter in dungeons rewards certain decks unreasonably while punishing others equally unreasonably? Or does the idea of dungeons with Power Struggle in effect make your eye twitch? If so, this is the utility for you. It will rescue your game if you have that bothersome Spell of Dominion hanging over your head, and it will do your dirty work if you can't be bothered to hunt down world magics.

The program does all this by altering bits and bytes in an existing save file of yours. When it asks which save you want to edit, press a key from 1 to 0, corresponding to the order on your in-game list of saves, or A for the auto-save. Then just press Y or N at the prompts and input stuff where appropriate. (For anyone who's interested, the haxxer edits the .sve part of a Shandalar save. Magic3.sve is the auto-save, while those ranging from 4 to D are your regular saves in order.)

There should be no way for the program to mess up a save, but I cannot absolutely guarantee that it won't do so at some time in some corner of the universe, so if you want to be entirely safe, back up your save beforehand. For that matter, you may want to back it up in case you press the wrong key or have second thoughts about something.

The utility is written for Manalink 1.3 saves, meaning it will also work with saves from a Manalink 2.0 install (which is the same where Shandalar is concerned), or a modified Manalink 1.3 where changes are limited to the data set. It needs to be run from the Magic folder where your save games reside.

The options presented to you are the following:

* Change difficulty level?

Lets you change the difficulty from the one you started out with. 0 is Apprentice, 3 is Wizard. You can actually set it to anything up to 255 if you like: monsters will have correspondingly more life - Arzakon gets 100 more for each level, I presume - and the AI will spend more time working out its plans. In that regard we're probably talking diminishing returns, though. Setting difficulty higher than 3 will cause a minor display error on the character screen which can be happily ignored and may also cause crashes or freezes, but hopefully that shouldn't be too common. Difficulty-dependent dungeon settings are not affected by this option.

* Give more mana links?

There will be a second prompt with an option to add mana links in all cities. If you press N you'll get to enter your desired number of mana links to add in random cities. If you press Y there will be a third prompt (and a fourth) asking if you also want to turn all villages into cities. Starting every duel at 123 life is not really anyone's idea of suspense, but the option is there. Adding a mana link in a city also flags it as visited so that it shows up in the city list (but not on the map screen).

* Free all cities and end ongoing siege?

If the enemy wizards have four mana domes each and are busy working on the fifth, this hack is your friend. It will remove all mana domes and as an added bonus stop a siege if it's underway.

* Set all wizards to dead (but enable all monsters)?

Using this option will set all wizards to defeated, leaving their castles in ruin. This means you can't reach the end of the game and fight Arzakon, so why would anyone want to do that? Well, the thing is, if the wizards are all dead, there won't be any sieges, which is great if you hate sieges. There will still be monsters running around so that you have enemies to fight and lairs to visit. If you had defeated one or more wizards previously, their monsters will return and join in the fun. Special note: if you use this function, you cannot trigger the endgame by reviving a single wizard and defeating it. To meet Arzakon, set all wizards to alive using either of the following two functions, then defeat them normally and/or set all of them but one to dead using the toggle function.

* Set all wizards to alive (and enable all monsters)?

When you want to wrap up your siege-free game, or you just want to reset things in general, this hack comes in handy. It will restore all the wizards to life, rebuild their castles and set their armies loose. (It may seem odd at first that these last two hacks are not symmetric when it comes to the monsters, but if you think about it, a world where you do nothing but run around and deliver messages between village elders doesn't really make for an exciting game, however unobjectionable to the common folks of Shandalar.)

* Toggle wizards (and their monsters) separately?

This option allows you to toggle the state of each wizard. Using this function to kill a wizard will also stop their minions from appearing on the world map, as if you'd defeated them normally.

* Reset all failed quests?

Failing a quest is of very little importance in the game, especially since there's a bug that may cause the flag to be set in the wrong place. It won't stop you from getting all mana links or anything. Still, this option is here for people who are satisfied with nothing less than perfection.

* Restock all town inventories?

Normally, town inventories don't renew unless you purchase from what they already have. This option simply makes them all randomize their inventories as if you had just arrived in Shandalar.

* Give a bunch of amulets?

Gives you 10 amulets of each colour to a maximum of 255 (assuming you didn't already have more). If you say yes at the second prompt, your number of amulets is simply set to 255 of each colour instead. If you had a million before, you now have less.

* Give a bunch of food and gold?

Gives you 5000 gold and 500 food to a maximum of 65535 (assuming you didn't already have more). Converting the gold to additional food is easily done in the game if you only want more grub. Choosing the high-powered option sets your amount of food and gold to 65535. How you're going to carry it is your problem.

* Make all monsters afraid of you?

Records enough victories against each monster type and colour that they'll offer you tribute on Wizard level. (If you set the difficulty higher, they'll still pay tribute.) This does not affect your win/loss record or your journal.

* Reset monster victories and timers?

This function deletes all recorded victories against monsters and resets all timers associated with the spawning of lairs and monsters. Additionally, any nearby monsters are removed, but an ongoing siege is not stopped. This means you will start afresh where monster encounters are concerned, finding more lairs and meeting weak monsters that normally stop spawning a while into the game. Again, the win/loss record will not reflect this.

* Give all world magics?

Fairly straightforward.

* Turn off cards in effect in dungeons?

Do you hate those Power Struggles with a passion? Do you roll your eyes when the AI trips itself up trying to make use of its free Leviathan? Make them go away with the push of a button. Note that monsters in castles sometimes get two free cards and the second card is not affected by this hack.

* See all dungeon clues?

Provides the three types of clues - location, colour and rules - for all castles and dungeons. Entering and leaving a dungeon will obscure its location as usual.

* Turn off life carrying over in dungeons?

This stops life gain and/or loss from carrying over between duels in castles and dungeons. That's pretty much a must if you want to play suicide black or stupid red burn throughout the game, so let's not consider this a dirty cheat. The dungeon clues screen will show the messages "Life losses carried over" AND "Remaining life added to next duel", but this is actually what it normally looks like if you play on the easier difficulties. If you say yes at the second prompt, not only do life losses not carry over, but life bonuses from dice DO carry over (effectively you get a higher life total for as long as you remain in the dungeon), and losing a duel will not throw you out of the dungeon, although the corridor space the monster was occupying will become impassable. In this case the dungeon clues screen won't say anything about life.

* Clear card restrictions in dungeons?

This option removes all restrictions like "no blue cards" or "no artifacts" or "one Rakalite minimum". Now you can make your own rules.

* Repair lost dungeons?

This one may require an explanation. Each dungeon saves its cards in up to three slots. Due to what is presumably a bug, a dungeon disappears permanently when the card in the first slot has been taken, meaning you can't have another shot at any remaining ones. If this has happened, this option will shuffle a card to the first slot and bring the dungeon back.

* Fill up empty dungeons with random cards?

If you already raided all the dungeons and want to do it again, this will fill each empty card slot in each dungeon with a completely random card. It could be Black Lotus, it could be Swamp, it could even be Akron Legionnaire. That's how crazy this function is. (Castles could theoretically hold up to two cards each, but a bag of gold and jewels is probably worth more than a random card anyway.)

* Catch a break?

This option rolls a bunch of minor hacks into one. Firstly it will stop an ongoing siege if there is one. Secondly it will replace all nearby monsters with lairs. Thirdly it will give you +20 life and a free Serra Angel in the next duel (which can be handy if you need to retake a city from a dragon who starts with Hypnotic Specter in play). Finally it resets two timers that serve to increase difficulty in subtle ways as time goes on. Hopefully there'll be no unwanted side effects of that.

* Change name?

If you don't like the name you started out with, or if the game's 25-character limit was too restrictive, you can get a new one. You can enter up to 55 characters with no ill effects, but all the same it may be wise to keep within 35 or so. If you want to enter characters like î or é that are normally disallowed, be aware that they are disallowed for a reason and won't display properly.
Code: Select all
Shandalar Splicer
-----------------

By Per Jorner
v1.0 (July 2009)

This simple utility copies character data from a save made in Shandalar in MicroProse's Magic: the Gathering, and can then insert that data into other saves. It could be used, for instance, if you start a red character and only after revealing the whole map learn that there's almost no mountain terrain. Or if you feel you're done with one map and want to explore another instead of going after the wizards, but don't want to start entirely from scratch.

When asked for a save to extract data from or insert data into, press a key from 1 to 0, corresponding to the order on your in-game list of saves, or A for the auto-save. (For anyone who's interested, the splicer edits the .sve part of a Shandalar save. Magic3.sve is the auto-save, while those ranging from 4 to D are your regular saves in order.) Extraction creates a small data file called splcetmp.sve, which can be spliced any number of times but is overwritten by any further extractions unless moved or renamed. Splicing will always use the current splcetmp.sve.

The splicer always overwrites your card collection and current decks; your gold, food and amulets; your name and gender; and a few other relevant bytes. It also asks whether you want to overwrite monster victories and/or world magics; if you don't, they remain as they were in the destination save. Note that your win/loss record does not carry over even if you splice monster victories, only the extent to which monsters fear you and the associated life penalty for the wizards.

The splicer doesn't affect difficulty level, world map layout and visibility, town data (including mana links and mana domes), dungeon contents and characteristics, dungeon clues, wizard status, journal entries, current location, or current quest; it's assumed that the destination save is newly created or in any case prepared the way you want it. You can use the Shandalar Haxxer to edit some of these things if you want, e.g. to quickly bring your mana link total back up to 20.

Your character portrait is not affected in any way. You can either fix the portrait as desired when you start up the new game you intend to splice your character into, or swap out the appropriate .fce file.

The utility is written for Manalink 1.3 saves, meaning it will also work with saves from a Manalink 2.0 install (which is the same where Shandalar is concerned), or a modified Manalink 1.3 where changes are limited to the data set. It needs to be run from the Magic folder where your save games reside.
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

Re: Shandalar Deck Injector

Postby Huggybaby » 10 Jul 2012, 19:51

Per wrote:(When I posted this on the WotC boards the reaction I got was basically "You shouldn't cheat at games".)
:lol: That's not our attitude around here! Anyway, as you know, it's not about cheating at all.
User avatar
Huggybaby
Administrator
 
Posts: 3071
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 567 times
Been thanked: 570 times

Re: Shandalar Deck Injector

Postby CirothUngol » 11 Jul 2012, 20:35

Well, those utilities look like fun!
All of the options seem great, but my initial points of interest are:
Give more Manalinks - Yes!
Kill all Wizards, Leave all Monsters - Kinda like a wandering monster Gauntlet, neat!
Reset Town Inventories - Very useful in an actual non-cheaty campaign.
See All Dungeon Clues - Very useful in an actual cheaty campaign.
Fill Up Empty Dungeons - This is cool. Now you can play 'em again, and again, and again...
Extract and Transplant Entire Character - Again, very cool. Same wizard, different map.

I'm at work right now, but I'll try these out tonight after I get home. Assuming that Ryanfae doesn't incorporate all of these goodies into his Deck Injector (and especially if they will work on Win7x64), I'd like to include these with the final Shandalar 2012 non-beta release... I'm hoping that you won't mind. As for the list of monster\card info in Shandalar.exe, do you remember their location in the executable? If not, I'll just scan around with a HexEditor until I find stuff that looks like CardInfo.

I've addressed the missing\bad palette issues for the Microprose .PIC files and I'll try to finish converting correct and proper BitMaps for all of the original image files tonight. I don't think that Shandalar will load them, but many of the graphics were never used in the game (several old 8-bit DOS-style images) so at least we'll get to see what they're supposed to look like. I've been posting all relative .PIC file info and downloads in this thread, but if I succeed in converting all of the images I'll start a new thread to post all info, utilities and BitMaps.
Speaking of...

You should probably start a new topic in the Shandalar Forum for your utilities. Not only will it be easier for users to find them, but a release of this calaber deserves its own topic (heck, it's not everyday that you see anything new for Shandalar). Besides, we seem to have rather unceremoniously hijacked Ryanfae's thread... his Deck Injector deseves better than that (quite the excellent utilitiy, if you haven't tried it yet).
"I thought the day had brought enough horrors for our ragged band, but the night was far worse."
-Lucilde Fiksdotter


My MtG Folder on DropBox, Google Drive, and OneDrive.
User avatar
CirothUngol
Programmer
 
Posts: 429
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 100 times

Re: Shandalar Deck Injector

Postby Per » 11 Jul 2012, 21:44

CirothUngol wrote:I'm at work right now, but I'll try these out tonight after I get home. Assuming that Ryanfae doesn't incorporate all of these goodies into his Deck Injector (and especially if they will work on Win7x64), I'd like to include these with the final Shandalar 2012 non-beta release... I'm hoping that you won't mind.
Not at all, throw the files and readmes into a folder somewhere. I assume the programs will work in DOSBox, though I haven't tried it (I only recently migrated from Win 98 to Win 7, having also worked some on XP which was nicely backwards compatible in comparison).

CirothUngol wrote:As for the list of monster\card info in Shandalar.exe, do you remember their location in the executable? If not, I'll just scan around with a HexEditor until I find stuff that looks like CardInfo.
Starts at 192608, you can't really miss it if you just open the file in a hex editor and scroll around. A little bit above are the enemy player definitions.

CirothUngol wrote:You should probably start a new topic in the Shandalar Forum for your utilities. Not only will it be easier for users to find them, but a release of this calaber deserves its own topic (heck, it's not everyday that you see anything new for Shandalar).
OK, will do.
Per
 
Posts: 8
Joined: 04 Jul 2012, 19:45
Has thanked: 0 time
Been thanked: 17 times

PreviousNext

Return to Shandalar

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form