Nifflas' Support Forum

Level Editing Support => Saira Level Editing Support => Topic started by: LightningEagle on December 19, 2009, 20:07:07

Title: Editing FAQ
Post by: LightningEagle on December 19, 2009, 20:07:07
Okay, so a thread with a single question regarding devices appeared. I don't want to be rude to anyone, but as this is our only forum regarding editing I kinda feel that I don't want it to be polluted by single question topics.

This thread should be for questions regarding editing of Saira and will work as a FAQ.

I will fill out with some basic Q/A.

Have a question?
Procedure:
 * Post a reply with your question to this topic
 * We will try to answer your question and redirect you to existing posts relevant to your question.

A thanks to everyone helping out in this upstart procedure of Saira editing.
Thanks to:
 * Nifflas - for creating this awesome game and answering our questions.
 * Exp HP - for active testing and creating detailed descriptions of mechanics.
 * smeagle - for an enthusiastic eagerness and for helping out by suggesting and pointing people in the right direction.

 * ... everyone else who is actively partaking in this phase of learning.

Saira Editing - FAQ

List of questions:
What is editable by the level editor?
Explain the editor, please?
Which keys should I use in the editor?
How do I scroll rightwards?
Do I need MMF2 to edit puzzles and devices?
What about the battery charger?
Can you put more than *insert number* playable planets on a star system?
Can you place more than one planet in the same orbit ring?
How is fuel cost between star system calculated?
Flags, how and where do they work?
Help, the collision mask of my tileset is acting up strange?

Q: What is editable by the level editor?
A: The level editors sole purpose is arranging objects, sprites and tiles and editing the settings for a single screen on a planet. In this way the editor has nothing to do with the creating of the galaxy or the solar systems, but it is used to structure the explorable planet.
The editor cannot be used to create objects and sprites. It just fetches the objects and sprites defined in the objects.ini and sprites.ini.

Q: Explain the editor, please?
A: Using the editor is pretty simple:

Q: Which keys should I use in the editor?
A: Here are the keys for the editor:

Q: How do I scroll rightwards?
A: Use the middle mouse button or scroll wheel.

Q: Do I need MMF2 to edit puzzles and devices?
A: Yes!

Q: What about the battery charger?
A: It is regarded as a puzzle. If you want to use one in a level you currently have to grab one of the puzzle.ccn files from Nifflas' level and use his. You can use this table as a reference when selecting the right puzzle.ccn file:
Quote
Star systemPowerPuzzle numberComments:
Austra2504
Cham2507
Goldschmidt7008
Josephine50010You need Flag 10=1 in the star system where it's placed. This is because it is locked in the original level.
Liuz35010
Ninian25016You need Flag 0=4 in the star system where it's placed. This is because it is missing power in the original level.
Polvere5003

Q: Can you put more than *insert number* playable planets on a star system?
A: Yes, it is possible to place multiple planets in a star system.
Planets in a star system are  created placed in the star system by writing an "Orbit #" section in the Star.ini of the given star system.
Please refer to this post in order to learn about the parameters regarding planet positioning: http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755 (http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755).
When a planet is created you have to create a folder of the same name as the new planet if you want the planet to be accessible. When this is done the planets explorable areas can be create/edited through the editor by selecting the planet in the "Selecting a planet" menu.

Q:Can you place more than one planet in the same orbit ring?
A: Yes, this is possible, but placing another planet in the same ring will create two rings laying upon each other. The result is A) the ring will be more visible and B) the last applied ring will place itself upon the first applied planet.
You can bypass this problem pretty easily by selecting a diameter which is just 1px bigger or smaller than the one of the other planet. This means the planet will be so near the ring that you probably won't notice the difference and as no ring exists for a size like 301px or 299px the second planet won't get a ring and you have no overlay.

Q:How is fuel cost between star system calculated?
A: Please excuse my explanation here as I'm not fluent in English mathematics notation.
The fuel cost actually equals the distance between stars. This is done by standard analytic geometry. The entire star map is a coordinate system where x-positive is to the right, y-positive is down and origin is the upper left corner. Each planet has a coordinate set given by it's location in the star.ini.
Now in order to know the fuel cost between two planets do this:
   Planet A coordinates = (X_A, Y_A)
   Planet B coordinates = (X_B, Y_B)
   sqrt{ (X_B - X_A)^2 + (Y_B - Y_A)^2 } = C
   Now floor* C and you have the result.
   
(http://img.photobucket.com/albums/v329/LightningEagle/Saira/fuelcalc.png)
As you can see this is just Pythagoras theorem applied.
*I am not 100 percent certain of this. It could just be rounded but I guess it's floored.

Q:Flags, how and where do they work?
A: We have flags as in KS, though they work a bit different in Saira. For those who don't know the flags of KS, they are Boolean variables which can be true or false. They are primarily used to remember that something has happened.
In Saira they can be used for something alike. In Saira you are not limited to 10 flags in total, but rather 16 flags for each star system. Due to this flags are localized to each star system. They cannot affect anything in another star system, but they affect all planets in the given star system.
Another change is that flags in Saira are not Boolean, they can take on values of different sizes. The sprites of "type=Flag Hazard" can be used to check if a flag has a given value and then do something or not based in the result, which returns either true or false.

Q:Help, the collision mask of my tileset is rectangular for all tiles?
A: Most likely this is due to your .png containing an alpha-channel.
I haven't checked the file since I don't have photoshop at this PC, but I think the problem is that the mask is saved as a 32-bit png, which stores an alpha channel despite that all pixels are fully opaque. The game will then ignore the magenta and instead consider fully transparent pixels non-collidable.

You need to discard the alpha channel and save it as a 24-bit png file. If you use Photoshop, open your image. In case the name of the layer becomes "Layer 1", it's saved incorrectly. Flatten the image, this should convert it into a background layer that does not support an alpha channel. Now save your file, and it should become a 24-bit png instead of a 32-bit.
http://nifflas.lpchip.nl/index.php?topic=2415.msg27391#msg27391 (http://nifflas.lpchip.nl/index.php?topic=2415.msg27391#msg27391)
Title: Re: Editing FAQ
Post by: Exp HP on December 19, 2009, 20:49:36
I was making something like this, but you beat me to it (again :awsum:).  At least I had only just started it this morning, so it's not like a lot of work went to waste.  I like the format of this better, anyways.

I think you deserve a :hiddenstar:
(this is for your accumulative efforts on the board in general, especially in the Gathering Knowledge thread)

This would make a good sticky.  Well, actually, I think it would depend on whether or not you're planning to maintain the list (as in, update the top post every once in a while as new questions are asked).  Because if you're not going to maintain that top list, we might still see repeat questions often... :/
Title: Re: Editing FAQ
Post by: LightningEagle on December 19, 2009, 20:57:08
I was making something like this, but you beat me to it (again :awsum:).  At least I had only just started it this morning, so it's not like a lot of work went to waste.  I like the format of this better, anyways.

I think you deserve a :hiddenstar:
(this is for your accumulative efforts on the board in general, especially in the Gathering Knowledge thread)

This would make a good sticky.  Well, actually, I think it would depend on whether or not you're planning to maintain the list (as in, update the top post every once in a while as new questions are asked).  Because if you're not going to maintain that top list, we might still see repeat questions often... :/
Currently I plan on maintaining the list. If I at some point goes inactive (dunno why, but I could die or whatever, you never know), if someone wants to take over the list I'm sure one of the 'higher-ups' wouldn't mind doing a bit backend and replace ownership of the post.

But for now I'll do maintenance...  ;)
Title: Re: Editing FAQ
Post by: Exp HP on December 19, 2009, 21:10:49
if someone wants to take over the list I'm sure one of the 'higher-ups' wouldn't mind doing a bit backend and replace ownership of the post.
I've always wondered if a mod here could do that.  I have a feeling they can't, because if they could then I would think that they would've done something with the stickies on the KS level editing board that were originally made by Bass and SiamJai on the old forum.
Title: Re: Editing FAQ
Post by: LightningEagle on December 19, 2009, 21:17:10
if someone wants to take over the list I'm sure one of the 'higher-ups' wouldn't mind doing a bit backend and replace ownership of the post.
I've always wondered if a mod here could do that.  I have a feeling they can't, because if they could then I would think that they would've done something with the stickies on the KS level editing board that were originally made by Bass and SiamJai on the old forum.
But I'm pretty sure it has been done before. I think I remember once where a thread was gathering something. The first post reached it's limit of text and the second post had it's ownership replaced in order for the threads information to remain in the beginning of the thread.

But anyhow, this isn't the purpose of the thread and practically it is possible to do, you just have to get the right person.
Title: Re: Editing FAQ
Post by: smeagle on December 20, 2009, 03:33:32
A control that you dont have is that if you right click on the play area, it selects that tile in the tileset!  ;)
Title: Re: Editing FAQ
Post by: LightningEagle on December 20, 2009, 09:30:43
A control that you dont have is that if you right click on the play area, it selects that tile in the tileset!  ;)
will add.
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 21, 2009, 22:50:13
Question
1 - can there be more that 2 planets in a solar system
2 - can 2 planets or more be on the same orbit.
Title: Re: Editing FAQ
Post by: Purple Pineapple on December 22, 2009, 00:05:58
Q: Can you put more than *insert number* playable planets on a star system?
A: Yes, it is possible to place multiple planets in a star system.
Planets in a star system are  created placed in the star system by writing an "Orbit #" section in the Star.ini of the given star system.
Please refer to this post in order to learn about the parameters regarding planet positioning: http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755 (http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755).
When a planet is created you have to create a folder of the same name as the new planet if you want the planet to be accessible. When this is done the planets explorable areas can be create/edited through the editor by selecting the planet in the "Selecting a planet" menu.
9_9 Give them the same diameter to put them on the same orbit. One orbit circle may ovelap the other planet, though. I dunno.
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 22, 2009, 03:03:47
question.
For the starmap, how much are the length and height and.
How do you tell how much fuel you need to go to one star to another without playing the saira game.
Title: Re: Editing FAQ
Post by: AA on December 22, 2009, 08:37:00
9_9 Give them the same diameter to put them on the same orbit. One orbit circle may ovelap the other planet, though. I dunno.

I think you could make a new 'Orbit XXX.png' file which is completely transparent and assign it to the second planet; but I guess that would mean adding files to the Data folder, which might not be good.
Title: Re: Editing FAQ
Post by: LightningEagle on December 22, 2009, 10:57:57
I think you could make a new 'Orbit XXX.png' file which is completely transparent and assign it to the second planet; but I guess that would mean adding files to the Data folder, which might not be good.
Teoretically, yes. But the exact same diameter would fetch the same image as orbit rings aren't something you specify. They're just located based on the size of the diameter.

You could however just give the second planet in orbit a single more pixel i diameter. It will be a nearly invisible shift and as i.e 301 doesn't have a circle the problem is solved.

9_9 Give them the same diameter to put them on the same orbit. One orbit circle may ovelap the other planet, though. I dunno.
Yes, one circle will overlap the other planet. The thing I mentioned above could be a fix.
question.
For the starmap, how much are the length and height and.
How do you tell how much fuel you need to go to one star to another without playing the saira game.
The size of the images for the starmap are as follows: (this goes for the map of a star system as I presume we are talking about that)
Layer 1 (lowest layer): 960x552px
Layer 2: 992x552px
Layer 3: 1024x552px

Regarding fuel: I'm fairly sure fuel requirements are calculated automatically based on the distance between the star systems.
Title: Re: Editing FAQ
Post by: LightningEagle on December 22, 2009, 11:24:32
Sorry about double post
How do you tell how much fuel you need to go to one star to another without playing the saira game.
I have done some calculations and come up with a way to calculate the fuel cost, which actually equals the distance between stars.
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 22, 2009, 13:52:04
Sorry about double post
How do you tell how much fuel you need to go to one star to another without playing the saira game.
I have done some calculations and come up with a way to calculate the fuel cost, which actually equals the distance between stars.

what is the equation, please.
Title: Re: Editing FAQ
Post by: LightningEagle on December 22, 2009, 14:14:33
Sorry about double post
How do you tell how much fuel you need to go to one star to another without playing the saira game.
I have done some calculations and come up with a way to calculate the fuel cost, which actually equals the distance between stars.

what is the equation, please.

Seriously, look in the FAQ in the first post. I don't update it for my own pleasure.

Q:How is fuel cost between star system calculated?
A: Please excuse my explanation here as I'm not fluent in English mathematics notation.
The fuel cost actually equals the distance between stars. This is done by standard analytic geometry. The entire star map is a coordinate system where x-positive is to the right, y-positive is down and origin is the upper left corner. Each planet has a coordinate set given by it's location in the star.ini.
Now in order to know the fuel cost between two planets do this:
   Planet A coordinates = (X_A, Y_A)
   Planet B coordinates = (X_B, Y_B)
   sqrt{ (X_B - X_A)^2 + (Y_B - Y_A)^2 } = C
   Now floor* C and you have the result.

As you can see this is just Pythagoras theorem applied.
*I am not 100 percent certain of this. It could just be rounded but I guess it's floored.
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 22, 2009, 22:12:27
sorry, I did not notice you modify the faq :oops:
Title: Re: Editing FAQ
Post by: Purple Pineapple on December 22, 2009, 23:01:10
I have done some calculations and come up with a way to calculate the fuel cost, which actually equals the distance between stars.
No, really? :P Actually, the distance in pixels between the two stars, but whatever. :)
Title: Re: Editing FAQ
Post by: LightningEagle on December 22, 2009, 23:55:41
I have done some calculations and come up with a way to calculate the fuel cost, which actually equals the distance between stars.
No, really? :P Actually, the distance in pixels between the two stars, but whatever. :)
Ah, yes, however, as pixels are rather hard to measure in any non horizontal or vertical sense I'd rather say distance. But of course that distance is measured based on the pixels.

Well, really... I did the calculations pretty much on a hunch (as a response to the question since I didn't know anything about it at the time he asked) and they fit nearly perfectly, which I decided to take as the truth.  ;)
Title: Re: Editing FAQ
Post by: Purple Pineapple on December 23, 2009, 23:10:09
Q: Can you put more than *insert number* playable planets on a star system?
A: Yes, it is possible to place multiple planets in a star system.
Planets in a star system are  created placed in the star system by writing an "Orbit #" section in the Star.ini of the given star system.
Please refer to this post in order to learn about the parameters regarding planet positioning: http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755 (http://nifflas.lpchip.nl/index.php?topic=2304.msg25755#msg25755).
When a planet is created you have to create a folder of the same name as the new planet if you want the planet to be accessible. When this is done the planets explorable areas can be create/edited through the editor by selecting the planet in the "Selecting a planet" menu.
I'm guessing Nifflas used a loop to load the planets, etc. At least in MMF, this would mean and end to it somewhere meaning a maximum number of planets. This is just a guess, though and I'm not sure how to test it.
Title: Re: Editing FAQ
Post by: Nifflas on December 24, 2009, 04:22:44
Well, somewhere there have to be a limitation of numbers of stars and planets - basically the game needs to loop through the stars and planets until the images have been loaded and the names read, and I suppose the limit is if you fill the entire screen with stars or planets so there's simply no room for any new ones. It's an infinite loop that stops when there are no more stars or planets to process, so there should be no maximum number aside from the size of a long integer (4,294,967,295).

Rest assure that you will never, ever, run into a limitation. Oh, and did I mention that if you have Multimedia Fusion 2, you can reprogram the starmap into anything you want.
Title: Re: Editing FAQ
Post by: Purple Pineapple on December 24, 2009, 05:01:54
Infinite loops. *facepalm
Title: Re: Editing FAQ
Post by: LightningEagle on December 24, 2009, 10:17:02
Oh, and did I mention that if you have Multimedia Fusion 2, you can reprogram the starmap into anything you want.

Well, yes, if you know how to...   :P2
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 24, 2009, 14:48:13
Oh, and did I mention that if you have Multimedia Fusion 2, you can reprogram the starmap into anything you want.

Well, yes, if you know how to...   :P2

I think a starmap is good enough but a good addition would be to switch Galaxys  ;)
Title: Re: Editing FAQ
Post by: LightningEagle on December 24, 2009, 16:29:01
I think a starmap is good enough but a good addition would be to switch Galaxys  ;)
Woah, woah...

How about creating a level with a few star systems first. One galaxy can easily contain 12+ stars without looking cramped together so you shouldn't need more galaxies for the time being.
I know what you are getting at though. :p

@Nifflas: On another note:
(If you read this Nifflas... please answer this. You don't have to fully explain or anything, just tell me if it's possible and (if so) give a hint, then I can probably figure the rest out.)
As far as I understand flags are localized to the star systems, but can we create "global flags"?
In a sense I suspect items work a little like a kind of global flag, but is it possible to check for a specific item using the .ini files? Like the "type=flag hazard"'s check for flags and values?
Also, do we have a feature similar to the warp-feature in KS, which would allow us to change the landscape of a planet radically?
Title: Re: Editing FAQ
Post by: Nifflas on December 24, 2009, 18:49:10
Sorry, 16 flags per system is all you get - and there are no warp or shift equivalents at all in Saira.
Title: Re: Editing FAQ
Post by: LightningEagle on December 24, 2009, 22:29:54
Sorry, 16 flags per system is all you get - and there are no warp or shift equivalents at all in Saira.
I see, and items are only accessible through subapps?
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 24, 2009, 23:16:47
I think a starmap is good enough but a good addition would be to switch Galaxys  ;)
Woah, woah...

How about creating a level with a few star systems first. One galaxy can easily contain 12+ stars without looking cramped together so you shouldn't need more galaxies for the time being.
I know what you are getting at though. :p

@Nifflas: On another note:
(If you read this Nifflas... please answer this. You don't have to fully explain or anything, just tell me if it's possible and (if so) give a hint, then I can probably figure the rest out.)
As far as I understand flags are localized to the star systems, but can we create "global flags"?
In a sense I suspect items work a little like a kind of global flag, but is it possible to check for a specific item using the .ini files? Like the "type=flag hazard"'s check for flags and values?
Also, do we have a feature similar to the warp-feature in KS, which would allow us to change the landscape of a planet radically?

My level will include 8 star systems and 4 planets maximum. It will be called the Evil lair
There is probably a chance that the enviroment part of the level will be easy.
Title: Re: Editing FAQ
Post by: Nifflas on December 27, 2009, 16:48:20
Sorry, 16 flags per system is all you get - and there are no warp or shift equivalents at all in Saira.
I see, and items are only accessible through subapps?
Yeah
Title: Re: Editing FAQ
Post by: PeppyHare4000 on December 31, 2009, 23:19:34
How do i draw a planet like nifflas in saira.
Title: Re: Editing FAQ
Post by: Shawnachu on January 01, 2010, 00:28:36
What am I doing wrong with this tileset and wallmask? When I load it into the game, all the tiles have rectangular collision masks around them, including the slopes.
Title: Re: Editing FAQ
Post by: smeagle on January 01, 2010, 01:49:12
see this post  C)
http://nifflas.lpchip.nl/index.php?topic=2415.msg27391#msg27391
Title: Re: Editing FAQ
Post by: Shawnachu on January 01, 2010, 03:00:06
Woot, it works! Thanks.
Title: Re: Editing FAQ
Post by: Comhon on January 13, 2010, 17:39:44
I can't leave planet and go to the orbit system, the application always shutdowns.
I think that it is because of cutscnes, but I still can't get it work! HELP?
Title: Re: Editing FAQ
Post by: LightningEagle on January 13, 2010, 20:01:33
I can't leave planet and go to the orbit system, the application always shutdowns.
I think that it is because of cutscnes, but I still can't get it work! HELP?
It's quite hard to answer anything from that.

Please fill us in some more details and/or post the episode.
Title: Re: Editing FAQ
Post by: Comhon on January 14, 2010, 16:39:40
It has one star system and only one planet, but I think that it could, or not?
The planet has only one incomplete creen.
It's only a test! You can do with it everything, like adding systems, planets...ect.
But please make it workable...
Thanks.

http://www.mediafire.com/?yvbztnly2mz
Title: Re: Editing FAQ
Post by: smeagle on January 15, 2010, 00:37:25
I think i found the problem!

btw, thats a pretty good first screen! ive done about 8 screens out of 13, but no details yet  :S

When it happens for me, t dosen't crash straight away, it says "file not found".

I added the planet to the collaboration level for a test, and it works. i can travel between stars. Btw, nice planet picture  :D

copy the _radio folder to your episode folder, because until the starmap is altered, its not gonna work without it
Title: Re: Editing FAQ
Post by: Comhon on January 15, 2010, 09:55:33
It works, but always says: Error with the opening file.
Title: Re: Editing FAQ
Post by: smeagle on January 16, 2010, 05:08:33
yeah, i also get that error, i don know how to fixd that  :^^:
Title: Re: Editing FAQ
Post by: AA on January 16, 2010, 11:02:37
That's weird, I added the Sound Module file and it still crashed, yet when I removed the Radio module it worked, but two error messages were displayed. My bet is that the game is looking for sound files it cannot find.
Title: Re: Editing FAQ
Post by: Pie_Sniper on February 28, 2010, 08:00:26
Does anybody know what units Pause and Pause +Random in Planet.ini are in? Seconds would be too long and milliseconds would be too short. Tenths of a second maybe?
Title: Re: Editing FAQ
Post by: Nifflas on February 28, 2010, 13:59:02
Time units are in frames. The game runs at 60 frames per second.
Title: Re: Editing FAQ
Post by: Pie_Sniper on February 28, 2010, 19:53:56
Ah ha, thank you Nifflas.