PDA

View Full Version : How To Create a SPS Map. [World Map Veiw]



Mat
02-15-2012, 01:39 AM
Okay.
I have seen people ask for this so I thought might aswell while I'm a bit awake:).
Covering?

Making the Image
Making the Code for SPS file
How to Test it :)

Making the Image!

First of go to the Location you want to create the Map for and see if you can use the world Map on it.

Lets look at FoG.
Perfect its has a world Map :)
http://i.imgur.com/26Bd8.png
Map it 100% Zoom! (MUST)

Now Take a screen shot of the map. and paste in to the editing program of your Choice I'll be using Adobe FireWorks CS5 as its a lot easier :).

http://i.imgur.com/nwr95.png

Crop the image so there is abit of black around the outter of the map.

http://i.imgur.com/FN3KZ.png

Now create a New Canvas which is 500px by 500px and make sure it has a Black Background!
http://i.imgur.com/A8nSe.png
As you can see from the image above I Have placed the Map in the middle of the image, you must do this!
Now save as 0_0.PNG

Finished Map
http://i.imgur.com/tThfc.png
MAP IS MADE!!!!
Modifying SPS.Simba to have a new area!

Open SPS.Simba and you should see this: http://i.imgur.com/5O6eW.png
Then scroll down still you see this:
http://i.imgur.com/Xvagc.png
Copy it, scroll down and re paste it at the bottom.
FoG:// Name of the area
with SPS_Surface do
begin
Name := 'Fog';//Name
ImagePath := SPS_IMG_PATH + 'Fog\';//Folder in which we will create shortly
FactorX := 400;//No Touchy
FactorY := 400;//No Touchy
TileOffsetX := -1;//No Touchy
TileOffSetY := -1;//No Touchy
Tolerance := 0.4;//Tolerance Change this is you are having problems with walking.
end;As you can see the code above is for FoG. all you do is copy it and paste it in, then change the folder Name etc.
Once you have done this the SPS.Simba File is Modified!

Making the Folder(Really Simple)

Go to
C:\Simba\Includes\SPS\img
Next create new folder to what you called it in the SPS.Simba which I called FoG.
Once the folder is created add the 0_0.PNG File you create first in to it.

Testing Your Map!

Testing your Map is quite easy.
I uses this to test my SPS Maps:program SPS_Tester;
{$i srl/srl.Simba}
{$i sps/sps.simba}
begin
SetupSRL;
SPS_Setup({Here you put the name of the area in my case FoG},[{The map Name Our case '0_0'}]);
Writeln(SPS_GetMyPos);
end.
http://i.imgur.com/fQ0t1.png
If you look at this image where I am testing it you will see a number like this (255, 245) this is the point in which you are at in that Map which means it has worked. Move around the area and keep testing it to see if it changes.
Creating a path, if that is the only Image in there you can use the path creator, but I'd find it easier to move around rs and run that little script which gives you your location, take a note of it and keep walking till you created your path(Like Reflection and Injection Bots Were).

Congratuations you have created and tested a Custom SPS Map!
If you have any question please feel free to post and I'll do the best I can to assist you :)
Mat
P.S. Bed time Now 2am ... HardCore Much :D :spot: Also I may do a Tutorial on How to use the MiniMap to Create SPS Maps. (Maybe)

John
02-23-2012, 08:40 AM
Legend just made my own for the Security stronghold. :D

the flea
02-23-2012, 04:21 PM
didn't know this tutorial existed very detailed and usefull

Mat
02-25-2012, 09:32 AM
I made it because I've seen people asking about how :) I made a Random event map for demon drill to:)
Mat

Fwd Motion
02-25-2012, 09:50 AM
Great tutorial! (:

I'm sure many will find it useful!

Im4everlast
03-12-2012, 09:54 PM
Thanks for the tutorial, this helped me make a good Abyss map :)

EDIT:

// Supported SPS surfaces
RUNESCAPE_SURFACE = 1;
DUNGEON_ESSENCE_MINE = 2;
DWARVEN_MINE = 3;
RUNECRAFTING_ALTARS = 4;
FoG = 5; // <---- this needs to be added (:

Mat
03-16-2012, 07:50 PM
Thanks for the tutorial, this helped me make a good Abyss map :)

EDIT:

// Supported SPS surfaces
RUNESCAPE_SURFACE = 1;
DUNGEON_ESSENCE_MINE = 2;
DWARVEN_MINE = 3;
RUNECRAFTING_ALTARS = 4;
FoG = 5; // <---- this needs to be added (:

Abyss you can't use Whole Map I had to take small snaps of the Mini Map.

vacacow1
03-28-2012, 10:30 PM
Hey i can't seem to be able to compile it

Here's my code

LIVING_ROCK_CAVERNS:// Name of the area
with SPS_Surface do
begin
Name := 'Living Rock Cavern';//Name
ImagePath := SPS_IMG_PATH + 'living_rock_caverns\';//Folder in which we will create shortly
FactorX := 400;//No Touchy
FactorY := 400;//No Touchy
TileOffsetX := -1;//No Touchy
TileOffSetY := -1;//No Touchy
Tolerance := 0.4;//Tolerance Change this is you are having problems with walking.
end;

I keep getting this problem


[Error] C:\Simba\Includes\SPS/SPS.simba(100:7): Unknown identifier 'LIVING_ROCK_CAVERNS' at line 99
Compiling failed.

I already got the folder created with the image inside of it but still can't make it compile

I wanted to know what i'm doing wrong and if you could help me please! Thanks!

Kyle Undefined
03-28-2012, 10:47 PM
At the top of sps.simba, which is found in /Simba/Includes/SPS/, you will see this:


const
// Path where all the SPS files are
SPS_IMG_PATH = IncludePath + 'SPS\img\';
SPS_IMG_FMT = '.png';

// Supported SPS surfaces
RUNESCAPE_SURFACE = 1;
DUNGEON_ESSENCE_MINE = 2;
DWARVEN_MINE = 3;
RUNECRAFTING_ALTARS = 4;


Add the LIVING_ROCK_CAVERNS there :)

vacacow1
03-28-2012, 11:19 PM
At the top of sps.simba, which is found in /Simba/Includes/SPS/, you will see this:


const
// Path where all the SPS files are
SPS_IMG_PATH = IncludePath + 'SPS\img\';
SPS_IMG_FMT = '.png';

// Supported SPS surfaces
RUNESCAPE_SURFACE = 1;
DUNGEON_ESSENCE_MINE = 2;
DWARVEN_MINE = 3;
RUNECRAFTING_ALTARS = 4;


Add the LIVING_ROCK_CAVERNS there :)

Thank you very much man!!

Google
03-30-2012, 12:01 AM
I seem to be having a little trouble here

getting a simba error
_________________

SPS: Exception: Error while reading stream: File "C:\Simba\Includes\SPS\img\FoG\0_0.png" does not exists in SPS_Load


Please Run simba as an Adman bla bla...
Sorry for the inconvenience

osunateosu
03-30-2012, 06:39 AM
Beautifully done, took a while for me to get it. Had to experiment here and there, but hey isn't that what scripting is all about! With this tutorial I was able to get SPS set up in a area that wasn't already made, +1 to you Mat.

Mufasa
05-27-2012, 02:57 PM
Is this guide out of date now? I can't seem to find this bit.

case surface of

RUNESCAPE_SURFACE:
with SPS_Surface do
begin
Name := 'Runescape Surface';
ImagePath := SPS_IMG_PATH + 'runescape_surface\';
FactorX := 400;
FactorY := 400;
TileOffsetX := -1;
TileOffsetY := -1;
Tolerance := 0.4;
end;


The only part in the script which says "case surface of" is this bit;

// Loads the "Area" image
function SPS_GetArea(Area: string; surface: integer): TMufasaBitmap;
var
x, y: integer;
S: string;
begin
SPS_GetAreaCoords(Area, x, y);

case surface of
RUNESCAPE_SURFACE: s := RUNESCAPE_SURFACE_FOLDER;
RUNESCAPE_OTHER: s := RUNESCAPE_OTHER_FOLDER;
end;

try
Result := TMufasaBitmap.Create;
Result.LoadFromFile(SPS_IMG_PATH + s + Area + SPS_IMG_FMT);
except
Writeln('SPS_GetArea ERROR: '+ExceptionToString(ExceptionType, ExceptionParam));
end;
end;

Flight
07-31-2012, 01:10 PM
Mat by chance do you still have your SPS map piece for the Abyss? It would sure save me a lot of time from having to create my own.