Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-16-2011, 02:19 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Creating a level via script?

Is there any way of creating a level via GScript without the conventional copylevel() function?
What I mean is creating a level file from scratch akin to the level that the GraalEditor program creates upon startup. I've tried looking for a function for this, but haven't found anything.

The only way I could imagine creating a level from scratch is taking a level file on the server, use the copylevel() function to create another and write the text content of the level file somehow so that it matches the GraalEditor startup level.

Any ideas?
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #2  
Old 12-16-2011, 02:23 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Have a blank level stored on the server and copylevel() that, or simply write the level manually(levels are stored as text, open a level up in wordpad) and savelines or something like that.
Reply With Quote
  #3  
Old 12-16-2011, 02:31 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Quote:
Originally Posted by DustyPorViva View Post
Have a blank level stored on the server and copylevel() that, or simply write the level manually(levels are stored as text, open a level up in wordpad) and savelines or something like that.
I'd rather do it dynamically if possible, ie. without having a blank level stored on the server.
So you're saying loadlines() works for .nw files? I can't exactly check for myself at the minute. If so, I didn't know that, so thanks!
So the method I suggested at first would be the way to go about it then?
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #4  
Old 12-16-2011, 02:34 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
What's so dynamic about that? You'd end up with the same result, a blank level is a blank level. And yes, levels are text so anything you could do to a text file you can do to a level.
Reply With Quote
  #5  
Old 12-16-2011, 02:36 AM
iBeatz iBeatz is offline
Kavan
iBeatz's Avatar
Join Date: Dec 2010
Location: Northern Ireland, UK
Posts: 154
iBeatz will become famous soon enough
Send a message via Yahoo to iBeatz
Quote:
Originally Posted by DustyPorViva View Post
What's so dynamic about that? You'd end up with the same result, a blank level is a blank level. And yes, levels are text so anything you could do to a text file you can do to a level.
When I mean dynamic, I mean I just want to make it so that only the script is needed for the process.
Thanks for your help.
__________________

Intelligence without ambition is like a bird without wings.

Reply With Quote
  #6  
Old 12-16-2011, 08:19 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
I think what you're after doesn't exist and has no need to exist. I don't see the problem in having a blank template level apart from the portability aspect...
Reply With Quote
  #7  
Old 12-16-2011, 08:56 AM
Fulg0reSama Fulg0reSama is offline
Extrinsical Anomaly
Fulg0reSama's Avatar
Join Date: Sep 2009
Location: Ohio
Posts: 3,049
Fulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant futureFulg0reSama has a brilliant future
Sorry If I misinterpret, but do you mean that you're looking for something for level generation? like for seperate people? If so then no clue. If not, then ignore what I asked.
__________________

Careful, thoughts and opinions here scare people.
Reply With Quote
  #8  
Old 12-16-2011, 11:44 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Not really sure what you're asking for, but if you're trying to create levels on-the-fly and delete them afterwards, this will handle it for you.
__________________
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:55 PM.


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