Can someone give me a few good sites to get an intro into graal scripting, or some good tutorial videos and such. I️ am trying to learn gscript but it is very difficult to find good tutorials on it.
Printable View
Can someone give me a few good sites to get an intro into graal scripting, or some good tutorial videos and such. I️ am trying to learn gscript but it is very difficult to find good tutorials on it.
https://www.youtube.com/user/Gscript2Tutorials/videos
https://www.era-go.com/forum/showthr...ighlight=noobs
https://www.era-go.com/forum/showthr...or-the-Noobs-2
https://www.era-go.com/forum/showthr...ighlight=noobs
https://www.era-go.com/forum/showthr...ighlight=noobs
https://www.era-go.com/forum/showthr...ighlight=noobs
https://www.era-go.com/forum/showthr...ighlight=noobs
https://www.era-go.com/forum/showthr...ighlight=noobs
Also if anyone knows how to create/download a gmap, I️ need a 2x2 that I️ can upload onto testbed
GMAPs Howto
Gmaps are files that contain information about how to links many single level
files (.nw) to a big map that seems like one level in game. This makes it
possible to have a map that shows all player on the same island or area as
yourself, and removes restrictions on what NPCs can do caused by the
seperativity of each level.
Earlier this was done through .txt files merely containing a list of levels,
and the setmap command, but this lacks many of the features the gmap way
provides, and thus shall not be used anymore. Many playerworlds probably still
use the old way, but this is merely because of the difficulties that make it
hard and error prone to convert a whole 'game' to a new format.
Gmaps, if not handmade, are created by the level generator that is installed
through Graal's setup.exe along with the Windows version of the game. To my
knowledge, for Graal's versions for other operating systems there is currently
no device that creates levels or maps.
Gmaps can also hold height information that are used by the Graal engine to
display levels in a three dimensional looking way. The height information is
mainly created by the level editor and the mystical "Terrain Generator"
programs that allows creation of whole islands, but is only available as a
leaked .exe file.
Gmaps are plain text files, and all gmaps as of now start with the string
GRMAP001, followed by a newline. Then, in each line, a 'command' is given,
usually in capital letters. Parameters to those commands are put into the same
line after a whitespace. Some commands are in fact lists, which have nothing
in their line, but which treat all following lines as their parameters until
they see themselves followed by 'END' without any whitespace again.
To learn about all that, in addition to reading this tutorial, I recommend to
check your 'maps' subfolder, and have a look at some PWs' gmaps. I receive my
knowledge of no other source than that.
WIDTH, and HEIGHT, followed by an integral number
Dimensions of the whole map, given in single levels. If given incorrectly,
these can break the whole map, thus be careful.
GENERATED, followed by a level name
Gives the last, or bottom right, level that was generated if the gmap was
created along with a whole set of levels using a device such as the terrain
generator.
LEVELNAMES, followed by a list of levels, and terminated by LEVELNAMESEND
The list of levels that are part of this map. Each 'row' of levels goes into
one line, seperated by commata. There is no commata at the end of a line.
MAPIMG, followed by a PNG file name
The image file that is to be used as the map that players see if they press
their Map key.
MINIMAPIMG, followed by a PNG file name
The image file that is to be used as the mini map in the bottom left corner
of one's screen.
NOAUTOMAPPING, uses no param
Disables the assembly of automagical screenshots into a map that is drawn
over the MAPIMG image.
GENEVENBORDERS, followed by true/false
GENSEED, followed by a big number used to seed randomness
GENBASE, followed by a height value
GENHEIGHT and LEVHEIGHT, followed by a height value
GENCHAOS and LEVCHAOS, followed by a number between 0 and 1, I think, exact to 1/20
HEIGHMAP, followed by a list of height values for each level ordered similar
to the LEVELNAMES list, terminated by HEIGHTMAPEND
RANDOMSEEDS, followed by lots of big numbers, probably ordered similar to the
LEVELNAMES list, terminated by RANDOMSEEDSEND
These are used by the engine to render the level in a 3dy way. I know no
more about them than what is obvious from reading their names. They are
usually set by the terrain generator.
Now, imagine you have a gmap and a set of levels and want to actually use it
on Graal. The main thing is to load it by using the clienstide script command
loadmap, which takes the name of a gmap as a parameter, without the .gmap
extension. This is usually done by a NPC Weapon that each player has, like
-System, or -Initialization, and as Stefan loads all gmaps as soon as a player
connects to the server, I suggest you do so too.
This will enable the engine to assign levels the player enters or sees. Levels
must still have link areas to each other in order to move on the map. But as
you are going to use the gmap on your playerworld, you need to make it
available for players to download, by putting it inside the levels/ folder
hierarchy using the RC's file manager, and adding it to the folder
configuration as mere level; level *.gmap, for example. It is neccessary to
additionally register it as file in the folder configuration, but there is no
gmap category to put it under.
To make the NPC Server aware of your gmaps, you need to list them in the
server options too. Add a new option gmaps= followed by a comma seperated list
of names without the .gmap extension. If your line gets too stuffed, you can
as well use multiple lines, as long as you prefix each one with gmaps=. The
entries in each lines will be added, and not replace each other.
TODO:
Make up sensible order for the commands.
Probably should ask Stefan about those:
How obsolete is it to use all of WIDTH, HEIGHT, GENERATED and LEVELSLIST?
MAPIMG and the like: Omit or put -?
Open a text document in notepad, ill give you an example of a gmap file.
GRMAP001
WIDTH 2
HEIGHT 1
LEVELNAMES
"levelname_a1.nw","levelname_b1.nw"
LEVELNAMESEND
Width = how many levels across the gmap is so as you can see its set as 2 so it will be 2 levels next to each other
Height = how many levels down the gmap is, its set to 1 so only one level down like a normal level.
levelnames are the names of the levels used for the gmap. so they start with the gmap name forexample the gmap file can be called era_themepark.gmap and the 2 levels will be name era_themepark_a1.nw and era_themepark_b1.nw
the letters are the columns and the numbers are the rows so since theres a and b like we set the width before, a comes first and then b will be to the right of it and they will both be on the row 1.
Once you create it save the file as a .gmap file
Probably badly explained and someone could do better but i just wanted to make a quick reply for you. You can also use the level generator that comes with the graal pc client, but i felt that was more awkward and annoying to use.
is the gmap for a server?
GRMAP001
WIDTH 2
HEIGHT 2
LEVELNAMES
"era_nbkhideout_a1.nw","era_nbkhideout_b1.nw", "era_nbkhideout_a2.nw","era_nbkhideout_b2.nw"
LEVELNAMESEND
I guess that would be the .gmap file and the levels are easy to make and just add in
if you still need help, later on i can come on testbed and help you.
added you on discord, i have to go eat so ill be around later
Not more than 25.