It is currently 23 Apr 2024, 10:08
   
Text Size

Implementing a custom encounter in DotP2013

Moderator: CCGHQ Admins

Implementing a custom encounter in DotP2013

Postby thefiremind » 11 Jul 2012, 09:48

As I did for the campaign, I'm going to write down what I can understand about encounters, and how we could code a new one.

I opened the deck list of the Suntail Hawk encounter:
Code: Select all
<DECK personality="DISTURBING_THE_NEST.XML" deck_box_image="locked" deck_box_image_locked="locked" content_pack="0" never_available="true" uid="52">
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="0" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="1" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="2" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="3" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="4" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="5" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="6" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="7" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="8" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="9" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="10" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="11" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="12" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="13" />
  <CARD name="SUNTAIL_HAWK_276984" deckOrderId="14" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="15" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="16" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="17" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="18" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="19" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="20" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="21" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="22" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="23" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="24" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="25" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="26" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="27" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="28" />
  <CARD name="SUNTAIL_HAWK_1MD1_1" deckOrderId="29" />
  <CARD name="SUNTAIL_HAWK_2MD1_2" deckOrderId="30" />
  <CARD name="SUNTAIL_HAWK_2MD1_2" deckOrderId="31" />
  <CARD name="SUNTAIL_HAWK_2MD1_2" deckOrderId="32" />
  <CARD name="PLAINS_277793" deckOrderId="33" />
  <CARD name="PLAINS_277793" deckOrderId="34" />
  <CARD name="PLAINS_277793" deckOrderId="35" />
  <CARD name="PLAINS_277793" deckOrderId="36" />
  <CARD name="PLAINS_277793" deckOrderId="37" />
  <CARD name="PLAINS_277793" deckOrderId="38" />
  <CARD name="PLAINS_277793" deckOrderId="39" />
</DECK>
Something that can be immediately noticed: the lands are at the bottom. This makes me think that encounter decks start to be drawn from the bottom of the XML list. That explains why the poor AI plays only 1 Suntail Hawk each turn: it's always the only one in hand!

You can also notice that there are 3 different Suntail Hawk cards. But here's the strange thing: open the 3 cards' XML files, and look at them. The only difference is the filename and the Multiverse ID! Why making 3 of them? Is there something I'm missing?

Inside the encounter WAD there's no special file (like those XML files for challenges that describe the starting situation), so the AI has everything it needs in the deck list and in the cards.

I just have to invent an encounter and see if it works. Does someone have an idea? I have some, but I don't like them very much. I like the style of the Helix Pinnacle encounter: a combo that goes off in a number of turns, and you have to win before it happens.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times

Re: Implementing a custom encounter in DotP2013

Postby Miraika » 11 Jul 2012, 12:15

The encounters in the game are pretty much only worth playing once. The only one I really like is the 100-card mill deck, since it's fun to blaze through your deck with all of the Howling Mines. So based on that, I would suggest looking at wacky enchantments/artifacts that affect you and how you have to play. Just add Leyline code.

I figured I would list some of Forge's challenges, which could be ported or at least give ideas. (To be clear, I had nothing to do with these.)

* AI starts with Divine Presence and has a deck with a bunch of 4-toughness dudes.

* AI starts with Forced Fruition and has cards like Visions of Beyond. You even get a Quest for Ancient Secrets to help out.

* AI starts with Infernal Genesis. AI's deck benefits from having lots of creatures and destroying your 1/1's.

* AI starts with Furnace of Rath to complement its aggro deck.

* AI starts with Eladamri's Vineyard and Upwelling to power out a bunch of fatties. You start with a Defense of the Heart as some relief.

* AI starts with three(!) copies of Eon Hub [to protect against artifact destruction] and plays a bunch of cards that require payment at upkeep (Pact of the Titan, Eldrazi Monument)

* AI starts with a Darksteel Ingot and has a bunch of "any color" lands like Glimmervoid to pay for heavy multicolored cards like Fusion Elemental
Miraika
 
Posts: 17
Joined: 10 May 2012, 04:56
Has thanked: 20 times
Been thanked: 4 times

Re: Implementing a custom encounter in DotP2013

Postby GamerXYZ0 » 11 Jul 2012, 13:20

Perhaps a Phage the Untouchable challenge? The AI ramps with some defense the first turns, then starts playing Phage after Phage after Phage. Well, with something that bypasses the Legendary rule of course (does such a card exist?). Just a single Phage at a time would of course not exactly be fun. Heck, you can always just scrap Phage's Legendary status yourself: Encounters already don't follow the rules after all (40 cards, and more than 4 copies).

Heck, almost every instant-win card would make for a nice encounter (excluding those you can't "play against", like Battle of Wits). Though, The Cheese Stands Alone is definitely something you should consider even if you can't "play against it" but the AI just "plays against itself".
GamerXYZ0
 
Posts: 102
Joined: 17 Jun 2011, 19:29
Has thanked: 10 times
Been thanked: 7 times

Re: Implementing a custom encounter in DotP2013

Postby thefiremind » 11 Jul 2012, 14:29

Thanks for the ideas, but I'm stuck at the moment because I can't seem to make a custom campaign playable:
viewtopic.php?f=62&t=7471#p92836

EDIT: Now I can make a custom campaign playable, and I understood why there are multiple versions of the same card without any difference except for filename and Multiverse ID: it seems that if a deck contains more than 15 copies of the same card, the AI can get bugged and doesn't play a card even if it can.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 721 times


Return to Programming Talk

Who is online

Users browsing this forum: No registered users and 9 guests

cron

Who is online

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

Login Form