 |
Author |
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Wed Apr 11, 2007 4:02 pm Post subject: Latest Editor Documentation / Requests |
|
|
Download Version 1.2
NOTE: chm files can get blocked by XP security. Right click the file and bring up the properties window and see if there's an unblock option.
Changelog:
- 1.2
- Further commands listed in script command reference.
- Switch/bollard tutorial
- Scripting introduction page.
- 1.1
- Tutorial 2 - connecting rooms.
- Script Command Reference basic commands.
- Chat Image Reference.
- 1.0 Initial release
Coming Documentation / Requests
- Full Editor Panel Reference
- Style Guide
- Water Tutorial
- Ghost hack tutorial
- Finish script command reference page
- item reference (include type/subtype needed for scripting)
- fx reference list + paths.
- object list for us with dummy panels?
- Dynamic object parameter reference.
- Data structure reference - mainly room configs (for hackers.)
Last edited by Fost on Wed Apr 18, 2007 10:42 pm; edited 4 times in total |
|
|
|
Back to top |
|
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Wed Apr 11, 2007 4:07 pm Post subject: |
|
|
Some updated info here. Some of the scripting reference examples may be of use to people who know what they're doing, although it really needs an introduction into how you do scripting on a per-room basis for everyone else.
Feel free to request anything and everything and I'll make a note of it above. |
|
|
|
Back to top |
|
|
 |
|
Inane

Joined: 06 Jul 2006 Posts: 173

|
Posted: Wed Apr 11, 2007 8:22 pm Post subject: |
|
|
As I previously said, some documentation on getting ghost hacks to work would be peachy keen. |
|
|
|
Back to top |
|
|
 |
|
Zharmad

Joined: 25 Dec 2006 Posts: 95 Location: Sydney, Australia

|
Posted: Thu Apr 12, 2007 12:22 am Post subject: |
|
|
Seconded. On that note though, I'm more keen to find out whether I can change the level/give experience to robots in my possession. Level one is a bit arduous, but we'll see how things go. |
|
|
|
Back to top |
|
|
 |
|
SethP
Joined: 24 Apr 2006 Posts: 302 Location: Connecticut, USA

|
Posted: Thu Apr 12, 2007 2:08 pm Post subject: |
|
|
Edit -- I asked for switch documentation before noticing it was already in the to-do list up top
I would still like to know if it's possible to make switches affect anything other than bollards and water. |
|
|
|
Back to top |
|
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Thu Apr 12, 2007 2:19 pm Post subject: |
|
|
SethP wrote: | I would still like to know if it's possible to make switches affect anything other than bollards and water. |
You can detect their state in lua, so there should be quite a lot you can do with them. The Save Huey adventure (OK, I know you can't get it right now, but it's on its way any day!) is designed to show lua being used to include functionality beyond that in the main game. It's only simple, but there's an added bonus system where you can pick up hidden 'power spheres'. It's all done with named dummy dynamic objects and a lua collision detection routine + writing out data to the saves. |
|
|
|
Back to top |
|
|
 |
|
SethP
Joined: 24 Apr 2006 Posts: 302 Location: Connecticut, USA

|
Posted: Thu Apr 12, 2007 2:39 pm Post subject: |
|
|
Sounds pretty cool. Thanks for the quick reply Fost  |
|
|
|
Back to top |
|
|
 |
|
Zharmad

Joined: 25 Dec 2006 Posts: 95 Location: Sydney, Australia

|
Posted: Thu Apr 12, 2007 3:28 pm Post subject: |
|
|
Is there possibility of scripting sound effects? I'm polishing what I have.
Also, can I affect the number of lives and current health of the player? |
|
|
|
Back to top |
|
|
 |
|
Crussh

Joined: 25 Jan 2007 Posts: 151 Location: Sweden

|
Posted: Thu Apr 12, 2007 3:56 pm Post subject: |
|
|
Hey Fost is there any way to make it so that a switch changes the direction of a conveyor belt? Cose that would be so cool  |
|
|
|
Back to top |
|
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Thu Apr 12, 2007 5:07 pm Post subject: |
|
|
Zharmad wrote: | Is there possibility of scripting sound effects? I'm polishing what I have. |
You can launch sounds and effects that are shipped with the game using script - that covers most of what's left for me to add in the script reference actually other than stuff that affects ghost hacking. I'll need to compile a list of the paths to all the sfx/fx you can use though.
Zharmad wrote: | Also, can I affect the number of lives and current health of the player? |
Yes - again, I need to document some more of this, but I'll also need Mark to go through the code and compile a list of items. The command is pretty simple and it's one line to give the player something, but you need to know what the items are else you'll be stuck. Energon for instance started life as an 'extend' pickup, so is called 'EXTEND'. There's various ways to inflict damage too, but I'm not as experienced as Mark with them which is why they aren't in the docs yet - I need to do some research myself!
One easy command you can do is restore the player's health using:
Crussh wrote: | is there any way to make it so that a switch changes the direction of a conveyor belt? |
Actually - that's something I wanted too! but there's currently no default way of doing it. At some point I want to test swapping or rotating the objects, which might make it possible, but I'm not sure how the game will react, if say the player is on top of it at the time. |
|
|
|
Back to top |
|
|
 |
|
Crussh

Joined: 25 Jan 2007 Posts: 151 Location: Sweden

|
Posted: Thu Apr 12, 2007 10:12 pm Post subject: |
|
|
Yay it might work (or not ) |
|
|
|
Back to top |
|
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Thu Apr 12, 2007 11:05 pm Post subject: |
|
|
*bump*
Updated the docs again - further additions to the scripting command reference, bollard tutorial, scripting introductory page that explains how room scripts are set up and how the two required functions operate within a room. |
|
|
|
Back to top |
|
|
 |
|
Blizgerg
Joined: 09 Jan 2005 Posts: 155 Location: The Planet Stinky Socks

|
Posted: Fri Apr 13, 2007 12:29 am Post subject: |
|
|
Should you mention putting the invisiblock on the bollards for the intersection thing?
Some of the chat images are repeated.
BTW with getWorldDir() couldn't someone put a .wav file in there adventure dir and then play it with a lua script? I was able to play wave files with the scripts if I put the wave file in the mrrobot program directory. Would including a wave file cause problems with the adventure downloader?
Can you control the game music from the script in any way?
One thing I think would be interesting to know is what file format the model_override parameter on some dynamic objects takes. Could I create my own custom decals if I knew how to make the proper model file? |
|
|
|
Back to top |
|
|
 |
|
Zharmad

Joined: 25 Dec 2006 Posts: 95 Location: Sydney, Australia

|
Posted: Fri Apr 13, 2007 1:26 am Post subject: |
|
|
Hmm. How do you get the wav file to play with scripts? THe program just crashes whenever I call
loadSFX( "data/sounds/*anything*.wav", 0.9, false, false ).. Maybe I have to load the sound files zipped up in MrRobot.000?
I'm also looking for a way to convert energon collected back into health and lives. |
|
|
|
Back to top |
|
|
 |
|
Fost Pod Team


Joined: 14 Oct 2002 Posts: 3734

|
Posted: Fri Apr 13, 2007 9:50 am Post subject: |
|
|
Zharmad wrote: | Hmm. How do you get the wav file to play with scripts? THe program just crashes whenever I call
loadSFX( "data/sounds/*anything*.wav", 0.9, false, false ).. Maybe I have to load the sound files zipped up in MrRobot.000? |
My bad! I got part of the documentation backwards - the last boolean sets the wav as fixed if true, and relative to the owner if false. So if you set it to false you need to include an owner.
try this:
Code: | loadSFX( "data/sounds/crate-drop.wav", 0.9, false, true )
playSFX( "data/sounds/crate-drop.wav" ) |
I've updated the docs. Remember - you can only load wavs that ship with the game. There may actually be a way to use your own, but I still need to investigate that.
Zharmad wrote: | I'm also looking for a way to convert energon collected back into health and lives. |
I'll have to consult Mark on that when he gets back. I think it might be done with sendMessage() but I'm not sure. |
|
|
|
Back to top |
|
|
 |
|
|
|
|
|
|