Author Topic: Internal Scripting!  (Read 55 times)

TmanDaCool1

  • Administrator
  • Member
  • *
  • Posts: 19
  • Profile-Score: +65535/-0
  • wew lad
    • View Profile
Re: Internal Scripting!
« on: January 22, 2015, 11:26:59 pm »
Quote from: Dav999
Another method for internal scripting:
Code: (scriptone) [Select]
iftrinkets(0,scripttwo)
(blank line)
Code: (scripttwo) [Select]
#
A)Say
<internal>
(blank line)
you can also write this:
Code: (scripttwo) [Select]
<internal>
(blank line)
This makes sure there's no terminal sound, and no cutscene bars.
You can use multiple simplified commands, and on the last two lines you write 'A)Say' and the internal command you want to use. Strangely enough, the internal command will always run first, then the simplified commands. You have to run the script from another script (with iftrinkets(0,asayscript)), and there should be exactly one empty line at the end of the script, not 0, because your internal command will be deleted, and also not 2, because then it doesn't work for some reason. If you don't want to use simplified commands, you can write # on the first line, or something similar.
Quote from: FIQ
Keep in mind that you CAN run multiple internal commands with the method, but you're limited to one line per script.
Code: (showtrinkets) [Select]
iftrinkets(0,showtrinkets1)
(blank line)
Code: (showtrinkets1) [Select]
iftrinkets(1,showtrinkets2)
A)Say
<internal>
(blank line)
Code: (showtrinkets2) [Select]
iftrinkets(1,showtrinkets3)
A)Say
<internal>
(blank line)
(…)
Quote from: FIQ
Entities is posted below. "Metadata" shows one, possibly two (which should be used in the specified order then) extra setting you can use. All are numbers, but you'll have to experiment what different numbers do. Modified by earlier list posted by ToasterApocalypse.
Code: [Select]
createentity(x,y,n,meta,meta)

x,y=coordinates
n=the number of the entity

0 - The player

1 - Enemy
Metadata: movement type, movement speed
Due to lacking needed data, you will only ever get a purple enemy box, unless you're in the VVVVVV polar dimension while doing the command

2 - Moving platform
Metadata: movement type, movement speed
Note that conveyors is implemented as moving platforms, see movement type 8 and 9.

3 - A disappearing platform

4 - A 1x1 quicker quicksand block

5 - A flipped Viridian, you will flip gravity when touched

6 - Weird red flashy thingy that disappears quickly

7 - Same as above, but doesn't flash and is coloured cyan

8 - A coin from the prototype
Metadata: Coin ID

9 - Trinket
Metadata: Trinket ID
Note that trinket ID start at 0, and everything above 19 will not be saved in the savefile once you restart the level

10 - Checkpoint
Metadata: Checkpoint state (0=flipped, 1=normal), Checkpoint ID (checks if the checkpoint is active or not)

11 - Horisontal gravity line
Metadata: Length in pixels

12 - Vertical gravity line
Metadata: Length in pixels

13 - Warp token
Metadata: Destination in tiles X axis, destination in tiles Y axis

14 - The round teleporter
Metadata: Checkpoint ID(?)

15 - Verdigris
Metadata: AI state

16 - Vitellary (flipped)
Metadata: AI state

17 - Victoria
Metadata: AI state

18 - Crewmate
Metadata: Colour (using raw color list, not the crewmate colors), mood

19 - Vermilion
Metadata: AI state

20 - Terminal
Metadata: Sprite, Script ID(?)

21 - Same as above but when touched the terminal doesn't light up
Metadata: Sprite, Script ID(?)

22 - Collected trinket
Metadata: Trinket ID

23 - Gravitron square
Metadata: Direction
If you input negative X coordinate (or too high), an arrow shows instead, just like in the real Gravitron

24 - Intermission 1 crewmate
Metadata: Raw color, mood
Doesn't seem to be affected by hazards, but should be. I'll have to look into this one

25 - Trophy
Metadata: Challenge identifier, sprite
If the challenge is completed, the base sprite ID (what you get if you use sprite=0) will change. Only use 0 or 1 if you want predictable results (0=normal, 1=flipped)

26: The warp token to the Secret Lab
Keep in mind that the warp is just implemented as a nice looking sprite. You'll have to script the functionality for yourself

55 - Rescueable crewmate
Metadata: Crewmate color. Color >6 will always show a *happy* Viridian

56 - Custom level enemy
Metadata: Movement type, movement speed
Keep in mind that if there's no enemies in the room, the enemy sprite data isn't updated correctly and it will just show what enemy you saw last time, or a square enemy

Undefined entities (27-50, 57+) give glitchy Viridians.
Quote from: Doormat
List of colors for createentity() crewmates:
Code: [Select]
0: Cyan
1: Flashy red (used for death)
2: Dark orange
3: Trinket color
4: Gray
5: Flashy white
6: Red (tiny bit darker than Vermilion)
7: Lime green (ala Viel)
8: Hot pink (ala Vaelyn)
9: Brilliant yellow
10: Flashy white
11: Bright cyan
12: Blue, same as Victoria
13: Green, same as Verdigris
14: Yellow, same as Vitellary
15: Red, same as Vermilion
16: Blue, same as Victoria
17: Lighter orange
18: Gray
19: Darker gray
20: Pink, same as Violet
21: Lighter gray
22: White
23: Flashy white
24-29: White
30: Gray
31: Dark, slightly purplish gray?
32: Dark cyan/green (ala Valso)
33: Dark blue
34: Dark green
35: Dark red
36: Dull orange
37: Flashy gray
38: Gray
39: Darker cyan/green
40: Flashier gray
41-99: White
100: Dark gray
101: Flashy white
102: Teleporter color
103 and onwards: White
Quote from: FIQ
Internal playlist
0 - Path Complete
1 - Pushing Onwards
2 - Positive Force
3 - Potential For Anything
4 - Passion For Exploring
5 - Pause
6 - Presenting VVVVVV
7 - Plenary
8 - Predestined Fate
9 - ecroF evitisoP
10 - Popular Potpurri
11 - Pipe Dream
12 - Pressure Cooker
13 - Paced Energy
14 - Piercing The Sky
Quote from: FIQ
The effect list
Code: [Select]
0 - Flip to ceiling
1 - Flip back to floor
2 - Cry
3 - Trinket collected
4 - Coin collected
5 - Checkpoint touched
6 - Quicker quicksand block touched
7 - Normal quicksand block touched
8 - Gravity line touched
9 - Flash
10 - Warp
11 - Viridian squeak
12 - Verdigris squeak
13 - Victoria squeak
14 - Vitellary squeak
15 - Violet squeak
16 - Vermilion squeak
17 - Terminal touched
18 - Teleporter touched
19 - Alarm
20 - Terminal squeak
21 - Time trial countdown "3", "2", "1"
22 - Time trial countdown "Go!"
23 - VVVVVV Man breaking walls
24 - Crewmates (de)combining into VVVVVV Man
25 - New record in Super Gravitron
26 - New trophy in Super Gravitron
27 - Rescued crewmate (in custom levels)

28+ segfaults
Quote from: FIQ
Entity limit is 3000.
Script limit is 500.

Code: [Select]
1 - Set gamestate to 0 (i.e. same as above in practice)
2 - "To do: write quick intro to story!"
4 - "Press arrow keys or WASD to move"
5 - Runs the script "returntohub" (i.e. fadeout, teleport to right before The Tower, fadein, play Passion for Exploring)
7 - Removes textboxes
8 - "Press enter to view map and quicksave"
9 - Super Gravitron
10 - Gravitron
11 - "When you're NOT standing on stop and wait for you" (Tries to access flipmode check to write "the ceiling" or "the floor", and check crewmate, but as this fails, the above prints instead)
12 - "You can't continue to the next room until he is safely accross."
13 - Removes textboxes quickly
14 - "When you're standing on the floor," (the same applies here as for 11)
15 - Makes Viridian happy
16 - Makes Viridian sad
17 - "If you prefer, you can press UP or DOWN instead of ACTION to flip."
20 - If flag 1 is 0, set flag 1 to 1 and remove textboxes
21 - If flag 2 is 0, set flag 2 to 1 and remove textboxes
22 - "Press ACTION to flip"
30 - "I wonder why the ship teleported me here alone?" "I hope everyone else got out ok…"
31 - "Violet, is that you?" cutscene (as long as flag 6 is 0)
32 - If flag 7 is 0: "A teleporter!" "I can get back to the ship with this!"
33 - If flag 9 is 0: Victoria-cutscene
34 - If flag 10 is 0: Vitellary-cutscene
35 - If flag 11 is 0: Verdigris-cutscene
36 - If flag 8 is 0: Vermilion-cutscene
37 - Vitellary after gravitron
38 - Vermilion after gravitron
39 - Verdigris after gravitron
40 - Victoria after gravitron
41 - If flag 60 is 0: run the beginning of intermission 1 cutscene
42 - If flag 62 is 0: run the 3rd intermission 1 cutscene
43 - If flag 63 is 0: run the 4th intermission 1 cutscene
44 - If flag 64 is 0: run the 5th intermission 1 cutscene
45 - If flag 65 is 0: run the 6th intermission 1 cutscene
46 - If flag 66 is 0: run the 7th intermission 1 cutscene
47 - If flag 69 is 0: "Ohh! I wonder what that is?" trinket cutscene
48 - If flag 70 is 0: "This seems like a good place to store anything I find out there…" (Victoria not found yet)
49 - If flag 71 is 0: Play Predestined Fate
50 - "Help! Can anyone hear this message?"
51 - "Verdigris? Are you out there? Are you ok?"
52 - "Please help us! We've crashed and need assistance!"
53 - "Hello? Anyone out there?"
54 - "This is Doctor Violet from the D.S.S. Souleye! Please respond!"
55 - "Please… Anyone…"
56 - "Please be alright, everyone…"
With gamestate 50-56, you can choose where to start, because everything will appear after each other (did anyone know that if you wait after "Help! Can anyone hear this message?", there will be more text?)
80 - If screen is black (and only if), continue to state 81 (My guess is that this is called when ESC is pressed, before the pause meny opens)
81 - Go back to the main menu
82 - Results of time trial (bugged)
83 - If screen is back, continue to state 84
84 - Results of time trial (I think 82 works better than 84)
85 - The Time Trial version of gamestate 200 (Flash, play Positive Force, turn on finalstretch mode)
States 90-95 are time trial related, but doesn't work properly in custom levels. The only real effects that happens in custom levels is a warp, and music change
90 - Space Station 1
91 - The Laboratory
92 - Warp Zone
93 - The Tower
94 - Space Station 2
95 - Final Level
96 - If the screen is black, continue to state 97
97 - Exit from Super Gravitron (teleport and play Pipe Dream)
100 - If flag 4 is 0: continue to state 101
101 - If you are flipped, flip back to floor, continue to state 102
The following states (102-112) tries to go to the current state + 1, like in 50-56 (but doesn't loop around), but may glitch as half of the states (103, 105, 107, 109, 111) doesn't exist.
102 - Verdigris: "Captain! I've been so worried!"
104 - "I'm glad you're ok!"
106 - "I've been trying to find a way out, but I keep going around in circles…"
108 - "Don't worry! I have a teleporter key!"
110 - "Follow me!"
112 - Removes textboxes
115 - Essentially nothing, continue to state 116
116 - Red dialog at the bottom of the screen saying "Sorry Eurogamers! Teleporting around the map doesn't work in this version!", continue to state 117, which doesn't exist, so things may fail
118 - Removes textboxes
State 120-128 works a bit like 102-112, i.e. in a series, but with less broken things
120 - If flag 5 is 0: continue to state 121
121 - If you're on the floor, flip.
122 - Vitellary: "Captain! You're ok!"
124 - Vitellary: "I've found a teleporter, but I can't get it to go anywhere…"
126 - "I can help with that!"
128 - "I have the teleporter codex for our ship!"
130 - "Yey! Let's go home!" (never heard of this cutscene before? Probably things Terry played with before coming up with the current story/etc /fiq)
132 - Removes textboxes
200 - Final mode
1000 - Turns on cutscenebars, freezes the game, continue to state 1001
1001 - You got a shiny trinket! dialog (but you didn't actually get any, this is just called each time you get one), continue to state 1003
1003 - Revert game to normal
1010 - You found a crewmate! in the same manner as for trinkets
2000 - Save the game
2500-2509 - Perform a teleport to some weird non-existent location, supposedly to The Laboratory I guess, continue to state 2510
2510 - Viridian: "Hello?", continue to state 2512
2512 - Viridian: "Is anybody there?", continue to state 2514
2514 - Removes textboxes, play Potential For Anything
3000-3099 states:
3000-3005 - Level Complete! You've rescued the crewmate applied to companion(), defaults to Verdigris. 6=Verdigris, 7=Vitellary, 8=Victoria, 9=vermillion, 10=viridian (yes, really), 11=Violet (Gamestates: 3006-3011=Verdigris, 3020-3026=Vitellary, 3040-3046=Victoria, 3060-3066=Vermillion, 3080-3086=Viridian, 3050-3056=Violet)
3070-3072 - Perform postrescue things, usually return to ship
3500 - Pause for a minute, continue to state 3501
3501 - Game Complete, continue to state 3502
3502 - 3507 just show stats
4010 - Flash + warp
4070 - The Final Level, but the game will crash when you reach timeslip! (Because of how the game gets entity information, which is broken in custom levels)
4080 - Captain teleported back to the ship: "Hello!" [C[C[C[C[Captain!] cutscene + credits
!!!The above will mess up your save data so don't do it unless you backed up!!!
4090 - Cutscene after you complete space station 1
« Last Edit: February 10, 2015, 06:09:02 am by Xalso »