Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Level Design (https://forums.graalonline.com/forums/forumdisplay.php?f=6)
-   -   GK Terrain (https://forums.graalonline.com/forums/showthread.php?t=134267516)

greggiles 12-07-2012 02:59 AM

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.

cyan3 12-07-2012 03:11 AM

Quote:

Originally Posted by greggiles (Post 1708800)
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


greggiles 12-07-2012 03:30 AM

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 = '#')??

cyan3 12-07-2012 03:32 AM

Quote:

Originally Posted by greggiles (Post 1708807)
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 (Post 1708807)
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 = #.

greggiles 12-07-2012 03:38 AM

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?

cyan3 12-07-2012 03:44 AM

Quote:

Originally Posted by greggiles (Post 1708809)
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.

DustyPorViva 12-07-2012 03:46 AM

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.

greggiles 12-07-2012 05:49 AM

I just wish in the terrain editor you had more control over what is generated and how the terrain develops.

DustyPorViva 12-07-2012 05:56 AM

Quote:

Originally Posted by greggiles (Post 1708833)
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.


All times are GMT +2. The time now is 10:58 PM.

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