Grapjas Posted December 15, 2020 Report Share Posted December 15, 2020 (edited) I noticed in the map editor that when you place a tree underwater, a ship can't go 'through' or, better said, over it. This can be extremely handy to safeguard ridges that aren't meant for ungarrisoning by creating a underwater barrier of trees. You can place them quite spacious so performance wise it costs nearly nothing. However, the problem with using real trees is that the workers on land will try to reach it infinitely. So that's bad. My solution to this is to implement a horizontal log (wider = better) that: Doesnt float, so it doesnt impact map visuals. That can't be chopped, but is persistent. Just like a tree. Have no idea where to start though. Or maybe someone has a better approach to it or hopefully point me in the right direction. Edited December 15, 2020 by Grapjas Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 15, 2020 Report Share Posted December 15, 2020 We you could create a special actor with the field mesh and a custom template with obstruction. This way you wi have a custom obstruction object. You can set it to be only visible in atlas See the trigger markers for example. 1 1 Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 Useful info, thanks Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 I got it to work, and it does it's job perfect @Stan`. However i do have another question. Do people need to download & install the custom templates i made in able for it to work, or is it included in the map data itself somehow? Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 15, 2020 Report Share Posted December 15, 2020 They need your custom templates, only the reference to them, the terrain an the textures are in map files. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 (edited) @Stan` would you be willing to put this into the base of the game? I think it's quite an important tool for map makers who want functional ridges without destroying their visuals. In any case, if anyone needs it / want to use it here you go: invisible_obstruction_field.rar It's a farm field that belongs to no-one, is visible in atlas only. Blocks any units from moving over it, also when submerged in water. Place the template files in simulation-> templates Place 'invisible_obstruction_field' in simulation-> templates -> structures Once you've done that you can find it in the map editor under the name 'invisible_obstruction_field'. Example: Base Profile 2020.12.15 - 15.54.54.04.mp4 : Edited December 15, 2020 by Grapjas Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 15, 2020 Report Share Posted December 15, 2020 Well for it to be there we would need an object just like the markers cause it would be very hard to move after placed Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 9 minutes ago, Stan` said: Well for it to be there we would need an object just like the markers cause it would be very hard to move after placed I'm not sure i follow. In the atlas editor you see a farmfield. You can just target that to move the barrier around. Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 15, 2020 Report Share Posted December 15, 2020 Sure but it should instead be a barrier shape or something using a field sounds a bit hacky 1 Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 Ah ok, i'll work on it. Quote Link to comment Share on other sites More sharing options...
nani Posted December 15, 2020 Report Share Posted December 15, 2020 Have you tried using custom special filters, haven't tried myself but should be able to expand the template of the entity you want to have the effect applied without template duplication. Here is an example I did for a map where i wanted to make the a wonder ungarrisonablehttps://code.wildfiregames.com/D1634 the file in question is binaries/data/mods/public/simulation/templates/special/filter/disableGarrisonHolder.xml so should be similar for your case 1 Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 I haven't checked that out. Tbh i never checked how to mod 0ad ever, this mini project is the first. Are filters only useable with js? I'll check it out, probably will come back with more questions. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted December 15, 2020 Report Share Posted December 15, 2020 Delenda Est has these placement obstructors, whose code may be useful to you. <?xml version="1.0" encoding="utf-8"?> <Entity> <AIProxy/> <Footprint> <Square width="38.5" depth="7.0"/> <Height>9.0</Height> </Footprint> <Obstruction> <Active>true</Active> <BlockMovement>false</BlockMovement> <BlockPathfinding>false</BlockPathfinding> <BlockFoundation>true</BlockFoundation> <BlockConstruction>true</BlockConstruction> <DeleteUponConstruction>false</DeleteUponConstruction> <DisableBlockMovement>false</DisableBlockMovement> <DisableBlockPathfinding>false</DisableBlockPathfinding> <Static width="37.0" depth="6.0"/> </Obstruction> <Ownership/> <Position> <Altitude>0</Altitude> <Anchor>upright</Anchor> <Floating>false</Floating> <FloatDepth>0.0</FloatDepth> <TurnRate>6.0</TurnRate> </Position> <Selectable> <Overlay> <Outline> <LineTexture>outline_border.png</LineTexture> <LineTextureMask>outline_border_mask.png</LineTextureMask> <LineThickness>0.4</LineThickness> </Outline> </Overlay> </Selectable> <Visibility> <RetainInFog>true</RetainInFog> <AlwaysVisible>false</AlwaysVisible> <Corpse>false</Corpse> <Preview>false</Preview> </Visibility> <VisualActor> <Actor>structures/hellenes/wall_long.xml</Actor> <SilhouetteDisplay>false</SilhouetteDisplay> <SilhouetteOccluder>false</SilhouetteOccluder> <VisibleInAtlasOnly>true</VisibleInAtlasOnly> </VisualActor> </Entity> 1 Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 15, 2020 Author Report Share Posted December 15, 2020 Thanks for helping, but i think it's pretty much the same thing as what i got going on at this moment You do it slightly different but i guess the outcome is the same. Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted December 16, 2020 Report Share Posted December 16, 2020 17 minutes ago, Grapjas said: Thanks for helping, but i think it's pretty much the same thing as what i got going on at this moment You do it slightly different but i guess the outcome is the same. Honestly, I would do whatever makes sense to you, but my way gets rid of a lot of files. You could split it up into a template_ file, and then make the entity file have just the footprint and actor and obstruction size. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 16, 2020 Author Report Share Posted December 16, 2020 21 minutes ago, wowgetoffyourcellphone said: gets rid of a lot of files. Yes, you are right. I overlooked that. Quote Link to comment Share on other sites More sharing options...
Nescio Posted December 16, 2020 Report Share Posted December 16, 2020 19 hours ago, Grapjas said: @Stan` would you be willing to put this into the base of the game? I think it's quite an important tool for map makers who want functional ridges without destroying their visuals. Well, I don't have objections to including a generic `template_obstruction.xml` in the public mod, provided it does not include more lines than strictly necessary. Have a look at the trigger points. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 16, 2020 Author Report Share Posted December 16, 2020 (edited) 6 hours ago, Nescio said: Well, I don't have objections to including a generic `template_obstruction.xml` in the public mod, provided it does not include more lines than strictly necessary. Have a look at the trigger points. Would this be acceptable? Only 2 files total, 1 for each version. obstruction.rar I guess templates -> other, would be the best place for it, but i'll leave that to you. Spoiler your code was more useful then anticipated @wowgetoffyourcellphone. I tried many other ways and failed. Edited December 16, 2020 by Grapjas Quote Link to comment Share on other sites More sharing options...
wowgetoffyourcellphone Posted December 16, 2020 Report Share Posted December 16, 2020 2 hours ago, Grapjas said: Would this be acceptable? Only 2 files total, 1 for each version. obstruction.rar 1 kB · 1 download I guess templates -> other, would be the best place for it, but i'll leave that to you. Hide contents your code was more useful then anticipated @wowgetoffyourcellphone. I tried many other ways and failed. No problem! I could make a new actor using the wall model plus a loud neon color so the obstruction object is very obvious in Atlas what it is. Right now the map maker might forget what it is since it has the skin of a standard stone wall. Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 16, 2020 Author Report Share Posted December 16, 2020 1 hour ago, wowgetoffyourcellphone said: No problem! I could make a new actor using the wall model plus a loud neon color so the obstruction object is very obvious in Atlas what it is. Right now the map maker might forget what it is since it has the skin of a standard stone wall. Yeah that would be helpful in some occassions like campaign maps. I'm interested in how you would do such a thing though, to learn from it. Which programs you use for the tasks etc. Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted December 16, 2020 Report Share Posted December 16, 2020 The most used tool is a good text editor us Linux users just need the default one but on Windows download notepad ++ it will check the syntax for json and xml just change the language from the menu on it's tool bar. Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
Grapjas Posted December 17, 2020 Author Report Share Posted December 17, 2020 13 hours ago, Loki1950 said: notepad ++ I use this one already for webdesigning, very nice indeed. Quote Link to comment Share on other sites More sharing options...
andy5995 Posted October 9, 2021 Report Share Posted October 9, 2021 On 15/12/2020 at 3:09 PM, nani said: the file in question is binaries/data/mods/public/simulation/templates/special/filter/disableGarrisonHolder.xml so should be similar for your case Was this replaced with binaries/data/mods/public/simulation/templates/special/filter/ungarrisonable.xml in a recent release? Quote Link to comment Share on other sites More sharing options...
Freagarach Posted October 9, 2021 Report Share Posted October 9, 2021 We don't have a `disableGarrisonHolder` (anymore?), the `ungarrisonable` makes sure that the entity can't garrison something. Quote Link to comment Share on other sites More sharing options...
andy5995 Posted October 9, 2021 Report Share Posted October 9, 2021 I was updating the Community Maps 2 mod and wasn't sure what the equivalent is for disableGarrisonHolder (because I'm not sure what exactly that is supposed to do). Is this change correct? 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.