myk's code contributions
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: myk's code contributions
by myk » 17 Feb 2013, 22:17
Ok, I've sorted and re-prioritized my list based on the above posts. If anyone wants ownership of any of the following tasks, or has further requests/suggestions, please speak up : )
Bugs to fix:
Bugs to fix:
- correct tab label text when switching deck sections
size How To Play and License Details overlay panels correctlyadd newly created scheme/planar decks to selection listsensure challenges are available when they are supposed to becould not repro (and neither can original reporter)only play sound event once at a time (stutter in untap phase when many cards are getting untapped, for example)don't propagate changes to current deck when you select 'no' at the save promptreevaluate cursor position when activating a card so tabbing off the application window then clicking back onto it doesn't tap the last highlighted cardReport Bug dialog doesn't work (do we want it to go to cardforge, or just format a post template for the forum?)- refresh screen on attack phase so auto-attacking creatures show their sword badges
ensure Play or Draw? dialog has focus when it comes up
- combine Duels and Challenges into one page, with challenges taking up the top slots in the duels menu (visually differentiate from duel opponents)
- for each screen/dialog:
- set useful default widget focus on show
ensure correct tab-focus order- attach keylisteners for useful enter/space/arrow hotkeys
- remove Command, use existing Runnable
- delete decks from in-game
- in the custom deck selection list for AI, visually mark decks that contain cards flagged with RemAIDeck
- show preview of skin when selecting
- fire off events for Foreroes new sounds
- r-click menu for restriction widgets (edit, change options, temporarily disable, invert)
- indicate how many cards are being hidden by the current filter (should alleviate "where did my cards go?" syndrome)
- sort battlefield card lists by name for effects that ask you to choose a card from the battlefield
- add dragtab panels to default place if they're missing in the editor_preferred.xml file
- move Import deck functionality to a button on the Current Deck tab
- keep remaining items selected in tables when some items disappear due to a move operation
- sort indicator for table columns with highest sort priority
- support for setting foiled cards in deck editor
- save filters per mode(deck/sideboard share a filter set, scheme gets its own, etc.)
- user-editable notes per deck
- add ManaCost widget to deck list, six symbols in the ratio of their use in the deck
remove old, unused, custom localization infrastructure- make it configurable whether cards are shown on hover and used on click or shown on click and used on double-click
- allow double-click on duel/challenge to start the duel
- achievements and more level names (see this feature request)
- don't replace catalog with current deck in sideboard mode now that we have a way to move cards between decks and sideboards
- make quest AI starting life configurable
- implement hotkeys for selecting self/opponents see here
- official/unofficial world split (see this post)
- add r-click options to deck editor: add/remove card (opposite direction -- add one more of an existing card in the deck, for example)
- make deck lists searchable
- show previews of the pet and plant on the duels page
- upload html file with a meta redirect with the build to point to latest directory
- disable travel button for a few duels after traveling
- make number of wins necessary to unlock new set configurable
- Longer-term improvements | Open
- enable tabbing through cards in match, activating them with space, enter from anywhere activates default button (ok, usually)
- save deck editor filter settings per deck
- remember column order per editor
- remember column sizes per editor
- allow column addition/removal via r-click menu on header
- make deck generation restricted by current filter
- quest deck generation
- tag support for decks, use for better organization in custom deck listbox
- configuration dialog for sound. can play each sound, turn it on/off, configure global volume
- apply new skin without restart
- consolidate sideboard listview items so multiple copies of cards don't take up an extra line, just show [qty] name
- show related card when hovering over the stack item for a target effect
move user preferences and downloadable content out of program directory so they are persisted across upgrades when users decompress to a different path (no more "pic import" steps or copying over of preferences)- cards labeled NEW compared to last time deck was edited (cards get a lastAcquired timestamp (only updated for first four copies, probably ok not to special case lands and relentless rats), decks get lastModified, compare on display)
- configuration options for number of cards/lands/relentless rats kept when selling extras
- thoughts on a new quest mode | Open
- mode targeted at getting players out of their comfort zones, putting them in new situations, and stretching their flexibility.
achievement-focused. bazaar replaced with perks tree. accomplishing achievements grants perk points. new Perks submenu, two tabs: global, world. global perks are always active, world perks only for the current world.
or..winning battles grants perk points. perk points have color, perks require a certain number of points in specific colors, just like mana costs. winning a duel grants 1/N perk points for each color in an N-color deck.
perk branches by color. pets for that color available once color branch is unlocked.
perk ideas (mostly stolen from current bazaar):
- white: life (levels 1-20, assuming player starts with 10 life)
- more money per duel (levels 1-5)
- better luck getting rares
- challenges more often
buy potions at spell shop: gives you a 10-life boost for the next duel. start with a few potions so players aren't faced with life issues until they have a chance to get some better decks together.
achievement ideas:
- win with every color mono deck
- win with a colorless deck
- win by milling
- win by poison
- win X battles with a certain color combination
- win in 10/5/1 turns
perk points given for:
- winning a duel
- completing a set
- achieving achievements
unlock an expansion by fighting in a world that includes that expansion in its format
adventure mode ideas:
tournaments: use one deck to battle through a series of opponents
Quest mechanics
When starting a quest, the player chooses a home world. A random expansion used by that world is immediately unlocked.
Further expansions from that world are unlocked after a pre-determined number of wins +/- x% in that world.
When you complete a set (4 of everything), you can unlock a set of your choice from any unlocked world
Only cards from sets available in a world are allowed in decks played in that world. Reprints are not allowed. This will force players to get core booster/starter/fat packs in the main world or spell shop for a world they are planning on playing in.
Booster packs are awarded for winning a duel. The booster pack awarded is from the choices available in the current world that the player has unlocked
In the first world the player enters, the player can choose to unlock the main world instead of an expansion during one of the unlock prompts
Dueling in the main world has an x% chance of unlocking a world of the player's choice
All Core sets start unlocked, so players play in the main world to get enough cards to travel to a destination world and play there effectively
Some worlds do not have any core sets enabled. These necessarily would allow expansion sets that include lands. They can only be played in by first unlocking the land-containing set from some other world that includes that set.
Spell shop only carries packs and decks valid in the current world
Diminishing returns for using the same cards/colors all the time. Every time a card/color is in a winning deck, its "win count" increases. A deck with cards/colors with a lower win count produces more rewards. This will encourage players to try out new cards and different styles and not just play particular cards all the time. Rewards are greatest when the average win count for the currently used cards is less than avg win count (plus x -- we don't want to start penalizing them right away) for all owned cards overall.
All games played for ante at first to increase the stakes (and therefore the fun, hopefully); a bazaar item can be purchased that allows the player to opt to pay 10 times the cost of the card instead of losing the card if a duel is lost. Challenges don't require ante, but are only available periodically, as is the case now.
Bazaar items:
allow (x) ante re-rolls (highest level of this item is the money-instead-of-ante perk described above)
more free mulligans
most bazaar items should cost more than they do now
different worlds have different items available? can be used in only that world? perhaps pets should be per-world so each world start is more difficult. or maybe there is a global set of weaker pets that always stay with you but world-specific pets are more powerful but cannot leave that world.
winning in your home world brings in twice as many booster pack rewards as winning elsewhere so quest starts are accelerated
duel opponents of all difficulties should always be available. Perhaps the three now displayed could be from differing levels (at various fractions of your current level, times some random factor). This would allow new decks to be tested out on easier opponents before trying them against hard ones.
you have a separate level attained for each world that determines the opponents (and reward multiplier) available in that world
UI
Deck editor world filters would not show reprints from other sets.
Opening the deck editor while in a particular world would have an unremovable world filter for that world. cards in the current deck that do not match the filter would be highlighted in red
The quest decks page would have two tabs, Decks valid in current world and All decks
viewtopic.php?f=26&t=1516&p=107768&hilit=vision#p107768
Last edited by myk on 27 Mar 2013, 01:06, edited 37 times in total.
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: myk's code contributions
by Max mtg » 17 Feb 2013, 23:09
bugs #3 - there was a quote of code on previous page with some hints
bugs #5 - look at forge.sound.SoundEffectType - I hope, it will be enough to switch the tap/untap sounds to sync-ed.
bugs #6 - Older version of deck editor copied the deck on load. On 'save' event editor called forge.util.storage.IStorage.add(T) with the changed deck as parameter. The reference to deck's storage was saved along with the deck. The storage at the moment returns decks without copying them... should i add that feature?
bugs #8 - It would be great to drop support of mantis. A lot of dependencies would be removed in pom.xml/
Shortlist
#12 - strongly approved (#3 not approved that much anymore)
#4 - forge.util.storage.IStorage.delete(String key) // deckname
#5 - see predicate on prev. page
#7 - Please use the events system (the existing one - when an event is fired from server and gui client decides what to do about it, like play a sound)
long-term
#2 - anywhere but in the deck file & folder.
#8 - I'll implement the underlying model, that is tag fields in the Deck class and IStorage methods filtering items by tag.
#11 - would be great is they return consolidated models as well (that is use ItemPool to manage collections). Honestly, sidboarding interface deserves a special dedicated window, unlike being a guest of 'order' routines.
#13 - strongly approved
#14 - changing forge.quest.data.QuestAssets.newCardList to Map<CardPrinted, YourTimeStampType> would do the job. (that is: don't even think of adding fields to cardprinted)
bugs #5 - look at forge.sound.SoundEffectType - I hope, it will be enough to switch the tap/untap sounds to sync-ed.
bugs #6 - Older version of deck editor copied the deck on load. On 'save' event editor called forge.util.storage.IStorage.add(T) with the changed deck as parameter. The reference to deck's storage was saved along with the deck. The storage at the moment returns decks without copying them... should i add that feature?
bugs #8 - It would be great to drop support of mantis. A lot of dependencies would be removed in pom.xml/
Shortlist
#12 - strongly approved (#3 not approved that much anymore)
#4 - forge.util.storage.IStorage.delete(String key) // deckname
#5 - see predicate on prev. page

#7 - Please use the events system (the existing one - when an event is fired from server and gui client decides what to do about it, like play a sound)
long-term
#2 - anywhere but in the deck file & folder.
#8 - I'll implement the underlying model, that is tag fields in the Deck class and IStorage methods filtering items by tag.
#11 - would be great is they return consolidated models as well (that is use ItemPool to manage collections). Honestly, sidboarding interface deserves a special dedicated window, unlike being a guest of 'order' routines.
#13 - strongly approved
#14 - changing forge.quest.data.QuestAssets.newCardList to Map<CardPrinted, YourTimeStampType> would do the job. (that is: don't even think of adding fields to cardprinted)
Last edited by Max mtg on 19 Feb 2013, 17:48, edited 1 time in total.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: myk's code contributions
by myk » 18 Feb 2013, 03:52
That would be great, then I'd just add the code to explicitly save (it might already be there, but I'll have to check all the code paths)Max mtg wrote:bugs #6 - Older version of deck editor copied the deck on load. On 'save' event editor called forge.util.storage.IStorage.add(T) with the changed deck as parameter. The reference to deck's storage was saved along with the deck. The storage at the moment returns decks without copying them... should i add that feature?
Is that a vote for just formatting a forum post template and giving them a clickable link to the appropriate thread (or forum in the case of releases, since the thread changes)bugs #8 - It would be great to drop support of mantis. A lot of dependencies would be removed in pom.xml
awesome, thanks -- I can bump it up the priority list.#8 - I'll implement the underlying model, that is tag fields in the Deck class and IStorage methods filtering items by tag.
I agree -- a mini deck editor would be nice, methinks. The singleton system makes it somewhat difficult to reuse the code for this without doing a fullscreen switch to the deck editor, tho..#11 - would be great is they return consolidated models as well (that is use ItemPool to manage collections). Honestly, sidboarding interface deserves a special dedicated window, unlike being a guest of 'order' routines.
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: myk's code contributions
by friarsol » 18 Feb 2013, 19:37
I had a similar issue just right now. First game everything was fine, space bar and "A" shortcut working. Didn't sideboard anything, space bar working in the beginning of the second game (i'm pretty sure). I cast Ravenous Rats, but with the Rats ETB trigger on the stack my space bar and A button are now non-functional. I did also notice that my up-down arrows didn't work in the sideboard, but I'm not sure that's related. If I goto Dev Mode, act like I'm adding a card to my hand and cancel, space bar is restored to the input panel.myk wrote: Edit: fixed. whew! it turned out to be components that were getting continually overwritten in SResizingUtil.
Edit: I can't seem to reproduce this, although it was my first game since launching Forge, so perhaps that has something to do with it. Oh well, hopefully it'll get fully ironed out at some point.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: myk's code contributions
by myk » 19 Feb 2013, 08:49
Sol: I haven't been able to repro the focus loss since I fixed the component readd-on-resize problem. Please keep me appraised if it continues to happen to you.
Re: bug #5 above, there are a few sounds that seem like they could apply to multiple cards simultaneously, but you'd only want to hear about once. Would it be ok to change the following to synced:
Re: bug #5 above, there are a few sounds that seem like they could apply to multiple cards simultaneously, but you'd only want to hear about once. Would it be ok to change the following to synced:
- AddCounter
- Poison
- RemoveCounter
- Sacrifice
- Token
- Untap
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: myk's code contributions
by moomarc » 19 Feb 2013, 08:53
Definitely! Basically any event that has an {API}All variant should probably also be included.myk wrote:Re: bug #5 above, there are a few sounds that seem like they could apply to multiple cards simultaneously, but you'd only want to hear about once. Would it be ok to change the following to synced:
- AddCounter
- Poison
- RemoveCounter
- Sacrifice
- Token
- Untap
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: myk's code contributions
by Max mtg » 19 Feb 2013, 09:22
Sound is played as a reaction to an event passing from game via a special bus (to avoid hardcoding sound into game classes), so it is unknown to sound system which method of api originated the event, so it is not possible at the moment to distinguish "events that has an {API}All variant".
For the rest I agree with the suggestion above.
For the rest I agree with the suggestion above.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: myk's code contributions
by friarsol » 19 Feb 2013, 15:19
Yea, I tried repro-ing it myself without any luck. Hopefully there's something specific I can point at to being the culprit. I play very quickly, and tend to notice as soon as I can't use the spacebar.myk wrote:Sol: I haven't been able to repro the focus loss since I fixed the component readd-on-resize problem. Please keep me appraised if it continues to happen to you.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: myk's code contributions
by Max mtg » 19 Feb 2013, 17:47
#3 - about removing Command - I think you should a bit delay that process to be able to refactor that commands in future. I found out that it is quite easy now to find all those Commands that may be passed to InputPayManaExecuteCommands. Once you delete the Command class, such instances will become undistinguishable from UI Runnables and any threads the game may start.
So, I suggest you just rename execute() into run() so that the Command class implements Runnable.
So, I suggest you just rename execute() into run() so that the Command class implements Runnable.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: myk's code contributions
by Chris H. » 19 Feb 2013, 18:40
myk wrote:size How To Play and License Details overlay panels correctlyfixed in r19727
I am using the Marble skin and these two windows look a wee bit strange:
-
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: myk's code contributions
by myk » 19 Feb 2013, 21:03
Hrm.. I'll see if it looks better with the standard "dialog" background instead of a transparent one Edit: fixed in r19757. I also let the how to play scroll area span the height of the screen so more is visible at once. Is this better, or did anyone prefer the smaller viewport?
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Re: myk's code contributions
by Max mtg » 19 Feb 2013, 22:48
a possible feature for deck editor = viewtopic.php?f=26&t=9646 That is support for foiled cards. The data model is ready.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: myk's code contributions
by Chris H. » 19 Feb 2013, 23:38
myk wrote:Hrm.. I'll see if it looks better with the standard "dialog" background instead of a transparent one Edit: fixed in r19757. I also let the how to play scroll area span the height of the screen so more is visible at once. Is this better, or did anyone prefer the smaller viewport?
I like having more info displayed at one time.
Is it possible to add a gap of 10% above and below the how to play scroll area?

-
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: myk's code contributions
by myk » 20 Feb 2013, 03:05
Nice. I'll add it to the list.Max mtg wrote:support for foiled cards. The data model is ready.
I added in a margin -- it looks much better now. Keep the suggestions coming!Chris H. wrote:Is it possible to add a gap of 10% above and below the how to play scroll area? :wink:
I added a new error viewer/bug reporter dialog. I could use some feedback on that as well. Does the browser interaction work for everybody? Is the forum post template good? Does the hyperlink work in the help text in the upper portion? If everything looks good, I'll go purge the mantis dependencies from the pom.
One note, the code there used some localized strings and constants. I noticed the localization system isn't exactly maintained, and the constants aren't exactly centralized. I put the URLs and strings directly in the code for now, but where should they be moved? See the _showDialog() method in r19764 to see what I mean.
One more thing, could someone close issue 654 at cardforge?
- myk
- Posts: 439
- Joined: 17 Jan 2013, 02:39
- Location: California
- Has thanked: 38 times
- Been thanked: 57 times
Who is online
Users browsing this forum: No registered users and 11 guests