Jump to content

Show range area effect.


Recommended Posts

Can be done with selection ring or decal. Right now game is bugged so that footprint create selection area and selection ring is base on footprint size. Instead obstruction should create selection area or something else done like selection ring size put in selection ring code insread of footprint. Maybe extend aura entitycode for input of "aura ring" size and texture.

Edited by wowgetoffyourcellphone
Link to post
Share on other sites

Can be done with selection ring or decal. Right now game is bugged so that footprint create selection area and selection ring is base on footprint size. Instead obstruction should create selection area or something else done like selection ring size put in selection ring code insread of footprint. Maybe extend aura entitycode for input of "aura ring" size and texture.

Actually this is handy, it allows one to define a zone for the fooprint, but allows units to come close to the walls.

Link to post
Share on other sites

Can be like this:

  <Auras>    <AuraFood>      <Type>range</Type>      <Radius>60</Radius>      <AuraDecal>auras/celts/circle_60.xml</AuraDecal>      <Affects>Gatherer</Affects>      <Modifications>        <ResourceGatherer.Rates.food..grain>          <Multiply>1.2</Multiply>	</ResourceGatherer.Rates.food..grain>      </Modifications>      <AuraName>"Rotary Mill" Aura</AuraName>      <AuraDescription>Gatherers +20% Food Gather Rate within 60 meters.</AuraDescription>    </AuraFood>  </Auras>

assumes it is in art/actors/decals folder of course. Or done in the <Selectable> element of the etntity with some diplicate of the footprint stuff.

Only issue would be to descide if aura decal should only show up when selected, or like with hero star, be 50% see through and then full coloor when selected (best option in my opinion), or show up all the time full color. Or even better, make it option (or maybe this be confuse).

EDIT: Changed it from a texture to a decal call.I think would be better to just call a decal than to add a bunch more width, depth, etc.code to this element.

Edited by wowgetoffyourcellphone
  • Like 1
Link to post
Share on other sites

Okay, so I try test. Looks like I was wrong and footprint code no long make selections, so intricate selection rings can be created! Here is a test I just did for temple Vesta:


  <Selectable>    <Overlay replace="">      <AlwaysVisible/>      <Texture>        <MainTexture>auras/test/1024x1024_aura.png</MainTexture>        <MainTextureMask>auras/test/1024x1024_aura_mask.png</MainTextureMask>      </Texture>    </Overlay>  </Selectable>

post-16580-0-11046900-1424471025_thumb.j

post-16580-0-68461100-1424471200_thumb.j

Edited by wowgetoffyourcellphone
  • Like 3
Link to post
Share on other sites

Wow quite nice :)

thnx! After some play I think it best to not always have AlwaysVisible.

And I think the aura ring should be separate like this:

  <Selectable>    <AuraOverlay>      <Radius>60</Radius>      <Texture>        <MainTexture>auras/test/1024x1024_aura.png</MainTexture>        <MainTextureMask>auras/test/1024x1024_aura_mask.png</MainTextureMask>      </Texture>    </AuraOverlay>  </Selectable>

separate from regular overlay with a radius element (so you can reuse the aura texture with different kinds and sizes of overlays which use footprint size). Mein gott, ther are many ways to do this. lol Because what if there are twoi aura? ;)

Edited by wowgetoffyourcellphone
Link to post
Share on other sites

Yeah could you make it so it is only visible when selected ? :)

yep did this. :)

\

Now that I mess around more, I think it should go like this:

  <Auras>    <Aura1>      <Type>range</Type>      <Radius>60</Radius>      <AlwaysVisible>False</AlwaysVisible>      <Texture>        <MainTexture>auras/test/1024x1024_aura.png</MainTexture>        <MainTextureMask>auras/test/1024x1024_aura_mask.png</MainTextureMask>      </Texture>      <Affects>Structure</Affects>      <Modifications>        <Health.Max>	  <Multiply>1.25</Multiply>	</Health.Max>      </Modifications>      <AuraName>"Eternal Fire of Rome"</AuraName>      <AuraDescription>Structures +25% Health within 60 meters of the Temple of Vesta.</AuraDescription>    </Aura1>  </Auras>

This way you can have different aura decals for multiple aura in same unit or building (so, imagine Temple Vesta here having a healing aura of 40 meters and a Loyalty aura of 100 meters or something). This also keeop all aura graphic separate from selection ring graphic.

Edited by wowgetoffyourcellphone
Link to post
Share on other sites

I have only messaed around with the code as it exists now. I have only added a new selection ring with the <Selectable> element.

This right here is only my suggestion of how it could or should be done instead of in Selectable. Reasons for keeping it within <Auras>

  • Helps keep the visual aura concept together with the aura code
  • Gives flexibility because the visual aura does not necessarily have to have the same visual behavior of the selection ring
  • Gives flexibility for each aura visualization to be different if deemed necessary
  • Prevents the need for a custom texture for each building or unit with an aura. If the game combines the selection ring and the aura ring into 1 texture (like I have done above as a test), then you can't keep the selection footprint sizes separate from the aura ring sizes. It has to be one texture.
  • Can give Aura ring the behavior of showing up with preview entity. Footprint/Selectable does not do this for good reason.

So, you could have Aura1 and Aura2 and Aura3 each weith different textures and stuff. There might be bad reasons to do this, but I don't know them.

  <Auras>    <Aura1>      <Type>range</Type>      <Radius>60</Radius>      <AlwaysVisible>False</AlwaysVisible>      <Texture>        <MainTexture>auras/test/1024x1024_aura.png</MainTexture>        <MainTextureMask>auras/test/1024x1024_aura_mask.png</MainTextureMask>      </Texture>      <Affects>Structure</Affects>      <Modifications>        <Health.Max>	  <Multiply>1.25</Multiply>	</Health.Max>      </Modifications>      <AuraName>"Eternal Fire of Rome"</AuraName>      <AuraDescription>Structures +25% Health within 60 meters of the Temple of Vesta.</AuraDescription>    </Aura1>  </Auras>
Edited by wowgetoffyourcellphone
  • Like 3
Link to post
Share on other sites

What a lot of gameplay can be possible with this and aura

We can add bonus to the buildings

Religius festivals can add economical and militar bonus.

In Empire earth I some buildings prevent to act some units like priest or prophet units other like houses gives a bonus to the nearby units.

Link to post
Share on other sites

Okay, so I try test. Looks like I was wrong and footprint code no long make selections, so intricate selection rings can be created! Here is a test I just did for temple Vesta:

  <Selectable>    <Overlay replace="">      <AlwaysVisible/>      <Texture>        <MainTexture>auras/test/1024x1024_aura.png</MainTexture>        <MainTextureMask>auras/test/1024x1024_aura_mask.png</MainTextureMask>      </Texture>    </Overlay>  </Selectable>

Love it. Can we have that in the game please?

  • Like 3
Link to post
Share on other sites

Eventually I think there should be a generalized way to paint ring of various type: aura, but for example also min and max firing range. They should be able to be set automatically, without specifying a texture, this would be a lot easier to manage (i.e. no need to modify XML files, just use settings already available in every unit for size, using a different color for type). See for example these that were generated using little textures that can be placed on the border of a big ring:

2006928115812_Panzers_Phase2.jpg

20090217131615.jpg

Also for aura there should be a way to detect if a unit is really influenced by the aura, this is especially useful when aura only parttially cover a unit. A possibility would be to have a symbol floating over the unit when the aura affects it (as some of the units in previous images have).

  • Like 2
Link to post
Share on other sites

The problematic part of it is however the performance. Such decals require GPU intensive alpha blending IIRC. So they should only be used in rare cases.

1. Auras are relatively rare.

2. modern graphics cards can handle thousands of instance of alpha blending. The game will not run very well on integrated graphics anyway. If a couple of more alpha blends are a problem for a rig the game can have option to tyrn them off (default: on, of course).

Link to post
Share on other sites

I'm not sure if displaying aura ranges as rings is the right way to do it. Especially when there are many overlapping rings (female citizen aura for example), it doesn't work well anymore.

I imagined it more like an effect on the affected units, like a glow or something (but I still don't quite see how we would show multiple different types of auras for example).

Link to post
Share on other sites

When I implemented auras (including range auras), I also wanted visualisations (or at least that was one of the first requests).

Selection rings and decals came up, but it appeared that both options would put a serious load on the processor when used on moving units.

Even when used on non-moving entities, it makes the game a lot heavier, as big decals enlarge the bounding box of those enties. So this results in those entities being rendered quite often virtually, while they're not visible on screen at all.

Of course, most of these concerns are theoretical, as the actual slowdown is caused by rather subtle (like depends on the number of units normally invisible, but due to the change being rendered). So the slowdown has never been actually profiled.

EDIT: most of the performance doubts were raised by Philip, so I guess they're rather valid.

  • Like 1
Link to post
Share on other sites

I'm not sure if displaying aura ranges as rings is the right way to do it. Especially when there are many overlapping rings (female citizen aura for example), it doesn't work well anymore.

I imagined it more like an effect on the affected units, like a glow or something (but I still don't quite see how we would show multiple different types of auras for example).

I would think that visualization would be for important things, like hero (you can only have 1) and static building (there are only a few of these). The female aura is quite inconsequential.

Edited by wowgetoffyourcellphone
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...