Forge version 1.5.38
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Forge version 1.5.38
by KrazyTheFox » 04 May 2015, 18:32
I actually added that exact feature alongside the abovementioned changes. Hit the "allow duplicate cards" checkbox when creating your quest (it's on the load/new quest menu, not the pop-up) and you'll potentially get duplicates. It defaults to unchecked so the behavior won't change for people unexpectedly.serrasmurf wrote:Exactly, fat packs and the like are fine, but initial pools currently never have duplicates
When I get home I can elaborate on the way the starting pools are now generated if anyone wants me to. It now does a lot of work to get you what you want and keep things you might not want out.
Edit: This is the current algorithm for picking your starting pool using the balanced distribution:
Filters:
- Code: Select all
for (i = [0..99]) {
if (i < colorBiasPreference) {
if (i % 8 == 0 && colorless not in preferred colors && includeArtifacts) {
add an artifact filter
} else if (i % 5 == 0) {
if (only colorless selected && Phyrexian limit not reached) {
if (Phyrexian cost cards in the selected sets) {
add a Phyrexian mana cost filter
continue
}
}
if (multicolored cards in selected sets and colors && multicolor limit not reached) {
add multicolor-only filter
} else {
add card-has-color filter //Still allows multi-colored cards
}
} else {
add mono-color filter
}
} else {
if (i % 6 == 0) {
add multicolor-only filter
} else {
add mono-color filter
}
}
}
Card Selection:
- Code: Select all
shuffle filters list
allowedMisses = (number of filters + 4) * number of cards needed
while (need more cards && allowedMisses > 0) {
if (filters remaining) {
pick next filter
try 10 times to pick a card using that filter from the selected sets/rarities
}
if (no card selected) {
try another filter 10 times
if (no card selected) {
continue to next card without generating one
}
} else {
if (card not in starting pool || allow duplicate cards) {
add card to starting pool
} else {
allowedMisses--
}
}
}
return starting pool
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Forge version 1.5.38
by drdev » 04 May 2015, 23:49
So sadly I learned the hard way that this change completely broke Quest Mode for the Android app, as you used the java.nio library that isn't available on Android.KrazyTheFox wrote:With the recent reports of quest saves getting corrupted on save, I've committed a change that now creates a backup of quest files before saving them. Only one backup will be kept and that will be overwritten the next time the quest is saved. This should keep people from completely losing quests. They're in the same location as the regular quest save except with a ".bak" extension.
I've gone ahead and committed r29345 to fix this issue by using a new FileUtil.copyFile function I wrote.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.38
by KrazyTheFox » 05 May 2015, 00:08
Ah, whoops. I'd checked this one before I made the change but it appears my source was incorrect. Thanks for the fix.drdev wrote:So sadly I learned the hard way that this change completely broke Quest Mode for the Android app, as you used the java.nio library that isn't available on Android.KrazyTheFox wrote:With the recent reports of quest saves getting corrupted on save, I've committed a change that now creates a backup of quest files before saving them. Only one backup will be kept and that will be overwritten the next time the quest is saved. This should keep people from completely losing quests. They're in the same location as the regular quest save except with a ".bak" extension.
I've gone ahead and committed r29345 to fix this issue by using a new FileUtil.copyFile function I wrote.
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Forge version 1.5.38
by drdev » 05 May 2015, 00:37
So after releasing a working Android build for quests, I realized that there's a couple problems with the new quest creation functionality.
1. You have to scroll quite a bit to view and configure all the settings.
2. Creating a new quest on the Main World seems to hang the app. There are no errors, and creating a quest on a smaller world like Ravnica works fine, so I'm assuming it's just a performance issue with the new algorithm for generating the starting pool or something.
Krazy, can you look into addressing these issues, particularly the performance one?
1. You have to scroll quite a bit to view and configure all the settings.
2. Creating a new quest on the Main World seems to hang the app. There are no errors, and creating a quest on a smaller world like Ravnica works fine, so I'm assuming it's just a performance issue with the new algorithm for generating the starting pool or something.
Krazy, can you look into addressing these issues, particularly the performance one?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Forge version 1.5.38
by KrazyTheFox » 05 May 2015, 00:40
I'm not really sure how to address this one. More options == more space, but I'll think on it a while and see if I can find a better way to do it.drdev wrote:1. You have to scroll quite a bit to view and configure all the settings.
Yep, I'll look into it. I'll see if I can get my android builds working again to give it some proper testing. Interesting that larger pools are hanging; smaller pools have been less performant during my testing.drdev wrote:Krazy, can you look into addressing these issues, particularly the performance one?
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Forge version 1.5.38
by friarsol » 05 May 2015, 03:06
Can someone familiar with the CardView stuff look at the following issues:
1) Morph/Face down cards leak their color. When a Morph spell is cast (or cards are otherwise flipped face down), the card view isn't updated appropriately and you can see what color the base card is.
2) Animated triggers from the DTK sieges (Palace Siege etc) aren't displayed in the card detail panel. I know how that system used to work, but I can't figure out what's going on with these CardViews and how to properly get these types of triggers to show up.
3) When choosing the Generic Choice of Palace Siege, the CardDetailText Pane stops showing it's oracle text as soon as the Generic Choice popup happens. It used to continue showing it while this choice is being made. This is useful, since otherwise unless you've memorized the spell, it's a crapshoot which half you want.
1) Morph/Face down cards leak their color. When a Morph spell is cast (or cards are otherwise flipped face down), the card view isn't updated appropriately and you can see what color the base card is.
2) Animated triggers from the DTK sieges (Palace Siege etc) aren't displayed in the card detail panel. I know how that system used to work, but I can't figure out what's going on with these CardViews and how to properly get these types of triggers to show up.
3) When choosing the Generic Choice of Palace Siege, the CardDetailText Pane stops showing it's oracle text as soon as the Generic Choice popup happens. It used to continue showing it while this choice is being made. This is useful, since otherwise unless you've memorized the spell, it's a crapshoot which half you want.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Forge version 1.5.38
by serrasmurf » 05 May 2015, 10:00
Hi Krazy,
I started some quests in the latest snapshot (29347), thnx for the duplicate option!
2 issues:
- I would expect that the colours i check are the colours i get, but they are the ones excluded
- I would expect the colours to be totally excluded, but instead i still get a couple of them (Not an issue but a bit counterintuitive)
I would also expect that the choice of balanced/random/surprise me is done over the colours I selected, but instead balanced is the only option linked with colour selection. I guess that makes sense too.
Would it make sense to have "multicolour" as a separate selection option?
KR
I started some quests in the latest snapshot (29347), thnx for the duplicate option!
2 issues:
- I would expect that the colours i check are the colours i get, but they are the ones excluded
- I would expect the colours to be totally excluded, but instead i still get a couple of them (Not an issue but a bit counterintuitive)
I would also expect that the choice of balanced/random/surprise me is done over the colours I selected, but instead balanced is the only option linked with colour selection. I guess that makes sense too.
Would it make sense to have "multicolour" as a separate selection option?
KR
- serrasmurf
- Posts: 316
- Joined: 30 Jan 2010, 14:09
- Location: The Netherlands
- Has thanked: 3 times
- Been thanked: 18 times
Re: Forge version 1.5.38
by KrazyTheFox » 05 May 2015, 12:03
You'll need to update your color bias option. It's probably still a 1-10 value, where now it's 1-100. The number is the percentage of your pool your selected colors will occupy. I think I've figured out a good way to reset that automatically but won't be able to do that til after work.serrasmurf wrote:Hi Krazy,
I started some quests in the latest snapshot (29347), thnx for the duplicate option!
2 issues:
- I would expect that the colours i check are the colours i get, but they are the ones excluded
- I would expect the colours to be totally excluded, but instead i still get a couple of them (Not an issue but a bit counterintuitive)
I would also expect that the choice of balanced/random/surprise me is done over the colours I selected, but instead balanced is the only option linked with colour selection. I guess that makes sense too.
Would it make sense to have "multicolour" as a separate selection option?
KR
I've looked at some of the performance problems on android and it does seem a bit slow. I can't find an android device that's slow enough to cause problems, but I should be able to attempt some optimization.
-
KrazyTheFox - Programmer
- Posts: 725
- Joined: 18 Mar 2014, 23:51
- Has thanked: 66 times
- Been thanked: 226 times
Re: Forge version 1.5.38
by elcnesh » 06 May 2015, 09:21
Added them to my shortlist of things to fix in the GUIfriarsol wrote:Can someone familiar with the CardView stuff look at the following issues:
1) Morph/Face down cards leak their color. When a Morph spell is cast (or cards are otherwise flipped face down), the card view isn't updated appropriately and you can see what color the base card is.
2) Animated triggers from the DTK sieges (Palace Siege etc) aren't displayed in the card detail panel. I know how that system used to work, but I can't figure out what's going on with these CardViews and how to properly get these types of triggers to show up.
3) When choosing the Generic Choice of Palace Siege, the CardDetailText Pane stops showing it's oracle text as soon as the Generic Choice popup happens. It used to continue showing it while this choice is being made. This is useful, since otherwise unless you've memorized the spell, it's a crapshoot which half you want.
- elcnesh
- Posts: 290
- Joined: 16 May 2014, 15:11
- Location: Netherlands
- Has thanked: 34 times
- Been thanked: 92 times
39 posts
• Page 3 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 76 guests