Here is my mod for KS:
https://sites.google.com/site/sergroj/ksExtract it into your KS folder. You'll also find 3 levels on the page. The first is just an example level with comments in the script,
GrayFace - Ball Tutorial is a real level introducing the bouncing ball game mode and
Platforms Room is a little test chamber with falling platforms.
Template objects thread.Custom characters thread.Speedrun of The Machine with a ball.Knytt Stories Ex1. First, changes that may be helpful for any player:- Bouncing ball mode.
- VVVVVV mode.
- You can take screenshots with Print Screen key and then view them with "[" and "]" keys. The savegame also stores coordinates of screens where the shots were taken (which makes it useful for keeping track of bugs you found in a level).
- Map. It's activated in Options or with "AllowMap = true" for individual levels.
- When you go to a new screen there's no delay before objects appear.
- New "Keep resolution in full screen" menu item to play the game in native monitor resolution, "Zoom" for windowed mode.
- F2 works in full screen.
- May set quick death without white flash.
- Keyboard shortcuts. Most menu buttons have their first letter as a shortcut. Levels in levels list are chosen by pressing buttons '1' to '8'. Save slots are chosen by pressing buttons '1' to '3'. 'Play', 'Start a new game' and 'Load game' have the right arrow as additional shortcut. Additional shortcut for 'Back' is BackSpace.
- Sorting by date, search and page buttons in level selection screen. Page buttons can be turned off by setting "No Level Page Numbers=1" in Data\settings.ini. Previous/Next page buttons now react double clicks and repeat if you hold them.
- Play button in Install Level dialog.
- Now you can drag & drop .knytt.bin files to install them while you're anywhere the menu screen.
- Ctrl+M (Sound -> Music) turns music on/off.
- Now all sounds are stopped when KS is inactive.
- Clickable links in Credits, a list of links for "Get More Levels" button.
- High priority of game process, so background tasks won't spoil the gameplay.
- Controls can be configured.
- Set "NoHologramDoubleDown = true" in Data\UserScript.lua to turn off triggering the Hologram when you press Down twice.
- Cheat improvements. You can now teleport between screens, save, turn powers on/off and turn ball mode on/off (in ragular levels).
- Prettier pick up light. It's smoother now, but there's a chance you won't notice it. In an unlikely case you want to get the standard pick up light back, add "OriginalPickUpLight = true" line to Data\UserScript.lua.
- Bug fixed: Ctrl+S and F2 sometimes didn't work in full screen mode.
- Bug fixed: Diagonal scrolling now works correctly with warps.
- Bug fixed: After removing Detector or Hologram powers they still were on.
- Bug fixed: egomassive's fix for objects facing bug is applyed, see http://nifflas.lpchip.nl/index.php?topic=4648.0
- Bug fixed: Music wasn't playing after cutscenes, see http://nifflas.lpchip.nl/index.php?topic=4744.0
- Bug fixed: Worlds directory subfolders without World.ini are no longer listed as levels.
- Bug fixed: Now Juni will no longer briefly appear in her old position when shifting to a new relative position on a new screen.
- Bug fixed: If you go to a screen with different ambiance and then quickly go back the ambiance doesn't restart now.
- Bug fixed: The music didn't stop when a fatal error message is shown.
- Bug fixed: Custom objects were leaking resources, causing bugs after a period of playing.
To use bouncing ball mode in a regular level, press Ctrl+Shift+C, then press Space+B. 8) I've finished all Nifflas' levels in this mode, they were much harder than usually.
A - decrease speed very much on impact.
S - jump on impact.
D - float (requires Umbrella)
Q, W - as usual
up/down - climb up/down (requires Climb powerup, may be combined with A and S)
up - fly up (requires Doube Jump, or Umbrella and upwards wind)
With Doube Jump you can fly 3 times, which is reset when you land on ground or on a wall (with Climb).
With Umbrella your fly is limitless while in upwards wind.
To hit save or shift you must hold down, as usual in KS.
2. Now, changes that level designers can take advantage of:- Lua.
- Bank 254 - objects templates. See this thread for more info.
- Bank 0, Obj 32 - No Wall Swim object.
- All graphics can be changed. Most important sounds (Juni sounds and save sound) can be replaced too.
- Text objects. You can use text of any color, use any custom font.
- Fullscreen is available when KS is started from editor.
- "Level Editor" button instead of "About MMF". "About MMF" is still accessable from Credits.
- Music can loop in a level. Add "MusicLoops = 0" to Script.lua for it. There is also an event "MusicLoops", so you can choose where it should loop.
- If FixCutscenes is set to 'true' by Script.lua, shifts with cutscenes and without Autosave flag won't return you to the last save point - instead you'll continue from where you triggered the cutscene, but the game won't be saved.
- Animals don't walk on air if you call NoWalkOnAir() from your script.
- Fish don't swim through walls if you call NoFishInWalls() from your script.
- Signs of any length can be read using Page Up, Page Down, Home and End buttons to scroll them.
- Fonts for signs: egomassive's Clean font contains characters missing in original font, Russian font contains Cyrillic letters. To use a font add "Font=FontName" line to [KS Ex] section of World.ini. WorldPath\Fonts can contain custom fonts.
- Support for gradients of any width.
- Game.MusicVolume, Game.AmbianceVolumeA, Game.AmbianceVolumeB control music and ambiance volumes.
- Game.AmbiFadeSpeedA, Game.AmbiFadeSpeedB control ambiance fade speed.
With Lua scripts you can make a lot of things, even completely new game modes, as demonstrated by the BouncingBallMode.
Play through the example level, then go to its folder and open Script.lua file. That's what powers all the unusual stuff.
Information on Lua can be found at
http://www.lua.org/manual/5.1/ and
http://www.lua.org/pil/Information on XLua interfaces can be found here:
https://sites.google.com/site/sergroj/ks/XLuaInterfaces.rar?attredirects=0&d=1Yet, I haven't done any documentation on my stuff, so feel free to ask.
The simplest thing to do is to add BouncingBallMode() line into your Script.lua to make a level played with a ball. Here are some other similar one-liners that may help you:
FixCutscenes = true
Lets you use cutscenes that don't autosave, but don't reset to the last save point.
LoadGhostsWhenEyeIsTaken = true
When the Eye is taken, ghosts would immediately show up. You'll also need to set "NeedObjects = true".
NoWalkOnAir()
Animals would respect platform edges and won't walk on air anymore. This includes ground-walking enemies.
NoFishInWalls()
Fish won't swim through walls.
NoLoadScreenDelay = true
This would remove the 1 tick delay that happens after screen tiles are rendered, but before objects are created. However, in object-intensive screens combined time to load tiles and objects becomes too big, so you may want to turn it on and off in BeforeLoadScreen event.
Level Editor Ex- List of objects, you can scroll it by clicking an object and holding the left button
- Adjacent screens previews.
- Now World.ini is automatically reloaded when it is changed by an external program (that is, 3rd Party Tools changes are no longer overwritten by the editor)
- "Screen -> Hide error messages" menu item added that disables errors that inform of transparent tilesets, invalid music etc.
- Automatic template Objects (Bank 254) creation from current view of the screen (with or without background gradient). This lets you layer a picture made of tiles on top of Juni for example. Choose an unused Template object and you'll see a camera button to the right of Object selector.
- Bug fixed: Ctrl+R didn't reload World.ini if the editor is invisible
- Bug fixed: When KS is in full screen mode the editor no longer reacts clicks and no longer gets resized
- Level -> Script menu item opens Script.lua
- Bug fixed: Editor reacted Ctrl+C, Ctrl+S, Ctrl+V and some other keys even if it's not focused.
- Bug fixed: Backup of World.ini was placed into world folder when the world is loaded, thus changing the folder Date. Now it's placed there only when World.ini is changed.
- Bug fixed: EditorSettings.temp was placed into world folder when the world is loaded, thus changing the folder Date.
- Bug fixed: If Tileset B was selected and the tile (0,0) of tileset was a part of the selection, Tileset A was used instead for painting.
- Ctrl+Q shortcut for KSManager (current screen).
- Full set of object icons for bank 255 in the original style.
- Now pressing Ctrl+arrow moves the view by 100.
- Author field for New Level is remembered.
- When "Show custom objects" option is active, objects graphics is shown together with object index icon.
- There was a major slowdown when going from screen to screen in big levels due to world.ini editor line searching. Some other performance improvements have been done.
- When you edit text of a sign in World.ini editor you see a preview of how it will look in the game.
- You can click on INI editor's margin near [x****y*****] to go to corresponding screen.
- Music and Ambients play buttons are now toggled by click.
- "Run Knytt Stories" menu item.
- Layer 3 is selected by default (can be changed by setting "Default Layer" in Worlds\EditorSettings.temp).
- Less flashy selection marks (set "Standard Markers=1" in Worlds\EditorSettings.temp to get back to default).
- Exit/Reset warning.
- The editor selects the last edited level at start up.
- Set options "ResolutionX" and "ResolutionY" in "Worlds\EditorSettings.temp" to make the editor switch to that resolution while you're working with it.
- Almost no CPU usage when inactive.
- Support for gradients of any width.
- Simple 1-frame custom objects (Bank 255) are displayed in objects list.
- Other small things like Alt+F2 shortcut for Reset and double click reaction for minimap.
- Bug fixed: Undo shortcut (Ctrl+Z) didn't work sometimes.
- Bug fixed: World.ini editor was catching Ctrl+Z and Ctrl+V shortcuts, thus messing things up.
- Bug fixed: Hiding layers in an empty screen caused the contents of the last visited non-empty screen to be pasted.
- Bug fixed: Level -> Script menu item didn't work sometimes.
- Bug fixed: Ctrl+Del was causing corruption and crashes due to no check for workspace existence.
- Bug fixed: Sometimes custom objects were cropped with "Show custom objects" option.
- Bug fixed: Flood-fill (Shift+click) didn't work for Tileset B.