AnnoCrat Posted July 20, 2018 Report Share Posted July 20, 2018 Hi, I am a great age of empires 2 modder and was modding in 0 AD recently, 0 AD is a awesome game, but I got some modding questions; > Is it possible to alter the land during gameplay? making it straight or make elevations or pits > Is it possible to make units move slower in sand terrain or shallow water? or add damage penalty for passing lava terrain? Maybe I missed some things, please let me know, thx Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 20, 2018 Report Share Posted July 20, 2018 5 minutes ago, AnnoCrat said: Hi, I am a great age of empires 2 modder and was modding in 0 AD recently, 0 AD is a awesome game, but I got some modding questions; > Is it possible to alter the land during gameplay? making it straight or make elevations or pits > Is it possible to make units move slower in sand terrain or shallow water? or add damage penalty for passing lava terrain? Maybe I missed some things, please let me know, thx Hello and welcome to the forums. Unfortunately it is currently not possible to change the terrain at game time. The terrain is not serialized so if you did that you'd get out of sync pretty quick because the computed paths would be different. The only implementation that exists is outdated. See https://trac.wildfiregames.com/ticket/2264 And About your second question it is possible with a little bit of modding. You have to create entities with Auras. Please note that any abuse of such auras will have a performance hit. The idea is to place said entities in the places you want to slow down. Their range will do the rest. Quote Link to comment Share on other sites More sharing options...
elexis Posted July 20, 2018 Report Share Posted July 20, 2018 No, that's not possible currently, but it is a viable and not so hard to implement feature. The terrain data (elevation and textures) are currently determined by the map and then there is no code to modify it in any way. Serializing the terrain (i.e. storing in savegames) is described in #2147 and one of the necessities. But there is also the simulation interface needed. There must be a TerrainManager system component that can be called from for example by building placement (terrain flattening or bridge-building in the Foundation or Repairable component or Commands processing), a triggerscript (for example simulating a vulcano) or maybe even a catapult hitting the ground (Attack component). While at it I'd also take the EnvironmentManager. Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 20, 2018 Author Report Share Posted July 20, 2018 Quote About your second question it is possible with a little bit of modding. You have to create entities with Auras. Please note that any abuse of such auras will have a performance hit. The idea is to place said entities in the places you want to slow down. Their range will do the rest wow good idea, "Environmental" ranged aura's this seems a fair solution, but it requires quite some effort in placement About the terrain changing items, once its implemented into the game, it will add lots of new possibility in 0 AD, also I noticed that it would look more realistic if terrain was flattened below foundations of (new) buildings. Please let me know if anyone might be smart enough to be able to implement this, I would be really grateful Quote Link to comment Share on other sites More sharing options...
elexis Posted July 21, 2018 Report Share Posted July 21, 2018 About some auras being slow, take a look at the relic auras, some of them are tremendously slow, especially those changing vision range #5099, it gets worse with the distance. Terrian flattening also has problem, consider the "Flying Wonder" in #3913. So we need to take some precautions before doing so. But the feature is certainly interesting, bridge building, road building, digging ditches, I want that somehow. Quote Link to comment Share on other sites More sharing options...
gaius Posted July 21, 2018 Report Share Posted July 21, 2018 @elexis @Annocrat LordGood had roads in Ponies Ascendant for faster movement, and I also used his work to implement roads in my mod the-age-of-0-ad. We use aura for for faster movement of Troops. That makes 0 A.D. more of a City-Building game, and is very cool. I just hope that the auras don't lag, which I don't believe. 1 Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 21, 2018 Author Report Share Posted July 21, 2018 Well, the aura's thing is one of the best features ive ever seen in any rts/city building game @elexis this is a sea of possibilities, not just digging ditches, its also possible to do crazy stuff like let a volcano rise, land erode etc, besides units being able to change the terrain, you could also let triggers do this, but thats a step further, anyways please let me know if some terrain change feature will happen. PS: do you know the game Populous: The Beginning? it's also a game where land changing plays vital roles, terrain also plays vital roles in warlords battlecry, where height difference plays a role in how much damage projectiles make. This game's terrain and camera view are truly amazing, that's why I hoped more could be done with it Also I made a special 26 color palette for importing terrains heightmaps to 0Ad, so you get cool terrains, and not crazy steep high mountains Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 21, 2018 Author Report Share Posted July 21, 2018 (edited) https://trac.wildfiregames.com/attachment/ticket/21/21.2.patch I'm taking a look at this code, maybe its a good start, atleast its something edit: how to install the .patch file? Edited July 21, 2018 by AnnoCrat Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 21, 2018 Report Share Posted July 21, 2018 4 minutes ago, AnnoCrat said: Also I made a special 26 color palette for importing terrains heightmaps to 0Ad, so you get cool terrains, and not crazy steep high mountains Please share I'm sure other people can make use of it. That's the nice thing about open source. Everyone can contribute. 4 minutes ago, AnnoCrat said: This game's terrain and camera view are truly amazing, that's why I hoped more could be done with it There will an isometric view too Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 21, 2018 Report Share Posted July 21, 2018 1 minute ago, AnnoCrat said: https://trac.wildfiregames.com/attachment/ticket/21/21.2.patch I'm taking a look at this code, maybe its a good start, atleast its something edit: how to install the .patch file? You need to get the source code. See trac.wildfiregames.com on how to get started. You also need to get familiar with at least SVN. Quote Link to comment Share on other sites More sharing options...
elexis Posted July 21, 2018 Report Share Posted July 21, 2018 4 minutes ago, AnnoCrat said: please let me know if some terrain change feature will happen "I would like to see it happen" is all I can say. If someone works on anything it's always a surprise for everyone. Even started patches are often discontinued. 9 minutes ago, AnnoCrat said: Also I made a special 26 color palette for importing terrains heightmaps to 0Ad, so you get cool terrains, and not crazy steep high mountains Heightmaps can be imported already in atlas and mapscripts already, what are the 26 special colors for? Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 21, 2018 Author Report Share Posted July 21, 2018 3 minutes ago, stanislas69 said: Please share I'm sure other people can make use of it. That's the nice thing about open source. Everyone can contribute. Here is the palette: This is a 26 color grayscale palette, it looks dark but it got the colors 0-0-0 til 25-25-25 in RGB values, this palette needs some instruction to be properly applied. > Step 1: Make or get the terrain heightmap image > Step 2: Open the image in a image editor with some palette editing functionality (I use the antique paint shop pro 5) > Step 3: Reduce the amount of colors in the heightmap image to 26 colors. > Step 4: Load my palette, but choose to maintain indexes do not choose closest color or diffusion > Step 5: if all is done right you got a very dark grayscale image, save it to the correct format (24 bit color) so it can be imported to the game These dark colors prevent the engine from drawing insanely huge mountains, enjoy! If someone want, I can upload a few of their heightmaps edited to this format and upload it back here if they think these instructions are too dificult darkest grayscale.pal Quote Link to comment Share on other sites More sharing options...
elexis Posted July 21, 2018 Report Share Posted July 21, 2018 7 minutes ago, AnnoCrat said: These dark colors prevent the engine from drawing insanely huge mountains, enjoy! There should be an option in atlas to vertically resize the terrain in theory. Suggested reading https://wildfiregames.com/forum/index.php?/topic/20786-palaxins-heightmap-guide/ 1 Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 21, 2018 Author Report Share Posted July 21, 2018 So, elexis, you can't make this feature come to life? also the patch file seems only to be a single edited JS file, the patch only shows the lines that get added, but making the patch thing works seems a really long and complicated process, maybe you or someone else can send or upload the JS file in edited form? so I can just put the modded JS file into my mod and see how it works, from there I can try make other adjustments, I am not a hero at programming languages, but I am good at editing game data and xls and scripts Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 25, 2018 Author Report Share Posted July 25, 2018 guess not then Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 25, 2018 Report Share Posted July 25, 2018 1 hour ago, AnnoCrat said: guess not then Hey, do not lose hope. This is an open-source project things take longer here. We are currently in a tedious legal process, to comply with GDPR, to offer a better A23 release. Which means most of the dev is stopped for now. elexis is working really hard on it. The feature might be for A24, if someone finds the time/motivation to do it. Nevertheless, it never being implemented probably means there is something more than a few lines of JavaScript code. Coding is fun and can be rewarding. A few devs here started from the bottom and now do awesome things, and it's never to late to start Nothing will beat motivation at getting things done. The best way to get something done is to do it yourself though Sorry for the inconvenience. 1 Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 25, 2018 Author Report Share Posted July 25, 2018 Trying to do it myself is what I attempted, the patch file where was linked to, I have no idea how it install it without needing to install dozens of new programs, I hoped someone could post me the output javascript file with the added/edited codelines so that I could put the .JS in my mod folder and see the changes made by the script and try editing the script myself to see if I can improve it Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 25, 2018 Report Share Posted July 25, 2018 12 minutes ago, AnnoCrat said: Trying to do it myself is what I attempted, the patch file where was linked to, I have no idea how it install it without needing to install dozens of new programs, I hoped someone could post me the output javascript file with the added/edited codelines so that I could put the .JS in my mod folder and see the changes made by the script and try editing the script myself to see if I can improve it Simplest way to install a patch is to a apply it If you don't know what patch / diff are they are text files that allows one to determine what has changed in a file. It will tell you what lines have been modified. Another way of *installing* it is to modify the file the diff is based on manually. You can see the files name inside it ( It's a text file) A minus in front of the line means the line was removed. A plus means that a line was added. As you can see it also needs C++ changes. The Js changes alone are not enough. It touches Foundation.JS Terrain.cpp Terrain.h Ccmpterrain.cpp IcmpTerrain.cpp Icmpterrain.h This means you also need a modified exe file... Quote Link to comment Share on other sites More sharing options...
elexis Posted July 26, 2018 Report Share Posted July 26, 2018 Sorry I missed the update. A patch / diff file is really easy to apply, one can execute "patch -p0 < filename" on linux or click on "apply patch" in tortoise svn on windows. But the patch linked above is 6 years old, that most likely doesn't apply anymore (and likely didn't implement something ready to use. From reading it it seems like it could work except for multiplayer and savegame loading). On 7/22/2018 at 12:24 AM, AnnoCrat said: So, elexis, you can't make this feature come to life? Possibly, there may be technical bottlenecks and difficulties that are only seen during implementation phase; but possibly. The question is whether I will try to, then whether I can comes after that. You can assume there will be 2-6 weeks going down the drain when also implementing a fun map or similar interesting applications.The petra AI would also likely need some changes at which point we may consider involving our last AI dev again. 4 hours ago, stanislas69 said: This means you also need a modified exe file... Compiling will be the easy part however. Quote Link to comment Share on other sites More sharing options...
Stan` Posted July 26, 2018 Report Share Posted July 26, 2018 5 hours ago, elexis said: Compiling will be the easy part however. True however since he doesn't want to install software thats hard Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 26, 2018 Author Report Share Posted July 26, 2018 wow okay, so because the file is very dated, its verfy unlikely that it will still work, also didnt see that other files were involved that were included in the sourcecode, well in this case, even installing the patch might cause the game to fail some other question, at maps I saw the option for a round map or square map, is there a way to make a map squared? Quote Link to comment Share on other sites More sharing options...
gaius Posted July 26, 2018 Report Share Posted July 26, 2018 @AnnoCrat if u make a random map and wont write in the JSON description file that it will be round, it will be automatically square. Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 26, 2018 Author Report Share Posted July 26, 2018 But besides random maps, you cant make scenarios square? (map files loadable in editor) Quote Link to comment Share on other sites More sharing options...
AnnoCrat Posted July 26, 2018 Author Report Share Posted July 26, 2018 Meanwhile im doing some fancy intergalactical texture/environment tests 1 1 Quote Link to comment Share on other sites More sharing options...
elexis Posted July 26, 2018 Report Share Posted July 26, 2018 Square maps have several problems: square maps of size X have area X², but circular maps of size X have the area X² * pi/ 4, i.e. square maps have 25% more size which yields unintended consequences like more lag and more cost to attack the enemy, more trade income minimap is made for a circular maps squaremaps have corners which are special locations that are hard to reach. that impacts the gameplay unless its a special case (like corsica vs sardinia or latium). On circular maps, the greatest distance between two points is X, on a square map SQRT(2) * X², i.e. 40% more walking distance, while still most of the relevant locations of gameplay are within the circular part Don't know if there are remains of atlas square map support. But you could probably hack it by generating the latium map and then deleting the contents and work with the square thing. About the 6 year old terrain flattening patch, that is not only outdated but also incomplete, because it lacks serialization. It's not a feature because the implementation wasn't finished, maybe yet. 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.