Puzzle Mode
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Puzzle Mode
by Ikeda » 01 Jul 2017, 23:40
Thank you for the advice; I've updated Puzzles 19 and 50, and these should now be accurate.
I've also had a go at scripting Puzzles 13 ("Waking Life"), 18 ("Yet So Far") and 44 ("Herald of Defeat"). Some notes:
I've also had a go at scripting Puzzles 13 ("Waking Life"), 18 ("Yet So Far") and 44 ("Herald of Defeat"). Some notes:
- All three of these puzzles were clearly meant to focus on a single block or expansion (M15, Portal Three Kingdoms, and Scars of Mirrodin block respectively), so if we want these to be aesthetically complete, these need to use cards from those specific expansions. I haven't set this up yet, though.
- Puzzle 44 has an oddity. The setup requires the opponent's Arrest to attach to your Core Prowler, and while I've done that, the resulting game state indicates that the same Arrest is attached to your Perilous Myr at the same time(!). It doesn't seem to affect the gameplay, however - the Myr is able to attack as normal.
- Attachments
-
- PC 13 18 44.zip
- Perplexing Chimera puzzles 13, 18 and 44
- (1.54 KiB) Downloaded 328 times
-
- PC 19 and 50.zip
- Perplexing Chimera puzzles 19 and 50 - updated
- (1.15 KiB) Downloaded 269 times
Re: Puzzle Mode
by Rooger » 02 Jul 2017, 00:35
I have asked on Discord a few days back and friarsol stated that the ability to choose sets for the cards isn't implemented as it is with .dck files for instance (if you want to specify a card to be from a given set you write (card name)|(set) but this doesn't work for game states) in the future we might be able to do it but right now i'm afraid it's not possible.
Re: Puzzle Mode
by Agetian » 02 Jul 2017, 04:53
Thanks a lot for your contributions, Ikeda! I committed your puzzles upstream. I also improved the situation with cards being attached to two permanents at once, so hopefully that should not be an issue anymore.
There was another issue with attachments which caused them to sometimes be incorrectly placed if a puzzle was restarted, but I fixed that as well.
- Agetian
There was another issue with attachments which caused them to sometimes be incorrectly placed if a puzzle was restarted, but I fixed that as well.
- Agetian
Last edited by Agetian on 02 Jul 2017, 13:23, edited 1 time in total.
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Agetian » 02 Jul 2017, 09:17
Puzzle Mode should now support Transformed cards (testing needed). The syntax is "card_name|Transformed" (where card_name is the name of the back face of the card). For example, Bearer of Overwhelming Truths|Transformed.
EDIT: Puzzle Mode should now support setting a specific card set for cards. The syntax is "card_name|Set:XXX", where XXX is the name of the set. For example, Mountain|Set:LEA.
- Agetian
EDIT: Puzzle Mode should now support setting a specific card set for cards. The syntax is "card_name|Set:XXX", where XXX is the name of the set. For example, Mountain|Set:LEA.
- Agetian
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Rooger » 02 Jul 2017, 19:03
Agetian, you are doing godlike work here, really appreciate your commitment.
I'll check the puzzles that use transformed cards and post here the fixes.
Edit: Right now only 2 of the puzzles are working with transformed cards (there is another puzzle that uses them but there are other issues with it)
I'll check the puzzles that use transformed cards and post here the fixes.
Edit: Right now only 2 of the puzzles are working with transformed cards (there is another puzzle that uses them but there are other issues with it)
- Attachments
-
- puzzle.rar
- (999 Bytes) Downloaded 353 times
Re: Puzzle Mode
by Agetian » 02 Jul 2017, 19:20
Hehe thanks a lot! And thanks a lot for your contributions, they are awesome! Much appreciated!
I committed all the working puzzles upstream, standardized the naming scheme a little to make them look well when sorted in the puzzle list (by the way, the puzzle list is now sorted in the alphabetic order, and it's also significantly larger).
- Agetian
I committed all the working puzzles upstream, standardized the naming scheme a little to make them look well when sorted in the puzzle list (by the way, the puzzle list is now sorted in the alphabetic order, and it's also significantly larger).
- Agetian
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Xitax » 11 Jul 2017, 21:39
For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
Re: Puzzle Mode
by Agetian » 12 Jul 2017, 03:13
Hmm, according to this image of the battlefield setup it should be a Plains and an Island, right? (I don't think it matters much if it's 2 Islands, but for authenticity purposes I guess it might be better to go with the Plains/Island):Xitax wrote:For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
https://i.imgur.com/lOFg87a.jpg
I added a Plains and an Island for now
- Agetian
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Xitax » 12 Jul 2017, 22:24
Oh yeah, well, I guess it would have to be a Plains to make sense. Dunno why I looked at that and saw an Island. I'm guessing it was originally missed because the author forgot to put them in the text description below the picture.Agetian wrote:Hmm, according to this image of the battlefield setup it should be a Plains and an Island, right? (I don't think it matters much if it's 2 Islands, but for authenticity purposes I guess it might be better to go with the Plains/Island):Xitax wrote:For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
https://i.imgur.com/lOFg87a.jpg
I added a Plains and an Island for now
- Agetian
https://pauperpuzzles.wordpress.com/201 ... -the-back/
Re: Puzzle Mode
by Xitax » 23 Jul 2017, 17:54
Coded some early Perplexing Chimera puzzles.
Perplexing Chimera #01 - Ground Control: Works as intended
Perplexing Chimera #02 - Death in Segments: Works
Perplexing Chimera #03 - Plans Within Plans: need help on this one. How to get the gamestate to remember that Mistfire Adept was exiled with my Suspension Field?
Perplexing Chimera #04 - The Last Holdout: Very complicated, might not matter that it's a Commander game. We'll see.
Perplexing Chimera #05 - Unable to implement game goal "kill all dragons"
Perplexing Chimera #06 - Second Nature: Works
Perplexing Chimera #07 - Light and Shadow: Codeable, but 3 turn win condition doesn't work in Forge at present. Also needs to have 1 card added to libraries - one useless card for human, and 1 card that avoids defeat if drawn by AI on turn 2 (Shadow Rift and another card seems ok).
Edit: Some puzzles require an explanation. Could we have a message text box to introduce the puzzle?
Perplexing Chimera #01 - Ground Control: Works as intended
Perplexing Chimera #02 - Death in Segments: Works
Perplexing Chimera #03 - Plans Within Plans: need help on this one. How to get the gamestate to remember that Mistfire Adept was exiled with my Suspension Field?
Perplexing Chimera #04 - The Last Holdout: Very complicated, might not matter that it's a Commander game. We'll see.
Perplexing Chimera #05 - Unable to implement game goal "kill all dragons"
Perplexing Chimera #06 - Second Nature: Works
Perplexing Chimera #07 - Light and Shadow: Codeable, but 3 turn win condition doesn't work in Forge at present. Also needs to have 1 card added to libraries - one useless card for human, and 1 card that avoids defeat if drawn by AI on turn 2 (Shadow Rift and another card seems ok).
Edit: Some puzzles require an explanation. Could we have a message text box to introduce the puzzle?
Last edited by Xitax on 30 Jul 2017, 14:30, edited 1 time in total.
Re: Puzzle Mode
by Agetian » 24 Jul 2017, 07:55
@Xitax: It's now possible to add descriptions to puzzles by adding the following line to the metadata:
Can you please provide the code for Perplexing Chimera #07 (you can set "Turns:3" even though it doesn't fully work yet) and submit the code here? I'll take a look at implementing the 3-turn win condition but ideally I need the actual puzzle to test it with.
- Agetian
- Code: Select all
Description:text of description
Can you please provide the code for Perplexing Chimera #07 (you can set "Turns:3" even though it doesn't fully work yet) and submit the code here? I'll take a look at implementing the 3-turn win condition but ideally I need the actual puzzle to test it with.
- Agetian
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Agetian » 26 Jul 2017, 13:10
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Re: Puzzle Mode
by Geese » 26 Jul 2017, 19:46
Hi! How does one figure out what the goal of any given puzzle is? Or are they all simply "win this turn?" I saw some references to a goal card in previous posts, but I'm not seeing that anywhere. I have 1.6.1 installed and running on Windows 10.
Apologies if this question doesn't belong in the Developer's Corner.
Apologies if this question doesn't belong in the Developer's Corner.
Re: Puzzle Mode
by Xitax » 27 Jul 2017, 01:08
Previously (to the update Agetian just provided for the next beta) it was always "defeat AI during your next turn" It worked as long as you set the starting parameter to AI's turn or to human's turn. One puzzle I coded started during AI's main2 phase and it worked. The rest were all current turn win solutions with the exception of the aforementioned Perplexing Chimera #7 which I haven't tested in the new environment.
The new feature to explain the goal at the start of the puzzle should help.
Also... during testing I found out that if you don't list the attaching permanent right after the permanent attached it would attach to the previous permanent listed instead. At least in one case. Try #7 again but move the Conviction after the Sea Monster instead and it attaches to Sea Monster not the intended card. CORRECTION: It attaches to Wayward Soul, but visually looks to be attached to Sea Monster - additionally Sea Monster says that it's attached by Conviction but isn't really (no effect).
Additional additional edit: Oh I forgot to add some cards to human and AI deck to make this puzzle actually winnable. Can't draw off an empty library... I'll upload a new one in a little while.
The new feature to explain the goal at the start of the puzzle should help.
Also... during testing I found out that if you don't list the attaching permanent right after the permanent attached it would attach to the previous permanent listed instead. At least in one case. Try #7 again but move the Conviction after the Sea Monster instead and it attaches to Sea Monster not the intended card. CORRECTION: It attaches to Wayward Soul, but visually looks to be attached to Sea Monster - additionally Sea Monster says that it's attached by Conviction but isn't really (no effect).
Additional additional edit: Oh I forgot to add some cards to human and AI deck to make this puzzle actually winnable. Can't draw off an empty library... I'll upload a new one in a little while.
Last edited by Xitax on 30 Jul 2017, 14:30, edited 1 time in total.
Re: Puzzle Mode
by Agetian » 27 Jul 2017, 04:56
Thanks, Xitax! If you tell me which cards to add, I can do that as well
And btw, I added a simple popup box that'll appear when you start the puzzle and which will outline the key parameters of the puzzle (goal, turns limit, difficulty, and description if one is present).
- Agetian
And btw, I added a simple popup box that'll appear when you start the puzzle and which will outline the key parameters of the puzzle (goal, turns limit, difficulty, and description if one is present).
- Agetian
- Agetian
- Programmer
- Posts: 3480
- Joined: 14 Mar 2011, 05:58
- Has thanked: 679 times
- Been thanked: 565 times
Who is online
Users browsing this forum: No registered users and 45 guests