Author |
Tutorial : Crowd sourcing up in this thing |
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-04-28 09:53  
So, it's long been known out tutorial is, well...
Hah.
Our tutorials are not very complex things. They are, in their simpliest terms, a map which references a script to run when it starts.
I'll post below a link to the current tutorial, and explain some of how it works, but for the most part to help with this, you need an understanding of LUA.
Our scripting engine has a multitude of server and client side functions, and for the majority of the tutorial all you're using is client side functions to determine when a player has changed their view, but you can also do things like check when your ship has changed velocity, etc.
One caveat I need to notify you about, is that the lines we draw to various parts of the interface, only work on the interface. For example, I can draw a line to the ship heading readout, the layout of gadgets, but I cannot reference objects in the game world, like a planet or a ship. This is a limitation that would require significant work, and something we're not planning on doing yet.
Those of you with LUA knowledge will quickly be able to understand the script, but those of you with limited knowledge may be able to understand parts of it due to the fact that all the code is commented to a decent degree.
I will post the script reference along with it to allow you to figure out what else can be done. Those of you wanting to help can simply edit the script and post your own version, if you need different ships or a line drawn to a part of the interface, just make a note of it and we can add it in afterwards.
You won't be able to test these as the game client requires certain flags to enable scripts to run, but I will do my best to get around to testing each and giving feedback.
Also note that you do not need to have an all-encompassing tutorial. Like I said, they're simply maps with scripts in, so if you want to do a building tutorial, act as if you're starting from fresh with nothing else in there (we can in all essense just make a map with one star and one planet for that with no AI).
Anyway, here's the nifty info:
Tutorial:
http://pastebin.com/MYtwfs3Z (use the raw function if you want to copy it into your own editor like Notepad++)
ScriptRef:
http://www.astutepixel.com/.nopeek/scriptref/ (this is extremely dated, so expect some things in here not to work anymore)
I know we have a bright few sparks umong the community here - here's your chance to shine and help us back DarkSpace an easier game to get into. [ This Message was edited by: Pantheon on 2013-09-18 08:09 ]
_________________
|
Null Pointer Grand Admiral Templar Knights
Joined: April 10, 2010 Posts: 148
| Posted: 2013-04-28 10:16  
http://pastebin.com/2u5Z0XLQ
Added a tutorial on the Shipyard screen, a bit alien to them if they're just launching the tutorial.
function onSpawnSelect()
messageBox( "Tutorial: Basic Trainingl
Welcome to the DarkSpace basic tutorial. This tutorial will teach you how to navigate your ship, engage in basic combat, and capture planets. You may press F1 at any time to see additional help for that screen. Here you see only one option for a ship, \"\MT-261 Light Transport\". For now, this is your only option. Using the left mouse button click on the ship.
Click on the OK button to continue, click on the Cancel button to abort this tutorial.", "onShipSelected()", "cancelTutorial()" );
-- called when the player enters the spawn selection screen
end
function onShipSelected( shipName )
messageBox("Good, at the bottom right of the screen you will see a description of the ship, along with details about the ship and weapon systems. Go ahead and click \"Launch\".
Click on the OK button to continue, click on the Cancel button to abort this tutorial.", "onTacticalView()", "cancelTutorial");
-- Called after the player selects a ship
end
Also, use of the startTutorial(); function isn't needed now..
EDIT: Used // instead if -- for commenting ^^. [ This Message was edited by: Boolean Argument on 2013-04-28 10:19 ]
_________________
|
Walrus of Apathy Admiral Templar Knights
Joined: August 07, 2005 Posts: 466 From: Dorans Basement
| Posted: 2013-04-28 10:46  
Also, you'll really want to move the ship the tutorial gives you away from the ICC light transport as its losing all its guns and won't be able to complete the combat portion of the tutorial once 1.7 comes.
_________________
|
Fluttershy Fleet Admiral
Joined: September 24, 2011 Posts: 778 From: Fluttershy
| Posted: 2013-04-29 00:21  
Can we have several tutorials which can be accessed?
-Combat, navigation, and blind firing.
-Building structures, interacting with structures, constructing platforms.
-Planet bombing, dropping infantry, capturing planets, planet defenses.
-General explanation of signature, ECM, ECCM, Beacons.
_________________
|
*FTL*Soulless Marshal
Joined: June 25, 2010 Posts: 787 From: Dres-Kona
| Posted: 2013-04-29 09:38  
Quote:
On 2013-04-29 00:21, Fluttershy wrote:
Can we have several tutorials which can be accessed?
-Combat, navigation, and blind firing.
-Building structures, interacting with structures, constructing platforms.
-Planet bombing, dropping infantry, capturing planets, planet defenses.
-General explanation of signature, ECM, ECCM, Beacons.
|
Like jack just said you would be starting from scratch. So either you or someone else would have to make one
_________________ We are Back from the shadows.
|
Fluttershy Fleet Admiral
Joined: September 24, 2011 Posts: 778 From: Fluttershy
| Posted: 2013-04-29 16:00  
I'll see if I can find the time and patience to do it.
I recently got a job so I have a lot less time to fiddle away on things.
My question, though, is if they will be able to support multiple tutorials.
_________________
|
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-04-29 16:59  
Yes. The tutorial selection scans for maps, so you can have multiple maps that load a different script for different things.
I've updated the tutorial in beta and would appreciate some critique (make note that I've only updated the start to include ship selection and spawning).
You will see script errors - you can ignore them for now, it's just the client not understanding the server calls (alerts are normally disabled, but seeing as I'm re-doing the tutorial, I can't be bothered to change it each time I push it to beta).
Here's the updated LUA file, so people can see what I've done compared to above:
http://pastebin.com/tQBBEHkv [ This Message was edited by: Pantheon on 2013-04-29 17:03 ]
_________________
|
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-08-27 19:57  
Bump.
_________________
|
Fluttershy Fleet Admiral
Joined: September 24, 2011 Posts: 778 From: Fluttershy
| Posted: 2013-08-27 23:29  
Hmm...
Would it be at all possible to have a spawnStructure() function?
spawnStructure(type,planet,position)
where
type (string) determines what structure you place
planet (string) is the planet you're placing the structure on.
position (integer) is which slot on the planet, which can range from 0 to something in the 200-300s depending on planet size.
Be sure if the value of position goes over how many the planet has, it throws an error and/or defaults to the highest unoccupied slot.
Maybe a 4th argument that determines the build progress of it, ranging from 0 (unbuilt) to 100 (fully operational)
Functions for setting technology, population, and resources would be swell too
[ This Message was edited by: Fluttershy on 2013-08-27 23:36 ]
_________________
|
Null Pointer Grand Admiral Templar Knights
Joined: April 10, 2010 Posts: 148
| Posted: 2013-08-28 00:41  
Quote:
On 2013-08-27 23:29, Fluttershy wrote:
Hmm...
Would it be at all possible to have a spawnStructure() function?
spawnStructure(type,planet,position)
where
type (string) determines what structure you place
planet (string) is the planet you're placing the structure on.
position (integer) is which slot on the planet, which can range from 0 to something in the 200-300s depending on planet size.
Be sure if the value of position goes over how many the planet has, it throws an error and/or defaults to the highest unoccupied slot.
Maybe a 4th argument that determines the build progress of it, ranging from 0 (unbuilt) to 100 (fully operational)
Functions for setting technology, population, and resources would be swell too
[ This Message was edited by: Fluttershy on 2013-08-27 23:36 ]
|
Poking through Ye ole' scripting forum, I found this:
variable1=getKey( "Nameofwhateverplanet" )
local x,y,z = getHexPosition(variable1,10)
spawn=createSpawn("building",x,y,z)
b1=spawnNoun( "Structures\\Kluth\\Colony Hub.PRT",spawn,"Nameofbuilding",variable1 )
Not entirely sure if it still works, since this was posted 2003~. But it's there.
_________________
|
Fluttershy Fleet Admiral
Joined: September 24, 2011 Posts: 778 From: Fluttershy
| Posted: 2013-08-28 04:32  
ugh, this is giving me a headache.
I'm gonna stop where I am on this until Pantheon can take a look at the script and tell me how terrible I am and why this is why I'm not a DS developer
A few things...
pushChat("") <- Does this work to print a visible message when inside of functions used for the server? (I want it to passively say something at each "stage")
remoteCall("Location",5,"function(\"".. playersShip() .. "\")"); <- what is all this gibberish? All these quotes, slashes and periods... what is even going on? Why can't it just say:
remoteCall("Location",5,"function( "playersShip()" )");
EDIT: I sorta see the reasoning on the 2nd question, basically the two periods join stuff, but i still have no idea what \" does.
Also, why is the forum turning \ into \\?
[ This Message was edited by: Fluttershy on 2013-08-28 06:48 ]
_________________
|
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-08-28 06:56  
Quote:
On 2013-08-28 04:32, Fluttershy wrote:
ugh, this is giving me a headache.
I'm gonna stop where I am on this until Pantheon can take a look at the script and tell me how terrible I am and why this is why I'm not a DS developer
A few things...
pushChat("") <- Does this work to print a visible message when inside of functions used for the server? (I want it to passively say something at each "stage")
remoteCall("Location",5,"function(\"".. playersShip() .. "\")"); <- what is all this gibberish? All these quotes, slashes and periods... what is even going on? Why can't it just say:
remoteCall("Location",5,"function( "playersShip()" )");
EDIT: I sorta see the reasoning on the 2nd question, basically the two periods join stuff, but i still have no idea what \" does.
Also, why is the forum turning \ into \\?
|
The last function you're calling is calling a secondary function, the quotation marks require a slash to ignore them as they usually indicate a string or value.
Quote:
On 2013-08-27 23:29, Fluttershy wrote:
Hmm...
Would it be at all possible to have a spawnStructure() function?
spawnStructure(type,planet,position)
where
type (string) determines what structure you place
planet (string) is the planet you're placing the structure on.
position (integer) is which slot on the planet, which can range from 0 to something in the 200-300s depending on planet size.
Be sure if the value of position goes over how many the planet has, it throws an error and/or defaults to the highest unoccupied slot.
Maybe a 4th argument that determines the build progress of it, ranging from 0 (unbuilt) to 100 (fully operational)
Functions for setting technology, population, and resources would be swell too
|
You can use SpawnNoun, but it's a bit iffy and I haven't tried it with planets in a while. It should work, but I'm not 100%. I do believe, however, that it places at a random point on the planet . We can no longer use this for ships unfortunately due to the shipAuditor, but it was fun to create ridiculous ships with scripts whilst we could.
You can in some cases just check if something exists on a noun as a child item ie:
for structnum = 0, structureCount( planet ) - 1 do
currNode = getStructure( planet, structnum );
if ( currNode == "blahblah" )
//code here to call messagebox that goes to the next tutorial checkpoint
end
This will itterate through the structures on the planet to find a structure . The scriptref has all the commands we have, although some of them no longer work (I'll get around to updating it at some point).
_________________
|
Fluttershy Fleet Admiral
Joined: September 24, 2011 Posts: 778 From: Fluttershy
| Posted: 2013-08-28 08:30  
Alright... just an initial test... http://pastebin.com/AsU9ubwK
Don't know why the formatting went all weird, I changed my theme in notepad++ and only used tab for spacing... very strange.
If you see any huge glaring issues, please let me know, I'd like to know what I'm doing wrong before I proceed any further.
What is SUPPOSED to happen:
Player joins game.
Player receives intro via dialog box.
Player clicks OK and first wave spawns.
First wave is defeated and second wave spawns, and so on.
Last wave is completed and it should reset back to the first wave.
[ This Message was edited by: Fluttershy on 2013-08-28 08:33 ]
_________________
|
Chewy Squirrel Chief Marshal
Joined: January 27, 2003 Posts: 304 From: NYC
| Posted: 2013-08-28 17:46  
Honestly, without the ability to test my code I have little motivation to write any. Otherwise I would definitely muck about with writing some tutorials.
_________________
|
Pantheon Marshal Palestar
Joined: May 29, 2001 Posts: 1789
| Posted: 2013-08-28 18:06  
I'll happily test it, unfortunately there's no real way to do it without a lot of developer access.
Flutter that is a VERY good first attempt. I'll go over it later tonight and touch it up. I can see a few errors, but nothing major at all. [ This Message was edited by: Pantheon on 2013-08-28 18:08 ]
_________________
|