Arbitrary Entity Manipulation

From Viki
Jump to navigation Jump to search

Arbitrary Entity Manipulation is an exploit present in all versions of VVVVVV where it is possible to use commands normally reserved for crewmates on any entity in the room, given their indice in the vector of entities (obj.entities). This includes every object in the game except for room text, script boxes, activity zones, spike hitboxes, and one-way hitboxes.

Arbitrary Entity Manipulation was discovered by Info Teddy at 4 a.m. on 9 September 2020 when she was reading VVVVVV source code.


To use Arbitrary Entity Manipulation, you must first set an internal variable to the indice of the entity you want to target, then you must call a crewmate-modifying command with an invalid crewmate identifier.

(TODO: Expand on this)


These are the list of script commands that are usable in this exploit.

  • changeai()
  • changecolour()
  • changecustommood()
  • changedir()
  • changegravity()
  • changemood()
  • changetile()
  • face()
  • flipgravity()


By using changecolour(), you can change the color of any entity in the room to red, yellow, green, cyan, blue, pink, or teleporter. This will have no effect if the targeted entity doesn't use its colour attribute, which includes entities like gravity/warp lines, platforms, and conveyors.


By using changetile(), you can change the sprite of any entity in the room to any arbitrary sprite. You can, for example, make upside-down terminals, or retexture platforms and conveyors to use some other row from entcolours.png, or use the hourglass and fish enemy types. Technically you can also change entities' sprites with changemood(), changecustommood(), and changegravity(), but those change the sprite to fixed values, and in the case of changegravity(), only increments an entity's sprite by 12.


By using changeai() and passing in any number for the second argument, you can set the state attribute of any entity to that number, which may or may not do interesting things. Furthermore, you can set the para attribute of any entity, by passing followposition or 16 for the second argument and passing the number you want to set para to for the third argument. Entities use para in different ways, most notably coins, trinkets, and rescuable crewmates use it to store their ID. This will set state to 16, obviously, but you can always set the state back afterwards with another changeai() if that is unwanted.


By using flipgravity(), you can set the rule of any entity to 7, which will convert them to a pseudo-crewmate that is neither the entity they were originally or an actual crewmate. This might have some interesting uses, given the right entity.

changedir() and face()

changedir() and face() can be used to change the dir attribute of entities, which isn't really useful because that attribute is only used by crewmates and the player.