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"
@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