Nifflas' Support Forum

Being Creative => Nifflas' Sources => Topic started by: GrayFace on October 31, 2010, 21:33:11

Title: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: GrayFace on October 31, 2010, 21:33:11
Here is my mod for KS: https://sites.google.com/site/sergroj/ks
Extract 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 (http://nifflas.lpchip.nl/index.php?topic=4741) is a real level introducing the bouncing ball game mode and Platforms Room (http://nifflas.lpchip.nl/index.php?topic=5652) is a little test chamber with falling platforms.
Template objects thread. (http://nifflas.lpchip.nl/index.php?topic=5017)
Custom characters thread. (http://nifflas.lpchip.nl/index.php?topic=5635)
Speedrun of The Machine with a ball. (http://www.youtube.com/watch?v=61ps0O6iuGM)

Knytt Stories Ex

1. First, changes that may be helpful for any player:


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.
Spoiler: Ball Controls (click to show/hide)

2. Now, changes that level designers can take advantage of:


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=1
Yet, 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:
Code: [Select]
FixCutscenes = trueLets you use cutscenes that don't autosave, but don't reset to the last save point.
Code: [Select]
LoadGhostsWhenEyeIsTaken = trueWhen the Eye is taken, ghosts would immediately show up. You'll also need to set "NeedObjects = true".
Code: [Select]
NoWalkOnAir()Animals would respect platform edges and won't walk on air anymore. This includes ground-walking enemies.
Code: [Select]
NoFishInWalls()Fish won't swim through walls.
Code: [Select]
NoLoadScreenDelay = trueThis 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

Title: Re: Extended Version - mod for KS & Level Editor
Post by: Yoeri on October 31, 2010, 22:53:02
Yes finally an use for the only programming language I know!
Title: Re: Extended Version - mod for KS & Level Editor
Post by: egomassive on November 01, 2010, 01:21:05
The play button in the install dialogue is a great idea. It was on my mod wish list.
Title: Re: Extended Version - mod for KS & Level Editor
Post by: GrayFace on November 01, 2010, 01:54:30
I took it from KSA :)
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: GrayFace on November 08, 2010, 22:35:24
Version 1.1
The first post has been updated. Here are changes from version 1.0:

Game:
Editor:


BTW, I've finished all Nifflas' levels in bouncing ball mode now, including secrets endings.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: Looki on November 09, 2010, 03:05:32
Gave this a very quick look (very late here), nice what you made out of this :)

"Bug fixed: If Tileset B was selected and the tile (0,0) of tileset was in selection, Tileset A was used instead for painting."
From what I recall that's not a bug. 0,0 is always empty, you should write a 0 value to the data file in that case.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: GrayFace on November 09, 2010, 11:33:31
Not with a rectangular selection :) I've changed the description of bug in the 1st post, so now it should be a bit clearer. In fact, in flood fill it was the opposite - 128 was written for (0, 0) of B, although I never checked the actual file and there's no other way to tell the difference.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: egomassive on November 09, 2010, 12:06:00
How does diagonal scrolling work with warps? What happens when the side destinations are unrelated?
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: Looki on November 09, 2010, 13:59:46
Oh, okay. I will have another look at this later. Man, I hope I didn't lose my dignity by exposing the editor source code... it's horrible :D
Looking forward to testing the Lua stuff, I always love scripting in games.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: GrayFace on November 10, 2010, 03:03:45
I've found a bad bug caused by my recent change of signs. Sometimes signs stop updating, always showing the same message. It's not easy to reproduce, so I wasn't able to fix it yet. Game restart fixes this when the bug happens (F2 should be enough).

How does diagonal scrolling work with warps? What happens when the side destinations are unrelated?
It first triggers X warp on this screen, then Y warp on the screen to which X warp has lead. Before the fix it just added the deltas of two warps together resulting in a totally wrong screen. And I've just realized I haven't completely fixed this in v1.1.

Man, I hope I didn't lose my dignity by exposing the editor source code... it's horrible :D
Doesn't seem horrible to me. It's MMF2, after all.
The horrible thing is my extension, which is basically a slightly modified extension template. It does its thing well, but from MMF2 it looks similar to the template. So, for example, a check that the window has focus looks like this: "Condition example: 0 + 0 = 0" :D

Looking forward to testing the Lua stuff, I always love scripting in games.
Cool.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: Looki on November 10, 2010, 17:46:14
Oh, that was your extension :) No wonder I couldn't open it. To check that the window has focus you could also use the Window Control object.
Title: Re: Extended Version v1.1 - mod for KS & Level Editor
Post by: GrayFace on November 15, 2010, 02:12:26
Version 1.1.1
The first post has been updated. Here are changes from version 1.1:

Game:
Editor:


Did I tell you that the example map was updated with version 1.1?
Title: Re: Extended Version v1.1.1 - mod for KS & Level Editor
Post by: Artix on November 18, 2010, 07:03:05
It's not working for me, I installed it, and extracted everything to my Knytt Stories folder.

Well, the tutorial level is broken, and as the picture shows, they're walking on air, but the dialog scrolling works fine.
Title: Re: Extended Version v1.1.1 - mod for KS & Level Editor
Post by: GrayFace on November 18, 2010, 16:47:12
Oops, the problem was in level compression. This also means that you are the first one who actually tried the mod out.

Version 1.1.2

Game:
Editor:
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: egomassive on April 13, 2011, 01:07:09
I just heard you are still working on this. I finally tried it out a short while ago, and I was really impressed with the capabilities. However, I don't think it'll see much use without a manual. Also, I was wondering if the level editor could be used to make normal KS 1.2.1 levels. The auto-reloading of the World.ini sounds extremely helpful.
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: GrayFace on April 15, 2011, 10:32:47
Yes, it creates normal 1.2.1 levels, but the uploaded version is still buggy, because the world.ini editor kicks in here and there. The new version will be out as soon as I fix diagonal scrolling (yes, it still works incorrectly) and a small bug in the editor.
It would be cool to have a manual, but I'm too lazy to write it.

Meanwhile I'm thinking of which Video Games Nerd quote would be appropriate to describe working with MMF.
(http://img29.imageshack.us/img29/3821/mmfi.png) (http://img29.imageshack.us/i/mmfi.png/)
As expected, nothing works right and "Number of <> 0" is triggered. Can anyone tell me how to destroy objects so that they are actually destroyed? :sick: My only guess so far is that destroying is deferred until the frame ends.
Edit: I've settled with a work-around.
Title: Re: Extended Version v1.2 - mod for KS & Level Editor
Post by: GrayFace on April 15, 2011, 13:24:09
Version 1.2

Game:
Editor:


And now I've done a real level with KS Ex: GrayFace - Ball Tutorial (http://nifflas.lpchip.nl/index.php?topic=4741).
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: egomassive on April 15, 2011, 21:39:44
I like the new keyboard shortcuts. I may have to steal that idea. I'll have to give the editor a try soon. The bugs sound small compared to the improvements.

...
Meanwhile I'm thinking of which Video Games Nerd quote would be appropriate to describe working with MMF. ...

MMF has so many hidden quirks it's a wonder anything worthwhile can be made with it. When I read through Nifflas' code I can see that he's learning and improving as he goes, and considering how difficult MMF is to work with he probably could have learned game making in C++ from zero knowledge in half the time. Then I think, now I'm learning MMF to make mods of Nifflas' games when I ought to be learning something more valuable.[/rant]
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: GrayFace on April 15, 2011, 22:51:09
I feel the same. The real problem isn't learning, but developing a big application without any ways to compare two versions, find&replace stuff, no real debug etc. When I was making the first version of KS Ex I had one bug for which the cause was completely unclear. To fix it I had to look at my modifications and do them in Nifflas' unmodified sources, even copying was impossible at places where groups are activated/deactivated. I still don't know what caused the bug, because after I've copied everything I wanted it just worked.
As for learning MMF, it's an interesting experience, I feel good about having spent my time on it.

I like the new keyboard shortcuts. I may have to steal that idea.
Sure, I've stolen the idea of scrollable signs from you BTW.
Back then I did experiments with changing appearance of things using custom objects and it worked fine, but the custom objects was late by one frame. After adding a callback at the very end of frame cycle
I'll have to give the editor a try soon. The bugs sound small compared to the improvements.
In the new version the only bug I'm aware of is a minor graphical glitch that happens with tilesets with transparent bottom line. Also, the "Level -> Script" didn't work for me one day, but I couldn't reproduce it today.

I've forgot about an important change in the editor:

Now I've added it to my posts.
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: egomassive on April 16, 2011, 07:50:19
... I'll try to create an object called something like 'ZZZZ' and place the callback in it. ...

The last object created is the first object to execute commands. So, if you create an object at start of frame --attach it to an object bar in the frame editor-- it will execute it's behaviors after all of the rendered objects execute theirs, afaik.

On the subject of stealing ideas, I was inspired by your no-fish-in-walls concept and put it in my mod. The play button in the install dialogue, I thought it would take you directly to the newly installed level. I now know it just takes you to the level selection menu, and I think you said you got the idea from Bloxmaster, but I want to steal what I originally thought it did. Bwahaha!
Title: Re: Extended Version v1.2 - mod for KS & Level Editor
Post by: Comhon on April 19, 2011, 07:58:48
I like this mod, mostly the raising water from tutorial.
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: GrayFace on April 28, 2011, 14:15:50
Turns out my assumption was right. Behaviors are executed on all object 'classes' and probably in order of creation of those 'classes'. When I added the behavior to the last of my new objects it worked. The synchronization of graphics is still not perfect, because the animation is done after all behaviors are done, so custom object is displayed in the right place, but is late by one frame.

The play button in the install dialogue, I thought it would take you directly to the newly installed level. I now know it just takes you to the level selection menu, and I think you said you got the idea from Bloxmaster, but I want to steal what I originally thought it did. Bwahaha!
I thought about this too, but somehow forgot about it.
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: egomassive on April 28, 2011, 23:00:22
Turns out my assumption was right. Behaviors are executed on all object 'classes' and probably in order of creation of those 'classes'. When I added the behavior to the last of my new objects it worked. ...
Interesting.

I found this quote on the Click Team site
Quote from: Yves
It's an internal order (it's sometimes the creation order, but it's usually different if you have deleted objects and created new ones).

Well, that's clear as mud. I think "created" means "added to the frame", not "spawned at runtime". Anyway, kudos for working it out in your mod. I doubt one frame will be noticeable, especially if position is accurate.
Title: Re: Extended Version v1.1.2 - mod for KS & Level Editor
Post by: GrayFace on April 29, 2011, 20:31:35
I found this quote on the Click Team site
Quote from: Yves
It's an internal order (it's sometimes the creation order, but it's usually different if you have deleted objects and created new ones).
Thanks, that makes it clear. In case an object is deleted, the next one created would probably take its place.
Title: Re: Extended Version v1.2 - mod for KS & Level Editor
Post by: GrayFace on October 15, 2011, 23:33:58
Version 1.3
This update is huge :)

Game:
Editor:

Title: Re: Extended Version v1.2 - mod for KS & Level Editor
Post by: Raicuparta on October 15, 2011, 23:38:03
I think you fixed everything that I ever noticed was wrong. This is awesome :)

EDIT: Something is wrong, the editor is using way to much CPU (above 50% on a Core2 Duo 2.2GHz), and that made it very slow.
Title: Re: Extended Version v1.3 - mod for KS & Level Editor
Post by: GrayFace on October 17, 2011, 00:37:37
It was caused by the last change I made to the editor. Now I've fixed it and another critical bug thanks to FTF32 and will upload a new version very soon.
Title: Re: Extended Version v1.3 - mod for KS & Level Editor
Post by: GrayFace on October 17, 2011, 09:12:13
Version 1.3.1

Game:
Editor:

Title: Re: Extended Version v1.3.1 - mod for KS & Level Editor
Post by: GrayFace on October 19, 2011, 09:13:26
I've run into a critical bug: objects behavior gets broken :(
Edit: It happens with lasers if NoLoadScreenDelay=true. There are problems with self droppers too. So, for now just don't enable NoLoadScreenDelay for all levels (that is, in Data\UserScript.lua). New version fixing the issue will be out soon.
Title: Re: Extended Version v1.3.1 - mod for KS & Level Editor
Post by: Raicuparta on October 23, 2011, 14:28:11
When "Extended Version Objects" is ticked (not sure if that's the right word, I mean when there is a V), it seems like the extra objects disappear, and when it is not ticked, the objects appear in the list. That should probably be the other way around.
Title: Re: Extended Version v1.3.1 - mod for KS & Level Editor
Post by: GrayFace on October 23, 2011, 18:02:13
That's strange. Maybe you mean extra objects from some other mod? When it's on, only standard and KS Ex objects are shown, when it's off KS Ex objects aren't shown, but objects from other mods (if present) are.
Title: Re: Extended Version v1.3.1 - mod for KS & Level Editor
Post by: GrayFace on October 23, 2011, 18:08:38
Version 1.4

Game:

Title: Re: Extended Version v1.3.1 - mod for KS & Level Editor
Post by: Raicuparta on October 23, 2011, 18:42:08
That's strange. Maybe you mean extra objects from some other mod? When it's on, only standard and KS Ex objects are shown, when it's off KS Ex objects aren't shown, but objects from other mods (if present) are.
Sorry, my bad, It was from another mod, everything is alright then.

How does the screenshot thing work? Where are they saved?
I would really like to have a feature to easily take screenshots of one or more screens without Juni in them, it would be really useful for me.

Again thank you for the amazing work :)

EDIT: I'm still getting an unusually high level of CPU usage, every now and then, even when it's just there in the background, the editor starts using 50% of the CPU (probably because this is a dual core and it can only use one core).
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: egomassive on October 25, 2011, 17:23:49
EDIT: I'm still getting an unusually high level of CPU usage, every now and then, even when it's just there in the background, the editor starts using 50% of the CPU.

I have the same problem with Looki's Level Editor Mod. My guess is it's a behavior from the original editor. It would be nice if the whole program paused itself when it lost focus.
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: Raicuparta on October 25, 2011, 17:50:47
EDIT: I'm still getting an unusually high level of CPU usage, every now and then, even when it's just there in the background, the editor starts using 50% of the CPU.

I have the same problem with Looki's Level Editor Mod. My guess is it's a behavior from the original editor. It would be nice if the whole program paused itself when it lost focus.
Oh. I don't remember it ever happening before, though.
My laptop is particularly loud when the CPU usage goes up, even though it doesn't get that hot, so it is pretty anoying.
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: GrayFace on October 28, 2011, 15:33:56
Is there any particular action that makes CPU% go to 50?
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: Raicuparta on October 28, 2011, 16:00:12
Is there any particular action that makes CPU% go to 50?
I don't think so, because a lot of times it just happens when I'm doing something else (not sure if I actually minimized it or if it was just in the background).
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: GrayFace on November 05, 2011, 10:16:26
I'll make a test version with which you can help me find the CPU% bug. Does it happen regularly?
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: Raicuparta on November 26, 2011, 13:52:24
Sorry, didn't read your post untill now. I just found out that the CPU thing only happens if I minimize the editor. If it just looses focus, nothing out of the ordinary happens.
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: Raicuparta on December 17, 2011, 01:40:33
I should have tested this before, but the original editor doesn't have the high CPU usage problem when minimized, just KS ex. It would be nice if someone else could test it to see if it's just me.
Title: Re: Extended Version v1.4 - mod for KS & Level Editor
Post by: GrayFace on December 26, 2011, 03:52:15
Indeed. Thanks, now I can hunt it down.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on January 05, 2012, 16:30:48
Version 1.4.1

Game:
Editor:


About 100% CPU bug. I naively thought that unchecking "Run when minimized" option should reduce CPU consumption in minimized state. Instead, it makes the thing consume 100% CPU. MMF2 never stops surprising me.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Denis on February 11, 2012, 09:07:12
It may sound foolish, but I've got a problem with "extracting into Knytt Stories folder". My computer displays the downloaded file as a Microsoft Office Picture Manager document. What do I have to do next?
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on February 11, 2012, 18:06:55
Denis, you need a program that extracts .rar compressed files. There's a great free one called 7-zip (http://www.7-zip.org/).
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Denis on February 11, 2012, 20:57:52
Thanks a lot, Egomassive! I apriciate your advice. :)

By the way, it's not my only problem. The second one is: I am intrigued by the abilities of the mod, but I don't understand the logic of programing. Is there some thorough manual? It can be in Russian as well.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Raicuparta on March 09, 2012, 21:31:18
This mod has been so useful, I could hardly knytt without it now.
I just don't understand, why don't GrayFace and egomassive team up with their awesome mods? ego's mod has some really cool stuff and it would be even better if there was an editor that made every new feature easier to implement in the levels.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on March 10, 2012, 01:58:05
To answer Raicuparta's question, I don't think the mods can be merged. We've both changed the game engine in very different ways. It would probably take as much work to join them as either of us have put in already. More importantly we're going in different directions. GrayFace's mod focuses on Lua scripting and alternate modes of play, like ball mode. Mine relies on ini instructions and built-in objects, like collectibles. To put it another way, his is powerful, mine is simple. I'm not saying you can't have both in one mod, but it would require an awesome level editor.

I have considered making a World.ini editor similar to the 3rd Party Tools. Don't know if it will happen though.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Raicuparta on March 10, 2012, 13:14:00
To answer Raicuparta's question, I don't think the mods can be merged. We've both changed the game engine in very different ways. It would probably take as much work to join them as either of us have put in already. More importantly we're going in different directions. GrayFace's mod focuses on Lua scripting and alternate modes of play, like ball mode. Mine relies on ini instructions and built-in objects, like collectibles. To put it another way, his is powerful, mine is simple. I'm not saying you can't have both in one mod, but it would require an awesome level editor.

I have considered making a World.ini editor similar to the 3rd Party Tools. Don't know if it will happen though.
Thanks for clarifying.
And I'd love to see that World.ini editor happen, right now it is pretty much preferable to edit the ini directly, at least for me.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Raicuparta on March 11, 2012, 18:27:54
3rd Party Tools - Run Knytt Stories doesn't seem to be working. Actually a good thing for me, since I accidentally click that way too often, but thought I should report it.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: peterarev on April 13, 2012, 01:38:21
Howdy,

I installed 1.4.1 and the game works fine, but if I try to edit/view the screen info in Third Party Tools / Knytt Stories Manager (current screen), none of the page info (shifts, etc.) show up.  Now I realize that it's in script.lua.  Where can I get a tutorial on how to use the programming language?  Is a point and shoot interface in the works?  I still haven't completely mastered world.ini and objects (especially animated), etc.  There are several references on the web which have helped me, but this new script is Greek to me.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on April 13, 2012, 02:23:12
@ peterarev: Everything is working fine for me, and your installation sounds correct. (The Knytt Stories.exe and Knytt Stories Ex.exe should be in the same folder.) I have two questions. Does the manager work any differently when launched from the normal level editor? Do you realize all the fields will be blank until you select something?

If the manager doesn't work from the normal level editor, then the most likely culprit is that your directory address is too long. The manager can't digest long addresses. Try moving your entire Knytt Stories folder to a location like c:\Games\.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: peterarev on April 13, 2012, 04:33:12
@ peterarev: Everything is working fine for me, and your installation sounds correct. (The Knytt Stories.exe and Knytt Stories Ex.exe should be in the same folder.) I have two questions. Does the manager work any differently when launched from the normal level editor? Do you realize all the fields will be blank until you select something?

If the manager doesn't work from the normal level editor, then the most likely culprit is that your directory address is too long. The manager can't digest long addresses. Try moving your entire Knytt Stories folder to a location like c:\Games\.

See my post again.  I edited it for the second time as I get the jist of 1.4.1.  Thanks for the coaching.  I'm pretty good with the Editor and just expected it to work with script.lua which it doesn't.  Is there a repository somewhere for Levels that take advantage of 1.4.1?  I could learn a lot by comparing script.lua to the screens and behaviors.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on April 13, 2012, 13:19:56
This thread (http://nifflas.lpchip.nl/index.php?topic=5133.0) lists levels made for all the Knytt Stories mods. I can't help you with the script.lua. I believe there are resources on GrayFace's site, the place you got the mod from.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on April 16, 2012, 20:42:36
My site does contain 2 levels with scripts, but that's about it. Writing Help is too much work. I prefer consulting people about things they want to do.

3rd Party Tools - Run Knytt Stories doesn't seem to be working. Actually a good thing for me, since I accidentally click that way too often, but thought I should report it.
It will work in 1.5 >) I added it in 1.4 or 1.4.1, but forgot to implement the functionality.
Edit: Use Ctrl+Q shortcut I've added and you won't hit "Run KS" by accident ;)
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: Raicuparta on April 19, 2012, 13:44:19
After considering for quite a long time, I've decided to port my currently in progress level to this mod (I have been using the better editor for a long time but now the level will actually require the mod), which will actually give me a lot more work but at least I'll get rid of tons of awkward workarounds and unnecessary screens.
What I'm saying is, you can hope a few questions to pop in here from time to time, I hope you don't mind :P
The first one is: is there a way to bind a different key to scroll the signs? Pg up and Pg down are ancient keys that no one uses anymore, I bet there are people who actually don't know what they are and would have to look for them in the keyboard.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on April 20, 2012, 03:48:41
Not at the moment. I've put it on my list for v1.5.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on April 20, 2012, 12:38:17
We've discussed linking to each others mods from the level selection screen*. I've now implemented that function, but where should the links point? For upgrading, Nifflas linked to a redirect.php on his website. This would probably be a good method for us, but only as long as we keep our sites up for all eternity. I originally planned to read the links from the settings.ini because that would allow the easiest method for updating the links. The problem with that is it's too easy for someone to abuse, redistributing with malicious addresses.

What are your thoughts?

*For people who are not GrayFace: In the same way that KS provides a link to Upgrade if the version you're using is outdated for the level you're trying to play, our mods are going to provide links to each other if the level you're trying to play is built for the other.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on April 21, 2012, 18:38:09
My mod's link is http://sites.google.com/site/sergroj/ks/ Nothing prevents it from staying up for eternity :) Except if Google does radical changes.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on April 22, 2012, 05:43:06
A screenshot of a little makeover of the map. Another one is a mock-up of editing screen properties, but I'm sure I'm not going to implement it. What I want to make is lower-right box with sign currently being edited in script editor.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: egomassive on April 22, 2012, 09:29:51
That map is pretty. *jealous*
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on May 01, 2012, 13:39:22
Adjacent screens preview!
I had to do the previews in 4 cycles, not 1 as I thought. This way I can render all objects on the screens without worries.
Edit: I've changed the screenshot, here you can also see sign editing.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: LPChip on May 01, 2012, 15:31:06
This looks really awesome and helpful. Even if I'd use this editor to make stock levels, it would be really handy.

Speaking of which... Is it possible to see if certain items/objects are KSex only?
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on May 01, 2012, 16:18:47
Yes, if you uncheck Screen -> Extended Version Objects, you'll only see standard objects and objects of other mods if there are any (their objects are hidden in Extended Version Objects mode).
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: LPChip on May 01, 2012, 22:04:02
ah, thats perfect!
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on August 27, 2012, 16:38:47
Hooray, I found the way to make it zoom without much trouble! It's surprisingly simple. Well, not in pure MMF, but with some WinAPI.
This technique may also help solve issues with full-screen in Night Sky.
Edit: I already love to play fullscreen in native resolution (1280x1024 for me). Now I can make zoom option for the editor too.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: JerkDouglas on October 28, 2012, 02:56:33
 I've shifted my abnormally complicated game to every mod since the beginning, this one is the one that will make it happen. You are a fantastic dude. I can hardly wait for the native resolution and the level-editor's adjacent screen previews. But no hurry man. (yes hurry, haha)

 I drew you a picture of Juni trying to script her own game. She is not very good at it.

(http://25.media.tumblr.com/tumblr_mckv53Lvzx1rxu9xfo1_1280.png)

 I was wondering though... is there a glossary of the various game-specific functions and parameters you're messing with in the scripts?

 I barely understand scripting as it is, but after me and a programmer buddy read all the lua scripts in the level and for the monsters and current effects, some of them look like you'd need to know some engine-specific variables and function calls to affect certain changes. I was wondering if you had a list of them that you used, or be willing to post in one of your threads?

 Also, I have a very minimal understanding of programming, so ignore what i said if it doesn't make any sense. :P
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on October 28, 2012, 03:55:21
Awesome :) 2 things left before I can release the new version are the example level and ReadMe updates. There are more things I wanted to do, but they can wait.
Writing help is a hard task that I decided not to do. With the small number of KS Ex users it's easier to help individually with particular scripts. Also with what is possible and what isn't (most things are possible :)). Most functions and variables can be found in Data\Lua\main.lua and some in Data\Lua\Functions.lua. Search for "local ObjectProps" in main.lua - these are 2 variables common for most objects. Then there go variables specific to various objects. These variables are used like "o.Permanent = 1".
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: JerkDouglas on October 28, 2012, 13:13:51
Holy crap I'm an idiot. That is exactly what I was looking for and I just didn't check that folder. Thanks a ton, haha.
Title: Re: Extended Version v1.4.1 - mod for KS & Level Editor
Post by: GrayFace on November 07, 2012, 13:15:43
Version 1.5

Game:
Editor:


As usual, the example level is updated too.
Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: ixMarcel on November 07, 2012, 15:11:47
I will download this soon ;). I'm using this mod to play levels.
Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: JTsentinel on November 07, 2012, 19:48:01
Wow, good job on this! I'm planning to use this too when I get better at making custom levels. Too bad I can't take advantage of lua scripting. :(
Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: JerkDouglas on November 08, 2012, 03:47:02
 Flawless! I'm honored you used the picture I made in the demo level, and then demonstrated how to move an image in a makeshift cutscene in the script. That's going to be very useful for me when I can figure out how you did it.

 Native resolution is crystal clear, and was such a good idea. And the biggest help is that resolution-changer for the editor. Sprite based projects always did needed some kind of a zoom for the building process.

 Question: ScreenScrollDetectionDelta. I can't find a solid definition on what that is.

 I suppose the only thing you need to add now if you're still interested in doing more, is a way to help all of us laymen figure out all the basic scripting in this game so we can more fully appreciate what you've done here. Maybe add some heavier notation to your scripts to break things down more. (Took me a day to be sure of what hotspotX and Y were used for, hahaha.)

 No pressure. You've done one hell of a lot already.
Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: GrayFace on November 08, 2012, 10:11:01
I'm glad you liked it :)

Question: ScreenScrollDetectionDelta. I can't find a solid definition on what that is.
KS didn't move you to a new screen when you're at x=600 or y=240, that is one pixel outside of the playing frame. I've fixed this, but than discovered that in Gaia this changed gameplay in one place a bit. There was layer 3 grass on one screen and the Juni got stuck in a bit due to the change. Thus, this became an option.

I suppose the only thing you need to add now if you're still interested in doing more, is a way to help all of us laymen figure out all the basic scripting in this game so we can more fully appreciate what you've done here. Maybe add some heavier notation to your scripts to break things down more. (Took me a day to be sure of what hotspotX and Y were used for, hahaha.)
I can participate in scripting some levels.
Scripted bosses would be cool.
Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: JerkDouglas on November 08, 2012, 15:33:55
 Speak of the devil, I'm almost up to a bossfight and would consider a scripting crash-course to be highly helpful. Better hurry up and plan it out, though.

 I also think I found a bug...

 If you try to flood-fill a single tile (Shift+click) in the editor, you cannot use tiles from tileset B. It will use the identical selected position from tileset A and flood fill that tile instead.

 Also, when selecting multiple tiles to stamp, then shift+clicking that range of tiles for a flood fill, the top left tile is always from tileset A.

Title: Re: Extended Version v1.5 - mod for KS & Level Editor
Post by: GrayFace on November 09, 2012, 17:14:00
Version 1.5.1
Also check out my speed-run of The Machine with a ball: http://www.youtube.com/watch?v=61ps0O6iuGM
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: JTsentinel on November 10, 2012, 03:55:49
How come Avira recognizes the editor as a virus? I tried to exclude it but it still detects the editor whenever I open it up.

Also, what are the standard sounds? Does it include walking, jumping and climbing sounds? I was thinking if I should just use your mod for my levels.

Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: GrayFace on November 10, 2012, 04:11:12
Yes, it includes all Juni sounds and save spots sound.

After you add the exe to Avira exceptions it would probably detect some .mfx module. The modules and actual exe are extracted into different locations each time the game is run, so it may be a problem.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: Widget on November 10, 2012, 04:34:09
I have the same issue with my AV detecting a module every time I run KS. It's a nuisance to tell it every time but once you're up and running it's okay. Think of it as encouragement to play lots of levels back-to-back  ;)
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: GrayFace on November 10, 2012, 11:27:40
Maybe I can make unpacked versions of the game and editor.
A list of player sounds indexes in no particular order: 29, 27, 25, 28, 31, 26, 30, 58, 59, 20, 21, 24. Use sound machine in example level to find out what they are.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: JTsentinel on November 10, 2012, 11:43:48
I get an error when I start the KS ex Example level:

Event 227 attempt to call a nil value
stack traceback.

and another one from Ball tutorial

event 1050 invalid parameter index requested
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: GrayFace on November 10, 2012, 12:47:38
Ooops, I forgot to update the Lua files in the archive.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: JTsentinel on November 12, 2012, 08:15:10
Everything works now. Is there a proper documentation or tutorial for the features of KS plus? I cant seem to find a tutorial on how to use custom character and how to customize other graphics/sounds.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: GrayFace on November 12, 2012, 16:25:51
Works? But I didn't change anything until now. Ok, take two :) I figured, since the last upload wasn't functional I won't change version number.
Version 1.5.1

Game:
Editor:


Note: I usually don't update example level on minor releases, this is no exception.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: JTsentinel on November 12, 2012, 19:56:54
I was talking about example levels, i re-downloaded both levels last night and it worked.
Title: Re: Extended Version v1.5.1 - mod for KS & Level Editor
Post by: GrayFace on November 12, 2012, 20:26:41
Version 1.5.2

Game:
Title: Re: Extended Version v1.5.2 - mod for KS & Level Editor
Post by: JTsentinel on November 17, 2012, 05:19:37
I cant run or open KS manager/3rd party tools using the editor.

edit:

I tried the Exe/Data download and it works fine again. I dont know whats going on with the all in one source...
Title: Re: Extended Version v1.5.2 - mod for KS & Level Editor
Post by: GrayFace on November 23, 2012, 11:14:02
Version 1.5.3

Game:
Editor:

Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: Polana on April 04, 2013, 20:16:24
I installed newest version today (I overwrote previous one) and when I wanted to make new level, I get this: "Error: could not open pack." It could load old levels normally. What should I do ?
Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: GrayFace on June 07, 2013, 02:41:54
If there is "Nifflas - Template" folder in Worlds, delete it.
Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: Polana on June 08, 2013, 21:41:41
I donīt have anything like that there. I will reinstall it all.
Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: egomassive on June 09, 2013, 05:41:10
I installed newest version today (I overwrote previous one) and when I wanted to make new level, I get this: "Error: could not open pack." It could load old levels normally. What should I do ?
You can get that error if Template.bin is missing from the data folder. It's probably not included with KS Extended, so you'll have to reinstall KS to get it back.
Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: Polana on June 09, 2013, 10:14:45
Thank you. It works now.
Title: Re: Extended Version v1.5.3 - mod for KS & Level Editor
Post by: GrayFace on October 19, 2013, 00:39:46
Version 1.5.4

Game:
Editor:


If you used foreground tiles layer in egomassive's mod, you'll love this update. Perhaps even more important is that it solves the standard problem of having only 2 tilesets per screen. To capture a specific layer as an object, just right-click other layers to make them invisible.
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on October 19, 2013, 10:21:16
BTW, what features from KS+ should I add to KS Ex?
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: egomassive on October 19, 2013, 17:35:29
Now that we know big World.ini files cause slow loading, I was recently wishing I'd used the map system from KS Ex in KS+.

I'd suggest the additional solid shapes from the Invisible bank. Having these would make it easier for designers to upgrade a KS+ project to KS Ex. Being able to write "invisibly" to the collision mask is a bonus to designers anyway.
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on October 20, 2013, 02:30:29
Now that we know big World.ini files cause slow loading, I was recently wishing I'd used the map system from KS Ex in KS+.
Why?
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: egomassive on October 21, 2013, 01:40:09
Now that we know big World.ini files cause slow loading, I was recently wishing I'd used the map system from KS Ex in KS+.
Why?
Because it's easy to inflate the size of the file by adding false locations and user defined colors for most of the rooms in a level. It'll only be an issue for large levels, but that's what I'm interested in making. The way KS Ex can define areas seems much more economical. My original goal was a designer friendly map system. I didn't realize large ini files could be such a burden.

If I were to design KS from the ground up, like a true KS 2.0, I'd add a z-depth to handle duplicate locations. I'd add a bank for map icons, and I'd reserve bytes in the Map.bin for map color and icon. [/offtopic]
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on October 21, 2013, 03:16:39
I didn't know KS+ allows custom map colors. Maybe I'll add this too. I got interested in collectables (coins, artifacts, new keys) so I've started working on them for KS Ex. Though, expanding KS Ex is not at all a priority. If I gain interest for WoG or KU editor, I'll abandon the work on collectables :)
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on October 22, 2013, 01:54:38
Looks like it's ready. Kinda feels like I've ripped off your work. :)
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: egomassive on October 23, 2013, 01:33:15
I stole ideas from you too. I only added color to the map because you did. User defined colors was a request by SecretGlitch anyway, iIrc. Creating our mods at the same time has strengthened both products.

You can rip the Collectibles code right out of my source if that's possible. It was a ton of painstaking work. You'll have to erase all the OCO instructions. And, you can use the graphics too. I'm rather proud of the coin and artifact animations.
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on November 02, 2013, 09:10:00
Now everything's ready, collectables and locks for them. I wonder if I should add new keys. It would be easy, but there aren't many colors left - surely green, maybe white, maybe even orange or azure, but that's it.
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: sergiocornaga on November 02, 2013, 18:15:18
If you were to add new keys, I think four would be the perfect number, so it's good that's what you were able to come up with. Pink and grey are other colours I could see working.
Title: Re: Extended Version v1.5.4 - mod for KS & Level Editor
Post by: GrayFace on November 02, 2013, 20:03:01
Yes, pink and gray can work. Actually artifacts can replace keys very well, so it's more a thing of aesthetics.
Title: Re: Extended Version v1.5.5 - mod for KS & Level Editor
Post by: GrayFace on November 03, 2013, 16:55:58
Version 1.5.5

Game:


The actual collectable objects are in template objects thread (http://nifflas.lpchip.nl/index.php?topic=5017). They are coin, artifacts, 2 new keys and locks for all of these items.
Title: Re: Extended Version v1.5.6 - mod for KS & Level Editor
Post by: GrayFace on November 08, 2013, 13:25:23
Version 1.5.6

Game:
Editor:


Now adding template objects to a level is as easy as it can be! More info, golden creatures and their locks are in template objects thread (http://nifflas.lpchip.nl/index.php?topic=5017).
Title: Re: Extended Version v1.5.6 - mod for KS & Level Editor
Post by: GrayFace on November 09, 2013, 18:03:33
Turns out I haven't included updated scripts with v1.5.6. I'll release v1.5.7 sometime soon anyway.
Title: Re: Extended Version v1.5.7 - mod for KS & Level Editor
Post by: GrayFace on November 12, 2013, 20:07:47
Version 1.5.7

Game:
Editor:


There are also new "force key"/"block user" objects from KS+ in template objects thread (http://nifflas.lpchip.nl/index.php?topic=5017), as well as necessary updates to golden creatures and collectables. I also noticed that I forgot to add Map Power object to the list.
I feel some temptation to fix the slowdown large World.ini causes in KG - Define, but that would mean making an extension to replace Ini++.
Title: Re: Extended Version v1.5.7 - mod for KS & Level Editor
Post by: GrayFace on November 15, 2013, 07:31:18
Homing bullets... All of these are  homing bullets. Strangely it doesn't seem to happen if I try to reproduce in KS+.
Title: Re: Extended Version v1.5.7 - mod for KS & Level Editor
Post by: Polana on December 14, 2013, 22:01:34
Hi
I was playing LordMarzog's Gauntlet part two and when I was squashed with his custom enemy or only got killed at the screen where it is, an error occurs: "Could not call user-defined destroy callback".
I have version 1.5.7.
Is there any solution of this problem (except for "don't get killed"  :))?
Thanks
Title: Re: Extended Version v1.5.7 - mod for KS & Level Editor
Post by: GrayFace on December 28, 2013, 20:04:23
Please send me the savegame.
Title: Re: Extended Version v1.5.8 - mod for KS & Level Editor
Post by: GrayFace on December 30, 2013, 01:53:27
Version 1.5.8

Game:

Title: Re: Extended Version v1.5.8 - mod for KS & Level Editor
Post by: GrayFace on April 11, 2015, 18:05:34
Version 1.5.9

Game:

Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: PhoenixTigerz on April 21, 2015, 05:11:05
Say GrayFace, having no background knowledge with programming :oops: , does the linked Lua manual contain all the functions, statements, etc. that are associated with your mod?
Also, is there anything in the manual that your mod doesn't utilize. Just wondering because the manual is a lot to read.
Just so I wouldn't ask in the future, but are the codes that you've given us, such as the "simple one-liners" are the only ones this mod uses? If there are other ones, where can I find them all? 
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: GrayFace on May 05, 2015, 09:46:57
Documentation is always a big issue for me. Documenting all functions would almost double the work, so I didn't do that. It's easier for me to write some code for people who need it.
By linked documentation do you mean Lua manual or "XLua Interfaces.chm"? Lua manual describes the Lua language itself and general-purpose functions. "XLua Interfaces.chm" describes functions of XLua binding for working with MMF objects, but doesn't contain any information about my KS-specific stuff. Simple one-liners may barely scratch the surface. Almost all functions and all events are implemented in Data\Lua\main.lua and Functions.lua. Best way to learn is to ask me :)
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: juste on August 19, 2015, 01:35:16
Hi, I've really enjoyed this mod. It's really awesome. I finally got around to getting it on my new computer, but I just have one concern.

When I start the .exe for the level editor (Level Editor Ex.exe), a Trojan is detected -- more specifically, "TR/Offend.6945595" somewhere in my Temp folder. This is detected whenever I try running the .exe and I must remove it every time, and, moreover, I'm not able to start the program due to this detection because it's being blocked (of course, I just disable my antivirus and run the program happily).

I don't doubt you or anything, and I can hardly see a Trojan being injected into a peculiar .exe such as this (a level editor for a really nice game..), but I'm just wondering why I may be detecting a Trojan in the program? Like, just a rational explanation as to why it's happening, because I know stuff like this is detected and it's nothing but I'm just curious as to the "third party" source to its detection.

It seems as though the detected "Trojan" is more specifically connected to the stdrt.exe process running thru the temp files. Just want to confirm.

Also, I downloaded the same mod previously and there were no problems (although, the computer I previously used didn't have an antivirus).

Once again I'd like to iterate that I do not believe you injected a trojan into stdrt.exe, Level Editor Ex.exe, or any other app affiliated with the download -- I'm just curious as to why this is happening. Thank you.
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: kilicool64 on August 19, 2015, 02:47:53
I've discovered what appears to be a minor bug. In areas where the music is only supposed to play when you have the eye, it plays even if I don't have it yet. For example, the creepy music in the dark area in The Machine starts playing right away, even before I collect the eye and can see the ghosts and invivible blocks. I'm not having this problem with the unmodded version of Knytt Stories.
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: egomassive on August 20, 2015, 04:52:36
@juste: Many virus protection programs find exception with the stdrt.exe sub-program. Level Editor Ex and many other Nifflas related programs were written with a software development program called MMF2. When you run a program written on this software it launches it's core functionality as a separate process which is similar to the way Trojans are deployed. At some point in history someone made a virus and disguised it as the strdt.exe. Most virus protection softwares therefore blacklist it. MMF2 is a somewhat widely used development software, but not wide enough for most virus protection software makers to care that they are blacklisting thousands of benign programs.

TLDR: It is safe. Try to teach your virus software to ignore it, but be as specific as you can since there are real viruses out there named strdt.exe.
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: GrayFace on January 16, 2016, 23:34:38
The next version won't run from Temp folder, so adding an exception for it in AV shouldn't be a problem. I found that "Compress the runtime" is causing the executable to be unpacked and run from Temp.

kilicool64, thanks for report
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: Vegetal Gibber on March 30, 2018, 20:53:17
Sorry for the sudden bump, but I just noticed that the latest build of KS Ex (v1.5.9) seems to always use the default skin color for Juni, even when a custom color value is set in the World.ini file. This is particularly noticeable in levels that rely on this feature to make Juni invisible or give her a silhouetted look. Custom clothes colors are displayed correctly, though.
Title: Re: Extended Version v1.5.9 - mod for KS & Level Editor
Post by: Wibi on May 13, 2022, 19:19:47
Few questions:
1. Is there something like a console? If I do print("example"), does it go somewhere that I can read?
2. How well-sandboxed is this?