Save location of global config for plugin?


#1

Got fed up with trying to make dark/light skins for some wip modules and implemented a global coloring style that applies to all of them regardless of the patch. Was wondering if there’s an “official” place to save such json file, so it doesn’t pollute the Rack folder and stays untouched when plugin updates happen.
I’m developing for Rack v1 if that makes a difference.


(Andrew Belt) #2

Each plugin should use up to 1 file and 1 folder in the Rack user directory called <plugin slug>.<extension> and <plugin slug>. So just use assetLocal("unlessgames.json") or asset::user("unlessgames.json") in Rack v1.


#3

I’m getting a little excited at the prospect of more of your modules. Could you do Space Invaders? Or Worm?


#4

Thanks @Vortico!

@dag2099 I appreciate the excitement, but got no game modules in the making. If the game doesn’t map out well to outputs it got no use in Rack, and I don’t see how Space Invaders would work, since the enemies have too regular move patterns, unless each enemy would be a note in a sequencer that gets outputted when they get shot down, but then that’d be better as a Breakout module :slight_smile: Also if you mean Worms that’s way too complex haha. I don’t know when will I do another game based module, but good classic candidates would be Tetris(check this), Asteroids (someone mentioned they were making Asteroids LFO when I released piong, hope they follow through…) or Tempest. Cheers!


#5

Yeah, I got a bit carried away. I stream a lot and it’s just an attention grabber, you know? Having a game of pong playing in the middle of your patch. It would be funny to have a sort of arcade of modules controlling various resonators and drum synths. I had to actually look up what I meant by “Worm”; i was actually thinking of Snake (https://en.wikipedia.org/wiki/Snake_(video_game)).


(Phil Golden) #6

Quick question here if you don’t mind save making another thread… Regarding the plugin.json just want to be sure I am correctly implementing.

{
slug goes here
old .json info: author, version, donationurl, email etc

  modules: {
    "NAME": { ← e.g. Model *modelNAME
      "name": "name in rack menu??",
      "description": "",
      "tags": [ "" ]
    }// ',' > 1
  }

}

It has to be named “plugin.json” also?


(Andrew Belt) #7

The distinction between slugs and names are explained in https://github.com/VCVRack/Rack/blob/v1/include/plugin/Plugin.hpp and https://github.com/VCVRack/Rack/blob/v1/include/plugin/Model.hpp. You probably don’t even need to write them yourself. You can just use ./helper.py createmanifest