It is currently 26 Apr 2024, 09:04
   
Text Size

Implementing a custom campaign in DotP2013

Moderator: CCGHQ Admins

Implementing a custom campaign in DotP2013

Postby thefiremind » 10 Jul 2012, 09:50

I'm doing some tests on the possibility to implement custom campaigns in DotP2013.

In order to do that, I copied the Revenge campaign (CAMPAIGN2.XML in the core) to a custom WAD, and changed its ID both in the name and inside the XML.

Here's the first discover: the maximum allowed ID for a campaign is 7. Any ID bigger than 7 makes the game crash when choosing Campaign in the menu. So we can make place for 3 custom campaigns at most (2 if a future "official" expansion will add the 5th).

Upon entering the custom campaign, here's the first bug:
screenshot | Open
Image
That horizontal line should join the 2 planeswalkers... why is it moved to the left? I didn't touch any of the numbers that looked like pixel measures inside the copy of the Revenge campaign, so I can't understand why the Revenge campaign is shown correctly while the copy isn't.

If I make a copy of the first campaign instead of the second, the horizontal lines are placed as they should. It's actually better to copy the first one since we have more places for custom battles. Maybe we can even invent encounters... :D Anyway, from now on, the tests will be made with a copy (or more) of CAMPAIGN1 instead of CAMPAIGN2.

Another thing I noticed: if I add 2 custom campaigns, they are placed after the "official" ones, as we would expect, but in reverse order between them. So if I add CAMPAIGN6 and CAMPAIGN7, the tab for CAMPAIGN6 is the rightmost.

These are the tags inside the campaign XML that aren't obvious:
  • x = Sets the x coordinate of the big portraits at the center of the screen, with 0 in the middle, negative numbers at the left, positive numbers at the right. This makes symmetry easy to achieve.
  • small_x = Sets the x coordinate of the small portraits on the plane selection. The convention is the same as the previous tag, but those coordinates are global (for the whole campaign rather than for each plane).
  • size = Sets the portrait's size. In the official campaigns, 1 is used for encounters, 2 for usual duels, 3 for the final duels against the famous planeswalkers. Of course you are free to use the size that you like most, but bear in mind that you'll have to change x and small_x together with size, if you want a pleasant result.
  • core = I think it just identifies the duel as belonging to the core WAD. Adding or removing this tag has no effect (at least, I can't see any).
  • trial = Since it's only present in the beginning duels of campaign #1, I think it identifies the duels that were available in the demo. Adding or removing this tag has no effect (at least, I can't see any).
  • image = I can't understand this one. It seems to have 3 possible values: type_0, type_3, type_9. I can't see any change after editing it.

I'll update the topic with more findings.
< 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 campaign in DotP2013

Postby thefiremind » 11 Jul 2012, 12:06

People, I'm stuck. There's one thing I didn't try yet: starting a duel in a custom campaign. Even just by copying CAMPAIGN1.XML, changing the name to CAMPAIGN6.XML and the id to 6, when I click on "Start duel" in any duel/encounter in the campaign copy, I come back to the campaign screen.

I'm probably missing something... but what?
< 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 campaign in DotP2013

Postby daenon611 » 11 Jul 2012, 16:37

Perhaps of hard coded lines in the executable? What about exchanging an existing campaign?
User avatar
daenon611
 
Posts: 68
Joined: 04 Sep 2011, 15:19
Location: Germany
Has thanked: 45 times
Been thanked: 4 times

Re: Implementing a custom campaign in DotP2013

Postby thefiremind » 16 Jul 2012, 18:42

I think I found the problem. The game probably doesn't like that a campaign ID is skipped, so I can't make a CAMPAIGN6 without a CAMPAIGN5. I wanted to skip #5 in sight of an eventual expansion, but it seems I can't. Well, at least now making a new campaign seems possible again.
< 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 37 guests


Who is online

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

Login Form