Skip to content

Commit a1cd913

Browse files
committed
a
1 parent 3337db0 commit a1cd913

32 files changed

+185
-1054
lines changed

LICENSE

Lines changed: 21 additions & 674 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
# Psych Engine Lua Script API
2-
3-
## Special Thanks to Contributors
4-
* LarryFrost - Pointing out countless errors in the Wiki.
5-
* tposejank - Pull Request for better Mobile support.
6-
* Frakits - Minor HTML/CSS advices for better support in other OS's.
1+
# Shadow Engine Lua Script API

assets/icon.ico

414 KB
Binary file not shown.

assets/logo.png

-27.9 KB
Loading

css/header.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
width: 100%;
44
height: 64px;
55
position: fixed;
6-
background-color: #8029B6;
6+
background-color: #272426;
77
top: 0;
88
left: 0;
9-
box-shadow: 0px 2px 2px 2px #8029B67F;
9+
box-shadow: 0px 2px 2px 2px #1a18197F;
1010
padding: 5px;
1111
overflow: none;
1212
}
@@ -26,7 +26,7 @@
2626

2727
.headertext
2828
{
29-
font-size: 24px;
29+
font-size: 22px;
3030
margin-top: -44px;
3131
margin-left: 70px;
3232
font-weight: bold;

index.html

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<head>
33
<meta charset="UTF-8">
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5-
<title>Psych Engine - Lua Script API</title>
5+
<title>Shadow Engine - Lua Script API</title>
66
<link rel="stylesheet" href="css/main.css">
77
<link rel="stylesheet" href="css/header.css">
88
<link rel="stylesheet" href="css/search.css">
@@ -29,8 +29,8 @@
2929
<div class="headerbox">
3030
<div class="header">
3131
<a href="index.html">
32-
<img width="64" src="assets/icon.ico" alt="Psych Engine Logo" draggable="false">
33-
<div class="headertext">Psych Engine - Lua Script API</div>
32+
<img width="64" src="assets/icon.ico" alt="Shadow Engine Logo" draggable="false">
33+
<div class="headertext">Shadow Engine - Lua Script API</div>
3434
</a>
3535
</div>
3636
</div>
@@ -40,21 +40,22 @@
4040
<h1>Home Page</h1>
4141
<hr>
4242
<p>This site is highly inspired by Flixel API's site, so huge props to them.</p>
43-
<p>These pages are intended for Psych Engine 1.0+, so it might not be reliable for older versions.
43+
<p>These pages are intended for Psych Engine 0.7.3 and Shadow Engine 0.2+, so it might not be reliable for other versions.
4444
<br>Support for other versions has been abandoned and will not be added to these pages.
4545
</p>
46-
<img width="400" src="assets/logo.png" alt="Psych Engine Logo" class="logoImage" draggable="false">
46+
<img width="400" src="assets/logo.png" alt="Shadow Engine Logo" class="logoImage" draggable="false">
4747

48-
<hr>
48+
<!--<hr>
4949
<h2>VS Code Extension</h2>
5050
<p><a href="https://gamebanana.com/tools/10716">It's highly recommended for you to install it</a>, as it auto-completes function names.
5151
</br>This is an unofficial tool though.</p>
52-
<hr>
52+
<hr>-->
5353
<h2>Running a script</h2>
54-
<h3>There are 6 types of LUA Scripts you can run:</h3>
54+
<h3>There are 7 types of LUA Scripts you can run:</h3>
5555

5656
<ul class="methoddiv">
5757
<li class="exampleitem"><b>Stage Script:</b> It will only run if the song's stage is loaded in the current chart, it should have the same name as your stage's .JSON file and should be inside <span class="methodexample">mods/My-Mod/stages/</span>.</li>
58+
<li class="exampleitem"><b>State / Substate Script:</b> It will only run while a specific State or Substate is active. State scripts should be placed inside <span class="methodexample">mods/My-Mod/stateScripts/</span> and Substate scripts inside <span class="methodexample">mods/My-Mod/substateScripts/</span>.</li>
5859
<li class="exampleitem"><b>Note Type Script:</b> It will only run if the named Note Type is being used in the current chart, it should be inside <span class="methodexample">mods/My-Mod/custom_notetypes/</span>.</li>
5960
<li class="exampleitem"><b>Event Script:</b> It will only run if the said Event is being used on the chart, it should be located inside <span class="methodexample">mods/My-Mod/custom_events/</span>.</li>
6061
<li class="exampleitem"><b>Song Script(s):</b> They should be saved inside the song's chart folder, it will only run in this specific song, no matter the Difficulty, Stage or anything else.</li>
@@ -63,12 +64,12 @@ <h3>There are 6 types of LUA Scripts you can run:</h3>
6364
</ul>
6465
<hr>
6566
<h2>Functions</h2>
66-
<h3>There are 22 pages available with 212 functions:</h3>
67-
<ul>
67+
<h3>There are ? pages available with ? functions:</h3>
68+
<!--<ul>
6869
<li><a href="pages/playstate.html">PlayState Functions</a></li>
6970
<li><a href="pages/reflection.html">Reflection Functions</a></li>
7071
<li><a href="pages/spritesheet.html">Spritesheet Functions</a></li>
71-
<li><a href="pages/flxanimate.html">FlxAnimate Functions</a></li>
72+
<li><a href="pages/flixel-animate.html">Flixel Animate Functions</a></li>
7273
<li><a href="pages/text.html">Text Functions</a></li>
7374
<li><a href="pages/sound.html">Sound Functions</a></li>
7475
<li><a href="pages/shaders.html">Shaders Functions</a></li>
@@ -78,22 +79,21 @@ <h3>There are 22 pages available with 212 functions:</h3>
7879
<li><a href="pages/timer.html">Timer Functions</a></li>
7980
<li><a href="pages/character.html">Character Functions</a></li>
8081
<li><a href="pages/file.html">File I/O Functions</a></li>
81-
<li><a href="pages/translations.html">Language/Translation Functions</a></li>
82-
<li><a href="pages/achievements.html">Achievements Functions</a></li>
8382
<li><a href="pages/substate.html">Substate Functions</a></li>
8483
<li><a href="pages/precache.html">Precache Functions</a></li>
8584
<li><a href="pages/score.html">Score Functions</a></li>
8685
<li><a href="pages/savedata.html">Save Data Functions</a></li>
8786
<li><a href="pages/script.html">Script Functions</a></li>
8887
<li><a href="pages/discord.html">Discord Functions</a></li>
88+
<li><a href="pages/mobile.html">Mobile Functions</a></li>
8989
<li><a href="pages/uncategorized.html">Uncategorized Functions</a></li>
9090
</ul>
9191
<br><hr>
9292
<h2>Other Pages</h2>
9393
<ul>
9494
<li><a href="pages/variables.html">List of all 106 Variables</a></li>
9595
<li><a href="pages/snippets.html">Code Snippets</a></li>
96-
</ul>
96+
</ul>-->
9797
</div>
9898
</body>
9999
</html>

js/selector.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,12 @@ function createSidebarContent(prefix) {
7979
'removeLuaSprite': 'spritesheet.html',
8080
'luaSpriteExists': 'spritesheet.html',
8181

82-
// FlxAnimate
83-
'makeFlxAnimateSprite': 'flxanimate.html',
84-
'loadAnimateAtlas': 'flxanimate.html',
85-
'addAnimationBySymbol': 'flxanimate.html',
86-
'addAnimationBySymbolIndices': 'flxanimate.html',
82+
// Flixel Animate
83+
'loadAnimateAtlas': 'flixel-animate.html',
84+
'addAnimationBySymbol': 'flixel-animate.html',
85+
'addAnimationBySymbolIndices': 'flixel-animate.html',
86+
'addAnimationByFrameLabel': 'flixel-animate.html',
87+
'addAnimationByFrameLabelIndices': 'flixel-animate.html',
8788

8889
// Text
8990
'makeLuaText': 'text.html',
@@ -192,18 +193,6 @@ function createSidebarContent(prefix) {
192193
'changeDiscordPresence': 'discord.html',
193194
'changeDiscordClientID': 'discord.html',
194195

195-
// Achievements
196-
'getAchievementScore': 'achievements.html',
197-
'setAchievementScore': 'achievements.html',
198-
'addAchievementScore': 'achievements.html',
199-
'unlockAchievement': 'achievements.html',
200-
'isAchievementUnlocked': 'achievements.html',
201-
'achievementExists': 'achievements.html',
202-
203-
// Translations
204-
'getTranslationPhrase': 'translations.html',
205-
'getFileTranslation': 'translations.html',
206-
207196
// Precache
208197
'precacheImage': 'precache.html',
209198
'precacheSound': 'precache.html',

pages/achievements.html

Lines changed: 0 additions & 117 deletions
This file was deleted.

pages/camera.html

Lines changed: 3 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<head>
33
<meta charset="UTF-8">
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5-
<title>Psych Engine - Camera Functions</title>
5+
<title>Shadow Engine - Camera Functions</title>
66
<link rel="stylesheet" href="../css/main.css">
77
<link rel="stylesheet" href="../css/header.css">
88
<link rel="stylesheet" href="../css/search.css">
@@ -29,8 +29,8 @@
2929
<div class="headerbox">
3030
<div class="header">
3131
<a href="../index.html">
32-
<img width="64" src="../assets/icon.ico" alt="Psych Engine Logo" draggable="false">
33-
<div class="headertext">Psych Engine - Lua Script API</div>
32+
<img width="64" src="../assets/icon.ico" alt="Shadow Engine Logo" draggable="false">
33+
<div class="headertext">Shadow Engine - Lua Script API</div>
3434
</a>
3535
</div>
3636
</div>
@@ -40,75 +40,6 @@
4040
<h1>Camera Functions</h1>
4141
<p><b>Functions to change camera points and apply effects.</b></p>
4242
<hr>
43-
<h2 id="setCameraScroll">setCameraScroll</h2>
44-
<p class="methodbox">setCameraScroll(<span class="variablemarkup">x</span>:Float, <span class="variablemarkup">y</span>:Float):Void</p>
45-
<p>Set the Game Camera's current scroll position.</p>
46-
<h4>Examples:</h4>
47-
<ul class="methoddiv">
48-
<li class="exampleitem"><span class="methodexample">setCameraScroll(0.0, 0.0)</span> - Camera Scroll position is set to X: 0 and Y: 0.</li>
49-
</ul>
50-
<hr>
51-
52-
<h2 id="setCameraFollowPoint">setCameraFollowPoint</h2>
53-
<p class="methodbox">setCameraFollowPoint(<span class="variablemarkup">x</span>:Float, <span class="variablemarkup">y</span>:Float):Void</p>
54-
<p>Set the Game Camera's follow point position.</p>
55-
<h4>Examples:</h4>
56-
<ul class="methoddiv">
57-
<li class="exampleitem"><span class="methodexample">setCameraFollowPoint(-150.0, 150.0)</span> - Camera Follow point is set to 150 units to the left and 150 units down.</li>
58-
</ul>
59-
<hr>
60-
61-
<h2 id="addCameraScroll">addCameraScroll</h2>
62-
<p class="methodbox">addCameraScroll(<span class="isoptional">?</span><span class="variablemarkup">x</span>:Float = 0, <span class="isoptional">?</span><span class="variablemarkup">y</span>:Float = 0):Void</p>
63-
<p>Adds X/Y to the Game Camera's current scroll position.
64-
<br>All values are optional and defaults to zero.</p>
65-
<h4>Examples:</h4>
66-
<ul class="methoddiv">
67-
<li class="exampleitem"><span class="methodexample">addCameraScroll(200.0, -100.0)</span> - Camera Scroll moves 200 units to the right and 100 units up.</li>
68-
</ul>
69-
<hr>
70-
71-
<h2 id="addCameraFollowPoint">addCameraFollowPoint</h2>
72-
<p class="methodbox">addCameraFollowPoint(<span class="isoptional">?</span><span class="variablemarkup">x</span>:Float = 0, <span class="isoptional">?</span><span class="variablemarkup">y</span>:Float = 0):Void</p>
73-
<p>Adds X/Y to the Game Camera's follow point position.
74-
<br>All values are optional and defaults to zero.</p>
75-
<h4>Examples:</h4>
76-
<ul class="methoddiv">
77-
<li class="exampleitem"><span class="methodexample">addCameraFollowPoint(-600.0, -200.0)</span> - Camera Follow point moves 600 units to the left and 200 units up.</li>
78-
</ul>
79-
<hr>
80-
81-
<h2 id="getCameraScrollX">getCameraScrollX</h2>
82-
<p class="methodbox">Usage: <b>getCameraScrollX()</b></p>
83-
<p>Returns Game Camera's current scroll X, float value.</p>
84-
<hr>
85-
86-
<h2 id="getCameraScrollY">getCameraScrollY</h2>
87-
<p class="methodbox">Usage: <b>getCameraScrollY()</b></p>
88-
<p>Returns Game Camera's current scroll Y, float value.</p>
89-
<hr>
90-
91-
<h2 id="getCameraFollowX">getCameraFollowX</h2>
92-
<p class="methodbox">Usage: <b>getCameraFollowX()</b></p>
93-
<p>Returns Game Camera's follow point X, float value.</p>
94-
<hr>
95-
96-
<h2 id="getCameraFollowY">getCameraFollowY</h2>
97-
<p class="methodbox">Usage: <b>getCameraFollowY()</b></p>
98-
<p>Returns Game Camera's follow point Y, float value.</p>
99-
<hr>
100-
101-
<h2 id="cameraSetTarget">cameraSetTarget</h2>
102-
<p class="methodbox">cameraSetTarget(<span class="variablemarkup">character</span>:String):Void</p>
103-
<p>Changes the Follow Point to target a character.</p>
104-
<ul>
105-
<li><b><span class="variablemarkup">character</span></b> - Can be "bf", "gf", or "dad" ("opponent" alternatively).</li>
106-
</ul>
107-
<h4>Examples:</h4>
108-
<ul class="methoddiv">
109-
<li class="exampleitem"><span class="methodexample">cameraSetTarget('opponent')</span> - Sets camera follow point to Opponent.</li>
110-
</ul>
111-
<hr>
11243

11344
<h2 id="cameraShake">cameraShake</h2>
11445
<p class="methodbox">cameraShake(<span class="variablemarkup">camera</span>:String, <span class="variablemarkup">intensity</span>:Float, <span class="variablemarkup">duration</span>:Float):Void</p>

pages/character.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<head>
33
<meta charset="UTF-8">
44
<meta name="viewport" content="width=device-width, initial-scale=1.0">
5-
<title>Psych Engine - Character Functions</title>
5+
<title>Shadow Engine - Character Functions</title>
66
<link rel="stylesheet" href="../css/main.css">
77
<link rel="stylesheet" href="../css/header.css">
88
<link rel="stylesheet" href="../css/search.css">
@@ -29,8 +29,8 @@
2929
<div class="headerbox">
3030
<div class="header">
3131
<a href="../index.html">
32-
<img width="64" src="../assets/icon.ico" alt="Psych Engine Logo" draggable="false">
33-
<div class="headertext">Psych Engine - Lua Script API</div>
32+
<img width="64" src="../assets/icon.ico" alt="Shadow Engine Logo" draggable="false">
33+
<div class="headertext">Shadow Engine - Lua Script API</div>
3434
</a>
3535
</div>
3636
</div>

0 commit comments

Comments
 (0)