badosu Posted May 16, 2020 Report Share Posted May 16, 2020 Hello folks, I want to recreate the slopes map from hidden cup on 0ad: I am stuck on making the elevation to sides, which should be pretty simple though, I wondered if someone knows of any map that has a similar feature? Quote Link to comment Share on other sites More sharing options...
asterix Posted May 16, 2020 Report Share Posted May 16, 2020 3 hours ago, badosu said: Hello folks, I want to recreate the slopes map from hidden cup on 0ad: I am stuck on making the elevation to sides, which should be pretty simple though, I wondered if someone knows of any map that has a similar feature? well something could be found here https://trac.wildfiregames.com/search?q=elevation https://trac.wildfiregames.com/wiki/Atlas_Manual_Starting i will ping @FeXoR @vladislavbelov @elexis they could know more. Quote Link to comment Share on other sites More sharing options...
badosu Posted May 16, 2020 Author Report Share Posted May 16, 2020 Cantabrian Highlands has a ramp, it seems `createPassage` can be used for making them. https://github.com/0ad/0ad/blob/master/binaries/data/mods/public/maps/random/cantabrian_highlands.js#L80-L90 Quote Link to comment Share on other sites More sharing options...
FeXoR Posted May 16, 2020 Report Share Posted May 16, 2020 Hi @badosu For a random map I would suggest using an ElevationPainter for the two areas with differing heights and afterwards using the SmoothElevationPainter to generate the ramp (and you could use the random argument to add some noise to the slope). For the latter also add a cliff texture to be painted with the TerrainPainter and you are done 2 Quote Link to comment Share on other sites More sharing options...
badosu Posted May 17, 2020 Author Report Share Posted May 17, 2020 Awesome! Unfortunately it seems the SmoothElevationPainter tries to return elevation to base creating a kind of a hill instead of a ramp, this was my attempt using it: Spoiler const heightTop = 20; const lowlandsWidth = fractionToTiles(0.4); const rampWidth = fractionToTiles(0.1); const elevationPainter = new ElevationPainter(heightTop); const rampPainters = [ new TerrainPainter(tCliff), new SmoothElevationPainter(ELEVATION_SET, heightTop, 20), new TileClassPainter(clRamp) ]; createArea( new RectPlacer(new Vector2D(halfMapSize + lowlandsWidth / 2 + rampWidth, mapSize), new Vector2D(mapSize, 0)), elevationPainter); createArea( new RectPlacer(new Vector2D(0, mapSize), new Vector2D(halfMapSize - lowlandsWidth / 2 - rampWidth, 0)), elevationPainter); createArea( new RectPlacer(new Vector2D(halfMapSize + lowlandsWidth / 2, mapSize), new Vector2D(halfMapSize + lowlandsWidth / 2 + rampWidth, 0)), rampPainters ); With createPassage I was able to obtain the desired result: Spoiler const heightTop = 20; const lowlandsWidth = fractionToTiles(0.4); const rampWidth = fractionToTiles(0.1); const elevationPainter = new ElevationPainter(heightTop); const rampPainters = [ new TerrainPainter(tCliff), new SmoothElevationPainter(ELEVATION_SET, heightTop, 20), new TileClassPainter(clRamp) ]; createArea( new RectPlacer(new Vector2D(halfMapSize + lowlandsWidth / 2 + rampWidth, mapSize), new Vector2D(mapSize, 0)), elevationPainter); createArea( new RectPlacer(new Vector2D(0, mapSize), new Vector2D(halfMapSize - lowlandsWidth / 2 - rampWidth, 0)), elevationPainter); createPassage({ "start": new Vector2D(halfMapSize + lowlandsWidth / 2, halfMapSize), "end": new Vector2D(halfMapSize + rampWidth + lowlandsWidth / 2, halfMapSize), "startWidth": mapSize, "endWidth": mapSize, "smoothWidth": 2, "tileClass": clRamp, "terrain": tHill, "edgeTerrain": tCliff }); createPassage({ "start": new Vector2D(halfMapSize - lowlandsWidth / 2, halfMapSize), "end": new Vector2D(halfMapSize - rampWidth - lowlandsWidth / 2, halfMapSize), "startWidth": mapSize, "endWidth": mapSize, "smoothWidth": 2, "tileClass": clRamp, "terrain": tHill, "edgeTerrain": tCliff }); 1 Quote Link to comment Share on other sites More sharing options...
nani Posted May 17, 2020 Report Share Posted May 17, 2020 linear interpolation looks ugly Quote Link to comment Share on other sites More sharing options...
badosu Posted May 17, 2020 Author Report Share Posted May 17, 2020 Yeah, sigmoidal might look better, or include noise. But im mostly interested in functionality for now Quote Link to comment Share on other sites More sharing options...
badosu Posted May 17, 2020 Author Report Share Posted May 17, 2020 Lul, does 0ad not allow water to be painted above a certain elevation? The original slopes map has sidelakes I wanted to recreate: Quote Link to comment Share on other sites More sharing options...
badosu Posted May 17, 2020 Author Report Share Posted May 17, 2020 So, since it seems not possible to make elevated lake, I brought the land elevation down. If that happens though, everywhere gets flooded even if no tWater was placed. Any ideas if what I want to do is feasible? Quote Link to comment Share on other sites More sharing options...
Stan` Posted May 17, 2020 Report Share Posted May 17, 2020 One could create a 3D actor with obstruction to create a small lake uphill. Currently there is only one water plane. 1 Quote Link to comment Share on other sites More sharing options...
badosu Posted May 17, 2020 Author Report Share Posted May 17, 2020 Well, for now I am using low elevation changes, unfortunately. It seems anything below 0 elevation it painted as water and anything above a certain elevation can't be painted as water. Is there any reason for this? 1 Quote Link to comment Share on other sites More sharing options...
nani Posted May 18, 2020 Report Share Posted May 18, 2020 You don't paint water, the water in 0ad is just a big plane under the terrain at a certain z position, you can change that z pos to make it look higher or lower 2 Quote Link to comment Share on other sites More sharing options...
alre Posted February 27, 2021 Report Share Posted February 27, 2021 and can you change that height locally? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.