> For the complete documentation index, see [llms.txt](https://hexose.gitbook.io/dx-modding-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hexose.gitbook.io/dx-modding-guide/lua-api/properties.md).

# Properties

### setProperty(property: String, value: Dynamic)

quickly sets a property in obj\_song

EXAMPLE:

```lua
function onCreatePost()
     -- alternative to obj_song.ntsc = true
     setProperty(“ntsc”,true) -- enables the ntsc filter from the bonus songs
end
```

### getProperty(property: String)

returns a property from obj\_song\
\
EXAMPLE:

```lua
function onCreatePost()
     show_message(getProperty(”ntsc”)) -- gets if the NTSC filter is enabled
end
```

### setUIProperty(uipart: String, property: String, value: Dynamic)

sets a part of the ui's property\
\
EXAMPLE:

```lua
function onCreatePost()
     setUIProperty(”scoretext”,”shown”,false) -- hides the score text
end
```

### getUIProperty(uipart: String, property: String)

sets a part of the ui's property\
\
EXAMPLE:

```lua
function onCreatePost()
     show_message(getUIProperty(”scoretext”,”xpos”)) -- would return scoretxt's xposition
end
```

## Notable Properties

### Song Variables

* `misses`- current amount of misses
* `accuracy` - current accuracy
* `coolscore` - current score
* `skill` - current health (0 is full health, 100 is no health)
* `bpm` - bpm

### Gameplay Variables

* `skipCountdown` - skips countdown if true
* `ghosttap` - enables ghost tapping if true

### Visual Effects

* `ntsc` - adds the filter from the bonus songs if true
* `screenborder` - adds the vignette from weeknd 4 if true

### Misc Variables

* `houtline` - healthbar outline
* `hplayer` - player hp bar colour
* `hbaddie` - badguy hp bar colour
* `foutline` - flowbar outline colour
* `fback` - flowbar bg colour
* `ffull` - flowbar fill colour
* `baddieicon` and `playericon` - player icons (set them to a sprite and they'll change)

### UI Properties

(these only work with setUIProperty and getUIProperty)

### scoretext

* xpos: Int
* ypos: Int
* scalex: Int (offsets scale)
* scaley: Int (offsets scale)
* font: Font
* shown: Bool

### healthbar

* xpos: Int
* ypos: Int
* scalex: Int
* scaley: Int
* shown: Bool

### flowbar

* xpos: Int
* ypos: Int
* scalex: Int
* scaley: Int
* shown: Bool
