Nifflas' Support Forum

Level Editing Support => Knytt Stories Level Editing Support => Topic started by: pumpkin on January 21, 2010, 01:17:35

Title: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 21, 2010, 01:17:35
I can make my own objects quite easily, (most are not animated) but when i place them they don't show up at all! (i use old school windows xp paint to make them, for i am poor)
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 21, 2010, 01:19:34
Nice try. You can't make your own objects by simply adding them to the data folder. If you want stationary drawings to appear, use custom objects. (http://nifflas.lpchip.nl/index.php?topic=31.0)
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 21, 2010, 01:23:07
i've done just that though!!
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: minmay on January 21, 2010, 02:41:29
Well, assuming the images are in PNG format and in the Custom Objects folder, you also need to add lines to World.ini.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 21, 2010, 03:28:33
Namely, name, init animspeed, and init animto.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 21, 2010, 04:37:09
not so long ago i made a small question mark block (like in super mario bros.) and a mushroom without writing any lines, and both worked, could it have been because i was using version 1.0.4?
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 21, 2010, 05:33:51
It might have been because you weren't using v1.0.4. The COs didn't show up until 1.2
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 21, 2010, 18:35:58
could be, thanks I'll check which version I'm using.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Evil on January 21, 2010, 23:07:03
youll also have to go to bank number 255 and place the square to the screen to make it appear sometimes

(sorry, I made that mistake back when I had ks :( )
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Pumpkinbot on January 22, 2010, 05:30:36
You gotta have the newest version of KS (don't know, offhand, but I thnk it's x.x.12, or something like that). Also, you have to put things in the .ini file. There's tutorials everywhere on this site.

Also, THERE CAN ONLY BE ONE HIGHLANDER PUMPKIN!
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 22, 2010, 06:17:52
haha i am pumpkin! not some pumpkindroid or android. I'm the real deal! scythes and all! (lol) i'm retarded where exactly is the .ini file?
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Pumpkinbot on January 22, 2010, 07:03:06
haha i am pumpkin! not some pumpkindroid or android. I'm the real deal! scythes and all! (lol) i'm retarded where exactly is the .ini file?
.../Knytt Stories/Worlds/Your Level - Your Name/World.ini :P
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 22, 2010, 23:03:25
Or, in the editor, Menu bar > Level > Settings
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 23, 2010, 23:46:41
any tips on how to use paint or is it even possible? Actually I know its possible i just dont remember exactly how i did it when i got it right. :huh:
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Exp HP on January 24, 2010, 03:07:48
Custom objects can be made in Paint.  I do it all the time.  Some tips:



If it is still not showing up in the game, please attach World.ini and one of your images to a post here so we can see what you're doing and tell you what you need to do to get it to work.


Again, making animated Custom Objects in Paint is relatively easy to mess up in part due to frame sizes.  If you Here's the best way to do it, IMO:
Paint is a limited program, so I recommend you consider learning how to use other free image editing tools, such as GIMP (http://www.gimp.org/).  Not only do such programs make it easy to do complicated tasks like blurring and recoloring, but many also let you use layers.  Also, you get to use real transparency - not KS's confusing transparent black.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 24, 2010, 06:06:48
dumb question: How do you edit the code for co's? 
PS thanks to all of you for helping a newb
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Exp HP on January 24, 2010, 06:58:19
You write it from scratch in World.ini.  You can put it anywhere in there as long as it's not right in the middle of an existing group.

Make your own group starting with "[Custom Object 1]" or whatever number you want (as long as it's >0 and <256) and define the variables there.  The ones you should know about:
Image=           (the name of the image, like Bottle.PNG)
Init AnimTo=     (the number of the last frame. Note that the first frame is frame 0.)
Tile Width=      (width of a frame in pixels)
Tile Height=     (height of a frame in pixels)
Init AnimSpeed=  (Higher numbers for faster speeds.)
Init AnimRepeat= (0 for infinite looping. Any other number to loop that many times.)

If you're asking how to program COs to do special stuff:  Haha, we wish.
Unfortunately, a CO is an animated graphic, and nothing more.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 24, 2010, 20:48:19
BLARGH, cough cough (http://nifflas.lpchip.nl/index.php?topic=2458.0)
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 24, 2010, 20:53:30
So what type of file should the code be? Where exactly can I write it from?
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Purple Pineapple on January 24, 2010, 20:54:26
.../Knytt Stories/Worlds/Your Level - Your Name/World.ini :P
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: Exp HP on January 24, 2010, 21:00:03
The file (world.ini) already exists.  And its location has been stated many many times.  You are just adding to that file.

And don't worry if you can't find it; there's a shortcut to reaching it.
If, in the Level Editor, you go to Level>Settings like previously stated, it will automatically open world.ini in your default text editor (most likely Notepad if you have Windows).

So let me list all the steps:
-Open your level in the KS level editor.
-Click on Level, then Settings
-In the document that opens, find a good, empty spot to add your code.
  -The first line of your code is "[Custom Object 1]" (or any number that isn't 0 and that is under 256)
  -The other line you absolutely must have is "Image=NAMEOFIMAGE.png".  Make this be the second line.
  -The rest of the code has been explained a couple of times already. (In my post here (http://nifflas.lpchip.nl/index.php?topic=2587.msg29897#msg29897) and in the guide Purple Pineapple linked to (http://thaiwonders.com/design/index.php?option=com_content&task=view&id=78&Itemid=211))
-Save and close.
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 24, 2010, 21:02:41
Well alright, thats about all questions answered!! (that i cant answer myself!) X-P
Title: Re: The Level Editor lets me place objects, but are invisible during gameplay!
Post by: pumpkin on January 25, 2010, 05:00:54
I've given up on the object that all this trouble was for, and now I'm just making a level full of British people floating around on umbrellas. :nuts: Look for it in a few weeks.