Arcomage
Dec 25, 2014 21:41:01 GMT
Post by GreatEmerald on Dec 25, 2014 21:41:01 GMT
Lately I've been working on a game I call DArcomage, which is a free software clone of Arcomage, a strategic card (mini)game that was originally part of the Might and Magic RPG games. The relevant thing about it is that I made a Touhou EoSD-themed card deck for it, and maybe someone would be interested enough to come up with ideas of their own for another deck!
The game itself is very simple. There are two players, each has a tower of a certain height (indicated at the bottom). The goal of this game is to be the first to build your own tower to the top or destroy the opponent's tower.
You do that by playing cards that have some effect on the game. The simplest card could, say, increase your tower height by 5. Another simple one could deal 5 damage to the enemy. In order to protect your tower, you can also build your wall; it doesn't have any effect on its own, but most cards can only deal damage to the tower once the opponent has no wall left.
Playing a card costs resources. There are three resources: bricks (usually used for wall-building cards), gems (usually used for tower-building cards) and recruits (usually used for damage dealing cards). Each round you get resources equal to the facilities you own: quarry produces bricks, magic produces gems, dungeon produces recruits. If you have low facilities, you will gain resources too slowly and won't be able to afford using expensive cards. If you generate a lot of resources, you can reach an alternative resource accumulation victory condition, but those are quite rare.
Resources, facilities and card cost is colour-coded for your convenience: bricks/quarry is red, gems/magic is blue, recruits/dungeon is green. Red cards require the given amount in bricks, blue cards require gems, green cards require recruits, white cards require all resources equally and black cards don't require anything at all.
Cards can change any of these. They can deal damage, build tower or wall, add or remove resources, facilities, change their own effect depending on special conditions or any combination of the aforementioned. Which is where strategy kicks in: you need to decide what to spend your resources on, what to keep for later and what to discard.
I also made a video to present the latest version of DArcomage, with gameplay footage, which you can see here:
So what does all of that have to do with Touhou? Well, I made the game easily modable, and in order to test if modding works, I needed to try making a card deck. Touhou spellcards came to mind, and so I made a Touhou EoSD card deck!
Here are some of the cards in the deck:
As you can see, card effects here range from fairly simple (Rage Trilithon: 3 damage, +3 wall) to fairly complex (Will there be none?: +10 of each resource, +10 tower and wall, or nothing at all, determined randomly). The way I made this deck is that I took a spell card, used its name (shortening if need be, as you can see space is limited), determined the resource type by the spellcard type (item = red, living thing = green, abstract concept = blue), thought of some appropriate action given the name, and assigned a cost by looking at similar cards from other decks. Also, cards are usually divided into three groups: common, uncommon and rare; 3 uncommon, 2 common and 1 rare card may appear in the game (so you can strategically hold onto a card to lower the chances of the opponent drawing it). Of course, I set card rarities depending on states the spellcards appear in: Rumia, Cirno, Meiling and low difficulty Patchouli cards are common, higher difficult Patchouli, Sakuya and low-level Remilia cards are uncommon, higher difficulty Remilia and Flandre cards are rare. Usually the less common the card, the stronger its effect is.
Going back to the whole "easily modable" part: cards are defined by using a very simple to understand, ini-like syntax in .lua files: github.com/GreatEmerald/libarcomage/blob/master/lua/Touhou/TouhouPool.lua
Here are two excerpts for the aforementioned cards:
Much of this is very self-explanatory. "Frequency" is the opposite of rarity (3 = common, 2 = uncommon, 1 = rare, but can be other values, this really shows how many cards of that type can be in the game at any given moment). "Cursed" defines whether the card is discardable or not (you can have bad "cursed" cards that are not good to play, but you can't discard them without playing, so you're forced to play them). "Picture" defines where the card picture can be found (they can all be in different files, or in one file with different coordinates, or any combination of the above). "Keywords" are not implemented yet, so ignore that. "PlayFunction" defines, in Lua code, what happens once you play the card. As you can see it's fairly straightforward; Damage deals damage, AddWall adds wall (the first number is which player the effect works on: 0 is you, 1 is the enemy; the second number is how strong the effect is). "AIFunction" is used by the AI to determine the priority to play the card; usually just adding the effects is sufficient.
This is a bit more complex with its functions, since it needs to get a random number. It's still quite straightforward: a variable is defined, it gets a random number of 1-3, then depending on which number it was certain actions are performed. The AI function says that there is one third chance of getting one effect, one third to get another, and one third to get nothing (well, that's not explicitly shown, but it would be "+ 0/3" which is just nothing).
Here's another image showing some rare cards:
Some card highlights:
Four of a kind: makes both castles equal!
Misdirection: If opponent's tower is smaller than their wall, it deals damage to the tower directly ("misdirects" around the wall).
Illusion misdirection: the opposite (it looks as if it would misdirect, but it actually hits whatever is the highest of the two!)
Mercury poison: poisons the opponent's dungeon and has a negative effect on the tower!
Sakuya's cards all allow playing an additional card in a row (and you can chain those, too).
Remilia's cards tend to lower the opponent's dungeon and are usually expensive.
This deck isn't enabled by default, though; you need to change the CardPools.lua file to enable it by changing the PoolInfo line into something like this:
I would have set it as default, but I don't have any free images for the cards (free as in me being able to reuse them; right now I'm using screenshots from the game itself, which is technically copyrighted). So if someone could find a set of images for all those cards it would be nice and I could then enable it by default.
And if anyone is interested, it would be nice to make another Touhou-inspired deck. Maybe from PCB or such. But not necessarily. I also had the idea of making spellcards only be blue ones, with characters themselves being green cards and items being red cards.
The game itself is very simple. There are two players, each has a tower of a certain height (indicated at the bottom). The goal of this game is to be the first to build your own tower to the top or destroy the opponent's tower.
You do that by playing cards that have some effect on the game. The simplest card could, say, increase your tower height by 5. Another simple one could deal 5 damage to the enemy. In order to protect your tower, you can also build your wall; it doesn't have any effect on its own, but most cards can only deal damage to the tower once the opponent has no wall left.
Playing a card costs resources. There are three resources: bricks (usually used for wall-building cards), gems (usually used for tower-building cards) and recruits (usually used for damage dealing cards). Each round you get resources equal to the facilities you own: quarry produces bricks, magic produces gems, dungeon produces recruits. If you have low facilities, you will gain resources too slowly and won't be able to afford using expensive cards. If you generate a lot of resources, you can reach an alternative resource accumulation victory condition, but those are quite rare.
Resources, facilities and card cost is colour-coded for your convenience: bricks/quarry is red, gems/magic is blue, recruits/dungeon is green. Red cards require the given amount in bricks, blue cards require gems, green cards require recruits, white cards require all resources equally and black cards don't require anything at all.
Cards can change any of these. They can deal damage, build tower or wall, add or remove resources, facilities, change their own effect depending on special conditions or any combination of the aforementioned. Which is where strategy kicks in: you need to decide what to spend your resources on, what to keep for later and what to discard.
I also made a video to present the latest version of DArcomage, with gameplay footage, which you can see here:
So what does all of that have to do with Touhou? Well, I made the game easily modable, and in order to test if modding works, I needed to try making a card deck. Touhou spellcards came to mind, and so I made a Touhou EoSD card deck!
Here are some of the cards in the deck:
As you can see, card effects here range from fairly simple (Rage Trilithon: 3 damage, +3 wall) to fairly complex (Will there be none?: +10 of each resource, +10 tower and wall, or nothing at all, determined randomly). The way I made this deck is that I took a spell card, used its name (shortening if need be, as you can see space is limited), determined the resource type by the spellcard type (item = red, living thing = green, abstract concept = blue), thought of some appropriate action given the name, and assigned a cost by looking at similar cards from other decks. Also, cards are usually divided into three groups: common, uncommon and rare; 3 uncommon, 2 common and 1 rare card may appear in the game (so you can strategically hold onto a card to lower the chances of the opponent drawing it). Of course, I set card rarities depending on states the spellcards appear in: Rumia, Cirno, Meiling and low difficulty Patchouli cards are common, higher difficult Patchouli, Sakuya and low-level Remilia cards are uncommon, higher difficulty Remilia and Flandre cards are rare. Usually the less common the card, the stronger its effect is.
Going back to the whole "easily modable" part: cards are defined by using a very simple to understand, ini-like syntax in .lua files: github.com/GreatEmerald/libarcomage/blob/master/lua/Touhou/TouhouPool.lua
Here are two excerpts for the aforementioned cards:
Card
{
Name = "Rage Trilithon";
Description = "3 damage, +3 wall";
Frequency = 3;
BrickCost = 4;
GemCost = 0;
RecruitCost = 0;
Cursed = false;
Colour = "Red";
Picture = {File = "eosd-404.png", Coordinates = {x = 0, y = 0, w = 384, h = 226}};
Keywords = "";
PlayFunction = function ()
Damage(1, 3)
AddWall(0, 3)
return 1
end;
AIFunction = function ()
return AIDamageEnemy(3)+AIAddWall(3)
end;
}
Much of this is very self-explanatory. "Frequency" is the opposite of rarity (3 = common, 2 = uncommon, 1 = rare, but can be other values, this really shows how many cards of that type can be in the game at any given moment). "Cursed" defines whether the card is discardable or not (you can have bad "cursed" cards that are not good to play, but you can't discard them without playing, so you're forced to play them). "Picture" defines where the card picture can be found (they can all be in different files, or in one file with different coordinates, or any combination of the above). "Keywords" are not implemented yet, so ignore that. "PlayFunction" defines, in Lua code, what happens once you play the card. As you can see it's fairly straightforward; Damage deals damage, AddWall adds wall (the first number is which player the effect works on: 0 is you, 1 is the enemy; the second number is how strong the effect is). "AIFunction" is used by the AI to determine the priority to play the card; usually just adding the effects is sufficient.
Card
{
Name = "Will There Be None?"; --And Then Will There Be None?
Description = "+10 of all resources, +10 castle or nothing";
Frequency = 1;
BrickCost = 0;
GemCost = 13;
RecruitCost = 0;
Cursed = false;
Colour = "Blue";
Picture = {File = "eosd-712.png", Coordinates = {x = 0, y = 0, w = 384, h = 226}};
Keywords = "";
PlayFunction = function ()
local Luck = math.random(3)
if Luck == 1 then
AddBricks(0, 10)
AddGems(0, 10)
AddRecruits(0, 10)
elseif Luck == 2 then
AddTower(0, 10)
AddWall(0, 10)
end
return 1
end;
AIFunction = function ()
return (AIAddGems(10)+AIAddBricks(10)+AIAddRecruits(10))/3 + (AIAddTower(10)+AIAddWall(10))/3
end;
}
This is a bit more complex with its functions, since it needs to get a random number. It's still quite straightforward: a variable is defined, it gets a random number of 1-3, then depending on which number it was certain actions are performed. The AI function says that there is one third chance of getting one effect, one third to get another, and one third to get nothing (well, that's not explicitly shown, but it would be "+ 0/3" which is just nothing).
Here's another image showing some rare cards:
Some card highlights:
Four of a kind: makes both castles equal!
Misdirection: If opponent's tower is smaller than their wall, it deals damage to the tower directly ("misdirects" around the wall).
Illusion misdirection: the opposite (it looks as if it would misdirect, but it actually hits whatever is the highest of the two!)
Mercury poison: poisons the opponent's dungeon and has a negative effect on the tower!
Sakuya's cards all allow playing an additional card in a row (and you can chain those, too).
Remilia's cards tend to lower the opponent's dungeon and are usually expensive.
This deck isn't enabled by default, though; you need to change the CardPools.lua file to enable it by changing the PoolInfo line into something like this:
PoolInfo = { {Name = "Touhou", PoolFile = "TouhouPool.lua"} }
I would have set it as default, but I don't have any free images for the cards (free as in me being able to reuse them; right now I'm using screenshots from the game itself, which is technically copyrighted). So if someone could find a set of images for all those cards it would be nice and I could then enable it by default.
And if anyone is interested, it would be nice to make another Touhou-inspired deck. Maybe from PCB or such. But not necessarily. I also had the idea of making spellcards only be blue ones, with characters themselves being green cards and items being red cards.