Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   Levels to gmaps (https://forums.graalonline.com/forums/showthread.php?t=65741)

excaliber7388 04-30-2006 01:49 AM

Levels to gmaps
 
Okay, basically, I made DR without the use of the level generator. Not, on gs2, it worked fine as a 'gmap' however, on V4, it doesn't work. It's also messed up the time scripts which use 'onmap'. So basicall, I'm asking if there is any way to convert these levels to a gmap?

xAndrewx 04-30-2006 10:42 AM

They're already a GMAP. All you need to make is the GMAP file. Simply copy/paste the levels in the order that they're linked and the width/height of the levels.

excaliber7388 04-30-2006 09:27 PM

Quote:

Originally Posted by xAndrewx
They're already a GMAP. All you need to make is the GMAP file. Simply copy/paste the levels in the order that they're linked and the width/height of the levels.

I'll try again, maybe I messed up, but I already have a list of the levels, in order, in a gmap file, with width and height, as well as something like gmaps=darkrival.gmap in the server options. So I must have done something wrong in the making of the txt file (.gmap)

Andy0687 04-30-2006 09:33 PM

Quote:

Originally Posted by excaliber7388
as well as something like gmaps=darkrival.gmap in the server options.

I dont know if it will make that big of a diffrence but the .gmap extension is not needed in "gmaps="

excaliber7388 04-30-2006 09:51 PM

x_X nope. Then again the outsides have changed a bit since I first made the levels txt file, and the height and width have probably changed as well. x_X is there an easier way other than walking around the server and figuring out how wide/tall it is, or is there some way I can generate a txt file and map. (M in editor never worked right x_X) (list index out of bounds is the most recent complaint)

Andy0687 05-01-2006 12:46 AM

Quote:

Originally Posted by excaliber7388
x_X nope. Then again the outsides have changed a bit since I first made the levels txt file, and the height and width have probably changed as well. x_X is there an easier way other than walking around the server and figuring out how wide/tall it is, or is there some way I can generate a txt file and map. (M in editor never worked right x_X) (list index out of bounds is the most recent complaint)

No I dont think there is, but on ProjectR we had a problem when updating a second gmap onto the server. Dunno how long its been going on for but Silent said something about restarting gserver when you add new gmaps to gmaps=

Unrelated responce probably, I dont really do gmaps, Sephiroth is the one who made our maps.

excaliber7388 05-01-2006 01:35 AM

Quote:

Originally Posted by Andy0687
No I dont think there is, but on ProjectR we had a problem when updating a second gmap onto the server. Dunno how long its been going on for but Silent said something about restarting gserver when you add new gmaps to gmaps=

Unrelated responce probably, I dont really do gmaps, Sephiroth is the one who made our maps.

I've tried that before too x_x
DR's a little understaffed, the old version of a Gmap was easy, but for v4, it hasn't worked x_x

Prozac 05-01-2006 10:43 PM

for sanstrata classic, of course 5 years ago we saved them all as .graal files.
well, we resaved them all as .nw files, but then all the ow level links were not from the 0 to 64 on the edges, they were like from 1 to 63 on some places.
so, to make it faster,
I used levelgen to make a blank level set with the same width and height as the sanstrata map.
Then I used my hosted website and uploaded the old converted .nw files and the blank levle set, and wrote a program in perl to read the level definition from the old levels (using the old bigmap.txt) tile definitions, since .nw can be read as a text file, and then overwrote the blank grass with the level set with the correct tile definitions.
Thus all that was left to do was to recreate the warps to the insides of the houses and change all the house inside to ow warps to be to the right file name, as the x and y are the same.

at least, that was the easiest way to do it that i could think of ...

excaliber7388 05-02-2006 02:19 AM

Quote:

Originally Posted by Prozac
for sanstrata classic, of course 5 years ago we saved them all as .graal files.
well, we resaved them all as .nw files, but then all the ow level links were not from the 0 to 64 on the edges, they were like from 1 to 63 on some places.
so, to make it faster,
I used levelgen to make a blank level set with the same width and height as the sanstrata map.
Then I used my hosted website and uploaded the old converted .nw files and the blank levle set, and wrote a program in perl to read the level definition from the old levels (using the old bigmap.txt) tile definitions, since .nw can be read as a text file, and then overwrote the blank grass with the level set with the correct tile definitions.
Thus all that was left to do was to recreate the warps to the insides of the houses and change all the house inside to ow warps to be to the right file name, as the x and y are the same.

at least, that was the easiest way to do it that i could think of ...

Ah yes, why didn't that come to me? ;)
Pretty cool though. Still have that program somewhere?

Prozac 05-03-2006 04:38 AM

hm i forgot where i posted it. and im sure theres probably an easier way. anyways thats the algorithm ... so now u can use c++ or basic or something to do it

excaliber7388 05-03-2006 03:39 PM

Any tips on how to write it (basics, I plan to do it in C++)

petro1212 05-04-2006 01:03 PM

You could ofcourse bother to copy them from map to map in level editor. I did this for N-pulse a while ago (not a huge overworld) anyhow this will hardly cost you a few hours. Ducati also did it (with a way bigger OW) anyhow just try it...

And as for GMAP questions.... there are tons of FAQ/Walktroughs and how-to posts/threads on these forums & in the Graal Bible ;)

You might even want to try and use Rick's GMAP naming system...

Malinko 05-08-2006 08:32 PM

You want to re-name the level files to something else along with links and then make those into a GMAP file?

Stefan has a program for that somewhere, of course, if this is what is wanted to do.

excaliber7388 05-08-2006 09:34 PM

Quote:

Originally Posted by Malinko
You want to re-name the level files to something else along with links and then make those into a GMAP file?

Stefan has a program for that somewhere, of course, if this is what is wanted to do.

Anything to get a gmap with the current OW
and it would take MUCh more than a few hours to convert DR by hand, it's a huge OW with a lot of links on it.

excaliber7388 05-09-2006 12:02 AM

And wasn't there a loadfullmap for the server options before? (We have a new overworld, but it's not going to replace the currentone for a LONG time, so we need to fix the current one)

Prozac 05-09-2006 05:17 AM

this is the perl code
the level list names are at the top

i didn't write it for public use, but you should be able to get the algorithm from it

PHP Code:

#!/usr/bin/perl 
print "Content-type: text/html\n\n";

#gmap level tile swapping

$newmap="sanstrata_a01.nw,sanstrata_b01.nw,sanstrata_c01.nw,sanstrata_d01.nw,sanstrata_e01.nw,sanstrata_f01.nw,sanstrata_g01.nw,sanstrata_h01.nw,sanstrata_i01.nw,sanstrata_j01.nw,sanstrata_k01.nw,sanstrata_l01.nw,sanstrata_a02.nw,sanstrata_b02.nw,sanstrata_c02.nw,sanstrata_d02.nw,sanstrata_e02.nw,sanstrata_f02.nw,sanstrata_g02.nw,sanstrata_h02.nw,sanstrata_i02.nw,sanstrata_j02.nw,sanstrata_k02.nw,sanstrata_l02.nw,sanstrata_a03.nw,sanstrata_b03.nw,sanstrata_c03.nw,sanstrata_d03.nw,sanstrata_e03.nw,sanstrata_f03.nw,sanstrata_g03.nw,sanstrata_h03.nw,sanstrata_i03.nw,sanstrata_j03.nw,sanstrata_k03.nw,sanstrata_l03.nw,sanstrata_a04.nw,sanstrata_b04.nw,sanstrata_c04.nw,sanstrata_d04.nw,sanstrata_e04.nw,sanstrata_f04.nw,sanstrata_g04.nw,sanstrata_h04.nw,sanstrata_i04.nw,sanstrata_j04.nw,sanstrata_k04.nw,sanstrata_l04.nw,sanstrata_a05.nw,sanstrata_b05.nw,sanstrata_c05.nw,sanstrata_d05.nw,sanstrata_e05.nw,sanstrata_f05.nw,sanstrata_g05.nw,sanstrata_h05.nw,sanstrata_i05.nw,sanstrata_j05.nw,sanstrata_k05.nw,sanstrata_l05.nw,sanstrata_a06.nw,sanstrata_b06.nw,sanstrata_c06.nw,sanstrata_d06.nw,sanstrata_e06.nw,sanstrata_f06.nw,sanstrata_g06.nw,sanstrata_h06.nw,sanstrata_i06.nw,sanstrata_j06.nw,sanstrata_k06.nw,sanstrata_l06.nw,sanstrata_a07.nw,sanstrata_b07.nw,sanstrata_c07.nw,sanstrata_d07.nw,sanstrata_e07.nw,sanstrata_f07.nw,sanstrata_g07.nw,sanstrata_h07.nw,sanstrata_i07.nw,sanstrata_j07.nw,sanstrata_k07.nw,sanstrata_l07.nw,sanstrata_a08.nw,sanstrata_b08.nw,sanstrata_c08.nw,sanstrata_d08.nw,sanstrata_e08.nw,sanstrata_f08.nw,sanstrata_g08.nw,sanstrata_h08.nw,sanstrata_i08.nw,sanstrata_j08.nw,sanstrata_k08.nw,sanstrata_l08.nw,sanstrata_a09.nw,sanstrata_b09.nw,sanstrata_c09.nw,sanstrata_d09.nw,sanstrata_e09.nw,sanstrata_f09.nw,sanstrata_g09.nw,sanstrata_h09.nw,sanstrata_i09.nw,sanstrata_j09.nw,sanstrata_k09.nw,sanstrata_l09.nw,sanstrata_a10.nw,sanstrata_b10.nw,sanstrata_c10.nw,sanstrata_d10.nw,sanstrata_e10.nw,sanstrata_f10.nw,sanstrata_g10.nw,sanstrata_h10.nw,sanstrata_i10.nw,sanstrata_j10.nw,sanstrata_k10.nw,sanstrata_l10.nw,sanstrata_a11.nw,sanstrata_b11.nw,sanstrata_c11.nw,sanstrata_d11.nw,sanstrata_e11.nw,sanstrata_f11.nw,sanstrata_g11.nw,sanstrata_h11.nw,sanstrata_i11.nw,sanstrata_j11.nw,sanstrata_k11.nw,sanstrata_l11.nw,sanstrata_a12.nw,sanstrata_b12.nw,sanstrata_c12.nw,sanstrata_d12.nw,sanstrata_e12.nw,sanstrata_f12.nw,sanstrata_g12.nw,sanstrata_h12.nw,sanstrata_i12.nw,sanstrata_j12.nw,sanstrata_k12.nw,sanstrata_l12.nw,sanstrata_a13.nw,sanstrata_b13.nw,sanstrata_c13.nw,sanstrata_d13.nw,sanstrata_e13.nw,sanstrata_f13.nw,sanstrata_g13.nw,sanstrata_h13.nw,sanstrata_i13.nw,sanstrata_j13.nw,sanstrata_k13.nw,sanstrata_l13.nw,sanstrata_a14.nw,sanstrata_b14.nw,sanstrata_c14.nw,sanstrata_d14.nw,sanstrata_e14.nw,sanstrata_f14.nw,sanstrata_g14.nw,sanstrata_h14.nw,sanstrata_i14.nw,sanstrata_j14.nw,sanstrata_k14.nw,sanstrata_l14.nw";

$oldmap="s34.nw,s33.nw,s32.nw,s8.nw,sirus38.nw,sirus25.nw,sirus26.nw,sirus27.nw,sirus42.nw,sirus50.nw,sirus52.nw,sirus53.nw,s35.nw,s43.nw,s39.nw,s7.nw,sirus37.nw,sirus23.nw,sirus21.nw,sirus24.nw,sirus41.nw,sirus49.nw,sirus51.nw,sirus54.nw,s36.nw,s37.nw,s38.nw,s6.nw,sirus36.nw,sirus28.nw,sirus22.nw,sirus29.nw,sirus40.nw,castle3.nw,castle2.nw,stown5.nw,s40.nw,s41.nw,s4.nw,s5.nw,sirus35.nw,sirus33.nw,sirus20.nw,sirus34.nw,sirus39.nw,castle4.nw,stown3.nw,stown4.nw,s42.nw,s9.nw,s3.nw,zypher4.nw,zypher6.nw,zypher9.nw,sgrassland9.nw,smountain4.nw,smountain5.nw,smountain6.nw,stown1.nw,stown2.nw,prozac5.nw,prozac3.nw,s2.nw,zypher3.nw,zypher5.nw,zypher8.nw,sgrassland8.nw,smountain3.nw,smountain10.nw,smountain12.nw,smountain15.nw,smountain19.nw,prozac4.nw,prozac1.nw,prozac2.nw,zypher1.nw,zypher2.nw,zypher7.nw,sgrassland7.nw,smountain2.nw,smountain9.nw,smountain11.nw,smountain13.nw,smountain17.nw,slake3.nw,slake1.nw,sgrassland2.nw,sgrassland1.nw,sgrassland3.nw,sgrassland5.nw,sgrassland6.nw,smountain1.nw,smountain7.nw,smountain8.nw,smountain14.nw,smountain16.nw,s31.nw,slake2.nw,sirus44.nw,sforest1.nw,sforest3.nw,sforest4.nw,sforest5.nw,sgrassland10.nw,sgrassland12.nw,sgrassland13.nw,sgrassland14.nw,sgrassland15.nw,s30.nw,slake4.nw,sirus45.nw,sforest2.nw,sforest6.nw,sforest8.nw,sforest9.nw,sgrassland11.nw,sdesert1.nw,sdesert11.nw,sdesert24.nw,sdesert25.nw,s29.nw,sirus46.nw,sirus47.nw,sforest12.nw,sforest13.nw,sforest14.nw,sirus48.nw,sdesert4.nw,sdesert3.nw,sdesert9.nw,sdesert22.nw,sdesert26.nw,s28.nw,s1.nw,s14.nw,s13.nw,s21.nw,s22.nw,s23.nw,sdesert12.nw,sdesert6.nw,sdesert10.nw,sdesert21.nw,sdesert23.nw,s27.nw,s10.nw,s12.nw,s15.nw,s16.nw,s17.nw,s19.nw,sdesert13.nw,sdesert7.nw,sdesert17.nw,sdesert18.nw,sdesert19.nw,s00.nw,s11.nw,s25.nw,s24.nw,s26.nw,s18.nw,s20.nw,river1.nw,river2.nw,river3.nw,river4.nw,river5.nw";

@new=
split(/\,/,$newmap);
@
old=split(/\,/,$oldmap);


print 
"Howdy $new[5] <p> \n ";

######## old file

for ($i=0$i<$#old+1; $i++)
{

$count=0;
$from_old="GLEVNW01\n";

open (FILE"../graal-old/$old[$i]");
 
until (eof(FILE))
  {
   
$line=<FILE>;
   
chomp($line);
  
# @link=split(/þ/,$line);
  
$newline="";
  if (
$line=~"BOARD 0") {$from_old=$from_old.$line."\n";}
  
#{$newline=$newline.$line."\n";}
  
$count++;
  }
close(FILE);

#   print "line $ya found in file $i $old[$i] <br> \n";

# put board stuff in new levels

# open (>FILE2,"../graal-old/$old[$i]")

open (FILE2,">../graal-fixed/$new[$i]");
print 
FILE2 "$from_old";
close(FILE2);

}

#########################

######## new file
print "\n <hr> \n ";

for (
$i=0$i<$#old+1; $i++)
{

$count=0;
$from_new="";

open (FILE"../graal-new/$new[$i]");
 
until (eof(FILE))
  {
   
$line=<FILE>;
   
chomp($line);
  
# @link=split(/þ/,$line);
  
$newline="";
  if (
$line=~"LINK ")  {$from_new=$from_new.$line."\n";}
  
#{$newline=$newline.$line."\n";}
  
$count++;
  }
close(FILE);

   print 
"line $ya found in file $i $new[$i] <br> \n";


#################
# put link stuff in new levels

open (FILE2,">>../graal-fixed/$new[$i]");
print 
FILE2 "$from_new";
close(FILE2);

}

#####################

exit; 


Malinko 05-09-2006 05:21 PM

Quote:

Originally Posted by excaliber7388
Anything to get a gmap with the current OW
and it would take MUCh more than a few hours to convert DR by hand, it's a huge OW with a lot of links on it.

Hm, alright.

One question before I can assist with that though.

So for example, let's have a 2x2 overworld map.

"darkrival_town1-0.nw","darkrival_town1-1.nw"
"darkrival_forest1-0.nw","darkrival_forest1-1.nw"

Then it's wished to convert those levels into a GMAP.

"dr_a01.nw","dr_b01.nw"
"dr_a02.nw","dr_b02.nw"

Of course, this can be optimized to create a GMAP file and have it loaded on Dark Rival.

GRMAP001
WIDTH 2
HEIGHT 2
MAPIMG dr_bigmap.png
MINIMAPIMG dr_minimap.png
LEVELNAMES
"dr_a01.nw","dr_b01.nw"
"dr_a02.nw","dr_b02.nw"
LEVELNAMESEND

Then can be saved as dr.gmap in Notepad or some word editor.

Though, this is what is wanted, right? Oh, and note, it will change the links within the level, so don't need to stress out about that, but might have to change links to "inside" levels.

Of course, the first example I provided

"darkrival_town1-0.nw","darkrival_town1-1.nw"
"darkrival_forest1-0.nw","darkrival_forest1-1.nw"

can be converted into a GMAP.

I guess it depends on what is wished to do, from personal peference. You can attach the current map file and I'm sure I or someone else here will convert it into a GMAP file and attach it on the forums, then it can be learned how to do.

excaliber7388 05-09-2006 07:14 PM

I've tried putting the old levels txt file in gmap format, it didn't work.

excaliber7388 05-09-2006 07:15 PM

Quote:

Originally Posted by Prozac
this is the perl code
...

Thanks, I'll use that :D

Malinko 05-10-2006 04:59 PM

If the PEARL doesn't function, then I would attach the GMAP file to a post, I'm sure there was some error made, because it sure does work.

excaliber7388 05-10-2006 07:08 PM

Quote:

Originally Posted by Malinko
If the PEARL doesn't function, then I would attach the GMAP file to a post, I'm sure there was some error made, because it sure does work.

I might rewrite it to C++, but I am going to use it. It should work :D I'll post if it doesn't

excaliber7388 05-10-2006 09:48 PM

With Dark Rivals old design, a program wouldn't work. I'm going to have to do it by hand. x_x Unless V4 accepts old maps, this is going to take a while x_x

excaliber7388 05-14-2006 05:46 PM

Okay, what I did was make a gmap with the level editor that was large enough to fit the old OW. Then I replaced the levels in the gmap file with the ones from the old gmap. I press M in editor, and it goes through it fine, however, the map image it generates is messed up, it cannot be opened, and it showes no image. I don't think I did anything wrong. The map is 25x37 levels, could it's size be a problem?

excaliber7388 05-16-2006 10:01 PM

1 Attachment(s)
Our gmap produces images the one below, and never makes a map image. What's wrong (support center is down, btw).
It's 25 by 37 levels.

Malinko 05-17-2006 04:57 PM

As I said before, post the old map, which can be converted into a GMAP.

We can't solve a problem unless we see what is going on. I'm guessing breaks are in the wrong place, because it shouldn't do that.

To answer the problem about the map image, v4 does not support that right now. Stefan said it could be added soon. Of course, walking around the GMAP, and press M in game will load the parts of the map that were visited.

excaliber7388 05-17-2006 05:18 PM

I'd post the gmap I'm trying to use, but it's too long. x_X

Malinko 05-18-2006 01:07 AM

Quote:

Originally Posted by excaliber7388
I'd post the gmap I'm trying to use, but it's too long. x_X

Upload it somewhere, or the GraalBible for now, then we can delete it afterwards.

I'm sure the moderators will not mind uploading it to an external host, because it is for GraalOnline development.

VulcanP2P 05-18-2006 03:18 AM

...it's too big to attach as a txt file?

excaliber7388 05-18-2006 03:28 PM

Quote:

Originally Posted by VulcanP2P
...it's too big to attach as a txt file?

omg, I feel like an idiot right now, I'll upload it when I get home to my comp.

Malinko 05-19-2006 05:10 PM

Quote:

Originally Posted by excaliber7388
omg, I feel like an idiot right now, I'll upload it when I get home to my comp.

*Blinks*

What did you think I meant?


All times are GMT +2. The time now is 09:16 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.