Skip to content

Instantly share code, notes, and snippets.

@fenhl
Last active May 4, 2020 14:05
Show Gist options
  • Save fenhl/2b427ef5f7c961c2ae70a6858fc6b1e1 to your computer and use it in GitHub Desktop.
Save fenhl/2b427ef5f7c961c2ae70a6858fc6b1e1 to your computer and use it in GitHub Desktop.
MSE feature ideas

Here's my ideas on what could be added to the Magic Set Editor now that we have a way to build it. Obviously these don't necessarily have to happen in this exact order, so for example a bugfix could also land in 2.0.3, 2.1.1, 3.0.1, etc.

MSE 2.0.2 (bugfixes)

  • fix off-by-one error when working with card in the Console tab (instead of using the card selected in the Cards tab, it uses the one below it)
    • there's a possibly related error where you can't get planeswalker cards as card, that should be fixed as well
  • fix length not working with maps
  • better RTL language support (see MightyD33r#5246's issues with making a Hebrew template)
  • fix substring("foo", begin: 3) returning true instead of ""
  • fix Cards tab card render not updating when styling data is changed

MSE 2.1 (backwards-compatible features)

  • allow empty map literal [:] (like in Swift)
  • give styles access to the flavor bar position (the position of the separator in a combined_editor field)
  • add a type built-in function that returns the type of its input as a string
  • allow access to the current date/time
  • allow to_image(card) and passing cards as input to crop etc (this removes the need for an external DFC splitter tool)
  • add a function/operator to check whether a map has a field
  • allow calling an export template from the command line (this is already in the svn_history branch)
  • allow searching the style list
  • “shiny” (gradient) borders (for gold/silver/bronze) (these might be doable already, not sure)
  • console history with arrow keys
  • monospace font and syntax highlighting in console
  • tooling for external IDEs (syntax highlighting, lints, jump-to-definition, etc.)
  • tooltips on template list for long titles/subtitles
  • allow “scale down to” on single-line text fields, to make “shrink type line” etc redundant
  • option to sync text size on multiple fields, to make explicit planeswalker text size redundant
    • possibly redundant with ability to locate the flavor bar?
  • import scripts (equivalent to exporters, to replace MSG)
  • don't require MSE reload after export template changes
  • self-updater
  • macOS and Linux builds
  • allow rotating the image in the image importer
  • support for bulleted lists (with proper indentation after soft line breaks)
  • allow access to a card's styling data in scripts

MSE 3 (backwards-incompatible features)

  • make .mse3set a directory file extension, allow reading .mse3set.zip as well
  • use card names and proper file extensions for image files
  • remove unused images
  • suffix .mse-{type}/{type} file with .mse file extension for editor support (syntax highlighting etc)
  • allow versioning packages
    • notify when updates are available
    • better dependency management (something similar to what Rust's Cargo.lock does maybe)
    • allow upgrade paths including handling of new defaults (e.g. Ancestral generic mana, brown legendary Vehicle P/T)
    • bundle a link to a default package repository with MSE, so that it works as a standalone .exe without a data folder
  • rename “HTML” export menu item to something clearer like “other”
  • allow space indentation in data files
  • maybe: modernize the scripting language
    • remove weak typing features in favor of better explicit type conversion tools
    • document what on earth is going on with \<, remove/replace it if it's not useful
    • improve debugging and error handling
    • allow importing MSE 2 code from MSE 3 code and vice versa, like with Rust editions
    • drop the special case that allows = instead of := when unambiguous with == due to precedence
  • rework exporters to generate either a file or a directory, not both
  • generate a lockfile to prevent simultaneous edits, e.g. when collaborating over Dropbox or Google Drive
  • instead of saving a .bak file, persist edit history on disk (and add an option to export without edit history)
    • maybe some way to visualize edit history
    • give exporters access to edit history and allow revision options, to facilitate writing a changelog exporter
  • real-time collaboration
    • requires a server component where sets can be hosted
    • login to tag edits with your username (could use the same accounts as a package repository, maybe just use Discord OAuth)
    • edit locking on a per-card basis instead of per-set
  • invisible field support (to replace card notes commands)
    • link related cards so the link is displayed on both cards
    • this is different from just implementing them as style options since they ignore the “options specific to this card” toggle and are always specific
  • allow assigning card fields explicitly in styles, e.g. card.name := "some other string"
@twanvl
Copy link

twanvl commented May 4, 2020

Here are some of my ideas:

Relatively easy to add

  • More script functions. What is needed?
  • Use script values for all card values. This is mostly an internal change, but it means that a boolean field would store an actual boolean for instance. In the future this also allows for things like lists and maps as values on a card.
    • Maybe multiple choice values should be lists instead of comma separated strings.
  • Improve file extensions in set files:
    • Use "/.png" for images
    • Use "set.mse-data" instead of "set" for the set file (breaks backwards compatibility)
    • Optional: use separate files for each card. This is currently already used when saving as a directory
  • Add GUI interface for saving a set as a directory
  • Don't save cropped images, instead save the crop parameters. This allows for editing and for more high-res images.
    • Maybe the crop parameters should be 'anchored' to the card box, so that switching to a full art template automatically adjusts the crop? (not very important)
  • Slight GUI rework:
    • Move list of cards to the left? That seems more consistent with most other programs. It should at least be on the same side as the keyword list
    • On large screens show the styling options below the card on the cards tab.
    • Convenience things:
      • Add a "duplicate card" menu item (Ctrl+D)
      • Add Ctrl+K shortcut for card search box.
      • Add Alt+left/Alt+right for navigating to previous/next selected item (card/keyword/etc.)
    • Other suggestions?
  • On styling tab, add a "use for all cards" button and a "reset/default" for each value.
  • Improve text and image rendering
    • Better down sampling code
    • Use proper gamma correction

Longer term

  • History/change tracking.
    • It shouldn't be that hard to implement, since all actions are already tracked, just not saved.
    • One issue is with saving pointers to things like cards and fields, but here indices or UUIDs might work.
      • As long as it is changes within a card, adding and removing cards; these could be treated on a per-card basis (with a recycling bin for removed cards)
    • For the user interface, it is probably useful to be able to view previous versions of cards without actually undoing, and to undo changes on only a specific card.
  • Unify game and stylesheet files
    • Maybe a stylesheet would just inherit from a parent game template, optionally overriding styling for fields, adding more fields, etc.
    • Maybe card styling could just be a list of (scripted) values to render. Then you wouldn't need to specify
    • Styling options would be part of a separate list of "unrendered" fields, displayed below the card.
  • Collaboration tools
    • Real-time collaboration would need a server, and that is probably too much work
    • A light-weight alternative is to save as a directory, and put that in a git repository or a shared dropbox folder. MSE would then need to support some kind of merging, automatic reloading/file watching, and avoid creating conflicts.
  • Auto-updater
    • This currently exists, but it relies on a file on the sourceforge server. Especially the templates are horribly out of date there.
    • Ideally there would be a central repository of templates.

@fenhl
Copy link
Author

fenhl commented May 4, 2020

  • script functions: Right now I'm looking for some way of, given a card value (rather than the global card), either getting the style name, e.g. m15-altered, or checking whether the style has a given styling option (a function for checking whether a map has a field would be useful here).
  • I'm not sure how much sense [:] as a separate concept from [] would make, but having that (in combination with type_name) would allow me to make the code for the JSON export template I'm writing right now much more readable.
  • I would prefer moving to file extensions that don't have - in them since macOS Finder doesn't recognize file extensions that contain - as such, adding extra keystrokes each time you rename a file.

@twanvl
Copy link

twanvl commented May 4, 2020

  • You should be able to do somecard.stylesheet.name, except that this crashes MSE right now.
  • For checking if a field exists there is currently the or else keyword. So you try to use it and if that fails you do something else, But that is not ideal.
  • Right now vectors and maps that come from a script are internally the same type, so [:] doesn't make sense. If the types are split it would.
  • Should I add a to_json function?
  • How often do you have to rename a file? We could move to .mseset, .msescript, .msedata, etc., but I am not sure if it is worth the effort.

@fenhl
Copy link
Author

fenhl commented May 4, 2020

  • A to_json builtin would only make sense with the map and vector types separated, otherwise you won't be able to generate both {} and []. Besides, I don't think it's the sort of thing that needs to be built in (but I suppose that depends on the overall approach to how much is provided as builtins)
  • I rename set files quite often, though I admit that's part of my rather unique workflow as the maintainer of Lore Seeker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment