Page 1 of 1

some questions regarding adding new/custom cards

PostPosted: 06 Jul 2016, 14:35
by aquilla
Hi everyone!

I've been lurking this forum for quite some time because of the work done on Shandalaar. I'm writing now because I wish to play-test my custom sets (from MSE) and I'm looking into some options on where to implement them...

First of all, who else has done this? And is it a lot of work? I'm trying to find a decent engine which it is it fairly simple to add cards to.

So, how is the Forge for this? I've had a look at some card scripts and the custom card thread. Is there any documentation on: syntax, AI, adding new abilities, any need for compilation etc?

Thanks in advance :)

Re: some questions regarding adding new/custom cards

PostPosted: 07 Jul 2016, 13:10
by friarsol
aquilla wrote:Hi everyone!

I've been lurking this forum for quite some time because of the work done on Shandalaar. I'm writing now because I wish to play-test my custom sets (from MSE) and I'm looking into some options on where to implement them...

First of all, who else has done this? And is it a lot of work? I'm trying to find a decent engine which it is it fairly simple to add cards to.

So, how is the Forge for this? I've had a look at some card scripts and the custom card thread. Is there any documentation on: syntax, AI, adding new abilities, any need for compilation etc?

Thanks in advance :)
Well, I can't really speak as someone who is written custom set scripts, but I do know a handful of other people have created their own sets. We even have our own thread dedicated to it - viewtopic.php?f=26&t=16205

One of the Forge users's edessa has been hammering through custom sets recently, so you can poke through that a bit to get an idea.

In general I'd say Forge is good for custom scripting. Our scripting language is pretty flexible and doesn't need recompiling. Card scripts are loaded as forge launches so when I'm scripting cards for new sets I just restart Forge to test changes.

We do have a wiki with the structure and abilities available http://www.slightlymagic.net/wiki/Forge_API although its certainly a bit outdated at this time. Typically the best way to learn how to script is find similar cards and open up their .txt file. If you have a release version of Forge, open up res/cardsfolder/ and unzip the cardsfolder.zip file in that location (afterwards you should delete the .zip file). Now you can see all the magic behind card scripting.

In general, each ability effect has custom written AI on how it will cast/interact with things, although making brand new abilities that don't exist anywhere requires Java coding changes, and our typical stance isn't to add abilities just for custom sets. That should be enough to get you started, if you have any questions feel free to expand below.