System Replace Terrain

Romek

Super Moderator
Reaction score
964
> 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
964
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
964
> 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
964
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
964
> 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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top