Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   generating levels? (https://forums.graalonline.com/forums/showthread.php?t=52528)

billybob256 05-02-2004 09:13 PM

generating levels?
 
I've always wondered, how does kingdoms make all it's playerhouses, ship levels and treasure maps? I mean, do they have some sort of big archive in a folder, which triggers a level higher each time one is created (eg. playerhouse_105.nw to playerhouse_006.nw), or is there some sort of way that you can generate levels?

Any ideas anyone?

protagonist 05-02-2004 10:28 PM

Uses copylevel I think.

Phayze 05-03-2004 01:37 AM

Yep, copylevel.
It just copies a template level to a new name, counting the number of current houses and then adding the next number to the end of the new level name.

billybob256 05-03-2004 02:37 AM

is it a graalscript command?

if so how would you use it in an NPC?

Leasure-13 05-03-2004 02:59 AM

Quote:

Originally Posted by billybob256
is it a graalscript command?

if so how would you use it in an NPC?

I would like to know the same thing.

osrs 05-03-2004 03:01 AM

Quote:

Originally Posted by billybob256
is it a graalscript command?

if so how would you use it in an NPC?

Yes, it is a graal script command. I suppose it's like this, not sure though:
NPC Code:
copylevel levelname,newlevelname;


billybob256 05-03-2004 03:17 AM

Quote:

Originally Posted by osrs
Yes, it is a graal script command. I suppose it's like this, not sure though:
NPC Code:
copylevel levelname,newlevelname;


I'm almost sure it's not like that. I've tried it clientsided and serversided, and nothing happens.

Anyone else have any ideas on what the command might be?

Python523 05-03-2004 03:23 AM

Quote:

Originally Posted by billybob256
I'm almost sure it's not like that. I've tried it clientsided and serversided, and nothing happens.

Anyone else have any ideas on what the command might be?

You're obviously using it wrong.

osrs 05-03-2004 03:49 AM

Quote:

Originally Posted by billybob256
I'm almost sure it's not like that. I've tried it clientsided and serversided, and nothing happens.
Anyone else have any ideas on what the command might be?

Database-NPC is probably the answer. I remember someone scripting a system and using that command into a DB-NPC.

Malinko 05-03-2004 01:19 PM

Graal Kingdoms also has that Terrian Generator. It randomly does levels by that long number. It's quite fun actually seeing what you can generate.

billybob256 05-03-2004 01:50 PM

Quote:

Originally Posted by Malinko
Graal Kingdoms also has that Terrian Generator. It randomly does levels by that long number. It's quite fun actually seeing what you can generate.

You can also use levelgenerator, which i think is better because i'm not using a 3D terrain

Loriel 05-03-2004 02:03 PM

Tell him how to use it correctly?

I think the newly created level must not be in levels, but a subfolder... ? Dunno.

VeX_RaT_Boy 05-03-2004 03:26 PM

Thats correct. The folder you're copying to can't be the same you're copying from...

billybob256 05-03-2004 03:44 PM

so, i would put an npc in the DB and make it go something like this?:

NPC Code:
if (created){
copylevel levelname.nw , playerhouses/levelname.nw;
}


Dach 05-03-2004 08:35 PM

Quote:

Originally Posted by Malinko
Graal Kingdoms also has that Terrian Generator. It randomly does levels by that long number. It's quite fun actually seeing what you can generate.

That doesn't make them on the spot though...

Quote:

Originally Posted by Phayze
Yep, copylevel.
It just copies a template level to a new name, counting the number of current houses and then adding the next number to the end of the new level name.

Thats rather simplified, to the point where it won't work actualy :\ what happens when you make it to level #125 and the house #92 deletes? Then you'll be trying to create a level that already exists

...if only the search button still worked, there are a couple of threads about this topic already

billybob256 05-06-2004 09:28 PM

ya, i got copylevel to work, and the level is in levels/copiedlevels/

I've set the folder config to 'level levels/playerhouses/*.nw'
but it says the level doesn't exist when i use warpto 30 30 copy1.nw.

Anyone know the problem now?

VeX_RaT_Boy 05-06-2004 09:35 PM

Don't start with levels/ It is kinda allready in levels... all you need is
NPC Code:
level playerhouses/*.nw


CaTigus 06-04-2004 06:51 PM

copylevel inside_copies/tent_original2.nw,inside_copies/tent_#s(server.tent).nw;
I used that for the tent on Valikorlia.

Dach 06-05-2004 07:45 PM

ok? your point?

projectigi 06-08-2004 08:25 AM

Does a level auto update itself when i copy a other level over it?


All times are GMT +2. The time now is 04:31 AM.

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