Graal Forums  

Go Back   Graal Forums > Development Forums > Future Improvements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2003, 08:42 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
A more soild mapping function

I can never get the map making thing to use the textfile I want! Make it so that when you hit 'M' in the editor that you can browse to chose the file...


Unless I am doing something wrong... If that's the case, someone please tell me and I'll delete the thread (if I still can by then.)
Reply With Quote
  #2  
Old 12-29-2003, 08:54 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 will become famous soon enough
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
Making a map should be more automatic. You browse, select the folder you want. And then all the levels in are are done. BAM. A map is made. Incluiding a map.txt....Why doesn't that work? -_-
__________________
Reply With Quote
  #3  
Old 12-29-2003, 09:09 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally posted by zell12
Incluiding a map.txt
The point of the map text is to tell the editor in which order to put the levels on the map... You need to make that manually...
Reply With Quote
  #4  
Old 12-29-2003, 09:18 AM
Kigan Kigan is offline
Banned
Join Date: Dec 2003
Posts: 92
Kigan is on a distinguished road
If you're talking different map's for different levels, just make an NPC that uses the level name. If you have a common naming scheme like "overworld-0,1.graal" set up the npc to set the map for all levels begining with "overworld" to overworld.txt or gmap or w/ever. If your working offline, you could make it a toweapons NPC.

Thats the way I've always done it, but then again, this was before the level generator or the nw level format, I'm sure a lot has changed.
Reply With Quote
  #5  
Old 12-29-2003, 09:24 AM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally posted by Kigan
If you're talking different map's for different levels, just make an NPC that uses the level name. If you have a common naming scheme like "overworld-0,1.graal" set up the npc to set the map for all levels begining with "overworld" to overworld.txt or gmap or w/ever. If your working offline, you could make it a toweapons NPC.

Thats the way I've always done it, but then again, this was before the level generator or the nw level format, I'm sure a lot has changed.
Huh? I have an NPC in a level with this...

NPC Code:

//#CLIENTSIDE
if (playerenters) {
setmap bella_angler.png,bella_angler.txt,9.7,15.3;
}



And the text file says this:

Quote:
"bella_angler2.nw","bella_angler3.nw"
When I go into edit mode in bella_angler2.nw and hit 'M' it says the thing about "This may take a while" I hit OK, and the save as window comes up, but it doesn't read the txt file... The file is in the same directory as the levels...


EDIT: It seems to be working now... I don't know what I did... Perhpas the .txt was in the wrong directory... Though I still believe that you should be able to choose the .txt file from a browser window, it would make this a lot less frustrating...
Reply With Quote
  #6  
Old 12-29-2003, 10:23 AM
Kigan Kigan is offline
Banned
Join Date: Dec 2003
Posts: 92
Kigan is on a distinguished road
I ment you could make an offline system script like this. This method checks the current level's filename to set the approiate map automaticailly, instead of having a bunch of setmap NPCs inside the levels, this method works better and is less buggy for users in my experience, but I haven't tried anything like it with an NPC server so I wouldn't know if it still works.

NPC Code:

// Script created by Ray P. Soucy <[email protected]>
// This is the System Script for Legends of Graal


if (created)
{
// Add this Script to the Player ("-" denotes a hidden script)
toweapons -system-;
}


if (created || timeout)
{
// Setup the Map and Minimap
// Overworld Levels start with "log-"
if (startswith(log-,#L))
{
setmap log-map.png,log-map.txt,0,0;
setminimap log-minimap.png,log-minimap.txt,0,0;
}

// Reset the timer, end of script.
timeout = .05;
}



EDIT:

The levelnames in this case are "log-x,y.graal". e.g. "log-0,2.graal"

I also use this method for other things like assigning MIDI files to certain levels.

It's better to have your scripting centralized.


Kigan
Reply With Quote
  #7  
Old 12-29-2003, 03:59 PM
haunter haunter is offline
Registered User
haunter's Avatar
Join Date: Mar 2001
Posts: 7,989
haunter is on a distinguished road
Quote:
Originally posted by Kigan
*stuff*
I know how to active a map... the problem was making graal use the .txt I wanted when I hit 'M' in the editor.
Reply With Quote
  #8  
Old 12-29-2003, 09:28 PM
Kigan Kigan is offline
Banned
Join Date: Dec 2003
Posts: 92
Kigan is on a distinguished road
Wow, I must of been tired, I totally read that wrong last night I didn't even know the editor had a map feature.
Reply With Quote
  #9  
Old 12-31-2003, 10:11 AM
TB3 TB3 is offline
Registered User
TB3's Avatar
Join Date: May 2001
Location: US of A State of VA
Posts: 658
TB3 is on a distinguished road
Send a message via Yahoo to TB3
Quote:
Originally posted by Kigan
I ment you could make an offline system script like this. This method checks the current level's filename to set the approiate map automaticailly, instead of having a bunch of setmap NPCs inside the levels, this method works better and is less buggy for users in my experience, but I haven't tried anything like it with an NPC server so I wouldn't know if it still works.

NPC Code:

// Script created by Ray P. Soucy <[email protected]>
// This is the System Script for Legends of Graal


if (created)
{
// Add this Script to the Player ("-" denotes a hidden script)
toweapons -system-;
}


if (created || timeout)
{
// Setup the Map and Minimap
// Overworld Levels start with "log-"
if (startswith(log-,#L))
{
setmap log-map.png,log-map.txt,0,0;
setminimap log-minimap.png,log-minimap.txt,0,0;
}

// Reset the timer, end of script.
timeout = .05;
}



EDIT:

The levelnames in this case are "log-x,y.graal". e.g. "log-0,2.graal"

I also use this method for other things like assigning MIDI files to certain levels.

It's better to have your scripting centralized.


Kigan

Just a side note i also probably made a small error:
Please dont make more timeouts than neccesary (I dont realy care if you do but its best to reduce that ammount make something more along the lines of this)
Mainly be because you only need to check the level name when a player enters the level.
This is in all cases although 50 weapon npcs with .05 timeout scripts doesnt lag the server it does lag on older client systems.
NPC Code:

//In Control NPC
if (playerisonline) {
if(!hasweapon(-Mapping)) addweapon -Mapping;
}


NPC Code:

//IN Weapon NPC -Mapping
if (playerenters) {
if (startswith(VARHERE,#L)) {
setmap VARHERE_map.png,VARHERE_map.txt,0,0;
setminimap VARHERE_minimap.png,VARHERE_map.txt,0,0;
}
}



And on subject yes it would be nice to have the editor ask for the map text file name when making a map, or maybe it and many other things could be in a seperate developer program? like tiledat editing, dungeon generator, level generator, terrain editor , and any other spiffy stuff put in one nice development program Especialy if the new Remote controls online level editing and offline wont be used too much or at all that would be a nice prog to have.
Gnight im cant see my eykborad
__________________

To the sun of your age, I arise

Last edited by TB3; 12-31-2003 at 09:22 PM..
Reply With Quote
Reply


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 01:01 AM.


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