# Makecode Arcade Mini Extentions/Functions

**URL:** <https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968>\
**Category:** Arcade\
**Tags:** extension\
**Created:** [May 15, 2023, 4:52pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968 "2023-05-15T16:52:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![meeeeeeeep1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meeeeeeeep1/32/7912_2.png) [@meeeeeeeep1](https://forum.makecode.com/u/meeeeeeeep1)\
**Post date:** [May 15, 2023, 4:52pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/1 "2023-05-15T16:52:53Z")

</div>

Hello! I’ve been experimenting with some of makecode arcade’s hidden functions, and I’ve made a list of mini extensions and functions for you to use!

* * *

## Extentions:

> **Console Overlay**
>
> [![Screenshot 2023-05-14 at 10-39-22 Topics tagged extension](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/b/b8ecb0cd356d99c1f4d0ab5411f82d0b05352f4b.png)](https://github.com/meeeeeeeep1/Console-Overlay)
> 
> > ### Description:
> > 
> > Using a built in but hidden feature, this extension displays the system console directly on the screen! It’s extremely helpful when you want to directly get values but don’t want to have to manually click on the console button.
> > 
> > Located in the `console` category
> 
> > ### Blocks:
> > 
> > ![Screenshot 2023-05-14 at 01-03-59 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a6ee41dcdb8c887968a004990f3114e1cb106869.png)
> 
> > ## Note!
> > 
> > The console overlay only saves the messages while it’s on, meaning that previous messages in the console are not displayed.
> 
> > ## Example
> > 
> > ![Screenshot 2023-05-14 at 01-16-16 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/a/a48f49253732aa78fe0035ba7811e3f00857bc42.png)
> > 
> > ## Output:
> > 
> > ![Screenshot 2023-05-14 at 01-17-20 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6a0b3857ec54cff005a66aabdfbe4095184035eb.png)

> **Info +**
>
> [![Screenshot 2023-05-14 at 12-55-06 Topics tagged extension](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/8795bc4b3c12fd76e8df244ae0197a57138148f5.png)](https://github.com/meeeeeeeep1/Info-plus/tree/master)
> 
> > ### Description:
> > 
> > This extension expands the `INFO` category, giving you the ability to show/hide the stats, change the life image and customize the stat colors.
> > 
> > Located in the `info` category
> 
> > ### Features:
> > 
> > - Ability to customize the on-screen life, timer, and score displays.
> > - Ability to turn those displays on/off
> 
> * * *
> 
> > ### Blocks:
> > 
> > ![Screenshot 2023-05-14 at 02-01-44 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/7/772d212f15d317eb3c41df5c2c2015a1e475dd10.png)
> 
> > #### Display:
> > 
> > - Turns the display on/off
> > - _Stats are automatically set to 0 if not previously set_
> 
> > ### Numbers
> > 
> > - Returns the value of the property
> 
> > ### Color
> > 
> > - Sets color of the background/text/border
> 
> > ### Set Life Image To `Image`
> > 
> > - Sets the life icon
> > - Recommended icon size: `8x8`
> 
> * * *
> 
> > **Example:**
> > 
> > ![Screenshot 2023-05-14 at 02-05-01 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/c/c118629d2e7217c2df1dfb5248c16abe9c6f387f.png)
> > 
> > **Output:**
> > 
> > ![Screenshot 2023-05-14 at 01-39-50 Microsoft MakeCode Arcade](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/8/8c2b0c8dedbf4d5e5dd4715d11f68c9e06213144.png)

* * *

## Functions

> **String Functions:**
>
> > ### Description
> > 
> > These functions are for more advanced uses of strings.
> 
> * * *
> 
> ### String to uppercase/lowercase
> 
> **Uppercase:**
> 
> ```auto
> helpers.stringToUpperCase("lowercase"): void
> 
> ```
> 
> **Lowercase:**
> 
> ```auto
> helpers.stringToLowerCase("uppercase"): void
> 
> ```
> 
> * * *
> 
> ### String is empty?
> 
> Checks if a string is empty, returns true if it is
> 
> ```auto
> helpers.stringEmpty("string"): boolean
> 
> ```
> 
> * * *
> 
> ### Replace all
> 
> This function finds all instances of `to replace` in `string` and replaces them with `replace with`
> 
> ```auto
> helpers.stringReplaceAll("string", "to replace", "replace with"): string
> 
> ```
> 
> Alternatively you can use `stringReplace`, but that only replaces the first instance of `to replace`
> 
> * * *
> 
> ### Slice
> 
> This function gets a substring in `string` from `start` to `end`
> 
> ```auto
> helpers.stringSlice("string", start, end): string
> 
> ```
> 
> Another alternative is `helpers.stringSubstr("string", start)` , where it gets the letters from `start` to the end of `string`
> 
> * * *

> **Search Function:**
>
> > ### Description:
> > 
> > These functions search for a specific thing by name. Returns `null` if nothing is found.
> 
> * * *
> 
> #### Search for song
> 
> ```auto
> helpers.getSongByName("mySong")
> 
> ```
> 
> * * *
> 
> #### Search for tilemap
> 
> ```auto
> helpers.getTilemapByName("myTilemap")
> 
> ```
> 
> * * *
> 
> #### Search for image
> 
> ```auto
> helpers.getImageByName("myImage")
> 
> ```
> 
> * * *
> 
> #### Search for animation
> 
> ```auto
> helpers.getAnimationByName("myAnimation")
> 
> ```
> 
> #### Search for tile
> 
> ```auto
> helpers.getTileByName("myTile")
> 
> ```

* * *

Thank you to the makecode arcade team for implementing these functions, I’m just showing them to you.  
More to come in the future!

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [May 15, 2023, 8:36pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/2 "2023-05-15T20:36:44Z")

</div>

This is super cool! I think I’ve found a glitch with the Info+ extension though. When I download the extension, my game won’t start, whether I’m actually using the extension blocks or not. The problem seems to be coming from a duplicate file that already exists in the game. I think if this file is removed in GitHub, the extension will work.

---

<div class="post-metadata">

**Author:** ![meeeeeeeep1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meeeeeeeep1/32/7912_2.png) [@meeeeeeeep1](https://forum.makecode.com/u/meeeeeeeep1)\
**Post date:** [May 16, 2023, 5:16pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/3 "2023-05-16T17:16:25Z")

</div>

Fixed! I deleted the file, but it gave me all sorts of errors so I restored it and it worked!

---

<div class="post-metadata">

**Author:** ![meeeeeeeep1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meeeeeeeep1/32/7912_2.png) [@meeeeeeeep1](https://forum.makecode.com/u/meeeeeeeep1)\
**Post date:** [May 17, 2023, 10:55pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/4 "2023-05-17T22:55:44Z")

</div>

### Two More Functions!

#### 1. Rotating An Image

This function rotates an image by `degrees`

```typescript
image.rotated(degrees): Image

```

This is a MUCH better alternative to complicated workarounds.

#### 2. Console Priority

This function adds a listener to the console, meaning that every time that something is logged in the console the code runs.

```typescript
console.addListener((priority, text) => void): void

```

This code seems very complicated, so let me break it down for you.

1. `(priority, text)`  
These are basically variables to use later on in the code, which means we shouldn’t edit them.

2. `() => void`  
`void` is just the script to run after the message is received. The best way to use it is by replacing it with:

Now that I’ve explained it, here’s how you can use it in your own code:

```typescript
console.addListener((priority, text) => function() {
//code here
})

```

Now we can monitor the console using plain old JavaScript.

An example of how we can use this in our code is:

```typescript
console.addListener((priority, text) => function() {
    if (text == "score+1" && priority == ConsolePriority.Log) {
        info.changeScoreBy(1)
    }
})

```

In this case, every time a message is logged the game checks if the message is `score+1` and the message type is `ConsolePriority.Log`. If so, it changes the score by 1.  
_PS: YOU CAN REMOVE A LISTENER BY COPYING THE SCRIPT THEN REPLACING `addListener` WITH `removeListener`._

---

<div class="post-metadata">

**Author:** ![Blobbey](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/blobbey/32/20831_2.png) [@Blobbey](https://forum.makecode.com/u/Blobbey)\
**Post date:** [May 23, 2023, 10:55pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/5 "2023-05-23T22:55:10Z")

</div>

Now when I use the URL to download the extension, nothing shows up.

---

<div class="post-metadata">

**Author:** ![meeeeeeeep1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/meeeeeeeep1/32/7912_2.png) [@meeeeeeeep1](https://forum.makecode.com/u/meeeeeeeep1)\
**Post date:** [May 24, 2023, 10:35pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/6 "2023-05-24T22:35:46Z")

</div>

Hmm, it seems to be working for me. Here are the links though:

> **[GitHub - meeeeeeeep1/Info-plus: This extension expands the \`INFO\` category,...](https://github.com/meeeeeeeep1/Info-plus/)**
>
> This extension expands the \`INFO\` category, giving you the ability to show/hide the stats, change the life image and customize the stat colors. - GitHub - meeeeeeeep1/Info-plus: This extension exp...

> **[GitHub - meeeeeeeep1/Console-Overlay: A Makecode Arcade extention that allows...](https://github.com/meeeeeeeep1/Console-Overlay/)**
>
> A Makecode Arcade extention that allows you to display the built in console directly on screen! - GitHub - meeeeeeeep1/Console-Overlay: A Makecode Arcade extention that allows you to display the bu...

---

<div class="post-metadata">

**Author:** ![VictorGamer](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/victorgamer/32/12895_2.png) [@VictorGamer](https://forum.makecode.com/u/VictorGamer)\
**Post date:** [January 17, 2024, 7:04pm UTC](https://forum.makecode.com/t/makecode-arcade-mini-extentions-functions/19968/7 "2024-01-17T19:04:58Z")

</div>

Info+ extension not showing up on url download
