It is currently 23 Jul 2019, 00:47
   
Text Size

Shandalar SVE Tool v0.2

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

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

Shandalar SVE Tool v0.2

Postby CirothUngol » 02 Jul 2015, 04:49

v0.2
I've updated the app again. Now it uses separate tab-selectable Text Editors to either add cards directly to the Library, or to Deck 1-3 (replacing their content and adding only cards missing from the Library) so you don't have to rebuild them anymore when restarting Shandalar. All thanks goes to RyanfaeScotland for his original DeckInjector whose output showed me how to add cards directly to the Decks without screwing up the SVE files and making them unplayable (hopefully ^_^).
v0.1a | Open
v0.1a
I've updated the app to address a couple of bugs and a few mentioned issues (thanx stassy!).

* SVEtool.ini is now used to preserve all user settings and may be used to change fonts, colors, and other internal settings. Lines beginning with ; are ignored and values may be given in any order.
* prices.csv is used to more fully define available cards in Korath's version, and the Manalink 1.3.2 coded bitmap is used for previous versions. This should prevent the injection of any cards not distinctly listed as available for that version, including NonCoded, Tokens, and Effect Cards.
* For increased readability, the Text Editor now uses a mono-space font and proper spacing when displaying '.CardID_Qty_CardName'.
* Fixed an error that made the 'Alpha' button give incorrect CardIDs and changed 'All' to 'Cancel' (I used it for testing and neglected to remove it).
v0.1 | Open
Greets gang! Man, some really excitin' stuff goin' on! And they said it would never happen... Korath, yer a freakin' genius! Reading through your gitlogs was educational, informative, and a heckuva lotta fun. You make a guy really wanna learn C. Thanx for keeping the rest of us so well informed. ^_^

Sorry for the long hiatus, but I come bearing gifts. After playing the new Shandalar version for awhile (damn, it's fantastic and tends to play better than Manalink) I realized that a quick and dirty method of manipulating the SVE files might be in order, so that card-testing can go much quicker. Since Ryanfae's DeckInjector was out of commission I extracted the Shandalar-to-CSV functions from PDAnalyser, wrote some search routines (much faster than PDA, gotta incorporate that), installed a few widgets and wrapped a GUI around it. The ReadMe:
Code: Select all
' 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.
--------------------------------------------------------------------------------
It doesn't place cards into a Deck, just into the player's Library, so Decks have to be re-build after restarting the game.
I've tested it on Mok's and Korath's versions, but it should operate on the Microprose originals as well. Please help me test it and let me know if you run into any issues with functionality or performance.

You can also download SVEtool v0.2 from any of the links in my signature.
Attachments
SVEtool_v02.zip
The Shandalar SVE Tool v0.2 is used to manipulate the Library, Decks, and most other values found inside of Shandalar SVE save files.
(205.06 KiB) Downloaded 1003 times
Last edited by CirothUngol on 06 Aug 2015, 06:35, edited 3 times in total.
"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, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 103 times

Re: Shandalar SVE Tool v0.1

Postby stassy » 02 Jul 2015, 07:55

Can you do the injection for enemies too? :p

Also if you hit the Alpha button and then choose Cancel, the utility will list ALL cards from A to Z, which take a lot of time instead of cancelling the order...

Also, same as PDA, an automatic location of Shandalar.exe would be nice in order to avoid the exe search every time it's running.

Edit: oups, there is no Cancel button for Alpha, just ok or All, my bad (though Ok doesn't sound right for Cancel, maybe change to close?)
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Shandalar SVE Tool v0.1

Postby CirothUngol » 02 Jul 2015, 12:52

Hiya, stassy! Thanks for taking a look.
It should probably produce an INI file to remember it's settings, that'll be easy to update. As for the 'Alpha' search, 'OK' initiates the search for whichever letters you've entered, 'All' gives you all cards, and the 'X' to the upper-right will cancel. Clicking 'OK' without entering any search criteria is the same as cancelling.

Please let me know if it seems to perform correctly (injects correct cards, detects uncoded correctly, etc). When I get a chance to play with this again, I'd like to add Tabs to the Text Editor for Library and Deck 1-3, but I thought I'd release it so people can use it for Card Testing.
"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, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 103 times

Re: Shandalar SVE Tool v0.1

Postby Bog Wraith » 02 Jul 2015, 13:34

Nice to see you stranger! :wink:

Thanks for this & the new ManaLink "All in One".

Hope all is well.

Thanks again for everything & welcome back, it's good to see you again! 8)
'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: 1095
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 414 times
Been thanked: 148 times

Re: Shandalar SVE Tool v0.1

Postby stassy » 04 Jul 2015, 05:19

There is missing the important thing in the readme : how to simply inject cards in the savegame :P

On SVEtool is running, I select a save then I load a file with card/id card, then I hit -=>MAGIC*....then I close SVEtool and run Shandalar but the savegame doesn't show the added file
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Shandalar SVE Tool v0.1

Postby CirothUngol » 05 Jul 2015, 16:22

Sure thing...

1) Open the app and allow it to find 'Shandalar.exe'. If not found, use the DialogBox to find 'Shandalar.exe'. Wait for SVEtool to find and parse all necessary data (use the 'File\Load Exe' menu option to select a different 'Shandalar.exe').

2) Choose the SVE file you'd like to modify using the drop-down ComboBox below the Text Editor (MAGIC3 is 'Resume Game'). I could probably label these using 'Savedescs', if that would make it easier.

3) Type Card Names into the Text Editor or click 'Load' to load a DCK file then click 'Check Cards' to reveal their availability in Shandalar. You may also click 'Find' to automatically examine an entire folder of PlayDecks and stop on any that contain fewer than the provided number of Unmatched/Noncoded cards. When it does, click 'Check Cards' to reveal which cards are not available.

4) Make any further adjustments to Food, Amulets, WorldMagics, etc. and click '-=>MAGIC*' to modify the choosen SVE file. SVEtool doesn't inject the cards into a specific Deck 1-3 (yet), it just places them into the player's library, so you'll have to rebuild the deck after restarting the game.

5) Afterwards, you can click 'Clear' and then 'Library' to verify that the new cards are now available in the player's library.

So far the card-injection seems to performed flawlessly for me. Please let me know if you run into any further issues.
"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, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 103 times

Re: Shandalar SVE Tool v0.1

Postby stassy » 06 Jul 2015, 11:33

So in order to add card you must not use MAGIC3 slot, right? Because it only worked when I choose MAGIC4 and so on...

Also, though the injector won't add them, it is possible to select and "inject" token like Zombie because it will be recognized as a valid card :

Image
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Shandalar SVE Tool v0.1

Postby CirothUngol » 06 Jul 2015, 12:42

Well, if you modify MAGIC3.SVE it'll show up when you choose "Resume Game", MAGIC4.SVE - MAGICD.SVE are save slots 1-10.

Hmm, yer right. All it does is block cards listed as 'non-coded', so I need to put something in place to block the insertion of token cards... I'll try to find an easy way to identify them. So what happens when you insert token cards, have you tried it?

Thanks stassy, I'll try to check it out when I get home this evening.
"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, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 103 times

Re: Shandalar SVE Tool v0.1

Postby stassy » 06 Jul 2015, 13:19

Yup yup, as I said above, nothing is happening, only the valid card are inserted (tried with Zombie + Zombify, only Zombify was available in the DeckEditor)
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Shandalar SVE Tool v0.1

Postby guinsoo » 07 Jul 2015, 07:29

stassy wrote:Can you do the injection for enemies too? :p

Also if you hit the Alpha button and then choose Cancel, the utility will list ALL cards from A to Z, which take a lot of time instead of cancelling the order...

Also, same as PDA, an automatic location of Shandalar.exe would be nice in order to avoid the exe search every time it's running.

Edit: oups, there is no Cancel button for Alpha, just ok or All, my bad (though Ok doesn't sound right for Cancel, maybe change to close?)
Not the thread owner but what do you mean by "for enemies"?
guinsoo
 
Posts: 15
Joined: 25 Jun 2015, 22:32
Has thanked: 4 times
Been thanked: 8 times

Re: Shandalar SVE Tool v0.1

Postby stassy » 07 Jul 2015, 10:31

Well, I though maybe (with the slighlest hope), it could be possible to automate or at least make a friendly UI software that can inject/modify enemy decks instead of doing everything manually...because the decks are going to pile up and it's going to be a pain to manage all of them.
stassy
Moderator
 
Posts: 5274
Joined: 25 Feb 2009, 07:06
Has thanked: 471 times
Been thanked: 337 times

Re: Shandalar SVE Tool v0.1

Postby jiansonz » 07 Jul 2015, 11:15

stassy wrote:because the decks are going to pile up and it's going to be a pain to manage all of them.
I keep track of them by keeping them in folders named after the forumites that built them, then I use quatrocentes-e-vinte's 'Shandalar characters' spreadsheet (with a few extra columns) too keep track of who has built decks for which enemies and also which version (if there are more than one) I currently use in Shandalar and in Manalink.
jiansonz
 
Posts: 211
Joined: 24 Feb 2010, 02:36
Has thanked: 34 times
Been thanked: 81 times

Re: Shandalar SVE Tool v0.1

Postby CirothUngol » 09 Jul 2015, 04:00

I've updated SVEtool to version 0.1a, please see the OP for details.
Bog Wraith wrote:Nice to see you stranger! :wink:
You too, Bogs! I haven't had much time to play recently, but I still drift back here from time to time, just to see if something BIG happens... thankfully I drifted back here within a few weeks of Korath's first release. How exciting is this?! I was so stoked that I sacrificed a couple of weekends to throw this app together (and a couple more for the Manalink3 Mods).
I hope everything's well with you, old friend. We all appreciate you (and Huggy) holdin' this place together for 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, or Google Drive.
User avatar
CirothUngol
Programmer
 
Posts: 430
Joined: 13 May 2009, 21:34
Location: Gulf Coast, Texas, USA
Has thanked: 106 times
Been thanked: 103 times

Re: Shandalar SVE Tool v0.1a

Postby Huggybaby » 11 Jul 2015, 19:19

CirothUngol wrote:Oops... looks like the attachment limit has been reached. Yikes! I say we all delete everything we've ever uploaded and give it all to Korath. I would hate to see that become a hindrance.
I just learned of this problem a couple of days ago from a post in another topic.

You guys should let us know via PM when something like this happens because we don't try to read every post every day. I used to do that a long time ago but now it's too much.

We're looking at the problem, I think there's a 10MB limit forumwide which is probably too small.

I'm not sure what to think of using forum attachments. I've always used external hosting for my pics and files but I've learned that's not reliable, so maybe using the forum is the best.
User avatar
Huggybaby
Administrator
 
Posts: 3081
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 580 times
Been thanked: 573 times

Re: Shandalar SVE Tool v0.1a

Postby Huggybaby » 11 Jul 2015, 19:21

And thanks for the nifty tool, I love these kind of things.

It's nice to see Shandalar finally getting kicked in the pants.
User avatar
Huggybaby
Administrator
 
Posts: 3081
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 580 times
Been thanked: 573 times

Next

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 287 on 31 Mar 2019, 04:11

Users browsing this forum: No registered users and 2 guests

Login Form