Rename and fix formatting but give up fixing grammar bc too long
This commit is contained in:
parent
e8bf31d1af
commit
d1b2461bdb
@ -1,16 +1,12 @@
|
|||||||
# Kade Engine Lua Mod Chart Documentation
|
# Lua Modcharts
|
||||||
|
|
||||||
In the 1.4.2 release of Kade Engine, we introduced Mod Charts. Mod Charts are a way of changing gameplay without hard coded values. This is achieved by using the Lua Scripting language to create script files that run during runtime.
|
In the 1.4.2 release of Kade Engine, we introduced Mod Charts. Mod Charts are a way of changing gameplay without hard coded values. This is achieved by using the Lua Scripting language to create script files that run during runtime.
|
||||||
|
|
||||||
All files **are located in** `assets/data/song/`
|
Song data is located in `assets/data/<song>/`, so the Lua file containing your scripts should be located at exactly `assets/data/<song>/modchart.lua`. (replace <song> with the name of the song. for example, `assets/data/milf/` for milf)
|
||||||
|
|
||||||
Modchart Lua File should be in `assets/data/song/modchart.lua` **exactly**
|
If the file doesn't exist, Lua code won't be ran.
|
||||||
|
|
||||||
Lua code will only be ran if that file exists.
|
## Examples
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
Full Example
|
Full Example
|
||||||
|
|
||||||
@ -90,23 +86,23 @@ end
|
|||||||
Looping through all of the rendered notes
|
Looping through all of the rendered notes
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
for i = 0, getRenderedNotes() do -- sets all of the rendered notes to 0 0 on the x and y axsis
|
for i = 0, getRenderedNotes() do -- sets all of the rendered notes to 0 0 on the x and y axsis
|
||||||
setRenderedNotePos(0,0,i)
|
setRenderedNotePos(0,0,i)
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
Centering BF's Side
|
Centering BF's Side
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
function setDefault(id)
|
function setDefault(id)
|
||||||
_G['defaultStrum'..id..'X'] = getActorX(id)
|
_G['defaultStrum'..id..'X'] = getActorX(id)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- put this somewhere in a function
|
-- put this somewhere in a function
|
||||||
|
|
||||||
for i = 4, 7 do -- go to the center
|
for i = 4, 7 do -- go to the center
|
||||||
tweenPosXAngle(i, _G['defaultStrum'..i..'X'] - 275,getActorAngle(i) + 360, 0.6, 'setDefault')
|
tweenPosXAngle(i, _G['defaultStrum'..i..'X'] - 275,getActorAngle(i) + 360, 0.6, 'setDefault')
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -116,10 +112,10 @@ Current calls to functions include,
|
|||||||
|
|
||||||
| Name | Arguments | Description |
|
| Name | Arguments | Description |
|
||||||
| :-----: | :------------: | :----------------------------------------------------------: |
|
| :-----: | :------------: | :----------------------------------------------------------: |
|
||||||
| start | Song Name | Get's called when the song starts |
|
| start | Song Name | Gets called when the song starts |
|
||||||
| update | Elapsed frames | Get's called every frame (after the song starts) |
|
| update | Elapsed frames | Gets called every frame (after the song starts) |
|
||||||
| stepHit | Current Step | Get's called when ever a step hits (steps are in between beats, aka 4 steps are in a beat) |
|
| stepHit | Current Step | Gets called when ever a step hits (steps are in between beats, aka 4 steps are in a beat) |
|
||||||
| beatHit | Current Beat | Get's called when ever a beat hits |
|
| beatHit | Current Beat | Gets called when ever a beat hits |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -175,13 +171,13 @@ These premade id's are the following:
|
|||||||
|
|
||||||
Creates a sprite out of the specified image, returns the id you gave it.
|
Creates a sprite out of the specified image, returns the id you gave it.
|
||||||
|
|
||||||
*Note: Sprite Path is normally the FILE NAME so if you have a file name of Image it'll go to assets/data/songName/Image.png so don't include the extension*
|
*Note: Sprite Path is normally the FILE NAME so if your file is named `Image` it'll go to assets/data/songName/Image.png so don't include the extension*
|
||||||
|
|
||||||
### Hud/Camera
|
### Hud/Camera
|
||||||
|
|
||||||
##### setHudPosition(int x, int y)
|
##### setHudPosition(int x, int y)
|
||||||
|
|
||||||
Set's the game hud's position in space.
|
Sets the game hud's position in space.
|
||||||
|
|
||||||
##### getHudX()
|
##### getHudX()
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user