Today, I made a Shortcut which allows the user to modify their Hopscotch JSON project file
Let's get a few things out of the way before I get to the main thing
- I know that modifying the JSON file isn’t new, there is already a topic on that. However, this Shortcut is the best way to do this on an iOS device.
- You don’t need anything except for the two shortcuts, an internet connection (only for checking for updates), and Hopscotch to do this.
- It is not a raw editor, but a guided editor (mostly). In my case, this means that when you open the file for editing, you will be asked what specific traits you’d like to change and what you want them to be without having to deal with cleaning up or messing up the code.
- There are a few reference files or lists that may be helpful to have, I will post them here. This includes block ID’s (if you want to edit the ae_json_edit ability) as well as copy+pastable code. (But now you don’t really need to copy secret blocks)
Download in this order
- View Dictionary Lets you view the project nicely
- Generate UUID Updated to not need internet, used to create scenes and abilities
- Hopscotch JSON Shortcut v1.4.1 This one lets you modify your Hopscotch project file
- Stand-Alone Shortcut for Share Sheet Run this from the share sheet, main shortcut got too big
Old shortcut links because you want to rack up the clicks
- Generate Hopscotch UUID You must download this one first
-
Edit Hopscotch JSON Generate Hopscotch UUID must be installed for certain functionalities
(The second shortcut is the main one) - View Dictionary because why not
What does the UUID do? When creating another scene, I have it create an object in the scene so it does not look like the project was lost. To generate this object, it must have a Universally Unique Identifier (UUID) to identify the object. Why my UUID generator? Hopscotch has a slightly different format to follow with UUIDs, so I made it compatible with my second Shortcut.
What can this Shortcut do? Well, it can..
- Change the Stage Size
- Manage Scenes: changing the default, renaming, adding, or deleting scenes
- Change the Webplayer Version (Read more by searching the Forum)
- Change the edited at date and time
- Modify Basic Attributes of an object. These include position, width and height (though they don’t do anything), name, and filename (the image it refers to in order to draw it), and the type (identifies what character or shape it is). Please not that the object must have a rule for this to work (it can be game start wait zero for simplicity).
- Base Object Scale: This scales characters by a certain multiplier (default is 1)
- Font Size: Smaller fonts can fit more text on one line, larger has better quality
- Variables: Edit all game variables in raw code. This allows you to change the name, ID (ID will mess it up though), etc. but you can also delete variables by deleting the cluster or JSON code that makes it up (no more velocity!)
- Edit the rules contained in a custom rule
- Edit traits of a rule. Modify parameters or copy the abilityID.
- Abilities: Edits raw JSON-like code for the project’s “ae_json_edit” ability. Change IDs of certain blocks here, add parameters, do whatever here. It will all show up in the “ae_json_edit” ability when you reopen the project. You can also add any MIDI song to a project and edit any ability given its UUID from above or found in a control script of a collapsable block.
What can I use it for?
- Messing with parameters in blocks
- Adding multiple scenes and switching between them
- Reviving objects you lost at position (10000, 10000)
- Hiding objects at position (10000, 10000)
- Seeing how different blocks react with odd parameters or ID’s.
- Discovering that the set color parameter is weird
How do I use it? There are instructions in the comment block of the Shortcut, or…
You can find an extensive help guide here (updated irregularly).
Reference – IDs and Color Values
Here are the IDs for Blocks
[t.WaitTilTimestamp = 19], [t.None = 22], [t.Move = 23],
[t.Rotate = 24], [t.ChangeX = 27], [t.ChangeY = 28],
[t.Scale = 29], [t.Clear = 30], [t.StrokeWidth = 31],
[t.StrokeColor = 32], [t.ChangeCostume = 33],
[t.ChangeSpeed = 34], [t.Wait = 35], [t.SetOpacity = 36],
[t.PenDown = 37], [t.PenUp = 38], [t.SetHeading = 39],
[t.SetText = 40], [t.SetPosition = 41], [t.SendToBack = 42],
[t.BringToFront = 43], [t.ChangeVariable = 44],
[t.SetVariable = 45], [t.MoveWithTrail = 46],
[t.SetInvisibility = 47], [t.Grow = 48], [t.Shrink = 49],
[t.Flip = 50], [t.SetSize = 51], [t.PlaySound = 52],
[t.MakeAClone = 53], [t.SetColor = 54], [t.Destroy = 55],
[t.SetImage = 56], [t.SetWidthAndHeight = 57],
[t.SetZIndex = 58], [t.SetOriginXY = 59], [t.SetCenterXY = 60],
[t.WaitSeconds = 61], [t.PlaySoundSeconds = 62],
[t.LeaveATrail = 26], [t.Repeat = 120], [t.RepeatForever = 121],
[t.CheckOnceIf = 122], [t.Ability = 123], [t.CheckIfElse = 124],
[t.ChangeScene = 125], [t.Random = 233], [t.XPos = 234],
[t.YPos = 235], [t.Random110 = 236], [t.Random1100 = 237],
[t.Random11000 = 238], [t.Variable = 239], [t.ConditionalOperatorEquals = 1e3],
[t.ConditionalOperatorNotEquals = 1001], [t.ConditionalOperatorLessThan = 1002],
[t.ConditionalOperatorGreaterThan = 1003], [t.ConditionalOperatorAnd = 1004],
[t.ConditionalOperatorOr = 1005], [t.ConditionalOperatorGreaterThanOrEqualTo = 1006],
[t.ConditionalOperatorLessThanOrEqualTo = 1007],
[t.HS_END_OF_CONDITIONAL_OPERATORS = 1008],
[t.TraitRotation = 2e3], [t.TraitXPosition = 2001],
[t.TraitYPosition = 2002], [t.TraitInvisibility = 2003],
[t.TraitSize = 2004], [t.TraitSpeed = 2005], [t.TraitCloneIndex = 2006],
[t.TraitTotalClones = 2007], [t.TraitWidth = 2008],
[t.TraitHeight = 2009], [t.TraitZIndex = 2010],
[t.TraitOriginX = 2011], [t.TraitOriginY = 2012],
[t.TraitCenterX = 2013], [t.TraitCenterY = 2014],
[t.HS_END_OF_OBJECT_TRAITS = 2015], [t.StageTraitWidth = 3e3],
[t.StageTraitHeight = 3001], [t.StageTraitTiltUp = 3002],
[t.StageTraitTiltDown = 3003], [t.StageTraitTiltLeft = 3004],
[t.StageTraitTiltRight = 3005], [t.StageTraitLastTouchX = 3006],
[t.StageTraitLastTouchY = 3007], [t.StageTraitTotalObjects = 3008],
[t.HS_END_OF_STAGE_TRAITS = 3009], [t.MathOperatorAdd = 4e3],
[t.MathOperatorSubtract = 4001], [t.MathOperatorMultiply = 4002],
[t.MathOperatorDivide = 4003], [t.MathOperatorRandom = 4004],
[t.MathOperatorPower = 4005], [t.MathOperatorSquareRoot = 4006],
[t.MathOperatorSine = 4007], [t.MathOperatorCosine = 4008],
[t.MathOperatorRound = 4009], [t.MathOperatorAbs = 4010],
[t.MathOperatorModulo = 4011], [t.MathOperatorTangent = 4012],
[t.MathOperatorInverseSine = 4013], [t.MathOperatorInverseCosine = 4014],
[t.MathOperatorInverseTangent = 4015], [t.MathOperatorMaximum = 4016],
[t.MathOperatorMinimum = 4017], [t.HS_END_OF_MATH_OPERATORS = 4018],
[t.ColorOperatorRandom = 5e3], [t.ColorOperatorRGB = 5001],
[t.ColorOperatorHSB = 5002], [t.HS_END_OF_COLOR_OPERATORS = 5003],
[t.Rule = 6e3], [t.RulePreview = 6001], [t.EventOperatorStart = 7e3],
[t.EventOperatorTap = 7001], [t.EventOperatorIsTouching = 7002],
[t.EventOperatorHold = 7003], [t.EventOperatorTiltRight = 7004],
[t.EventOperatorTiltLeft = 7005], [t.EventOperatorTiltUp = 7006],
[t.EventOperatorTiltDown = 7007], [t.EventOperatorLoudNoise = 7008],
[t.EventOperatorShake = 7009], [t.EventOperatorBump = 7010],
[t.EventOperatorSwipeRight = 7011], [t.EventOperatorSwipeLeft = 7012],
[t.EventOperatorSwipeUp = 7013], [t.EventOperatorSwipeDown = 7014],
[t.EventOperatorEnterTheWorld = 7015], [t.EventOperatorTiltRightEditor = 7016],
[t.EventOperatorTiltLeftEditor = 7017], [t.EventOperatorTiltUpEditor = 7018],
[t.EventOperatorTiltDownEditor = 7019], [t.EventOperatorNotPressed = 7020],
[t.EventOperatorGamePlaying = 7021], [t.EventOperatorTouchEnds = 7022],
[t.HS_END_OF_EVENT_OPERATORS = 7023], [t.Object = 8e3],
[t.AnyObject = 8001], [t.ScreenEdge = 8002], [t.Device = 8003],
[t.Self = 8004], [t.OriginalObject = 8005], [t.HS_END_OF_EVENT_PARAMETER_BLOCKS = 8006]
Here are the IDs for Event Operators
[t.HSEventOnStart = 1239], [t.HSEventTouchedObject = 1240],
[t.HSEventTapStage = 1241], [t.HSEventShake = 1242],
[t.HSEventTiltRight = 1243], [t.HSEventTiltLeft = 1244],
[t.HSEventTiltDown = 1245], [t.HSEventTiltUp = 1246],
[t.HSEventLoudNoise = 1247], [t.HSEventCollision = 1248],
[t.HSEventHeldObject = 1249], [t.HSEventEnteredWorld = 1250]
Here are the IDs for Characters
[t.monkey = 0], [t.text = 1], [t.octopus = 2],
[t.gorilla = 3], [t.cupcake = 4], [t.bear = 5],
[t.dino = 6], [t.frog = 7], [t.greenman = 8],
[t.mustache = 9], [t.spacepod = 10], [t.zombieBear = 11],
[t.ghoulopus = 12], [t.bats = 13], [t.frankenrilla = 14],
[t.jodyWitch = 15], [t.cauldron = 16], [t.pumpkin = 17],
[t.broom = 18], [t.lantern = 19], [t.parrotFlying = 20],
[t.mandrill = 21], [t.mosquito = 22], [t.missChief = 23],
[t.venus = 24], [t.jeepers = 25], [t.banyan = 26],
[t.stargirl = 27], [t.astro = 28], [t.chillanna = 29],
[t.robo = 30], [t.raccoon = 31], [t.bird = 32],
[t.HS_END_OF_CHARACTERS = 33], [t.square = 34],
[t.circle = 35], [t.hexagon = 36], [t.triangle = 37],
[t.rightTriangle = 38], [t.rectangle = 39], [t.heart = 40],
[t.star = 41], [t.arch = 42], [t.parallelogram = 43],
[t.squiggle = 44], [t.donut = 45], [t.tetrisZ = 46],
[t.tetrisT = 47], [t.tetrisL = 48], [t.corner = 49],
[t.flower = 50], [t.threeProngedBoomerang = 51],
[t.squishedBox = 52], [t.bead = 53], [t.chevron = 54],
[t.xShape = 55], [t.tetrisLine = 56], [t.HS_END_OF_SHAPES = 57],
[t.toucan = 58], [t.anteater = 59], [t.crocodile = 60],
[t.sloth = 61], [t.iguana = 62], [t.hut = 63], [t.penguin = 64],
[t.winterQueen = 65], [t.shyYeti = 66], [t.deer = 67],
[t.elf = 68], [t.snowGlobe = 69], [t.polarbear = 70],
[t.sleigh = 71], [t.mistletoe = 72], [t.snowMan = 73],
[t.snowflake = 74], [t.roundedSquareFullSize = 100],
[t.squareFullSize = 101], [t.circleFullSize = 102],
[t.hexagonFullSize = 103], [t.triangleFullSize = 104],
[t.rightTriangleFullSize = 105], [t.rectangleFullSize = 106],
[t.heartFullSize = 107], [t.starFullSize = 108],
[t.archFullSize = 109], [t.parallelogramTallFullSize = 110],
[t.squiggleFullSize = 111], [t.donutFullSize = 112],
[t.tetrisZFullSize = 113], [t.tetrisTFullSize = 114],
[t.tetrisLFullSize = 115], [t.cornerFullSize = 116],
[t.flowerFullSize = 117], [t.fanbladeFullSize = 118],
[t.squishedBoxFullSize = 119], [t.roundedRightTriangleFullSize = 120],
[t.arrowRoundedFullSize = 121], [t.beadFullSize = 122],
[t.parallelogramWideFullSize = 123], [t.chevronFullSize = 124],
[t.xFullSize = 125], [t.tetrisLineFullSize = 126],
[t.hexagonV3 = 150], [t.triangleV3 = 151], [t.rectangleV3 = 152],
[t.heartV3 = 153], [t.starV3 = 154], [t.archV3 = 155],
[t.squiggleV3 = 156], [t.tetrisZV3 = 157], [t.tetrisTV3 = 158],
[t.tetrisLV3 = 159], [t.fanbladeV3 = 160], [t.arrowRoundedV3 = 161],
[t.beadV3 = 162], [t.parallelogramWideV3 = 163],
[t.chevronV3 = 164], [t.HS_END_OF_FULL_SIZE_SHAPES = 165],
[t.HS_NUMBER_OF_OBJECTS = 166], [t.image = 2e3],
[t.HS_START_OF_CHARACTERS2 = 3e3], [t.crocodileJaws = 3001],
[t.lanternFullSize = 3002], [t.HS_END_OF_CHARACTERS2 = 3003],
[t.nil = 1e4], [t.edgeOfScreen = 3e4]
Here are the IDs for Parameters
[t.Default = 42], [t.LineWidth = 43], [t.LineColor = 44],
[t.RandomLow = 45], [t.RandomHigh = 46], [t.Variable = 47],
[t.VariableValue = 48], [t.Conditional = 49],
[t.HSObject = 50], [t.Sound = 51], [t.Event = 52],
[t.SetText = 53], [t.Object = 54], [t.TextOnly = 55],
[t.Scene = 56]
Here are the HSB to RGB Color Maps
"HSB(289,57,44)": "rgb(100, 48, 112)",
"HSB(266,63,82)": "rgb(134, 77, 209)",
"HSB(234,34,100)": "rgb(168, 177, 255)",
"HSB(289,28,89)": "rgb(215, 163, 227)",
"HSB(338,30,100)": "rgb(255, 179, 207)",
"HSB(355,64,91)": "rgb(232, 84, 96)",
"HSB(336,89,84)": "rgb(214, 24, 100)",
"HSB(354,96,83)": "rgb(212, 8, 29)",
"HSB(28,100,100)": "rgb(255, 119, 0)",
"HSB(49,100,98)": "rgb(250, 204, 0)",
"HSB(54,85,100)": "rgb(255, 233, 38)",
"HSB(124,35,96)": "rgb(159, 245, 165)",
"HSB(88,68,77)": "rgb(134, 196, 63)",
"HSB(111,65,56)": "rgb(64, 143, 50)",
"HSB(167,60,84)": "rgb(86, 214, 186)",
"HSB(199,45,100)": "rgb(140, 219, 255)",
"HSB(192,95,82)": "rgb(10, 169, 209)",
"HSB(207,82,86)": "rgb(39, 138, 219)",
"HSB(219,75,46)": "rgb(29, 60, 117)",
"HSB(0,0,30)": "rgb(77, 77, 77)",
"HSB(306,20,20)": "rgb(51, 41, 50)",
"HSB(24,76,48)": "rgb(122, 67, 29)",
"HSB(0,0,80)": "rgb(204, 204, 204)",
"HSB(0,0,100)": "rgb(255, 255, 255)",
"HSB(32,26,98)": "rgb(250,220,186)",
"HSB(31,35,88)": "rgb(225,187,146)",
"HSB(28,47,75)": "rgb(192,143,101)",
"HSB(26,63,61)": "rgb(156,100,57)",
"HSB(24,37,35)": "rgb(89,69,56)"
Secret blocks? You don’t need these anymore. They’re integrated into the shortcut so that if an ability is blank, these are added by default, or you can type it as {secret_blocks} in the editor.
You can, however, have a link to a live secret blocks draft. Publish and unpublish the project to save it to your own drafts.
Mini Shortcuts (these are usually made before putting a concept into the main one)
- Hopscotch Color Optimizer – see posts 949 and 988
- Create Dictionary Ability – see posts 1633 and 1718
Describe an Issue by quoting and answering these questions
When did you get the error while running the shortcut? Please be specific.
What were you trying to do with the shortcut when you got the error?
Please tap the 3 dots to edit the shortcut, tap “run” (looks like a play button), then try and do the same thing. Take a screenshot of the shortcut when the same error occurs.
What iOS version are you using, and what shortcut version is stated in the first comment when editing the shortcut?
@pomtl @omtl @ThinBuffalo @Petrichor @XAMANION @Good-Es
(you should ask to join GoodEs for more cool stuff like this lol)
Any questions? Feel free to ask