New quest features/changes
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
60 posts
• Page 2 of 4 • 1, 2, 3, 4
Re: New quest features/changes
by DennisBergkamp » 08 May 2010, 17:20
Yes, that would be ideal. I'll see if I can add this.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 13 May 2010, 16:46
This message originally appeared in the Forum/Topic:
Re: Decks for the AI
This message deals with some coding which is required for the special quests that appear after 25 wins.
Re: Decks for the AI
This message deals with some coding which is required for the special quests that appear after 25 wins.
DennisBergkamp stated:
I've been messing around a lot with the quest code lately, the next version will have a whole new set of features. The code is not pretty, but I've finally got stuff to work which allows me to play "Quest" matches against the computer. I've set it up so that Quests can be added in a separate text file (just like cards.txt) using a format like this:Then, I still optionally hardcode a few things, like:
- Code: Select all
/* id = Quest id
* name = Name of the quest
* desc = Description
* difficulty = Easy, Medium, Hard... it basically just represents the computer's starting life (easy = 20 life, medium = 25 life, hard = 30 life)
* repeatable = After a quest is completed, can they be played again?
* numberWinsRequired = Amount of wins required before this quest will show up
* cardReward = Just the text shown for what cards are rewarded (eg. "Five random blue rares" or "Ten random cards")
* creditsReward = Amount of credits won after completing the quest
*/
- Starting permanents of the computer.
- Starting permanents of the player.
- Card reward for completing the quest (this would match whatever text was specified previously for the cardReward entry).
The decks used for these quest matches can be specified through just adding the .dck file into res/quest/decks, using a naming convention of "quest{id}.dck". But I guess I'll keep the regular quest decks the same for now.
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by Chris H. » 13 May 2010, 16:50
OK, I think that I will try to create a special quest deck and I think that I have found the coding which goes along with these types of special opponent decks in QuestUtil.setupQuest().
I hope to create a deck with legends to battle and I will try to set up the code additions and rewards at end of quest. I am only now getting started on this and can not predict if I will be successful.
I hope to create a deck with legends to battle and I will try to set up the code additions and rewards at end of quest. I am only now getting started on this and can not predict if I will be successful.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by DennisBergkamp » 13 May 2010, 18:49
Ah yes, it's very easy actually... I played around with adding icons to a quest as well, but I didn't like the results. So you can make the last line of a quest in quests.txt anything ("noIcon", for example).
Then the rest (card rewards, computer/human extra permanents) is done in QuestUtil.java.
Then the rest (card rewards, computer/human extra permanents) is done in QuestUtil.java.
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 15 May 2010, 12:47
I added my new AI deck to the quests.txt file and named my new deck quest11.dck and placed a copy in the /res/quest/decks/ folder. I have played a number of quests using the RG deck that comes with the questdata file in the SVN.
My deck at number 11 never shows up. And I am seeing the non repeatable decks appear again even after I have beat them. Hmmm.
So, the quests window apparently doe not scroll to show more than 6 quests at one time. And the repeatable dungeon crawl decks take up most of these 6 spots in the list. And the non repeatable decks come back like a ghost from the dead and fill up the remaining spots.
My deck at number 11 never shows up. And I am seeing the non repeatable decks appear again even after I have beat them. Hmmm.
So, the quests window apparently doe not scroll to show more than 6 quests at one time. And the repeatable dungeon crawl decks take up most of these 6 spots in the list. And the non repeatable decks come back like a ghost from the dead and fill up the remaining spots.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by DennisBergkamp » 15 May 2010, 15:18
Hmm, yeah I've never actually made them non-repeatable (yet) since I figured I'd test them a bunch of times first...
The reason your quest is not showing up is probably just bad luck. What happens is that in between games (any game, it doesn't have to be one of the special quests), a random selection of quests gets created. The amount of quests that shows up is based on your current amount of wins, the max you'll ever get is 7 (I haven't implemented a vertical scroll bar yet).
The reason your quest is not showing up is probably just bad luck. What happens is that in between games (any game, it doesn't have to be one of the special quests), a random selection of quests gets created. The amount of quests that shows up is based on your current amount of wins, the max you'll ever get is 7 (I haven't implemented a vertical scroll bar yet).
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 15 May 2010, 16:50
`DennisBergkamp wrote:Hmm, yeah I've never actually made them non-repeatable (yet) since I figured I'd test them a bunch of times first...
The reason your quest is not showing up is probably just bad luck. What happens is that in between games (any game, it doesn't have to be one of the special quests), a random selection of quests gets created. The amount of quests that shows up is based on your current amount of wins, the max you'll ever get is 7 (I haven't implemented a vertical scroll bar yet).
I spent a little more time with it and I finally saw my deck appear.

I thought that maybe the non-repeatable part had not yet been implemented. A work in progress. I see that you kept the Quest window no larger than 1024 x 728. The original deck description for my deck did not fit within the size limitations. I had to go back and delete some extra material.
I like the idea of having some cards start in play with this new fantasy quest decks. Although it makes the dev team think a little harder on what cards we should have in place at start of game.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by DennisBergkamp » 20 May 2010, 04:30
By the way, has anyone tried the opponent icon feature? If you do it right, stuff should look like this in-game (playing against Lisa Simpson) :
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 20 May 2010, 10:07
`DennisBergkamp wrote:By the way, has anyone tried the opponent icon feature? If you do it right, stuff should look like this in-game (playing against Lisa Simpson) :
I have not yet had a chance to gather any opponent icons, but I like your screen shot.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by Chris H. » 20 May 2010, 23:03
I visited google and found a pic for each of the 65 deck names. Cropped and resized them to 100 x100 pixels. I placed them into the icons folder of a fresh copy of Forge rev 1080.
I think that the icon should be drawn farther to the left. By about 25 to 30 pixels. Granted, we can move the border to the right and widen the left side panels. It might be nice if the default width was enough to display the entire deck icon picture. Do you have the same issue with Windows?
Oh, BTW, that is Storm trying to peek around the 20 life points.
`
I think that the icon should be drawn farther to the left. By about 25 to 30 pixels. Granted, we can move the border to the right and widen the left side panels. It might be nice if the default width was enough to display the entire deck icon picture. Do you have the same issue with Windows?
Oh, BTW, that is Storm trying to peek around the 20 life points.

`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by DennisBergkamp » 21 May 2010, 17:14
Ahh, I see... I'm not sure, but this could be hard to fix. It's using this BorderLayout layout manager, which doesn't provide a whole lot of control, you can put components North, South, East, West and Center (and then there's some relative positioning such as LINE_START, LINE_END, etc.)
I put the icon Center, but I guess on low res (or maybe Mac?) screens it doesn't have enough space to be shown completely. What happens if you make the entire left panel bigger?
I put the icon Center, but I guess on low res (or maybe Mac?) screens it doesn't have enough space to be shown completely. What happens if you make the entire left panel bigger?
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 21 May 2010, 18:03
`DennisBergkamp wrote:Ahh, I see... I'm not sure, but this could be hard to fix. It's using this BorderLayout layout manager, which doesn't provide a whole lot of control, you can put components North, South, East, West and Center (and then there's some relative positioning such as LINE_START, LINE_END, etc.)
I put the icon Center, but I guess on low res (or maybe Mac?) screens it doesn't have enough space to be shown completely. What happens if you make the entire left panel bigger?
I can drag the border to make the left panel wider and this will allow the entire jpg icon to be displayed. The life number will move to the right as the panel becomes wider. So, it is not much of a problem.
I am using a 24" wide screen iMac with the monitor set to the default 1920 x 1200 size. I just saved both of our pics and then loaded them into a pic viewer. I placed my pic over on top and slightly down and I can compare the placing for the objects within the Computer titledBorder panel.
I took a screen shot of both of our pics so that you can see what I am seeing. The icon on my Mac is being drawn farther to the right than it is on your computer. I don not know what could be causing this to happen.

I looked at my screenshot again. On your computer the Hand + num, Removed+ num, Library+ num, and Grave+ num are narrower and do not extend to the right. On my computer these objects and the Poison Counters + num line up with a right justification.
I wonder if this is the result of a code change on your local copy which has not yet been merged into the SVN?

`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: New quest features/changes
by mtgrares » 21 May 2010, 18:28
It looks good. A pictures gives the AI more personality. (I enjoy watching the Simpsons also.)DennisBergkamp wrote:By the way, has anyone tried the opponent icon feature? If you do it right, stuff should look like this in-game (playing against Lisa Simpson) :
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
Re: New quest features/changes
by DennisBergkamp » 21 May 2010, 18:54
Aha! This is very interesting... I haven't made any changes to my code, so it must just be a Mac thing.Chris H. wrote:`DennisBergkamp wrote:Ahh, I see... I'm not sure, but this could be hard to fix. It's using this BorderLayout layout manager, which doesn't provide a whole lot of control, you can put components North, South, East, West and Center (and then there's some relative positioning such as LINE_START, LINE_END, etc.)
I put the icon Center, but I guess on low res (or maybe Mac?) screens it doesn't have enough space to be shown completely. What happens if you make the entire left panel bigger?
I can drag the border to make the left panel wider and this will allow the entire jpg icon to be displayed. The life number will move to the right as the panel becomes wider. So, it is not much of a problem.
I am using a 24" wide screen iMac with the monitor set to the default 1920 x 1200 size. I just saved both of our pics and then loaded them into a pic viewer. I placed my pic over on top and slightly down and I can compare the placing for the objects within the Computer titledBorder panel.
I took a screen shot of both of our pics so that you can see what I am seeing. The icon on my Mac is being drawn farther to the right than it is on your computer. I don not know what could be causing this to happen.![]()
I looked at my screenshot again. On your computer the Hand + num, Removed+ num, Library+ num, and Grave+ num are narrower and do not extend to the right. On my computer these objects and the Poison Counters + num line up with a right justification.
I wonder if this is the result of a code change on your local copy which has not yet been merged into the SVN?![]()
`
We might only be able to fix this by using a different LayoutManager for that one pane.
Another thing you should try, Chris, is to go to the main menu and make sure that "Use LAF fonts" is checked. I'm wondering if that would make a difference...
-
DennisBergkamp - AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: New quest features/changes
by Chris H. » 21 May 2010, 19:03
`DennisBergkamp wrote:Aha! This is very interesting... I haven't made any changes to my code, so it must just be a Mac thing.
We might only be able to fix this by using a different LayoutManager for that one pane.
Another thing you should try, Chris, is to go to the main menu and make sure that "Use LAF fonts" is checked. I'm wondering if that would make a difference...
I tried checking the LAF fonts option. The 20 life points is drawn at a smaller point size. More of the picture is visible.
`
-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
60 posts
• Page 2 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 21 guests