It is currently 16 Apr 2024, 05:45
   
Text Size

tweaking cards

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

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

tweaking cards

Postby noioso » 11 May 2021, 14:10

Hello everybody. i'm new to this forum.
Lately i'd been playing shandalar a bit so i've come up with the idea of tweaking some cards.

given that:
I don't want to add new card to the list or new graphic.
Neither adding new effect not already in the version i got.
I'm not a programmer but I can understand simple coding and scripting.
I don't want to distribute anything (unless asked in this forum, but i don't think this will happen).

My version of shandalar:
From the readme "Shandalar 2012 revisited No one ever reads the ReadMe... -- CirothUngol November 6, 2012"
this version runs on win10 with no problem, there are 12 cab files for modding.

These are the tweaks i want to do, example:
Pit scorpion is a black 1/1 venom for 2B. I want to change this to a 1/3 stoning.
(poison is useless in a <10 Life point format)
Remove every banding reference and change that with extra Toughness,
raise the price of some outrageuos card like time walk (3UU), ancestral recall (2U),
mox and dual lands come in to play tapped.
(yes it is a P9 nerf! and that'is what makes me sure no one would want to play with my mod!)

as you could see, that's nothing trascendental.

My archievements so far:

I've got the gist of the Shandalar_20111207.csv file.
(ID;____Full Name;CODED CARD;___Short Name;Cost Text;Expansion;Color;Card Type;
__0;Air Elemental;_________1;Air Elemental;___|3|U|U;_____800h;____2;________7;
Rarity;Req Colorless;Req Black;Req Blue;Req Green;Req Red;Req White;Num Pics;
_____4;____________3;________0;_______2;________0;______0;________0;_______6;
Expansions Rarity;Power;Toughness;Sleighted Color;Hack Color;Hack Mode;Enchant Type OWN;
___________10001h;____4;________4;______________0;_________0;________0;_______________0;
Enchant Type OPP;New Types 1;New Types 2;New Types 3;New Types 4;New Types 5;New Types 6;
_______________0;______1001h;________3Ah;_________-1;_________-1;_________-1;_________-1;
New Types 7;Subtype;Subtype 2;Mana Source Colors;
_________-1;_____65;______211;_________________0; etc. etc.) (edit: sorry but the preview and the submitted dont align same way)
by trials and errors and confronting the entries i should be able to do this.

i've tried to use magic_updater but I'm not successful:
I get a rarity.dat and a DBinfo.dat, when i put them in to the program folder and start shandalar i get various errors:
"Fatal: couldn't find cards.dat, DBinfo.dat or rarity.dat." Later I found about modding the file Shandalar.exe.

I've read about this slightlymagic/forum/viewtopicf=76&t=21400"
"Most of the values in that Rarity.csv file are only looked at when displaying cards and when building the AI deck in sealed-deck mode: even for game-relevant data like colors, power, and toughness, the real values that the game uses are stored somewhere else. The first column in Rarity.csv that's actually used is the set name - in particular, that tantalizing "Card Status" column, with "Yes"'s and "No"'s that almost exactly corresponds to cards in the game, is read but then ignored. The real values are stored directly in Shandalar.exe in an array we refer to as cards_data[]; there's a list of cards defined in cards_data[] here...

Simplifying a bit, cards need to be enabled in five places to be used in the game: file Cards1.dat; file Rarity.csv; a C function implementing the card in Shandalar.exe; cards_data[] in Shandalar.exe; and an array cards_coded[] containing a single bit for each card, also in Shandalar.exe. Each of these has somewhat fewer cards enabled than the previous."

Thank you Korath!

Then:
cards_data[] was the main bottleneck that prevented expansion of Manalink past 2000 cards and Shandalar at all for so many years, since there isn't room to add any more data there. So if you don't want Manalink, the only option is to find cards that are in cards_data[] but aren't enabled in cards_coded[]. There's only two of them - Akron Legionnaire and, as you found, Stone-Throwing Devils.

In the version of Shandalar.exe that I've been working from, cards_coded[] starts at position 0x183d70 and looks like this:
00183d70: ffe5 ef77 7fb5 bfce 7f3b feff 7ef7 3ffa ...w.....;..~.?.
00183d80: ebd9 efff ffeb ffdf db37 ebf6 fbff fdaf .........7......
00183d90: 79fa ffff ed90 0744 4200 9b0c 0031 08c1 y......DB....1..
00183da0: 109e 01b2 4a4a c230 4154 84c8 fbd5 d078 ....JJ.0AT.....x
00183db0: 8520 f10d ca00 0980 d021 0051 0055 1400 . .......!.Q.U..
00183dc0: 2402 6000 8000 000c 4080 0000 4122 1128 $.`.....@...A".(
00183dd0: 0160 000c 0824 0284 2802 d8f8 ff00 200c .`...$..(..... .
00183de0: 1040 0000 8cca 0000 0000 0000 0000 0000 .@..............
00183df0: 001a 1000 804a 4031 8084 0100 8108 c004 .....J@1........
00183e00: 1426 1000 0014 0020 24c8 1409 0400 0250 .&..... $......P
00183e10: 8605 0000 0000 0000 0000 0000 0000 0000 ................
00183e20: 8061 fa4d b5b5 3dcd be89 7b37 042a 2787 .a.M..=...{7.*'.
00183e30: 5adf 0ef2 3500 0000 0000 0000 0000 0000 Z...5...........
00183e40: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00183e50: 0000 0000 0000 0000 0000 0000 0000 00d0 ................
00183e60: 0f00 0000 0000 0000 0000 0000 0000 0000 ................

etc etc. Ok, I would like to skip working in hex!

I've also found the list of cards used in shandalar here: slightlymagic/forum/viewtopic?f=76&t=17879#p189014.

So here the real question:
Using magic_updater i get a modified version of magic.exe. is there a way to modify shandalar.exe?
will a modified version of magic_updater.bat (or maybe a modified version of csv2dat.exe, and ct2exe.exe) do the work?


enabled in five places to be used in the game:
A)file Cards1.dat; >>>>>>>>>>>>>>>>>>>>>>>> I dont have this, i get DBinfo.dat from updater. need to be changed? and what about cards.dat?
B)file Rarity.csv; >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> does this means rarity.dat that i get from Shandalar_20111207.csv through updater?
C)a C function implementing the card in Shandalar.exe; >> a tool like magic_updater.bat?
D)cards_data[] in Shandalar.exe; >>>>>>>>>>>>>>>>>>>>>>>> No clue. maybe related to C(right above) but different.
E)and an array cards_coded[]>>>>>>>>>>>>>>>>>>>>>>>>>>>>> No clue either.

there is someone who is willing to help with this?
thanks you everybody.
noioso
 
Posts: 2
Joined: 11 May 2021, 13:13
Has thanked: 0 time
Been thanked: 0 time

Re: tweaking cards

Postby noioso » 11 May 2021, 18:43

searching carefully i have found the sad story of korath and the troll. I think my question will ever be left unanswered, Shandalar reflourished once and died again, time to delete it and find another interest.
noioso
 
Posts: 2
Joined: 11 May 2021, 13:13
Has thanked: 0 time
Been thanked: 0 time

Re: tweaking cards

Postby Korath » 14 May 2021, 07:30

If you're still around, I can provide guidance on how to do most of this.

It will involve either hex editing, or the creation of (fairly simple) software to do it for you. The Manalink data tools are specific to magic.exe and cards.dat (which is almost, but not quite, in the same format as Shandalar's cards1.dat), and even if they weren't, you'd have to extract the Shandalar data to use them anyway.

The hardest part here is the etb-tapped moxes and duals. Both etbt and mana production are part of the card function in this engine, so there'd have to be an exact match with an existing card in order to handle this purely through data. There isn't one in Shandalar - I think the earliest printed are the Mirage diamonds.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times


Return to Shandalar

Who is online

Users browsing this forum: No registered users and 27 guests


Who is online

In total there are 27 users online :: 0 registered, 0 hidden and 27 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 27 guests

Login Form