distractionware forums

VVVVVV => VVVVVV Levels => Topic started by: Terry on July 26, 2011, 09:53:17 AM

Title: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 26, 2011, 09:53:17 AM
Part 2 of the tutorial is now available here! (http://distractionware.com/forum/index.php?topic=394.0) A scripting tutorial is still in the works, but in the meantime, check out increpare's post below, or PJBottomz's Scripting Tutorial level (http://distractionware.com/forum/index.php?topic=450.0).

This is a very short, simple tutorial to get you started making levels in the new VVVVVV level editor. I'll try to keep it as brief as I can. Later tutorials will cover entities and room settings in more detail, and how to use scripting!

(http://distractionware.com/blog/img/2011/07july/tut1_menu1.png)

Ok, first up, you can find the editor from the main menu. Select "PLAYER LEVELS"...

(http://distractionware.com/blog/img/2011/07july/tut1_menu2.png)

Then "LEVEL EDITOR".

(http://distractionware.com/blog/img/2011/07july/tut1_editor1.png)

Alright! When you've done that, you should see a screen like the one above. You can place tiles with the mouse, like so:

(http://distractionware.com/blog/img/2011/07july/tut1_editor2.png)

...but for shaping out a level properly, you'll need a bigger brush:

(http://distractionware.com/blog/img/2011/07july/tut1_editor3.png)

If you hold down the Z key, you'll draw with a 3x3 brush instead of a single tile brush. (Hold down the X key to use a 5x5 one.) You can also delete tiles by using RIGHT CLICK. (or Ctrl+Click on Mac)

(http://distractionware.com/blog/img/2011/07july/tut1_editor4.png)

Alright. Now, sketch out a quick room like the one above, with an exit to the right. By default, you start in a 5x5 world (you can see the room coordinates in the lower right corner). To move to a different room, just use the arrow keys!

(http://distractionware.com/blog/img/2011/07july/tut1_editor5.png)

From room (1,1), trying pressing right to go to room (2,1). You'll notice a white bar on the left hand side of the screen here - this indicates that there's a wall on this edge, useful for making sure you don't get any collision errors when you put the level together.

(http://distractionware.com/blog/img/2011/07july/tut1_editor6.png)

Ok, draw another room in here, like the one above (so that it has an exit to the left into the other room). We've got a basic level layout now, so let's put something in it!

(http://distractionware.com/blog/img/2011/07july/tut1_editor7.png)

If you press the space key, a little menu will pop up. This allows you to select the tool! Currently we're using the Walls tool, so let's move over to the checkpoint. You can change tools by pressing the < and > keys, or by pressing the shortcut key for that tool. (The numbers 1,2,3,4,5,6,7,8,9,0 are shortcuts for various tools, as are the top row letters R,T,Y,U,I,O,P).

Ok! Once you've placed a checkpoint (hide the space menu if you can't see the floor tiles), move back to the first room.

(http://distractionware.com/blog/img/2011/07july/tut1_editor8.png)

Here, we're going to place a Crewmate! That tool is on the second page of the space menu (or use the shortcut key "O").

This is a good time to mention that you can change the colour of the crewmate you placed by clicking them again! You can do this multiple click action with many entities, which will cycle through it's different variations.

(http://distractionware.com/blog/img/2011/07july/tut1_editor9.png)

Ok! Go back to room (2,1) and press ENTER. This will spawn you at the nearby checkpoint! You can just press ENTER again to return to the editor, or:

(http://distractionware.com/blog/img/2011/07july/tut1_editor10.png)

You can go rescue the crewmate! Yey :viridian:

(http://distractionware.com/blog/img/2011/07july/tut1_editor11.png)

Ok! Well, we've got a basic level working now, so to distribute it, we probably want to change it's settings. Press ESCAPE to go to the map settings menu. From here, select "CHANGE DESCRIPTION".

(http://distractionware.com/blog/img/2011/07july/tut1_editor12.png)

Enter whatever information you want here. This will help people identify your level in the play menu.

(http://distractionware.com/blog/img/2011/07july/tut1_save.png)

Ok, with that done, go back to the editor. To save your map, press SHIFT + S, and give it a filename. The extension is added automatically. (I'll talk more about the SHIFT menu options in the next tutorial.)

(http://distractionware.com/blog/img/2011/07july/tut1_editor13.png)

And that's it! We've made a basic level! From here, try experimenting with the different tools and see how you get on. The next tutorial will cover entities and room settings. The one after that will cover scripting.

Enjoy! To distribute your level for other people to play, go find the .VVVVVV file in your Documents folder. (On windows, that should be in My Documents/VVVVVV, on Mac it's Documents/VVVVVV, on Linux ~/.VVVVVV). You can play other people's levels by copying files into this directory.

Thanks for reading! Hope you have fun making levels! :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: SoulEye on July 26, 2011, 10:31:20 AM
I am Souleye and I approve of this message.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: increpare on July 26, 2011, 05:41:03 PM
Useful tips

shift+arrow keys resizes the world size

for the impatient, here's some scripting advice pasted from terry's twitter account:

I'll write a proper tutorial later, but here's a super quick guide to scripting in VVVVVV: Place a teminal or scriptbox and type a name...
That name is how you refer to the script. In the editor, you can modify what's in it. Here are a few simple commands:
This is how you make a terminal talk - the number that "say" takes as an argument is the number of lines - pastebin.com/1t393wK9
The "reply" command makes Viridian talk: pastebin.com/8CFehPDP
You can change expression with the "happy" and "sad" commands
music(songnum) will play a given song (same as the numbers in the menu), delay(frames) will wait for how many ever frames
Now, logic! "flag(1,on)", say, will turn flag number 1 on. "flag(6,off)" turns flag six off. There are 100 flags, or something like that.
"ifflag(5,scriptx)" will jump to the script named "scriptx" if flag 5 is set.
You can also do iftrinkets(t,script) to check that you've collected at least t trinkets! Or you can use iftrinketsless(t,script).
destroy(gravitylines) will get rid of all the gravitylines on a screen, while destroy(warptokens) gets rid of all the warp tokens.
You could totally use that to make gates that are unlocked with trinket keys, incidentally. If you were so inclined.
That's about it. Hoping to expand scripting in later patches, but there's enough there now to do some interesting stuff :)

Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: mint301 on July 26, 2011, 07:20:22 PM
Honestly I think the editor is self explanitory. Only issue I'm currently having is remembering to save before eziting out of the editor. Please add something which prompts you to save when you chose to exit!  ;)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheSHadowFog on July 27, 2011, 05:09:57 AM
Nice tutorial!  :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 27, 2011, 08:46:20 AM
Just a quick question, how do you delete scripts? I've deleted the box associated with them, but they won't disappear from the list.

EDIT: Aha, it's backspace, but I'll leave that here in case anyone else asks.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 27, 2011, 06:29:54 PM
Is there a way to check if a flag is off? It would help me make a script only activate once.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 27, 2011, 08:37:57 PM
I've found a weird glitch, whenever I write a music-changing script, it seems to shut off all the game's sound until I reset it.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: increpare on July 28, 2011, 03:12:08 AM
I've found a weird glitch, whenever I write a music-changing script, it seems to shut off all the game's sound until I reset it.
pressing m *anywhere* right now mutes the game.  try pressing m again.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 28, 2011, 04:59:32 AM
Ah okay, that makes sense. But why was a mute feature even implemented? The music is way too good  :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Gnome on July 28, 2011, 08:52:11 AM
It's incredibly easy to use. Even scripting makes quite a bit of sense!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: randomnine on July 28, 2011, 01:10:09 PM
Is there a way to check if a flag is off? It would help me make a script only activate once.

Here's how I'm doing scripts that only activate once.

At the start of the game, trigger a script which sets flag x to "on"

Put a trigger zone for the once-only script, hitting a very simple script called scriptconditional.

scriptconditional:
ifflag(x,script)

Set up the script itself separately.

script:
flag(x,off)
... (all the other script stuff)

The name of "script" has to be lowercase or the jump from ifflag() won't hit it. You also have to do it this way round, as when ifflag() triggers, it puts black borders around the screen which don't disappear until a say() or a reply() - so your script needs at least one of those in, too!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 01:26:44 PM
Haha, yikes! I'm sorry, the conditional stuff was added very last minute and not tested very well. Glad you were able to trick it into working, though. I promise it'll be easier in the next patch! :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: randomnine on July 28, 2011, 01:48:24 PM
Well, it's working well enough, just about :)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Buttons on July 28, 2011, 02:15:45 PM
Quick question: in the level editor, it seems that breakable platforms don't block moving ones as they do in Laboratory 2 (Prize for the Reckless, Exhaust Chute). Any particular reason for that?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 02:21:23 PM
Quick question: in the level editor, it seems that breakable platforms don't block moving ones as they do in Laboratory 2 (Prize for the Reckless, Exhaust Chute). Any particular reason for that?

Yeah - unfortunately, this isn't actually implemented in VVVVVV either, believe it or not - in the two places you see it happen, it's hardcoded in.

Basically, to make it work in the editor, I would have had to recode the way moving platforms work in VVVVVV, which I decided not to do as I didn't want to risk breaking any platform behaviour in for the relauch. At some point in the future I'll fix this, but for now I'm afraid it's just something you can't do :victoria:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: jamodawg97 on July 28, 2011, 02:55:07 PM
I have a bit of a problem.  I was drawing stuff, switched items, and now I can only draw in single dots.
Also, In the script thing, I cant do this:
say(2) \\ this would be guy one
bla
bla
reply(2) \\ this would be guy two
:)
:(
reply(2) \\ this is SUPPOSED to be guy one, but it shows guy two
..
..

Do I do say(2) again?

ALSOALSO!!!
I try doing the
happy
command, buy he is still sad. 

PS:  This game is awesome!  Thank you HIB!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 03:04:07 PM
Hmm, that's weird - can I see the exact script you wrote?

(You can access it by opening the level file with a text editor, by the way, it's all human readable XML. Scroll down to the bottom for the script!)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: jamodawg97 on July 28, 2011, 03:54:24 PM
I actually did figure out the script problem, but I didn't figure out the happy part. 
I still do need help though, at the end of my level I have a script, and right before it goes to the last line, the game crashes.
I would give it to you, but it crashed before I got a chance to save.  I will try recreating it. 

This is similar, but has the same problem:
Code: [Select]
<script>Captain Where are you:|say(2)|Captain! Where are you!|It is cold and scary here...|reply(2)|I just got down here!|I&apos;ll get to you somehow!|FIN:|say(1)|Captain!  I can&apos;t believe you made it!|reply(1)|Yeah, that was short...|say(3)|Well, to be fair, jamodawg97 didn&apos;t|know how to re-scale a map when he|started the level.|reply(2)|True.  You gotta admit he did a |decent job at a first attempt.|say(1) Not really.|</script>
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 03:56:31 PM
This bit at the end looks wrong:

|say(1) Not really.|

The "|" character is the separator, so it looks like you wrote all that on one line, which the editor can't handle! (that, or there's a bug, which is very possible). Anyway, it should be "say(1)" on the first line, and "Not really." on the second.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: jamodawg97 on July 28, 2011, 04:00:48 PM
I wrote them on seperate lines though...
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 04:02:52 PM
Sorry! The VVVVVV scripting editor is pretty buggy right now. It'll get better!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FawFuL on July 28, 2011, 06:11:55 PM
After I heard about the level editor, I decided to buy this game for myself  :viridian:

 expect some levels from me soon ^^

Is there a way to check if a flag is off? It would help me make a script only activate once.

Here's how I'm doing scripts that only activate once.

At the start of the game, trigger a script which sets flag x to "on"

Put a trigger zone for the once-only script, hitting a very simple script called scriptconditional.

scriptconditional:
ifflag(x,script)

Set up the script itself separately.

script:
flag(x,off)
... (all the other script stuff)

The name of "script" has to be lowercase or the jump from ifflag() won't hit it. You also have to do it this way round, as when ifflag() triggers, it puts black borders around the screen which don't disappear until a say() or a reply() - so your script needs at least one of those in, too!


But isn't it more simple to keep you from turning on flags in the beginning? Now, the following example sounds like the easiest and best way to script this to me:

Script1:
ifflag(1,script2)
Say(1)
Hello
Say(1)
I will activate something for you!
destroy(gravitylines)
Say(1)
Here you go!
flag(1,on)

Script2:
Say(1)
Sorry, you used this already.

Now it misses the redirection the first time because script 1 is off, at the end of the script it gets turned on so the next time you read it, you will see script 2. It's also easier to see script1 as main script than script2 I guess.  :viridian:

Also, question.. If you use Iftrinketsless(1,scriptname), shouldn't it go to 'scriptname' if you have 0 or 1 trinket(s)? Iftrinkets(2,scriptname) works if you get 2 trinkets, but Iftrinketsless doesn't seem to work for me.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheoX on July 28, 2011, 06:48:32 PM
this scripting stuff is a bit confusing.  I understand the say and reply but that's about it. 

I hope someone makes a scripting thread.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 06:55:02 PM
Sorry, I was hoping to get the second tutorial out today, but I've had my hands full with the save converter  :victoria: Will try to catch up tomorrow!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: I am Ry on July 28, 2011, 07:03:53 PM
This made me join the forum. c: Messing with it now. Also, hi, everyone!

On topic: Quick question, is there a way to give each room it's own title like in the game?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheoX on July 28, 2011, 07:08:23 PM
Sorry, I was hoping to get the second tutorial out today, but I've had my hands full with the save converter  :victoria: Will try to catch up tomorrow!

That's OK take your time!  Someone else might make a thread too, who knows.  Some people get good at this sort of thing quickly.

This made me join the forum. c: Messing with it now. Also, hi, everyone!

On topic: Quick question, is there a way to give each room it's own title like in the game?

Yeah one of the tools is room name I believe, you just click somewhere and type in a name.  It actually doesn't have to be at the bottom of the screen, it can be anywhere.

EDIT: What I want is to be able to put in my own music and/or enemy sprites.  Or if that's unfeasible, at least have access to more enemies.  That way I can put in cloud puffers :D 
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: I am Ry on July 28, 2011, 07:17:23 PM
Quote from: TheoX
Yeah one of the tools is room name I believe, you just click somewhere and type in a name.  It actually doesn't have to be at the bottom of the screen, it can be anywhere.
Is that how it works? I put text in and when I tested, it showed up exactly where I put it in the editor. Also, it allows you to place more than one, so I'm not sure if that works :victoria:

EDIT: What I want is to be able to put in my own music and/or enemy sprites.  Or if that's unfeasible, at least have access to more enemies.  That way I can put in cloud puffers :D 
This!  :vitellary:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Terry on July 28, 2011, 07:18:20 PM
"Room Names" and "Room Text" are slightly different things :) Room text can be placed anywhere, but to get classic VVVVVV style room names, they're a room property in the SHIFT menu. Press Shift+R to change it!

You can change the music in the settings music (press ESC), though not custom music (yet). Also, you can change the enemies by pressing Shift+3! (Custom enemies unfortunately aren't in this version, though.)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: I am Ry on July 28, 2011, 07:34:45 PM
Haha, I actually, just found it but thank you!  :)

(I actually rather like the room text idea as well)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheoX on July 28, 2011, 08:59:45 PM
Thanks for the tips Terry!  Seems like the shift button is pretty important!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on July 28, 2011, 11:42:54 PM
How do you change the level size? I want to turn my 5x5 level ~10x10ways.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: PastorOfMuppets on July 29, 2011, 12:12:13 AM
Quick question: Is there any way to make crewmate-specific lines, like there are in the actual game? For example, if I wanted Vermillion to say something like "Hey, Captain!", could I get it to show up in his color, rather than the grey that the say command gives you?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Habstinat on July 29, 2011, 05:46:23 AM
Quick question: Is there any way to make crewmate-specific lines, like there are in the actual game? For example, if I wanted Vermillion to say something like "Hey, Captain!", could I get it to show up in his color, rather than the grey that the say command gives you?
There aren't any (documented) ways to do this as of yet that I'm aware of.
How do you change the level size? I want to turn my 5x5 level ~10x10ways.
Hold Shift and use the arrow keys.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on July 29, 2011, 06:11:27 AM
Thanks a lot!  :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: SirBryghtside on July 29, 2011, 07:07:48 AM
I'm halfway through doing a level, but so far haven't found any 'finalise' option - as in, making it an actual level (like the options on 'play a level) rather than a testing bit on the editor.

Help?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on July 29, 2011, 07:22:13 AM
I'm halfway through doing a level, but so far haven't found any 'finalise' option - as in, making it an actual level (like the options on 'play a level) rather than a testing bit on the editor.

Help?

Shift + S, save it as whatever. It'll appear in the play levels part. (Make sure to add a name and description, or it'll look weird!)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FawFuL on July 29, 2011, 07:42:47 AM
I'd still like to know this before it gets forgotten:

Also, question.. If you use Iftrinketsless(1,scriptname), shouldn't it go to 'scriptname' if you have 0 or 1 trinket(s)? Iftrinkets(2,scriptname) works if you get 2 trinkets, but Iftrinketsless doesn't seem to work for me.

Also, is there a possibility to move around during a script, like during a delay? If not, i hope this feature will be there in the future  :victoria:

You see, this is ideal for making a gravitron with the following script:

Delay(600)
Destroy(gravitylines)

If you would put 2 gravity lines, and a script box field between, this would almost be the same as the real gravitron in the story. Except for the timer.. oh well, maybe a timer during a delay is some cool feature for the future aswell  :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: SirBryghtside on July 29, 2011, 09:09:28 AM
I'm halfway through doing a level, but so far haven't found any 'finalise' option - as in, making it an actual level (like the options on 'play a level) rather than a testing bit on the editor.

Help?

Shift + S, save it as whatever. It'll appear in the play levels part. (Make sure to add a name and description, or it'll look weird!)
Thanks, I must've missed it somehow   :)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 29, 2011, 12:14:58 PM
As someone suggested earlier, I made a script like this:

ifflag(1, ignore)
flag(1,on)
*speech stuff*

and ignore was just an empty script. going there the second time made the game put the black on the top and bottom as if taking was about to start, and putting delay(1) in ignore did the same thing. Instead for now I just made Viridian think about how you shouldn't be there.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FCreature on July 29, 2011, 03:07:41 PM
I don't know if this is where I can report editor bugs but;

I made a script that looked like this

say(2)
Blurg blurg blurg blurg blurg
blurg blurge?
reply(3)
Blurg blurge! blurge blurge
blurge blurge blurge blurge
blurge blurge blurge!

but, then I went in game to test it and when I pressed space to get the reply, the game crashed and I lost all my progress :(
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Ice on July 29, 2011, 03:10:56 PM
I don't know if this is where I can report editor bugs but;

I made a script that looked like this

say(2)
Blurg blurg blurg blurg blurg
blurg blurge?
reply(3)
Blurg blurge! blurge blurge
blurge blurge blurge blurge
blurge blurge blurge!

but, then I went in game to test it and when I pressed space to get the reply, the game crashed and I lost all my progress :(
Something like this had happened to me when I was trying to make the script in my last post, but I tried it again to see if it was re-creatable and it worked fine. I kind of just assumed that I typed it wrong the first time.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on July 29, 2011, 11:31:58 PM
I always put an 'end' at the end of my scripts, ever since I started I've hardly had any script crashes at all, if any.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Blublu on August 02, 2011, 07:52:01 PM
Is there any way or workaround to make a script run more than once without exiting the screen? It seems like it only runs once, then it won't run again until you exit and re-enter the screen.  :(
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: YouKnow on August 03, 2011, 04:23:25 AM
I can think of a way that involves many flags and many different scripts, although it would have a limitation on where you can place the mess in physical space.

It's probably better to wait for Terry to implement something like that if he ever will.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Blublu on August 03, 2011, 09:34:35 PM
Yeah, that's what I figured. I'll have to design around that. :P
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on September 14, 2011, 07:23:37 AM
HEY! I need help.

I'm working on a level where the difficulty is decided by a trinket... The enchanced testing program.

Anyway, here's the script.

iftrinketsless(1,destroywarp)
end

------

So if you have less than 1 trinket, the warp is destroyed and you get an easy way...

now, destroywarp script is this:

destroy(warptokens)
flash

... what am i doing wrong?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: PJBottomz on September 14, 2011, 01:03:50 PM
You put "iftrinketsless" - if you want it to activate when you have 1 trinket, put:

Code: [Select]
iftrinkets(1,destroywarp)
end

Also, "destroywarp" should look like this:

Code: [Select]
flash
destroy(warptokens)
end
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on September 14, 2011, 06:21:27 PM
You put "iftrinketsless" - if you want it to activate when you have 1 trinket, put:

Code: [Select]
iftrinkets(1,destroywarp)
end

Also, "destroywarp" should look like this:

Code: [Select]
flash
destroy(warptokens)
end

Exactly, I want the warp to be destroyed if you have no trinkets at all - the trinket triggers a difficulty mode.

I'll try rearranging flash and destroy though...
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: PJBottomz on September 14, 2011, 06:25:20 PM
Hmm, that's peculiar...

I'll run my own test of it, and post the results.

EDIT: Okay, I ran my own test of it, and it had the same results: nothing. I guess iftrinketsless is broken or something. :-/ The only option seems to be to use the basic route - use iftrinkets.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Insani on September 14, 2011, 07:16:10 PM
Hmm, that's peculiar...

I'll run my own test of it, and post the results.

EDIT: Okay, I ran my own test of it, and it had the same results: nothing. I guess iftrinketsless is broken or something. :-/ The only option seems to be to use the basic route - use iftrinkets.

Damn... I suppose I could change the trinket to an 'easy mode' option.

EDIT:

http://filesmelt.com/dl/SOOPAVV.vvvvvv

VVVVVVMAN is the best command in the game.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: darkhog on December 27, 2011, 12:12:23 PM
Is there a way to check if a flag is off? It would help me make a script only activate once.

Here's how I'm doing scripts that only activate once.

At the start of the game, trigger a script which sets flag x to "on"

Put a trigger zone for the once-only script, hitting a very simple script called scriptconditional.

scriptconditional:
ifflag(x,script)

Set up the script itself separately.

script:
flag(x,off)
... (all the other script stuff)

The name of "script" has to be lowercase or the jump from ifflag() won't hit it. You also have to do it this way round, as when ifflag() triggers, it puts black borders around the screen which don't disappear until a say() or a reply() - so your script needs at least one of those in, too!

I've actually came upon even simpler solution for playing scripts one time than this:
Code: [Select]
ifflag(x,stop)
(proper script)
flag(x,on)

"stop" is dummy, empty script (you can name it as you like, but it's most intuitive) and x must be same in first and last flag command for obvious reasons.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: spadler097 on March 18, 2012, 02:43:29 AM
Hi, I am a beginner of scripting. And I currently encounter some scripting problems: :victoria:

1. I don't understand the term "flag" in the tutorials. I mean, what will it do?
2. What does the "x" means in the command flag(x,on)?
3. Can I "see" a flag?
4. Can I make a specific crew member to talk if there is more than one crew member in a room?

I hope my questions will not be too difficult to answer. :verdigris:

(Sorry for the bad English, if there is any) :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FIQ on April 13, 2012, 08:23:21 AM
Hi, I am a beginner of scripting. And I currently encounter some scripting problems: :victoria:

1. I don't understand the term "flag" in the tutorials. I mean, what will it do?
2. What does the "x" means in the command flag(x,on)?
3. Can I "see" a flag?
4. Can I make a specific crew member to talk if there is more than one crew member in a room?

I hope my questions will not be too difficult to answer. :verdigris:

(Sorry for the bad English, if there is any) :viridian:

1: Flags is essential to any game/level with some kind of progressing in terms of script - you can use them to make a script only run once, make so a certain flag must be on to do something, and so on.
For example, you can make 2 (or rather 3) scripts like this:

script1
flag(1,on)
say(1)
You've executed this script! Now, you'll have access to script 2 properly!

script2
ifflag(1,script3)
say(2)
Access denied.
You have to execute script1 for this to work!

script3
say(1)
Access granted!


I'm bad at describing things, tell me if you didn't understand!

-----

2: x means anything. In this case, a number. x is to mark that you can type whatever you want in here.
For example: "say(x)" - you type in whatever you want instead of x (in this case a number between 1 and 5, (and in the 2.1 beta, 1 and 11).


3: You can check if a flag is on by ifflag(x,runscript) (runscript is another script, x is the flag number), if this was what you meant?

4: In the 2.1 beta (you can find this in the VVVVVV Technical Discussion forum), you can use say(x,crewmate name). This will make the text appear in the color equal to crewmate name. For example:

say(1,vitellary)
Hi, Vitellary here.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Hilbert on July 14, 2012, 07:02:26 AM
Terry
When I opened the editor after editing and closing a Level, the passion for exploring music played.
It only stopped after I closed the game. Help...?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: blue626 on July 14, 2012, 08:17:40 AM
I think that was already mentioned: Music in the level editor (http://distractionware.com/forum/index.php?topic=871.0)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheJonyMyster on June 23, 2013, 07:11:06 PM
Sorry for... "bumping" but on Mac you don't need to ctrl click for right click. It has nothing to do with the OS, just the mouse you're using.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Dav999 on June 23, 2013, 11:45:12 PM
Sorry for... "bumping" but on Mac you don't need to ctrl click for right click. It has nothing to do with the OS, just the mouse you're using.

On trackpads, you can also click with two fingers; that's how I right click every time.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: TheJonyMyster on June 26, 2013, 07:34:36 AM
I have a trackpad, and I can right click normally.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: weee50 on June 30, 2013, 03:06:20 PM
pressing m *anywhere* right now mutes the game.  try pressing m again.
Maybe 2.2 should fix that.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: crazya on June 30, 2013, 03:24:01 PM
pressing m *anywhere* right now mutes the game.  try pressing m again.
Maybe 2.2 should fix that.

Except that it looks like 2.2 will not be a thing.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Dav999 on June 30, 2013, 03:25:36 PM
pressing m *anywhere* right now mutes the game.  try pressing m again.
Maybe 2.2 should fix that.

Actually, 2.1 already turns that option off if you're in the script editor. Typing a word in a script which contains the letter M already turned music off, for example.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: weee50 on June 30, 2013, 03:37:17 PM
Quick question: in the level editor, it seems that breakable platforms don't block moving ones as they do in Laboratory 2 (Prize for the Reckless, Exhaust Chute). Any particular reason for that?
You mean Space Station 2. There is no lab 2 for 10427859437589347598345345 times!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Mathias70770 on July 30, 2014, 10:50:47 AM
Can anyone tell me how to make a polar dimension?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: crazya on July 30, 2014, 12:21:25 PM
Can anyone tell me how to make a polar dimension?
First, make sure the room you want to be polar-dimension style is using the Warp Zone tileset. Open your level file (*.vvvvvv) with a text editor. Scroll down until you find text that looks something like this:

Code: [Select]
            <edLevelClass tileset="3" tilecol="X" platx1="_" platy1="_" platx2="_" platy2="_" platv="4" enemyx1="_" enemyy1="_" enemyx2="_" enemyy2="_" enemytype="_" warpdir="_">Y</edLevelClass>
What "_" is depends on the room. "X" is what you want to change.
Make sure that Y is the same as the name of your room! If it isn't, you're editing the wrong room. Each edLevelClass line represents the data for a room in your level.

Change X (whatever it is) to 6. If your room has no name, give it a temporary one so you can find it. Using the Find feature with your roomname as the text will make things quicker.

Repeat this for all the rooms in the polar dimension.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: SJMistery on November 04, 2015, 12:54:39 AM
What exactly happens if you do not use the warp zone tileset and change the colour name to 6+? and with the WZ tiles colour 7+?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: crazya on November 04, 2015, 06:50:28 AM
What exactly happens if you do not use the warp zone tileset and change the colour name to 6+? and with the WZ tiles colour 7+?
It starts using tiles outside of the intended tileset and looks really buggy.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: -Kiwi Alexia ♡ on November 06, 2015, 03:36:52 PM
What exactly happens if you do not use the warp zone tileset and change the colour name to 6+? and with the WZ tiles colour 7+?
Lab tileset with colour to 6 makes the rainbow background. You just MIGHT want to be in direct mode for placing blocks though... Unless you want the tileset with the diamond enemy as the floor.
RIP ENGLISH
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: lol...ipops2 on November 07, 2015, 08:00:16 AM
I'd still like to know this before it gets forgotten:

Also, question.. If you use Iftrinketsless(1,scriptname), shouldn't it go to 'scriptname' if you have 0 or 1 trinket(s)? Iftrinkets(2,scriptname) works if you get 2 trinkets, but Iftrinketsless doesn't seem to work for me.

Also, is there a possibility to move around during a script, like during a delay? If not, i hope this feature will be there in the future  :victoria:

You see, this is ideal for making a gravitron with the following script:

Delay(600)
Destroy(gravitylines)

If you would put 2 gravity lines, and a script box field between, this would almost be the same as the real gravitron in the story. Except for the timer.. oh well, maybe a timer during a delay is some cool feature for the future aswell  :viridian:

Bump? Just use internal scripting
Code: [Select]
say(-1)
text(1,0,0,4)
say(2)
gamestate(10)
text(1,0,0,4)
endtext
endcutscene()
loadscript(stop)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on November 07, 2015, 08:16:01 AM
INTERNAL SCRIPTING WASN'T EVEN DISCOVERED THEN.
STOP BUMPING TOPICS TO CORRECT PEOPLE THAT DIDN'T EVEN HAVE THE SAME TOOLS AS YOU BY TELLING THEM TO USE THOSE TOOLS.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: That Souleye Crewmate on November 07, 2015, 08:17:41 AM
I'd still like to know this before it gets forgotten:

Also, question.. If you use Iftrinketsless(1,scriptname), shouldn't it go to 'scriptname' if you have 0 or 1 trinket(s)? Iftrinkets(2,scriptname) works if you get 2 trinkets, but Iftrinketsless doesn't seem to work for me.

Also, is there a possibility to move around during a script, like during a delay? If not, i hope this feature will be there in the future  :victoria:

You see, this is ideal for making a gravitron with the following script:

Delay(600)
Destroy(gravitylines)

If you would put 2 gravity lines, and a script box field between, this would almost be the same as the real gravitron in the story. Except for the timer.. oh well, maybe a timer during a delay is some cool feature for the future aswell  :viridian:

Bump? Just use internal scripting
Code: [Select]
say(-1)
text(1,0,0,4)
say(2)
gamestate(10)
text(1,0,0,4)
endtext
endcutscene()
loadscript(stop)
Are you insane?
Are you really...
I can't take this shit anymore. I CANNOT.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: @Kreator on November 07, 2015, 09:57:26 AM
pass the bleach please
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: That Souleye Crewmate on November 07, 2015, 10:36:54 AM
i also like the "bump?"
the question mark does it.
cause it's a bump after 4 years!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FIQ on April 20, 2016, 11:56:07 PM
INTERNAL SCRIPTING WASN'T EVEN DISCOVERED THEN.
STOP BUMPING TOPICS TO CORRECT PEOPLE THAT DIDN'T EVEN HAVE THE SAME TOOLS AS YOU BY TELLING THEM TO USE THOSE TOOLS.
Actually, it was.
But nobody used it since Terry fixed that bug in 2.1 (The one Stalefish used to get colored textboxes in 2.0 is essentially just another internal scripting exploit, and the first (public) one of its kind).

Also, it's hardly a bump when the thread is stickied. But yes, suggesting someone to use something 4 years later is not likely to help.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on April 21, 2016, 03:48:06 PM
just let us be angry in peace ok
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: VVVVVVGamer03 on September 28, 2016, 02:34:37 AM
You should make destroy(scriptbox) valid so that you don't have to waste flags if you don't want a script to repeat.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: QwertymanO07 on September 28, 2016, 06:46:26 PM
You still need a flag to keep destroyed items destroyed.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: VVVVVVGamer03 on September 29, 2016, 01:46:33 AM
You still need a flag to keep destroyed items destroyed.
Whoops didn't think of that  ::)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Duckman50001 on September 30, 2016, 08:05:13 PM
You still need a flag to keep destroyed items destroyed.
Whoops didn't think of that  ::)

Then Terry needs to make a "foreverdestroy(gravitylines/warptokens/platforms/scriptboxes)
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on September 30, 2016, 10:43:12 PM
...can't you just use flags like everyone else

actually that'd be kind of cool because literally every single level has some problem with the script limit or flag limit
I can't imagine how terry was able to make the main game with these limitations
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Dav999 on October 01, 2016, 01:01:21 AM
The main game simply doesn't have that many cutscenes.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: FIQ on October 13, 2016, 03:56:28 PM
And besides, you can easily "extend" the amount of available flags by relying on more than 1 to deactivate a script.

Let's say you've used up 90 of the flags in a level for script stuff.
If at one point you are certain that a player has to have done all these 90 things, at that point you can activate a 91th flag.
Then you can reuse the 90 other flags for more things, as long as each script also checks 91.
Simple.

And besides, what kind of level would use up all flags anyway? My own level ended up using up 16 flags for teleport history (to make cheats work), 4 flags for teleport system to work, 10 flags for various temporary purposes and to disable and/or override teleporter scripts (basically equavilent to the in-game loadteleportscript function), 16 for teleport unlockings, 8 for jukebox purposes, and 10ish (slightly less I think) for power sources and game progression in general. There's still over a third of the flags left, and I could still have optimized away quite a lot of these. Dimension Open can get away with using around 40 flags at most, it has less teleporter destinations, and while having more cutscenes, it's far more linear.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: SJMistery on December 06, 2016, 09:49:11 AM
OOOR, you could simply make a script resetting the flags on certain points so you can re-use them... What about storing the flags 90-99 to do this:

Lets say you have many sections, we will call them A,B,C,D and E, I know, lame names, I feel lazy.

You want X events to activate on section A when you replay it, and Y events on B, etc.

Simple: after you end stage A, there is a script that enables one of the flags between 90-99 and disables every single other flag below the ones choosen as chapter resets. 95-99 will do it in our example

If you go back to A, a script activated by flag 95 will re-activate every relevant flag to the section A.
If you go to B, similarly, the flags for a replay will be set on at the start by a script related to flag 96. Again, leaving will trigger a script that will disable every flag and enable 96.

This way you can have a practically unlimited amount of flag-related scripts. And if you somehow run out of space, use a binary-like code with the flags so you have 2^N resets, N being the number of flags you save for the resetting script.
Title: Script request
Post by: Valso22 on January 15, 2017, 03:10:07 PM
Hey terry i have a script request, its "warp" it warps you to a room, heres an example [warp(3,5)] It places in the middle of that room an virdian (but without a little of brightness) that you can move it with the cursor
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: QwertymanO07 on January 15, 2017, 03:14:49 PM
This already exists in the game as gotoroom(x,y), where it teleports the player without any effects to the room coordinates, but starting at 0.  It requires making an internal script, however, and places the player at the same place on the screen that they teleported from.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on January 15, 2017, 05:01:11 PM
This already exists in the game as gotoroom(x,y), where it teleports the player without any effects to the room coordinates, but starting at 0.  It requires making an internal script, however, and places the player at the same place on the screen that they teleported from.
if combined with gotoposition(x,y,n), you can place the player anywhere in the room.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Valso22 on January 15, 2017, 09:17:03 PM
Quick question: Is there any way to make crewmate-specific lines, like there are in the actual game? For example, if I wanted Vermillion to say something like "Hey, Captain!", could I get it to show up in his color, rather than the grey that the say command gives you?
There aren't any (documented) ways to do this as of yet that I'm aware of.
How do you change the level size? I want to turn my 5x5 level ~10x10ways.
Hold Shift and use the arrow keys.
Umm the first question i answer me. Ok type a command called "say(<lines>,<crewmate color>).
If you dont put the number of lines, the game would crash

Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Valso22 on January 15, 2017, 09:30:05 PM
How i can make an npc move OR the player control the npc?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: QwertymanO07 on January 15, 2017, 09:55:08 PM
Umm the first question i answer me. Ok type a command called "say(<lines>,<crewmate color>).
If you dont put the number of lines, the game would crash
This was posted long before an update added crewmate colored textboxes.  As a general rule, if someone says something in VVVVVV is impossible that clearly isn't, chances are they were using an older version, so replying to their post will not help anything.

How i can make an npc move
First, you need to use a technique called "Internal Scripting"; you can find the details here (http://distractionware.com/forum/index.php?topic=1089.0) (though note that you can make the say() blocks up to 50).  From there, you can use the createcrewmate() command to create an NPC, then use the changeai() command to set their ai to something like "followposition,12" to make them walk near position 12 (though obviously you could use any number).
OR the player control the npc?
"NPC" is short for "non-player character", so they simply wouldn't be an NPC if the player controlled them.  If you mean making the player into someone other than Viridian, you're looking for another internal command called changeplayercolour(), though that resets upon death.
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: Valso22 on January 16, 2017, 12:26:42 PM


"NPC" is short for "non-player character", so they simply wouldn't be an NPC if the player controlled them.  If you mean making the player into someone other than Viridian, you're looking for another internal command called changeplayercolour(), though that resets upon death.

so like changeplayercolour(#FFAAAA)?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on January 16, 2017, 02:17:11 PM
no you cant use hex

it'd be changeplayercolour(green)
you can use these color options:
player
green
red
yellow
purple
blue
teleporter
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: QwertymanO07 on January 16, 2017, 03:38:07 PM
player
Is it player?  It thought it was cyan.  Do they both work?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: shiny k on January 16, 2017, 03:39:50 PM
i think player works too
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: mrytp on March 27, 2017, 08:52:17 AM
no you cant use hex

it'd be changeplayercolour(green)
you can use these color options:
player
green
red
yellow
purple
blue
teleporter

What colour is teleporter?
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: lol...ipops2 on March 27, 2017, 09:22:56 AM
no you cant use hex

it'd be changeplayercolour(green)
you can use these colour options:
player
green
red
yellow
purple
blue
teleporter

What colour is teleporter?
IT'S FLASHY RAINBOW AWESOMNESS GET YOURS TODAY!
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: nPOW11 on June 11, 2017, 02:31:40 PM
Terry, Could you make it so we can use other enemies? (Not just 4x4) Thanks! :viridian:
Title: Re: VVVVVV Level Editor Tutorial - Part 1: The basics
Post by: -Kiwi Alexia ♡ on June 11, 2017, 03:23:57 PM
The game is no longer being updated.




yo terry lemme make the next ver i need pdelay