It is currently 25 Apr 2024, 20:49
   
Text Size

Shandalar

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

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

Shandalar

Postby Snacko » 05 Mar 2009, 11:51

I was thinking this might need a need topic.
I will post all my findings in here then most likely move it to the wiki.

To begin with Shandalar is running on tape and glue! I didn't even realize how broken it is before I started debugging it.
First:
HINTS.TXT
Has wrong ids for the cards, now you might know why you didn't see some of the combo hints ever!

Second:
CONCISE.CSV
You would think this is your standard 3 row csv with the ID at the first column. Wrong! The first column isn't used at all and the rows are read in the same order as they appear in the executable. This leads us to 2 bugs, first the order doesn't match! so you get cards values for the wrong cards. Second, the file has only 511 cards in while there are 722 cards defined which means other cards get the default values of 0 for the 2nd row and -1 for the 3rd row. I don't know what these values are used for but it can't be a good thing :)


Will post some more as those bugs appear, and yes they do quite often.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Bog Wraith » 05 Mar 2009, 13:35

Making this a sticky for now, until it moves to the wiki.

This is such an important part of ManaLink that has never been addressed before. It's got a whole lotta people excited about the potential inclusion of all that has/will be done into the Shandalar module.

Many of us are saying our prayers before we go to bed every night, hoping for this to happen! [-o<
'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: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Shandalar

Postby Huggybaby » 05 Mar 2009, 16:02

Snacko, when might you make a fixed version available for testing? I wonder if playtesting a fixed version will reveal that those bugs were left in for some strange reason? 8-[

I know now how the second guy to lay eyes on the dead sea scrolls must have felt.
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: Shandalar

Postby Snacko » 05 Mar 2009, 16:24

I got one that doesn't change anything except move the cards to a new location in the exe.
It seems to work 100%, I can upload this one, but not much of testing can be done in there.

There are quite many checks in the exe like

Load some file.
Read it and apply (we don't care if it's malformed as long as it looks ok)
We read something that doesn't make sense (not defined card), so we discard it.
Everything seems to work just fine!
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Snacko » 05 Mar 2009, 20:52

Shandalar seems to be working, I can even get Dummies into my deck :P
Currently there seems to be a problem with the randomiser as it get's the Dummies as well.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Snacko » 06 Mar 2009, 13:24

Got it working, not everything is patched, but new cards seems to pop up in Towns/Starting Deck/Events.
Haven't got a crash yet but who knows maybe if you add cards with ids over 1500 it might start crashing, but I already know where to fix it.

http://www.mediafire.com/download.php?gmjflizunge

The file has currently 10000 card spaces.
The first card starts at virtual address 0x991000.
The card count is at virtual address 0xA40C7F.
This says how many cards from the last one won't be given (ex. Dummies, Tokens, Special FX cards, etc) or used in the events.
0057EB75 2D 87240000 SUB EAX,2487
All the special cards have to be added at the back.
Once you add a normal playable card you need to modify the above value ex. 1 card added
0057EB75 2D 87240000 SUB EAX,2486

The extra space is non executable and can be used for variables only (there are some tables which depend on the number of cards which I haven't remapped to the new memory region yet, still it doesn't crash yet!)
New cards should most liekly be added via a dll, however the functions addresses can and most likely are different between Magic.exe and Shandalar.exe.
If the new cards are written with yasm this could be easyly fixable via remapping once macro and not touching the card logic ex.
%define Phase [0xFFFFF]
%define TapCard 0xFF00FF

cmp Phase, Upkeep
push CardID
call TapCard
to
%define Phase [0xAAAAA]
%define TapCard 0xAA00AA

cmp Phase, Upkeep
push CardID
call TapCard
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Huggybaby » 06 Mar 2009, 13:45

Snap! Thanks Snacko me boy!
User avatar
Huggybaby
Administrator
 
Posts: 3207
Joined: 15 Jan 2006, 19:44
Location: Finally out of Atlanta
Has thanked: 701 times
Been thanked: 594 times

Re: Shandalar

Postby Bog Wraith » 06 Mar 2009, 14:00

Man, I'm going to download this right away and start exploring.

Awesome Snacko, I knew this place would have a 8) HUGE impact on our beloved ManaLink!
------------------------------------------------------------------------------------------------------------------
EDIT

Unfortunately, after trying this for quite awhile, on two different installs of the game, I've yet to see one new card in Shandalar!

I went from village to village, city to city, got the free cards in the lairs, completed quests to have a choice for cards, traded amulets for cards etc...

I've seen nothing new at all.
'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: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Shandalar

Postby Snacko » 07 Mar 2009, 14:31

That is good (if you didn't have any crashes) as I haven't added any new cards in the distributed version. I feel that the old way of adding cards isn't exactly fully proper so I would opt for coded dll or possibly the hand coded dll(has to be a separate one).
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Bog Wraith » 07 Mar 2009, 16:16

I was mistaken then, sorry.
I thought we were supposed to see some of the new cards within Shandalar.

As for stability, the game seems to be running normally. I will continue to test it by continuing my quest to finish it after facing Arzakon!
'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: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Shandalar

Postby Snacko » 08 Mar 2009, 21:30

I got some cards coded but it seems I need to edit Cards1.dat for them to show up ingame stay tuned.
Here's and example how cards can be coded to be ManaLink and Shandalar compatible at the same time!
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby Bog Wraith » 08 Mar 2009, 21:40

Better & better Snacko!

Meanwhile I have continued to play with your .exe and the stability is rock solid!

This new info about coding for both Shandalar and the main game simultaneously has tremendous implications for the whole ManaLink project.

I again remain very hopeful and excited about the prospects! :)
'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: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Re: Shandalar

Postby Snacko » 08 Mar 2009, 21:53

If there is something like dat2csv it would be helpful, after all someone must have converted the cards.dat to the csv format. You didn't type it all the first time, did you ?
I got the 10 shocklands from guild pact ready for testing after I mange to edit the Cards1.dat.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Shandalar

Postby EviL_CLonE » 09 Mar 2009, 22:48

Googling I found this:

http://www.tek.com/ja/products/Measurem ... t2csv.html

I have ABSOLUTLY NO IDEA about how does this work... I have opened the file in the same folder as the cards.dat file, and 4 or 5 files were created... maybe one of them is the "translation"
EviL_CLonE
 
Posts: 143
Joined: 24 Feb 2009, 16:54
Location: Buenos Aires, Argentina
Has thanked: 1 time
Been thanked: 0 time

Re: Shandalar

Postby Bog Wraith » 09 Mar 2009, 23:21

I had my first game crash today and it happened multiple times against the same creature I was dueling.

It was when I dueled the Nether Fiend. I never got a chance to get the crash report as of yet because the game kept closing, but I will try to get myself in duels with this creature again to see if I can get it.

Snacko, is there anything else info wise I need to get you to report on this crash if it reoccurs?
'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: 1108
Joined: 28 May 2008, 22:40
Location: Shandalar
Has thanked: 425 times
Been thanked: 153 times

Next

Return to Shandalar

Who is online

Users browsing this forum: No registered users and 30 guests


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 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 30 guests

Login Form