Using The Console

From The Powder Toy
Revision as of 07:53, 2 November 2012 by wikku9 (talk | contribs) (Translate/Tłumaczenie)
Jump to: navigation, search

Powder Toy aktualnie używa konsoli Lua, która pozwala na wiele więcej niż stara konsola. Jeśli chcesz zrobić proste rzeczy, używanie tej konsoli będzie łatwiejsze i ma krótsze komendy.

Używanie konsolo

Po wersji 49.3 komendy potrzebują symbolu ! na początku

Konsola to najprościej mówiąc okienko w którym wywołujesz zdarzenia zakodowane w grze. Pozwala na dużo więcej rzeczy niż zwykłe ruszanie myszką i klikanie, czy nawet hackowanie gry.

Otwieranie konsoli jest łatwe. Przyciskasz klawisz ~ (na niektórych klawiaturach jest to ` lub ¬ lub ^/° na klawiaturach w standardzie QWERTZ) (Ten klawisz jest na dokładnie na lewo od przycisku 1, na góre od Tab i pod Escapem). Po wciśnięciu gra się pauzuje, i wysuwa się czarne pole tekstowe na górze ekranu.

W porównaniu do innych gier, konsola Powder Toya jest intuicyjna i łatwa w obsłudze, ale prawdopodobnie i tak zajmie ci to wiele prób aby zapamiętać komendy.

Najczęściej używana i najbardziej funkcjonala komenda to !set. Oto składnia tej komendy:

!set [którą zmienną zmienić] [cząstki/cząstka do zmiany] [nowa wartość zmiennej]


Przykładowo, chcę zmienić typ cząstki o indeksie #25 na METL.
!set type 25 metl

W polu na cząstkę do zmiany można wpisać all, wtedy komenda obowiązuje do wszystkich cząstek na ekranie.
!Set type all metl
Zmieniłoby każdą cząsteczkę na mapie w METL.

!Set type metl watr
Zmieniło by każdą cząstkę METL w WATR.

!Set type metl none
Usunęłoby cały METL w symulacji.

Zamiast type można używać większości zmiennych cząstek, np. temp, ctype, life, x, y, tmp, tmp2. Zobacz Zmienne jeśli chcesz sprawdzić znaczenie tych wartości.


Komenda !quit zamyka natychmiastowo grę.

Komenda !create tworzy element o danym typie na danej pozycji x, y.
!Create METL 200,100
Stworzy 1 piksel metalu na pozycji X: 200, Y: 100.

Funkcja !kill lub !delete (to samo) niszczy cząstkę na podanej pozycji.
!delete 200,100
Usunie cząstkę na pozycji X: 200, Y: 100.

Komenda !load wczytuje symulację o podanym ID.
!Load 500000
Wczyta symulację o ID 500000.

Funkcja !bubble tworzy bąbelek mydlany na pozycji X, Y. Bez tej funkcji bardzo trudno inaczej stworzyć mydlaną bańkę.
!bubble 100,100 Stworzy bańkę na pozycji X: 100, Y: 100.

Ta strona wiki nie zawiera wszystkich komend w grze, tylko tłumaczy jak działa konsola.
Kilka innych komend: !file
!sound
!python
!reset
!reset velocity – Zeruje prędkość wszystkich cząstek.
!reset pressure – Zeruje ciśnienie w całej symulacji.
!reset sparks – Usuwa wszystkie SPRK na mapie.
!reset temp – Zmienia temperaturę cząstek do domyślnej, początkowej.

Wyrażenie !if może być używane tylko w skryptach. Sprawdza czy typ danej cząsteczki to dany typ.
!if type 1,dmnd
Jeśli cząsteczka #1 to diament, zwraca 1, jeśli nie, zwraca 0.

==== Używanie skryptów. Używając dowolnego edytora tekstu, zapisz skrypt w rozszerzeniu txt w folderze w którym znajduje się Powder Toy. Potem otwórz konsolę i wpisz:
'dofile("nazwa pliku''). Czasami może wyświetlić, że skrypty są wyłączone.

Hints and tips on using tmp, life, and ctype

Admins/TPT-devs please fill in this section with which particle types are effected by the "tmp", "life", and "ctype" variables, and what those effects are with each particle type that uses them. Please also give some example code.

ctype
  • Clone (BCLN, PCLN, CLNE): ctype is the element being generated by the clone. For example, you can make all the clne on the screen generate neutrons with the console/script command "!set ctype clne neut"
  • State changes (ICE, LAVA): ctype is the element to melt/freeze into. For example, you can make lava freeze into bomb like this "!set ctype lava bomb". That actually gets some interesting results.
  • SPRK: ctype is the element covered by the spark.
  • Color (PHOT, FILT, FWRK, GLOW, BRAY): ctype is used to store various bits of information about color. There is currently no simple way to change this with console.
  • PIPE: Ctype distinguishes the different types of pipe (red/green/blue/unallocated). There is currently no simple way to change this with console (but experiment with setting ctype to none, dust, watr, oil, fire). For more information on pipe, see Using PIPE element.
  • QRTZ: QRTZ growth uses ctype. For example, the natural way is to pour SLTW on it. The SLTW changes the ctype to DUST. "!set ctype qrtz sprk" will cause rapid, unnatural growth. This can also be achieved by sparking QRTZ manually.
  • WIRE: The different types of WIRE(Electron head, tail, wire) are distinguished by it's ctype. Try experimenting with ctypes DUST, WATR and none.
  • Using ctype, you can make molten ice and molten diamond with this code: for molten ice, put ice then type " !set ctype ice lava " then type " !set temp ice 500 " and the ice in the world will become molten ice. Molten diamond occurs when you place lava then
use " !set ctype lava dmnd ". This goes along with the above mentioned state changes.
tmp

Tmp is a value used for various element properties. Only a few elements use it. NOTE: this is NOT temperature (which is called 'temp'). Tmp can also change the channels of WIFI.

  • PIPE: the type of the element currently contained in the pipe. Use '!set tmp pipe 0' to remove all particles from all pipes.
life

Use this with with fire or plasma to make it have more or less time until it burns out. For example, "!set life fire 1000" to make it last for a VERY long time (even to the point it is unrealistically still glowing even after its temperature has cooled to room temperature, same with plasma). Use with fuse to make it be in the already burning state by reducing this number to something really low like 1 (command for that is "!set life fuse 1"). You can use it to basically put any element into a state that uses the same special property but use it either much more, better, longer, shorter, worse, or less.

E.G.:

  • DEUT has a property that says it can multiply itself based on its temperature. It is possible to use life to make it obey this property but at the same time make it use it vastly more. As in, 99999 life deut makes it expand across the whole screen.
  • Another closely studied use of the life variable is what it does to ACID. Acid is corosive. It has a set life value of 75 that cannot be raised without editing the game engine. The more particles acid corrodes away the lesser its life value becomes. If set below fifty any particle can destroy acid.
  • Switches, like SWCH, HSWC, PCLN, and PUMP, also use life to turn on and off.
  • Portals use life to generate their effects. This is one of the only times life goes into negative naturally.
  • Stickman's health can be changed by editing his life.
  • SPRK uses not only ctype, but life as well. SPRK on most metals has a life of 4. On INST it has a life of 1. This shows how long the spark will remain on the material. The material afterward then uses life to calculate when it can be sparked again.