System Terrain Generator

PurgeandFire

zxcvmkgdfg
Reaction score
509
> IT probably wouldn't lag as much if done in JASS

Hmm. That would be possible if I knew JASS.

C'mon! Stop hiding it! I taught you practically everything you need to know about JASS and you're still avoiding it! Face it, you'll have to use it sooner or later.
Like in our map. :p

Lol... I'm just messin' with ya. I can't really tell what it means because I don't know GUI anymore... :(

I'll still try to understand the code though. :D
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
I <3 GUI

Though, how do you like the system?
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
Haven't looked at the map, but I strongly suggest Jass for it.

Ghan, do you have any programming language? If yes, learning Jass wouldn't be a biggie. If not, you can always take a break from improving the system and learning Jass will help you in all your mapping from then.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Ghan, do you have any programming language?

I'm taking a Java class in school. :rolleyes:

Purge is right. I know a fair amount of JASS. However, I'm still much better and faster with GUI. At least for now.
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
> Which is impossible via triggers I think.

Yes. It is. Destructables only. :(
 
B

Bwack_Wat

Guest
Pathing Generator.

I have thought about doing this for a long time, but I couldn't find a use so i never got to it.

Now that someone has done it, I can present thoughts:

Pathing, I've thought of a way to do it.

Code:
Untitled Trigger 001
    Events
    Conditions
    Actions
        Set TerrainSpot = (Position of Terrain Spot Dummy)
        Set RandomDirection = (Random integer number between 1 and 3)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                PresentDirection Equal to 1
            Then - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    If - Conditions
                        RandomDirection Equal to 1
                    Then - Actions
                        Environment - Change terrain type at (TerrainSpot offset by 100.00 towards 180.00 degrees) to Lordaeron Summer - Rock using variation -1 in an area of size 1 and shape Square
                        Set PresentDirection = 2
                    Else - Actions
                        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                            If - Conditions
                                RandomDirection Equal to 2
                            Then - Actions
                                Environment - Change terrain type at (TerrainSpot offset by 100.00 towards 90.00 degrees) to Lordaeron Summer - Rock using variation -1 in an area of size 1 and shape Square
                                Set PresentDirection = 3
                            Else - Actions
                                Environment - Change terrain type at (TerrainSpot offset by 100.00 towards 0.00 degrees) to Lordaeron Summer - Rock using variation -1 in an area of size 1 and shape Square
                                Set PresentDirection = 4
            Else - Actions

Each number is a direction, as of this, 1 = left, 2 = up, 3 = right, and 4 = down. The randomed number is different each time based on "PresentDirecion".

Now this would only work if the path starts going up, you would copy this 3 more times, to replicate other directions and set the variables as follows.

Basically, it randomizes a direction, it wouldn't calculate any crazy things like finding where its already been, but it would suffice as a random path generator.

> For finding the start of a path you could randomly move "TerrainSpot" as a dummy unit to a random spot, and set "PresentDirection" to random number in 4 and it would then generate the path as follows.

> For finding where its been before, you would have to add some sort of probability engine, something that adds how many times its gone in one direction, and then changes the randomized number by number of number of times its been in one direction and then, you would simply round that down.

If this has inspired you, have fun.

o.o
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Hmm. So, do you run this multiple times? Some of that code looks unnecessary to me. I think you might be better off doing a loop. Just use a random offset. Also, it leaks points. But it's a start.
 
B

Bwack_Wat

Guest
...

No no no... Its not a WIP I just cooked it up to preview how a random pathing trigger could work.
 
B

Bwack_Wat

Guest
Covered

Yep, and then it would keep going to randomly pop out more squares of repetition. :D

"Basically, it randomizes a direction, it wouldn't calculate any crazy things like finding where its already been, but it would suffice as a random path generator."

"> For finding where its been before, you would have to add some sort of probability engine, something that adds how many times its gone in one direction, and then changes the randomized number by number of number of times its been in one direction and then, you would simply round that down."

o.o
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
I think this native:
JASS:
native SetDoodadAnimation       takes real x, real y, real radius, integer doodadID, boolean nearestOnly, string animName, boolean animRandom returns nothing


Might create a doodad. But I'm not sure. :)

"SetDoodadAnimation" I don't think that sounds as a "CreateDoodad" :p. It just sets the animation of the doodad, as the name sais. Simple as that. Plus, it doesn't returns anything. Believe me, I've tried once to play with doodads. Didn't worked :p.

You could make dummy units to use doodads models. However, that would work only if the model doesn't has a skin depending on the tileset...
 

elmstfreddie

The Finglonger
Reaction score
203
You could make dummy units to use doodads models. However, that would work only if the model doesn't has a skin depending on the tileset...

You sure? Doodads have a material layer that is Replaceable Id (some number) that means change with the tileset, or tree, etc. For example the mountain king's stick is Replaceable Id 31, which changes according to what type of tree he grabs for a stick.
So I'm thinking it would work.
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
The mountain giant is special. He recognizes the tree he grabs, not the tileset.

However, I noticed that doodads do not have changing skins :D. So it's perfectly possible. What I said there applies to destructibles like trees and such.
 

Monovertex

Formerly Smith_S9
Reaction score
1,461
I think that was somewhat rude and unnecessary. You made yours, well, bravo!, but you don't need to advertise it in the rival thread.

And it was off-topic, btw.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Nah, I tested it, and it didn't work. I just assumed it would work because it is the same thing with dialogs, you create them without even using a createdialog thing.

:p

I guess you can always do what dhk did as in make them destructables. Also, it may make yours more possible if you make it in JASS!! :D
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
1. Thank you all for your comments. You've helped me a lot on this. :D

2. Major update. Execution limit threat greatly reduced. I added waits in the triggers that will stop the trigger from freezing up so much. This allows you to set the Generation Seed lower, which will increase the randomness, but also the amount of modifications, meaning you can end up with higher terrain, and you will definitely have more trees. Though, the destructable probability is changeable.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • 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

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top