It is currently 19 Apr 2024, 16:40
   
Text Size

Request: Up-to-date Shandalar information

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

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

Request: Up-to-date Shandalar information

Postby RyanfaeScotland » 07 Nov 2010, 12:17

So I've scoured the forum for information on Shandalar and there seems to be some discrepancies between the forum topics and the wiki or at least enough to confuse me so I'm wondering if someone could clear up some questions I have.

How close are you to adding new cards?
From what I can see you're at the stage where you know what the problem is relating to space, basically tables that aren’t big enough to hold any more data than is already there, and you know how to sort it, find/create more space and update the original pointers to point to the new location, it is just a case of actually doing it. From the wiki I’m taking it there is enough space for 10K cards but Ids over 1500 cause problems which is where the re-pointing of pointers comes in, ya?
The card format is already known (I know this from Snacko’s help in the injector) and so presumably the technique for adding status effects and so on is as well?

What compiler was used to create Shandalar.exe and how much source is known?
Maybe firing off a nooby question here but I’m working on the assumption an .exe is just a compiled program and that you can find out what the most likely compiler was using TrID which would help in the decompiling process. Has this been done and is it known or am I barking up the wrong tree? Given that it has been decompiled in parts how many parts are we looking at so far or any idea as a percentage? If you are one of the people ripping it up how much have you shared with the world and how much is your ‘working with code’ (i.e. code your still looking at and don’t want to release cause it’s a mess)

Who is still working on this project?
There are about 3 key names I’ve saw cropping up in my travels, Snacko obviously since he is in my search term, Mok (gone I’m sure), Tapani and you know what there was someone else so sorry for not mentioning you but the name has popped out my head at the moment.

Is there a bigger repository of info on Shandalar than the wiki that I’m missing?
Sorry but the wiki just seems a bit slim compared to the amount that is discussed in the forum. That .dat file alone probably holds a wealth of information that would be useful. Am I missing something?


That’s it for now, thanks for the answers as always :)
RyanfaeScotland
Programmer
 
Posts: 38
Joined: 04 Apr 2010, 11:29
Has thanked: 12 times
Been thanked: 6 times

Re: Request: Up-to-date Shandalar information

Postby Snacko » 08 Nov 2010, 17:08

1) viewtopic.php?f=76&t=931&p=10241&hilit=gmjflizunge#p10241 This is the modified exe I made long ago that has more space and I hopefully didn't mess up other parts as this has lots of code rewritten to point to the new memory region. The basic exe you get from Mok package is UPX packed and you need to decompress it to compare to the original one. I was using dUP2 patching engine to make the changes. There are still some cross reference tables that have some arbitrary set maximal space that would need changes. There was minimal testing done, because I only checked if those Dummy cards show up in towns and events and they did :)

2) Some ancient version of MS Visual Studio. All the original code was written in plain C from the looks. This makes the assembly very easy to read as there are no sophisticated compiler optimisations in sight.
Pretty much all the code decompilation was done trough IDA decompiler. It outputs pseudo C code which is a mashup of C and asm which is very easy to read and understand with basic C and asm knowledge.

3) Tapani has made some modifications so that Shandalar is less buggy and added some enchantments, from my knowledge there were some releases from time to time and he might still be reachable. Other than that noone has made (including me) anything with Shandalar in a while.

4) C source from Manalink dll has some broad ideas that can be applied to Shandalar. Most important are the data structures as they're exactly the same in both. Other parts might be or not be available in Shandalar as there was so much hacking in Manalink you sometimes can't say if some of the code is really the original one.
Cards1.dat doesn't have anything interesting besides the actual card data you would need to edit to introduce new cards. You can check the pseudocode viewtopic.php?f=76&t=931&hilit=gmjflizunge&start=15#p10537 You also see an example of hardcoded arrays in there.
How to read dat in few easy steps
Code: Select all
numberOfCards = uint32(cardsFile.read(4))
sizeOfStrings = uint32(cardsFile.read(4))
binaryData = cardsFile.read(numberOfCards * 152)
stringData = cardsFile.read(sizeOfStrings)
Then the binary data will have pointers to string data and some other things like card ids, rarity, etc.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: Request: Up-to-date Shandalar information

Postby RyanfaeScotland » 09 Nov 2010, 11:48

Ok cool, at uni just now so will have to have a proper read through everything a little later on but I know I've been through the topics posted before yet it's still good to know these are the ones that are of the main interest.

I'm not certain who's version of Shandalar I'm playing with just now, I think I grabbed it off Classic-pc-games.com or something and patched it a while ago to show the text properly so will probably go on and replace my install with the ones posted here.

Good to here it's not optimised that should make life alot easier. Sadly my main language is Java so reading ASM and C is still a little iffy but I'm sure I'll understand enough to get the jist.

Anyway time for the next class.
RyanfaeScotland
Programmer
 
Posts: 38
Joined: 04 Apr 2010, 11:29
Has thanked: 12 times
Been thanked: 6 times

Re: Request: Up-to-date Shandalar information

Postby Tapani » 10 Nov 2010, 16:57

To spin-off from the Q regarding adding cards.

There are many problems regarding adding cards, not just the available space. I think replacing existing cards is a more viable approach. I can ellaborate on this, if you wish.
User avatar
Tapani
 
Posts: 24
Joined: 13 Nov 2009, 15:49
Has thanked: 0 time
Been thanked: 0 time

Re: Request: Up-to-date Shandalar information

Postby RyanfaeScotland » 13 Nov 2010, 10:06

Please do Tapani, the more I know the better. :)
RyanfaeScotland
Programmer
 
Posts: 38
Joined: 04 Apr 2010, 11:29
Has thanked: 12 times
Been thanked: 6 times


Return to Shandalar

Who is online

Users browsing this forum: Baidu [Spider] and 40 guests


Who is online

In total there are 41 users online :: 1 registered, 0 hidden and 40 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: Baidu [Spider] and 40 guests

Login Form