Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




AI alterations?
Moderator: CCGHQ Admins
5 posts
• Page 1 of 1
AI alterations?
by n1x4 » 12 Dec 2014, 00:59
Evening gents. Was wondering if it's at all possible to alter the AI in any way or somehow manage copy 2013's to 2014's. Seems no matter what in '14 I am ALWAYS mana-screwed or flooded even with the custom decks from the forums. Restarted the campaign again and took me 6 restarts to finally get a hand with good land/spell ratio and ok draws on Chandra. With 2013 it was a blast to play, rarely ever had screw or flood, still do but don't have the card availability that's in '14 or I would stick with '13. If someone could maybe point me in the right direction of adding ManualMana and Objects to '13 as well as most of the cards/decks especially the M14/15 that would be cool too but would rather tinker with the AI in '14 if at all possible. I'm no stranger to modding (FarCry, Fallout, Skyrim, even Street Fighter x Tekken lol) so if its a little tricky I can usually figure it out but new to DotP.
Any advice would be appreciated.
Glad to be a part of the forums!
Any advice would be appreciated.
Glad to be a part of the forums!
- n1x4
- Posts: 3
- Joined: 12 Dec 2014, 00:44
- Has thanked: 0 time
- Been thanked: 0 time
Re: AI alterations?
by RiiakShiNal » 12 Dec 2014, 03:23
ObjectDC functions don't need to be ported to DotP 2013 as DotP 2013 has a native ObjectDC() (which is why I named it such for DotP 2014).
Porting the Manual Mana functions could be done by altering the code to use the native ObjectDC() implementation, but as there are already mana token implementations for DotP 2013 so I don't really see a need to back-port it.
Any cards using multiple choice questions with more than 3 options (like Mana Flare, Exotic Orchard, and Reflecting Pool) would have to be written differently anyway due to engine limitations in DotP 2013. So back-porting the cards built using Manual Mana functions would still require lots of time and effort if it would even be possible for some of them.
Porting the Manual Mana functions could be done by altering the code to use the native ObjectDC() implementation, but as there are already mana token implementations for DotP 2013 so I don't really see a need to back-port it.
Any cards using multiple choice questions with more than 3 options (like Mana Flare, Exotic Orchard, and Reflecting Pool) would have to be written differently anyway due to engine limitations in DotP 2013. So back-porting the cards built using Manual Mana functions would still require lots of time and effort if it would even be possible for some of them.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: AI alterations?
by n1x4 » 12 Dec 2014, 03:47
Understood.. Thanks for clearing it up. I was under the assumption they were running the same engine. Apologies. After poking around a little in both I see what you mean by limitations (somewhat). Makes sense now why there's more done for '14 than '13 as well. So, ruling that out of course is there a way to manipulate the AI behavior or rather the RNG for drawing? Surely my luck just isn't that bad with '14 and not '13. Just played a few hands in each and same horrid flood/screw in '14 every time, actually all screws highest I had was 3 lands lel. While '13 was pretty fair on the drawing in all hands. *shrug* TBH, that's really my only issue with '14 currently.
- n1x4
- Posts: 3
- Joined: 12 Dec 2014, 00:44
- Has thanked: 0 time
- Been thanked: 0 time
Re: AI alterations?
by RiiakShiNal » 12 Dec 2014, 12:10
They are based on the same engine, but with each game WotC/Stainless makes changes to the engine either adding or removing capabilities. In most cases it makes sense to keep moving to the next version of the game (because more cards are generally possible), but there are also times to just stick with a particular version (for example we can't currently truly mod DotP 2015 because they locked it down, or because you like a specific game mode such as Archenemy in DotP 2012).
As for changing the AI or the RNG for starting hands I don't think it can be done without reverse engineering the engine and modifying that. However, it could be possible to simulate changing how the mulligans work to meet certain requirements, but it would not be consistent with magic rules (magic rules state it should be random as such it is quite possible to get mana screwed). For example you could write an ability such that you accept the hand you are initially given by the game then before anyone plays the ability asks if you are actually happy with your hand. If not then it would count how many cards are in your hand, put all those back in your library, shuffle your library until certain conditions are met (for example min 3 land cards in the top 7 cards of the library) then deal you the number of cards you previously had minus 1 to simulate mulligan (you could ignore the first minus 1 if they had 7 cards in hand to simulate a first free mulligan) then repeat the process. It should be noted though that this would require changes to cards like leylines to make them work with the simulated method properly.
Granted, shuffling in DotP (regardless of version) is not exactly "fair" as the shuffling engine follows certain rules (some to allow selectable difficulty) when a shuffle is called. For example if a deck is configured to allow it the engine will keep certain biased cards towards the bottom of the deck for the AI player. I also imagine that it tries to give the AI player a certain amount of land towards the beginning of the game. I do not know if there are any rules it follows for human players or which implementation is more MtG accurate (if any of them).
As for changing the AI or the RNG for starting hands I don't think it can be done without reverse engineering the engine and modifying that. However, it could be possible to simulate changing how the mulligans work to meet certain requirements, but it would not be consistent with magic rules (magic rules state it should be random as such it is quite possible to get mana screwed). For example you could write an ability such that you accept the hand you are initially given by the game then before anyone plays the ability asks if you are actually happy with your hand. If not then it would count how many cards are in your hand, put all those back in your library, shuffle your library until certain conditions are met (for example min 3 land cards in the top 7 cards of the library) then deal you the number of cards you previously had minus 1 to simulate mulligan (you could ignore the first minus 1 if they had 7 cards in hand to simulate a first free mulligan) then repeat the process. It should be noted though that this would require changes to cards like leylines to make them work with the simulated method properly.
Granted, shuffling in DotP (regardless of version) is not exactly "fair" as the shuffling engine follows certain rules (some to allow selectable difficulty) when a shuffle is called. For example if a deck is configured to allow it the engine will keep certain biased cards towards the bottom of the deck for the AI player. I also imagine that it tries to give the AI player a certain amount of land towards the beginning of the game. I do not know if there are any rules it follows for human players or which implementation is more MtG accurate (if any of them).
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: AI alterations?
by n1x4 » 12 Dec 2014, 16:07
Insight greatly appreciated man! Answered exactly what I needed to know and in depth so, again, thank you. Reckon I'll stick it out with '14 b/c of the many options available and hit up '13 when I want to planechase or get too frustrated lel
Have a good one and hack on.
Have a good one and hack on.
- n1x4
- Posts: 3
- Joined: 12 Dec 2014, 00:44
- Has thanked: 0 time
- Been thanked: 0 time
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 20 guests