Jump to content
Sign in to follow this  
Freagarach

A question to modders.

Recommended Posts

Hail to all modders! (@Exodarion, @darkinterloper, @borg-, @Nescio, @Angen, @wowgetoffyourcellphone, @Trinketos, @Stan`, @FeXoR, @asterix, @DarcReaver, @nani, @azayrahmad, @Loki1950 and all those not mentioned (we gotto have a list or something for this).)

When working on improving support for armour (D2229) there rose some questions during discussion with @wraitii. I've seen some mods with directional damage support and, because templates ought to be changed anyways, I thought I might as well try to add some support in SVN, or at least make it easier.

Template code as it stands:

Spoiler

  <Armour>
    <Hack>1</Hack>
    <Pierce>1</Pierce>
    <Crush>1</Crush>
    <Foundation>
      <Hack>1</Hack>
      <Pierce>1</Pierce>
      <Crush>1</Crush>
    </Foundation>
  </Armour>

What it is at least changed to:


  <Resistance>
    <Damage>
      <Hack>1</Hack>
      <Pierce>1</Pierce>
      <Crush>1</Crush>
    </Damage>
    <Capture>2</Capture>
    <Foundation>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Foundation>
  </Resistance>

 

What I propose:

Spoiler

  <Resistance>
    <Stone>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Stone>
    <Foundation>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Foundation>
  </Resistance>

Where "Stone" can be any name and multiple resistance types can be present:


  <Resistance>
    <Armour>
      <Damage>
        <Hack>2</Hack>
        <Pierce>4</Pierce>
        <Crush>15</Crush>
      </Damage>
    </Armour>
    <Shield>
      <Damage>
        <Hack>4</Hack>
        <Pierce>8</Pierce>
      </Damage>
      <Capture>10</Capture>
    </Shield>
  </Resistance>

Which would mean that this particular unit would in total 12 pierce, 6 hack, 15 crush and 10 capture defence.

The code to calculate the resistance to a specific attack would allow for resistance types to be circumvented. However, the condition as to which resistance type(s) to circumvent still needs to be coded in component files, by you. This leads to the loaded question:  do you think this is worth a shot? (For those interested in the actual code and perhaps willing to give some feedback on that specifically: D2229.)

Edited by Freagarach
  • Like 3
  • Thanks 2
  • Confused 1

Share this post


Link to post
Share on other sites

I think I understand what you're getting at, and it does sound intriguing, but maybe you can give more examples of how it can be used. Right now, I'm thinking something like this:

Using your example, "Armor" could be body armor and "Shield" is, well, the shield. So, using directional attacks, an arrow from the front is blocked by both the "Armor" and "Shield" resistance, while an arrow from the back would only be blocked by the "Armor" resistance. Is this close?

Could even extend it to an arrow from the left gets blocked by 100% of the Armor and 75%of the Shield stats, while an arrow from the right is blocked by 50% of the shield and 100% of the armor resistance stats, making flanking even that much more dynamic. (historically, generals had to place their best troops on the right flank to counteract this and other phenomena. 

This stuff is pretty cool, but frankly only makes sense with battalions. ;) I can't imagine having to worry about flanking and directional attacks while microing 100s of individual little soldiers on the screen. Makes more sense to include such a tactical feature with dozens of battalions instead. But having that functionality in the engine would make it that much better for potential mods, definitely. 

Edited by wowgetoffyourcellphone
  • Like 2

Share this post


Link to post
Share on other sites
1 minute ago, wowgetoffyourcellphone said:

This stuff is pretty cool, but frankly only makes sense with battalions. ;) I can't imagine having to worry about flanking and directional attacks while microing 100s of individual little soldiers on the screen. Makes more sense to include such a tactical feature with dozens of battalions instead. But having that functionality in the engine would make it that much better for potential mods, definitely. 

Plus with proper formations working

  • Like 2

Share this post


Link to post
Share on other sites
45 minutes ago, Freagarach said:

Hail to all modders! (@Exodarion, @darkinterloper, @borg-, @Nescio, @Angen, @wowgetoffyourcellphone, @Trinketos, @Stan`, @FeXoR, @asterix, @DarcReaver, @nani, @azayrahmad, @Loki1950, @sphyrth and all those not mentioned (we gotto have a list or something for this).)

When working on improving support for armour (D2229) there rose some questions during discussion with @wraitii. I've seen some mods with directional damage support and, because templates ought to be changed anyways, I thought I might as well try to add some support in SVN, or at least make it easier.

Template code as it stands:

  Reveal hidden contents


  <Armour>
    <Hack>1</Hack>
    <Pierce>1</Pierce>
    <Crush>1</Crush>
    <Foundation>
      <Hack>1</Hack>
      <Pierce>1</Pierce>
      <Crush>1</Crush>
    </Foundation>
  </Armour>

What it is at least changed to:



  <Resistance>
    <Damage>
      <Hack>1</Hack>
      <Pierce>1</Pierce>
      <Crush>1</Crush>
    </Damage>
    <Capture>2</Capture>
    <Foundation>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Foundation>
  </Resistance>

 

What I propose:

  Reveal hidden contents


  <Resistance>
    <Stone>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Stone>
    <Foundation>
      <Damage>
        <Hack>1</Hack>
        <Pierce>1</Pierce>
        <Crush>1</Crush>
      </Damage>
    </Foundation>
  </Resistance>

Where "Stone" can be any name and multiple resistance types can be present:



  <Resistance>
    <Armour>
      <Damage>
        <Hack>2</Hack>
        <Pierce>4</Pierce>
        <Crush>15</Crush>
      </Damage>
    </Armour>
    <Shield>
      <Damage>
        <Hack>4</Hack>
        <Pierce>8</Pierce>
      </Damage>
      <Capture>10</Capture>
    </Shield>
  </Resistance>

Which would mean that this particular unit would in total 12 pierce, 6 hack, 15 crush and 10 capture defence.

The code to calculate the resistance to a specific attack would allow for resistance types to be circumvented. However, the condition as to which resistance type(s) to circumvent still needs to be coded in component files, by you. This leads to the loaded question:  do you think this is worth a shot? (For those interested in the actual code and perhaps willing to give some feedback on that specifically: D2229.)

@The Undying Nephalim   might want to take a look for Hyrule Conquest  as for other mods the more options, the better (more useful) it will be. By the way, thank you for your hard work, I am definitely interested in what are you doing.

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites
11 minutes ago, wowgetoffyourcellphone said:

Using your example, "Armor" could be body armor and "Shield" is, well, the shield. So, using directional attacks, an arrow from the front is blocked by both the "Armor" and "Shield" resistance, while an arrow from the back would only be blocked by the "Armor" resistance. Is this close?

This is spot on :)

11 minutes ago, wowgetoffyourcellphone said:

Could even extend it to an arrow from the left gets blocked by 100% of the Armor and 75%of the Shield stats, while an arrow from the right is blocked by 50% of the shield and 100% of the armor resistance stats, making flanking even that much more dynamic. (historically, generals had to place their best troops on the right flank to counteract this and other phenomena.

That (a percentage of damage based on the position) is currently not implemented, but is not that hard (see @Angen's battalion mod). What I envision is that a unit attacked from the front has a ~95% chance of using the shield to block damage (when not preoccupied, perhaps) and decreasing that percentage to "0" at the edges of the LOS of a person. But that has to be coded in seperately in "Attacking.js".

19 minutes ago, wowgetoffyourcellphone said:

battalions

(D2175 combined with D2182 and properly working formations, as @Alexandermb noted.)

19 minutes ago, asterix said:

thank you for your hard work, I am definitely interested in what are you doing.

Glad to be of service!

  • Like 1

Share this post


Link to post
Share on other sites
9 hours ago, Trinketos said:

is this for armor only?

Aye, this is for armour only.

9 hours ago, Trinketos said:

What is possible with this?

This would allow for a modder to circumvent specific resistance types. An example:

Spoiler

If a attacked unit has this:



  <Resistance>
    <Armour>
      <Damage>
        <Hack>2</Hack>
        <Pierce>4</Pierce>
        <Crush>15</Crush>
      </Damage>
    </Armour>
    <Shield>
      <Damage>
        <Hack>4</Hack>
        <Pierce>8</Pierce>
      </Damage>
      <Capture>10</Capture>
    </Shield>
  </Resistance>

as its resistance, a modder could include in the component a check to circumvent specific resistance types.

E.g. a check could be incorporated for the relative angle between the attacked entity and the origin of the attack. When the check is then true, a resistance type to be ignored is passed, e.g. "Shield" in this case. That would mean that during damage calculation, that specific resistance type is not accounted for. In this case it would mean the attacked entity only has 2 Hack, 4 Pierce and 15 Crush resistance, instead of 6 Hack, 12 Pierce, 15 Crush and 10 Capture resistance.

Another example would be critical hits, a chance to find a hole in an armour, so the whole "Armour" resistance is ignored.

The downside of this is, when we include it but noone uses it, that it means more code to maintain, more chance for bugs, for no benefit.

I hope this clarifies it a bit @Trinketos? Otherwise feel free to ask!

8 hours ago, sphyrth said:

You can edit me out of the OP. I ain't part of any of the hardworking contributors to the game.

Anyone who is constructively participating on the forum is, IMHO, a contributor. But if you still want to be edited out (because you're no modder?), I'm willing to do that.

  • Thanks 2

Share this post


Link to post
Share on other sites

As a modders I welcome any update that add depths to the gameplay, especially this one. This could potentially solve the problem of ranged unit OPness without nerfing.

  • Like 1

Share this post


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.

Sign in to follow this  

×
×
  • Create New...