mimesot Posted January 18, 2018 Report Share Posted January 18, 2018 Hi! I am currently having a lot of fun with the 0 A.D. map editor. One thing I noticed, when placing objects was that I can move my units through all actors. Only entities are blocking the path. If I have a desert stonnemine, these large chunks of rock can only be placed as actors, all units are moving through. I could place a stationary entity object right beneath it to block the path, but then that entity object would be a gaia object, which you can either mine or destroy, which thus does not reslove the problem. Is there any way to have e.g. blocking actor or to define an entity as indestuctable or to have a dummy object, flat and small enough to hide it beneath rocks and gaia-buildings? The second question is wether there is a way to make terrain, which is flat but still not usable for building something upon it. Like when creating a lava lake. I especially would like to prohibit farms on desert and rocks. Thanks and kind regards mimesot Quote Link to comment Share on other sites More sharing options...
Skhorn Posted January 18, 2018 Report Share Posted January 18, 2018 You would have to create a copy for that entity and set in it's properties health and armour to 0, like this: <?xml version="1.0" encoding="utf-8"?> <Entity parent="template_structure_defense_wall_long"> <Armour> <Hack>0</Hack> </Armour> <Health> <Max>0</Max> </Health> <Footprint> <Square width="38.5" depth="9.0"/> <Height>9.0</Height> . . . But i don't know if this has changed in the time, but feel free to try it For the second question, kinda hacky way to overcome that, would be making that terrain impassable with the terrain tools, check in atlas for an option to show the passable terrain and modify it with the terrain tools, bad thing is it won't be flat anymore Quote Link to comment Share on other sites More sharing options...
mimesot Posted January 19, 2018 Author Report Share Posted January 19, 2018 Hi! Thanks for the fast response. Wow, I really like that game as a game, but now I am absolutly amazed how every thing about these entities (except for meshes and such) is human readable and tidily hierarchically structured. (OK, right now I am asking myself why they mixed xml and json). You just need to know that the entity file inherits every property from its parent and you can just overwrite one, including the actor for the visual representation. I just created an indestructable, uncapturable seleukidian library with the looks of a the macedonian library. This is really awsome. Is there a way to remove the health but keep the option to capture it? And in case I want an object, which is impossible to capture: Is there a Way to remove the capture points bar? I realized that there is a parameter looking like this, which I can possibly use to place a special stone in the desert/mountains which blockss alll building. <Obstruction> <Active>true</Active> <BlockMovement>false</BlockMovement> <BlockPathfinding>false</BlockPathfinding> <BlockFoundation>true</BlockFoundation> <BlockConstruction>true</BlockConstruction> <DisableBlockMovement>false</DisableBlockMovement> <DisableBlockPathfinding>false</DisableBlockPathfinding> <Static width="100.0" depth="100.0"/> </Obstruction> I will try that tomorrow. Thanls again and good night! mimesot Quote Link to comment Share on other sites More sharing options...
Skhorn Posted January 19, 2018 Report Share Posted January 19, 2018 30 minutes ago, mimesot said: Is there a way to remove the health but keep the option to capture it? And in case I want an object, which is impossible to capture: Is there a Way to remove the capture points bar? I leave that question to somebody else that knows that @elexis or @stanislas69, i think it's possible but i don't know how or feel free to modify the templates and see if it works. Beware, that if you want to share your map, you gotta share those files too. This might help you https://trac.wildfiregames.com/wiki/Modding_Guide Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted January 19, 2018 Report Share Posted January 19, 2018 3 hours ago, mimesot said: every thing about these entities (except for meshes and such) is human readable Ironically, you can actually read large parts of of the mesh file in a text editor such as Notepad++. Collada files [the filetype of most of the game's models] are a form of XML. It's just the geometry part is coded into a binary matrix for max compression [I think; I'm not an expert, but I'm probably close]. Here is a blocker object I added to Delenda Est to help prevent the AI from building structures on critical pathways, such as the path from the top of an acropolis, etc. It's code could help you I think. You could copy the code from this and then make the obstruction whatever size you want and the Atlas-only visible actor whatever you want. placement_obstructor.xml Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 19, 2018 Report Share Posted January 19, 2018 @mimesot You can render a unit invulnerable by setting a flag in the templates. For it not to be capturable, you'll have to check the template's inheritance to see which one sets it as capturable, then override it in the object template you do not want to be capturable. Quote Link to comment Share on other sites More sharing options...
mimesot Posted January 20, 2018 Author Report Share Posted January 20, 2018 (edited) Hi there! You guys are awsome :-) @Skhorn 22 hours ago, Skhorn said: This might help you https://trac.wildfiregames.com/wiki/Modding_Guide Indeed, thanks for the suggestion! I would like to ask you further, if there is any comprehensive list of the XML-tags. I opened quite a lot XMLs yesterday but i didn't stuble across the one, which wowgetoffyourcellphone came up with ... like pulling a rabbit out of a hat. <VisibleInAtlasOnly>true</VisibleInAtlasOnly> 22 hours ago, Skhorn said: Beware, that if you want to share your map, you gotta share those files too. It is always good to be reminded of possible pitfalls. Is there an elegant way to do so? As the root folder of 0 a.d. appears not to have a fixed relative path regarding the maps folder I cannot simply create a self-extractinng zip. How does the game remain consistent among different players? By just adding files, not modifying existing ones, does this alter the game in a way it becomes impossible to start multiplayer games? I would have to place a big warning sign on my map then. @wowgetoffyourcellphone 19 hours ago, wowgetoffyourcellphone said: You could copy the code from this and then make the obstruction whatever size you want and the Atlas-only visible actor whatever you want. placement_obstructor.xml This is a great template. I will incorporate it. Thanks a lot. @stanislas69 16 hours ago, stanislas69 said: You can render a unit invulnerable by setting a flag in the templates By "a flag" do you actually mean something like <invulnerable/> Edited January 20, 2018 by mimesot Created @user sections, which did not work 1 Quote Link to comment Share on other sites More sharing options...
Skhorn Posted January 20, 2018 Report Share Posted January 20, 2018 1 hour ago, mimesot said: Indeed, thanks for the suggestion! I would like to ask you further, if there is any comprehensive list of the XML-tags. I opened quite a lot XMLs yesterday but i didn't stuble across the one, which wowgetoffyourcellphone came up with ... like pulling a rabbit out of a hat. Check it https://svn.wildfiregames.com/entity-docs/0.0.22.html 1 hour ago, mimesot said: It is always good to be reminded of possible pitfalls. Is there an elegant way to do so? As the root folder of 0 a.d. appears not to have a fixed relative path regarding the maps folder I cannot simply create a self-extractinng zip. How does the game remain consistent among different players? By just adding files, not modifying existing ones, does this alter the game in a way it becomes impossible to start multiplayer games? I would have to place a big warning sign on my map then. The best examples can be see here https://github.com/0ADMods Mostly you need the mod.json and a certain directory structure The game remains consistent among different players by all having the same set of files, it wouldn't be possible to play a multiplayer game if you had modified a map and the rest hasn't. If your intention is to share the map, you gotta share the map + the files you edited. You can zip it, ofc, but still the files needs a structure like this one: Just try that the directory tree you make, be the same within the game paths Hope it helps Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 20, 2018 Report Share Posted January 20, 2018 10 hours ago, mimesot said: Hi there! You guys are awsome :-) @Skhorn Indeed, thanks for the suggestion! I would like to ask you further, if there is any comprehensive list of the XML-tags. I opened quite a lot XMLs yesterday but i didn't stuble across the one, which wowgetoffyourcellphone came up with ... like pulling a rabbit out of a hat. <VisibleInAtlasOnly>true</VisibleInAtlasOnly> It is always good to be reminded of possible pitfalls. Is there an elegant way to do so? As the root folder of 0 a.d. appears not to have a fixed relative path regarding the maps folder I cannot simply create a self-extractinng zip. How does the game remain consistent among different players? By just adding files, not modifying existing ones, does this alter the game in a way it becomes impossible to start multiplayer games? I would have to place a big warning sign on my map then. @wowgetoffyourcellphone This is a great template. I will incorporate it. Thanks a lot. @stanislas69 By "a flag" do you actually mean something like <invulnerable/> Yeah like that. I think it's done in a map called silk road you can find on GitHub on 0adMods. 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.