It is currently 31 Oct 2024, 23:25
   
Text Size

Puzzle Mode

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Puzzle Mode

Postby 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:
  • 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.
I've also had a try at scripting Puzzles 27 ("What's in a Name") and 31 ("Who Dares Wins") from the same site, but got defeated by the fact that these puzzles use cards that haven't been coded into Forge - specifically Celestial Convergence and Harm's Way, respectively. I might do a summary of the feasibility of scripting all fifty of the puzzles on the site.
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
Ikeda
 
Posts: 7
Joined: 11 Jun 2017, 05:58
Has thanked: 0 time
Been thanked: 5 times

Re: Puzzle Mode

Postby 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.
Rooger
 
Posts: 88
Joined: 06 Jan 2013, 06:59
Has thanked: 44 times
Been thanked: 35 times

Re: Puzzle Mode

Postby 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
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

Postby 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
Agetian
Programmer
 
Posts: 3480
Joined: 14 Mar 2011, 05:58
Has thanked: 679 times
Been thanked: 565 times

Re: Puzzle Mode

Postby Rooger » 02 Jul 2017, 19:03

Agetian, you are doing godlike work here, really appreciate your commitment. =D>

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
Rooger
 
Posts: 88
Joined: 06 Jan 2013, 06:59
Has thanked: 44 times
Been thanked: 35 times

Re: Puzzle Mode

Postby 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
Agetian
Programmer
 
Posts: 3480
Joined: 14 Mar 2011, 05:58
Has thanked: 679 times
Been thanked: 565 times

Re: Puzzle Mode

Postby Xitax » 11 Jul 2017, 21:39

For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 12 Jul 2017, 03:13

Xitax wrote:For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
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):
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

Postby Xitax » 12 Jul 2017, 22:24

Agetian wrote:
Xitax wrote:For "Pauper Puzzles #29 - A Stab in the Back" AI should have 2 Island in play.
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):
https://i.imgur.com/lOFg87a.jpg

I added a Plains and an Island for now :)

- Agetian
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.

https://pauperpuzzles.wordpress.com/201 ... -the-back/
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby 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?
Last edited by Xitax on 30 Jul 2017, 14:30, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 24 Jul 2017, 07:55

@Xitax: It's now possible to add descriptions to puzzles by adding the following line to the metadata:

Code: Select all
Description:text of description
The description will currently be visualized on the puzzle goal card. Might also add a pop-up message box later.

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

Postby Agetian » 26 Jul 2017, 13:10

UPDATE: The "Turns:X" parameter in puzzles should now work correctly.

- Agetian
Agetian
Programmer
 
Posts: 3480
Joined: 14 Mar 2011, 05:58
Has thanked: 679 times
Been thanked: 565 times

Re: Puzzle Mode

Postby 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.
Geese
 
Posts: 1
Joined: 26 Jul 2017, 19:20
Has thanked: 1 time
Been thanked: 0 time

Re: Puzzle Mode

Postby 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.
Last edited by Xitax on 30 Jul 2017, 14:30, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby 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
Agetian
Programmer
 
Posts: 3480
Joined: 14 Mar 2011, 05:58
Has thanked: 679 times
Been thanked: 565 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 45 guests


Who is online

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

Login Form