Page 1 of 1

How to only use certain sets in Shandalar

PostPosted: 05 Jul 2015, 01:28
by Sefestis
Hi,
I hope this hasn't be said before, but, I was wondering if someone would be willing to make a Mod/Version where the only cards in the game are from sets Alpha threw Onslaught Block/8th Edition (Pre-Modern).
I only want to play with the older cards and not the newer ones, and more than the cards in the base game.
Or if someone can tell me how to alter the game files to delete the Sets I dont want to use in game, that would also be fine as well. (I have no Programming/Code skills if that helps your answer choice).

Any English Version of Shandalar will do.
Thanks,
Matt

Re: How to only use certain sets in Shandalar

PostPosted: 05 Jul 2015, 01:47
by Korath
You can do this, with some amount of effort, by editing Shandalar.ini. There's a section that lets you disable individual cards.

Adding a feature to filter out whole sets is feasible, though not exactly a high priority. If you file a feature request in the bugtracker at the top of the screen I'll get around to it eventually.

Re: How to only use certain sets in Shandalar

PostPosted: 05 Jul 2015, 03:17
by Sefestis
I have no idea what Im looking for or how to do this, So I will leave this up to you. :mrgreen:

Re: How to only use certain sets in Shandalar

PostPosted: 05 Jul 2015, 21:11
by CirothUngol
The CardIDs are still the same for all of the original cards in Shandalar (ie #952=Rubinia Soulsinger), so it's simply a matter of listing the Names or Numbers of every card above that ID# listed as 'coded' (I use the file 'prices.csv'). Paste the following code into a text file and save as 'shanExclude.cmd', then place it near your Shandalar install and run it:
Code: Select all
@ECHO OFF
SETLOCAL EnableExtensions DisableDelayedExpansion
:: shanExclude.cmd
:: outMode=0 for CardID, 1 for CardName
SET outMode=0
SET outFile=shanExclude.txt
SET lastCardID=952

SET cnt=0
SET shanPath=
FOR /R %%A IN (Shandalar.*exe) DO SET "shanPath=%%~dpsA"
IF NOT EXIST "%shanPath%Shandalar.exe" (
   ECHO Cannot find '%shanPath%Shandalar.exe'
   ECHO Please relocate %~nx0 and try again.
   GOTO :stop
)
IF NOT EXIST "%shanPath%prices.csv" (
   ECHO Attempting to create the file 'prices.csv'.
   ECHO Please verify it exists and try again.
   PUSHD "%shanPath%"
   Shandalar.exe --show-prices
   POPD
   GOTO :stop
)
REM.>"%outFile%"
FOR /F "usebackq skip=1 tokens=1-5 delims=," %%A IN ("%shanPath%prices.csv") DO (
   IF %%A GTR %lastCardID% (
      SET flag=
      IF /I "%%E" EQU "shandalar" SET flag=1
      IF /I "%%D" EQU "shandalar" SET flag=1
      IF DEFINED flag (
         TITLE %~n0: %%A %%B
         IF %outMode% EQU 0 ECHO %%A>>"%outFile%"
         IF %outMode% EQU 1 ECHO %%~B>>"%outFile%"
         SET /A cnt+=1
      )
   )
)
:stop
TITLE %~n0: Finished %cnt% cards added
ECHO Press any key to exit...
PAUSE >NUL
ENDLOCAL
EXIT /B 0
Just copy/paste the generated list 'shanExclude.txt' into 'Shandalar.ini'.
Change the variable 'outMode' to '0' for CardID, or '1' for CardName.

Re: How to only use certain sets in Shandalar

PostPosted: 05 Jul 2015, 21:33
by Korath
It'll take a fair bit more effort than that; the next thousand or so ids aren't sorted by set. I suspect they were whichever cards happened to be enabled when the Manalink 2000-card limit was worked around.

Which card is in which set can either be extracted from rarity.dat (see read_rarities() in drawcardlib/config.c), or - probably more easily - from parsing magic_updater/Manalink.csv.

Re: How to only use certain sets in Shandalar

PostPosted: 09 Jul 2015, 03:03
by CirothUngol
Damn, I misunderstood the OP. I thought he wanted only the cards from the original Microprose game (the batch file lists all cards above #952). Sorry, guys.

You could probably use PDAnalyser to produce PlayDecks of all the Expansions from the file Manalink.csv (available in the \magic_updater\ folder of the latest patch) and get the desired list that way.

Just start PDAnalyser, select Manalink.csv, and choose the menu option Export\CSV to Expansion.

Re: How to only use certain sets in Shandalar

PostPosted: 09 Jul 2015, 03:24
by gmzombie
I actually thought of this as well and I think it would be cool someday when we have more cards in different sets. What korath has done here is nothing short of amazing and I can't wait to see what's next.