System Replace Terrain

Romek

Super Moderator
Reaction score
963
> So you can change the terrain type outside the playable map area ?
The map boundary, yes.
I find that bj_mapInitialPlayableArea doesn't include the map boundaries, whilst GetWorldBounds() does. Obviously you want the terrain to change within boundaries too.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Obviously you want the terrain to change within boundaries too.
Ok, but is it true for all the map or just a little part outside the playable map area ?
If it's the second solution, i think you could determine it, and apply the needing offsets to the playable map area.
However if there is no real link between the playable map area, the entire map and the rect which you can change the terrain, then simply forget it.
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
ok, you can change the terrain in the entire map, i don't see why you would need that, but it's a fact.
 

Romek

Super Moderator
Reaction score
963
It's just an extra global rect. I don't understand why you're making such a big deal out of it.
When I used bj_mapInitialPlayableArea, some of the borders of the map weren't changed.

Did GetWorldBounds() kill your best friend? Do you really hate it so?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
It's just an extra global rect. I don't understand why you're making such a big deal out of it.
When I used bj_mapInitialPlayableArea, some of the borders of the map weren't changed.
I know

Did GetWorldBounds() kill your best friend? Do you really hate it so?
yes, he did.

Just forget it, my previous post was to said that you're right.
I'm just a perfectionist, i thought you couldn't change the terrain outside the playable map area, at least not for each cells but only some which are near the border of the map, but i was wrong.

I still don't see why you would need to change the terrain which won't never be visible (only some cells outside the playable map can be visible), and then you could win efficiency, at least for your functions ReplaceGlobalTerrain... , but again, just forget it.
 

A.Dominion

New Member
Reaction score
0
hi i need to change terrain in my map

hi Troll Brain and Romek... :D

i am interested in the terrain limit, you said no more than 16 terrain (some terrain take 2 other take 1, but the limit is 16)
ok is the 16 limit, the limit off terrain displayed at the same time, or on the same map.??

because when i change terrain in GUI wich should be equivalent about limit with jass the thing that Troll Brain said happened...

i can use without bug (11) terrains at initialisation then change (9) more terrain by replacing old one.
in game that is season 1 (7) terrains
2 (7) terrains (replace a (2) terrain by another)
3 (8) terrains (replace (4) terrain by (5))
i test quite a bit with many bugs, terrain non changing replaced by existing one. this is working but it seems to be the limit, the smallest change make bugs....
Is there a way to change terrain as easily as Romek seems to say?
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
I've retested and it seems the limit is not 16, but 14 (13 different tilesets + the original one), or maybe as you've said some terrains takes 2, but i don't think so, erf need more tests ...
And no there is no way to increase this limit, it is harcoded, even if you totally replace a tileset during the game.
What it does matter is the number of already used tilesets on the map (during the game + placed at the map creation)
 

A.Dominion

New Member
Reaction score
0
:)

what i mean by take (2) is that some terrain like loarderon use 2 memory
the 5 loarderon tileset use alltogether (10) while some terrain like sunkenruin grassysand, sand, Ashenvale vigne, leaf use only (1) each.
there is allways a number attached to the tileset icon in the editor and that is the (memory) it take. with normal editor you are limited to (13) terrain.
but you can have more WEU for example, but i think the more terrain you get are the max terrain the game authorise, wich mean you couldn't change any terrain then....

anyway this is pretty annoying, it would be so cool to be able to change the terrain without restriction.... :(
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
The only way is to hack war3 and the players need to launch the map with this hack, pretty lot of work for such a tiny thing.
Alternatively you can ask to the author of RTC, MindWorX, maybe it's easy for him :
http://www.wc3c.net/showthread.php?t=105727

For the tilesets, i had understood what you wanted to say.
Maybe it's when the tileset change after a blight/unblight on him.
 

Romek

Super Moderator
Reaction score
963
> anyway this is pretty annoying, it would be so cool to be able to change the terrain without restriction....
Indeed it is. I thought there was just a simple limit on the amount of tiles used at any one time. =|
 

Troll-Brain

You can change this now in User CP.
Reaction score
85
Romek said:
Ever had a problem with the 16 tile limit of Wc3? Well, with this, you can bypass that limit easily. Though it doesn't actually allow more than 16 tiles to be used, you can dynamically replace terrain tiles to other ones to create the illusion of countless tiles being used.
You should change your description, because it's not true, you can't avoid the 16 tile limit.
 

Romek

Super Moderator
Reaction score
963
Done.
 

Dem0n_Hunter

Active Member
Reaction score
2
Hi, sry if I sound noob over here. but can u tell me what I need to change exactly?
I want the whole map's terrain be changed from summber lordaeron to winder
also do i need 2 of this to change it back?
is there a limit to how many commands i can put?
 

quraji

zap
Reaction score
144
>>can u tell me what I need to change exactly?
You don't need to change anything :)

>>I want the whole map's terrain be changed from summber lordaeron to winder
This function replaces the whole map's terrain:
JASS:
function ReplaceGlobalTerrain takes integer OldTerrain, integer NewTerrain returns nothing

So you might try:
JASS:
call ReplaceGlobalTerrain(LORDAERONSUMMER_GRASS, LORDAERONWINTER_GRASS)


>>also do i need 2 of this to change it back?
You can use this:
JASS:
function ReplaceGlobalTerrainReversed takes integer OldTerrain, integer NewTerrain returns nothing

Like:
JASS:
call ReplaceGlobalTerrainReversed(LORDAERONSUMMER_GRASS, LORDAERONWINTER_GRASS)


>>is there a limit to how many commands i can put?
Nope (well technically there is, but you don't have to worry about it).
 

Dem0n_Hunter

Active Member
Reaction score
2
first, thx for the reply +rep if you just answer my next question, (that's a lie I already gave you a rep lol)
ok so if I need to write that trigger that u mentioned which looks like it's doing the job, why do I need the rest of the codes for ?
 

quraji

zap
Reaction score
144
You can read the information on the post if you want to know what they're for :p

Just remember that just because you paste a system in your map doesn't mean you have to actually use every function.
 

Dem0n_Hunter

Active Member
Reaction score
2
Ok, so when we type
call ReplaceGlobalTerrainReversed

the red text uses one of the function in the code right?
just one more thing, how do I add the chat command in there?
when I looked at the sample trigger it was a long code so I"m not sure how to do it.
 

Hellberg

New Member
Reaction score
0
I noticed in your demo map ([Snippet] Change Terrain Types5.w3m) that there are no cliffs.

I copied the library into my map and tried to replace cliffs by calling:
JASS:
call ReplaceGlobalTerrain(LORDAERONSUMMER_GRASS_CLIFF, LORDAERONWINTER_SNOW_CLIFF)

But it didn't work.

Does this library support replacing cliff tiles?
 

Romek

Super Moderator
Reaction score
963
> Does this library support replacing cliff tiles?
Clearly not. :(

I've not tested, though if it doesn't work for you, it won't work for me. Sorry!
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top