Terrain Defence As Damage Reduction?
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
- averyimaginativename
- Posts: 245
- Joined: August 21st, 2010, 12:40 pm
- Location: /dev/null
Terrain Defence As Damage Reduction?
I apologise if this has been asked before - I have searched, but there's so many RNG complaints show up in the results, I might have missed something...
I'm working on my first campaign, and for a special weapon in a single scenario, I want to change the behaviour of terrain defence, but I can't work out how to do it.
Is it possible using WML to change the chance to hit to 100%, and also to reduce the damage taken by the defence percentage of the terrain they're on?
For example, an attack dealing 10 damage is guaranteed to hit, but when used on an elf on a forest tile would only do 3 damage.
(If it's too complicated for somebody to tell me exactly how to do it, a yes/no answer would be fine - I'm happy to work it out for myself as long as I know it's possible).
I'm working on my first campaign, and for a special weapon in a single scenario, I want to change the behaviour of terrain defence, but I can't work out how to do it.
Is it possible using WML to change the chance to hit to 100%, and also to reduce the damage taken by the defence percentage of the terrain they're on?
For example, an attack dealing 10 damage is guaranteed to hit, but when used on an elf on a forest tile would only do 3 damage.
(If it's too complicated for somebody to tell me exactly how to do it, a yes/no answer would be fine - I'm happy to work it out for myself as long as I know it's possible).
UMC Story Images web gallery
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.
Re: Terrain Defence As Damage Reduction?
Thank you.averyimaginativename wrote:(If it's too complicated for somebody to tell me exactly how to do it, a yes/no answer would be fine - I'm happy to work it out for myself as long as I know it's possible).
The terrain defense on each unit is based on his/her move-type that is on "core/unit.cfg" (in the defense tag) AFAIK.averyimaginativename wrote:I'm working on my first campaign, and for a special weapon in a single scenario, I want to change the behaviour of terrain defence, but I can't work out how to do it.
Yes, it is. (well, I haven't tried it though.)averyimaginativename wrote:Is it possible using WML to change the chance to hit to 100%
Refer WEAPON_SPECIAL_MARKSMAN or MAGICAL on "core / macros / abilities.cfg".
Still yes, but how to do depends on how you would like to do.averyimaginativename wrote:and also to reduce the damage taken by the defence percentage of the terrain they're on?
Hopefully, these are going to help you.
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
Re: Terrain Defence As Damage Reduction?
Here's such a system made into a multiplayer era, you can copy over the events from that. You might need to change them a little bit to prevent the same unit from receiving the modification several times (once per scenario), or to make sure that recalled units get it too.
The code is a couple years old but I think it'll still work.
The code is a couple years old but I think it'll still work.
Spoiler:
- averyimaginativename
- Posts: 245
- Joined: August 21st, 2010, 12:40 pm
- Location: /dev/null
Re: Terrain Defence As Damage Reduction?
I'm heading in the right direction now - thanks a lot, you've saved me from lots of headaches.
UMC Story Images web gallery
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.