Graal Forums  

Go Back   Graal Forums > Development Forums > Level Design
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-07-2012, 02:59 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
GK Terrain

After generating a gmap using the Terrain Generator, is there a way to manipulate the height of the ground via Graal editor?

I already have my map down and I want to smooth out a part of it.
Reply With Quote
  #2  
Old 12-07-2012, 03:11 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by greggiles View Post
After generating a gmap using the Terrain Generator, is there a way to manipulate the height of the ground via Graal editor?

I already have my map down and I want to smooth out a part of it.
You can edit the terrain in the level editor if you load the gmap using an NPC script. The code below in the PHP tags should display the terrain in the editor with + signs that can be dragged to increase or decrease the height of the terrain.

PHP Code:
//#CLIENTSIDE 
if (created) { 
removetiledefs
addtiledef picso2.png,,0
loadmap <mapname>;

Edit: It is also possible to adjust the terrain with more precision by opening the nw files in a text editor and editing the values between HEIGHTS and HEIGHTSEND.

HTML Code:
GLEVNW01
BOARD 0 59 64 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALYLILZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BOARD 0 60 64 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKIKPK4LZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BOARD 0 61 64 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKIKfKcKJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BOARD 0 62 64 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALoKpKsK4LZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BOARD 0 63 64 0 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKIK8K9KJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
HEIGHTS
-9,-9.199103,-6.75348,-5.989041,-5.39811,-5.31243,-6.02231,-7.48845,-9
-7.809034,-7.907582,-4.041552,-2.094102,-1.860217,-3.97436,-2.349522,-4.82965,-7.872246
-5.317629,-5.919947,-4.465134,-1.518277,2.255427,2.68023,-2.246057,-2.672366,-8.241459
-4.084151,-4.463924,-4.300854,-1.267892,0.8243203,2.604145,-2.774229,-2.833819,-4.440935
-2.04995,-1.942909,-3.455682,-0.9224968,2.394568,0.7131252,-3.65461,-2.993888,-2.755904
-1.296921,-2.195355,0.651484,-0.102754,1.284953,-0.9629025,0.1463762,0.9875636,0.3814467
2.319204,1.480761,2.09862,1.752551,1.218703,1.111533,2.621422,3.546274,3.1322
6.062353,6.139744,4.494535,5.023921,4.217975,5.116597,4.8672,4.370885,4.920545
9,7.993682,8.147653,6.736805,7.360621,8.798235,8.619749,6.676979,6
HEIGHTSEND

Last edited by cyan3; 12-07-2012 at 03:21 AM.. Reason: can also edit nw files
Reply With Quote
  #3  
Old 12-07-2012, 03:30 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
This helps...thank you. Just two more questions.

1. In the editor, can you manually enter the value of the height where he yellow numbers are?

2. Kinda a NPC scripting question, but can you do a player check on height?
--like if (player.height = '#')??
Reply With Quote
  #4  
Old 12-07-2012, 03:32 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by greggiles View Post
1. In the editor, can you manually enter the value of the height where he yellow numbers are?
Sadly you can only manually set the values if you open the level in a text editor.

Quote:
Originally Posted by greggiles View Post
2. Kinda a NPC scripting question, but can you do a player check on height?
--like if (player.height = '#')??
You would check the players z axis by using player.z = #.
Reply With Quote
  #5  
Old 12-07-2012, 03:38 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Quote:
You would check the players z axis by using player.z = #.

OOOOh duh hahha.
I wonder if it's possible to alter the terrain via weapon script?
Reply With Quote
  #6  
Old 12-07-2012, 03:44 AM
cyan3 cyan3 is offline
Registered User
cyan3's Avatar
Join Date: Nov 2005
Location: England
Posts: 2,919
cyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant futurecyan3 has a brilliant future
Quote:
Originally Posted by greggiles View Post
OOOOh duh hahha.
I wonder if it's possible to alter the terrain via weapon script?
I'm not entirely sure if its possible or not but you could probably hack around it by using File IO to edit the terrain values in the level files but it's hardly a good solution and probably wouldn't work with any sort of efficiency/stability.
Reply With Quote
  #7  
Old 12-07-2012, 03:46 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
In Graal Editor first enable "Baddies, NPCs, Chests -> Show Terrain Grid" if you haven't. You'll see a lot of yellow + and numbers representing the height of the terrain. It sounds like you already found this, but I'm just saying it to be sure.

Anyways, once you do that you can drag the + up and down to change the height. If you hold ctrl down while doing so it will snap the terrain to the nearest whole number.

You can also change the height of the terrain via the setz() command:

PHP Code:
setz(x,y,width,height,a,b,c,d);            sets z of x,y with a,b,c,as corner heights 
                                           
(use updateterrain to save
In which you will have to use updateterrain() immediately afterwards to have the changes take effect. This is apparently all done clientside so I don't think this is a legit way to permanently manipulate terrain. You'll probably have to ask Tig for more information regarding this.
Reply With Quote
  #8  
Old 12-07-2012, 05:49 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
I just wish in the terrain editor you had more control over what is generated and how the terrain develops.
Reply With Quote
  #9  
Old 12-07-2012, 05:56 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
Quote:
Originally Posted by greggiles View Post
I just wish in the terrain editor you had more control over what is generated and how the terrain develops.
I dunno, terrain generator gives you plenty of options and even the option to manually tweak points.
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 12:18 AM.


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