Orc Racial Trait (1.12 SP/MP mod)

Discussion of all aspects of multiplayer development: unit balancing, map development, server development, and so forth.

Moderator: Forum Moderators

Post Reply
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Orc Racial Trait (1.12 SP/MP mod)

Post by Samonella »

This experimental mod creates a new trait for orcs: "aggressive." Units who have this trait deal +2 melee damage while attacking, but not while defending. They also lose 2 HP per level. Also, it is impossible for one orc to be both "strong" and "aggressive."

All suggestions, ideas and other feedback are welcome here! Here are a few of my thoughts:
Balance implications
Check out this excellent analysis of "aggressive" by Gyra_Solune.

Also, I think it's worth noting that the chances for getting each trait are not equal. Specifically, there's a 7/20 chance to get "aggressive," a 13/40 chance to get "strong," and a 53/120 chance for each of the others (quick, intelligent, resilient). This is opposed to most races (like humans) who have an even 1/2 chance for each trait, and the elves/dwarves who have a 2/5 chance for each trait (because of healthy/dexterous). If you want to know where exactly all these chances come from, I'll explain it, but here's the main point:
Orcs get "strong" much less often than other races, but of course that's because they get "aggressive" about as often as they get "strong."
They get one of the traits that affects their damage (strong/aggressive) more often than other races, but not by too much.
They get other traits (quick, intelligent, resilient) less often than other races, but not by too much.

You can think of it as though whenever they would have gotten "strong," there's a chance they'll get "aggressive" instead, but that's not quite accurate either. I wanted this to be the case because both "aggressive" and "strong" are a bit disappointing to get on assassins (and archers, though less so). Archers would much rather be intelligent, and either one would usually prefer quick or resilient. By adding a trait that's so similar to strong, I didn't want to dramatically increase the chance that an archer or assassin almost wastes a trait.
Also, the algorithm I used to add a new trait doesn't exactly lend itself to nice, even chances. It's not as simple as modifying the mainline orc race.
Alternate ideas
These are ideas to possibly modify or replace "aggressive."

1) Wolves can be "aggressive" too
This one is probably a bad idea. Wolves' attack was originally 5-3, so (when attacking) aggressive wolves have an impressive 7-3 attack. That's the same as a spearman. During day-time, that's 5-3 (the same as a strong wolf). At night, this moves all the way up to 9-3, which, when combined with wolves' impressive mobility, is why I think letting wolves be "aggressive" would just be too OP. It would be too easy to run in, attack and inflict heavy damage, likely killing most units with just two attacks, and escape at dawn. Another way to look at it is that "aggressive" gives orcish grunts and archers +4 damage total, the same as "strong" gives an elvish fighter. An aggressive wolf, on the other hand, gets boosted +6 damage during most times of day. Either way you look at it, I'm not likely to give wolves this trait, even though I wanted to at first.

2) Orcs can be both aggressive and strong -- sort of
The biggest advantage to this idea is that it simplifies the weird chances mentioned in the section above. Basically, orcs have an equal chance of getting any trait combination, including strong and aggressive. The trait's damage doesn't stack however; a strong, aggressive orc gets +2 damage when attacking and +1 when defending. If this were the case, "aggressive" would probably deduct less (or no) HP.

3) Aggressive is only +1 damage, but applies to melee and ranged attacks
Right now, it seems like an aggressive assassin is a bit of a dud, and so are aggressive archers (though less so). This change would aim to fix that. Also, now it would be reasonable to allow an orc to be both aggressive and strong; in fact, for grunts this would have the same effect as idea number 2. This would also make it much less likely for orcs to get a full +2 attack damage (around 2/25 or 8% chance). With this statistic, idea number 1 starts to sound a lot more reasonable.

Number 3 would be a lot more complicated, of course... aggressive assassins would do +3 ranged damage regardless of ToD, which probably doesn't make a big difference. Aggressive archers, on the other hand, would do +3 ranged damage during day/dawn/dusk, but +6 damage at night! For their cheap cost, low xp to advance, and versatility in choosing a damage type, I think a 2/5 chance of being aggressive is OP. Also, consider that although few orcish grunts would be strong AND aggressive, almost all of them would be strong OR aggressive. In fact, where 1 in 2 grunts used to do extra damage, now 4 in 5 would. This basically changes the grunt's base damage, so it's probably a bad thing too.
EDIT: Added this section:
Current limitations
1) "Aggressive" doesn't have an entry in the help menu, because no one seems to know if/how the [help] tag works in add-ons. If you know anything, please leave a comment here. I'm not the first person to run into the problem.

2) Since traits directly affect attacks' base damage, looking at the side menu can be a bit misleading; during the aggressive unit's turn, the +2 is calculated right into the attack strength, so the player has to remember on his/her own that it will be less during opponent's turns. The opposite is also true; other teams (including allies) only see the unit's defensive damage displayed, so they must remember that it will get boosted during the opponent's turn.

3) "Aggressive" will always be the first trait on the list, displayed before whichever other trait the unit has. I could randomize it, but it would complicate the code more than it's worth, IMO.

4) There's an unfathomable bug when a unit is both aggressive and resilient; the extra HP added by resilient only affects the max_hitpoints, so the unit is recruited a few HP short. Worse, I've tried a few different ways to heal the unit before/while/after "resilient" is added, but they all have the strangest behavior: the unit appears with full HP, but on the next turn (when the unit gets its movement points) the healed hitpoints disappear, leaving it with the same amount as if I hadn't healed it. I'm still trying to figure out a solution.

5) Only orcs who are recruited can get this trait; in campaigns/scenarios, orcs placed via [unit] or debug mode will never be "aggressive." I don't think there's a work around without 1.13's unit_placed event.
Oh, btw, this mod only works in multiplayer because I haven't figured out a way to affect campaigns too. If you know one, please fill me in.
Last edited by Samonella on January 26th, 2017, 1:32 am, edited 2 times in total.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (MP mod)

Post by The_Gnat »

Very interesting mod. :D So basically why have you decided to add this trait? Is this a step in a goal to add many new traits? Is this because you think that orcs don't have enough damage? Is this because you think the orcish faction is under balanced?

EDIT: (i just re-read my post and it seems a bit terse, i am just asking so i can give some helpful feedback) ^_^
User avatar
Paulomat4
Moderator Emeritus
Posts: 730
Joined: October 16th, 2012, 3:32 pm
Location: Wesmere library, probably summoning Zhangor

Re: Orc Racial Trait (MP mod)

Post by Paulomat4 »

If you know one, please fill me in.
That depends if you want to do this in 1.12 or in 1.13.
In 1.13 SP mods can be added the same way as MP mods. Just set the type tag to hybrid.

Code: Select all

[modification]
	type=hybrid
[/modification]
In 1.12 this is a bit trickier. You'll need to use Lua code to do this. If you want you can study the Unitmarker add-on on the 1.12 server which does this. I'll be happy to reply to your questions about it.

EDIT: the XP bank add-on is another add-on for 1.12 which does this :)
Creator of Dawn of Thunder and Global Unitmarkers

"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (MP mod)

Post by Samonella »

The_Gnat wrote:Very interesting mod. :D So basically why have you decided to add this trait? Is this a step in a goal to add many new traits? Is this because you think that orcs don't have enough damage? Is this because you think the orcish faction is under balanced?
Haha, I didn't really think about it that way. I guess I just like how the elves and dwarves have a racial trait, and when I was reading this tread about orc racial trait ideas I got this one. The reason I like this trait specifically is that it brings some variety to the northerners, who, as a strength-in-numbers faction, can be just a touch bland. I certainly don't think they were too weak before, and while designing this mod I tried to avoid it making orcs stronger or weaker; they should just be a little different.
Paulomat4 wrote:In 1.12 this is a bit trickier. You'll need to use Lua code to do this. If you want you can study the Unitmarker add-on on the 1.12 server which does this. I'll be happy to reply to your questions about it.

EDIT: the XP bank add-on is another add-on for 1.12 which does this :)
Awesome, thanks! I'll take a look when I have some time, hopefully later today.

EDIT: Also, I added another section to the original post, mentioning a few things that are non-ideal about the current mod.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (MP mod)

Post by The_Gnat »

Samonella wrote:Haha, I didn't really think about it that way. I guess I just like how the elves and dwarves have a racial trait, and when I was reading this tread about orc racial trait ideas I got this one. The reason I like this trait specifically is that it brings some variety to the northerners, who, as a strength-in-numbers faction, can be just a touch bland. I certainly don't think they were too weak before, and while designing this mod I tried to avoid it making orcs stronger or weaker; they should just be a little different.
Very good. And i think it is good that you do not allow both strong and aggressive. The only thing i am wondering is: is giving +2 damage on attacks too normal? I think it is good, though, that you reduce the HP by 2 per level that makes it more unique! :D

I personally think it would be cool to give every race a unique trait!
Samonella wrote:Awesome, thanks! I'll take a look when I have some time, hopefully later today.
I have attached an archive of a the Orc Racial Trait working in singleplayer. I made a simple modification to your add-on which now loads the events you created in singleplayer using a little Lua that zookeeper showed me. It works pretty well but i suggest testing it before you release it as an add-on.
Attachments
Orc_Racial_Trait.zip
(2.83 KiB) Downloaded 272 times
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (1.12 MP mod)

Post by Samonella »

Paulomat4 wrote:In 1.12 this is a bit trickier. You'll need to use Lua code to do this. If you want you can study the Unitmarker add-on on the 1.12 server which does this. I'll be happy to reply to your questions about it.
Ah, lua. Where curly braces are everywhere but where you expect them. Thanks again! The mod works in single player now; at the start of each campaign play-through a message asks whether to allow aggressive orcs or not, and the choice persists throughout the campaign. Unfortunately, it does not affect orcs created via [unit] or debug mode; only those that are recruited. 1.13's unit_placed event is the only way to fix this I can think of.

Also, my mod seems to be interfering with the unit-marker, and I'm not sure why... I renamed the variables, both on the wml side and the lua side.
The_Gnat wrote:I have attached an archive of a the Orc Racial Trait working in singleplayer. I made a simple modification to your add-on which now loads the events you created in singleplayer using a little Lua that zookeeper showed me. It works pretty well but i suggest testing it before you release it as an add-on.
Em, well... I didn't see your post until after making mine. :oops:
Thanks anyway!
The_Gnat wrote:Very good. And i think it is good that you do not allow both strong and aggressive. The only thing i am wondering is: is giving +2 damage on attacks too normal? I think it is good, though, that you reduce the HP by 2 per level that makes it more unique! :D

I personally think it would be cool to give every race a unique trait!
I don't think I'd call the current 'aggressive' normal, especially compared to the elves' racial trait. Of course, like I said, I'm always happy to hear ideas, and I guess that includes ideas for traits for other races. I do believe in KISS, though. KISS is mostly important for code, but i think it's a good guideline for game design too.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (1.12 MP mod)

Post by The_Gnat »

Samonella wrote:Also, my mod seems to be interfering with the unit-marker, and I'm not sure why... I renamed the variables, both on the wml side and the lua side.
Hmm, well the reason your add-on conflicts with the unitmarker is probably because your Event Loader has the exact same id as the unitmarker's Event Loader, and so which ever one is installed last will override the other addon. I would suggest you change the id of your event loader. If that doesn't work for you here is my version of your add-on updated with the new SP event you made, tested and working with the unitmarker add-on. I only made a tiny change to it to include the turn 1 message.
Orc_Racial_Trait.zip
(3.3 KiB) Downloaded 268 times
Samonella wrote:Em, well... I didn't see your post until after making mine. :oops:
Thanks anyway!
Yes a few people have had this problem ;) I don't mind it only took me a few minutes to write up that code.
Samonella wrote:I don't think I'd call the current 'aggressive' normal, especially compared to the elves' racial trait.
That is true, the dexterous trait is kind of boring :P
Samonella wrote:Of course, like I said, I'm always happy to hear ideas, and I guess that includes ideas for traits for other races. I do believe in KISS, though.
Once again i agree, as long as it is not repetitive it is better to be simple and easy to understand then new and inventive.

So what races currently have unique traits? Here's the ones i can think of:

Undead (undead trait), Dwarves (healthy trait), Elves (dexterous trait), Goblins (weak,slow,dim), Mechanical (mechanical trait), Trolls (fearless trait, no intelligent trait)

--

So that means the woses, wolves, naga, merman, saurian, khalifate, drakes, gryphons, falcons, and maybe the monsters could do with a new unique trait. I think the most important are the drakes, woses, and khalifate. Any ideas?
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (1.12 MP mod)

Post by Samonella »

The_Gnat wrote:Hmm, well the reason your add-on conflicts with the unitmarker is probably because your Event Loader has the exact same id as the unitmarker's Event Loader, and so which ever one is installed last will override the other addon. I would suggest you change the id of your event loader. If that doesn't work for you here is my version of your add-on updated with the new SP event you made, tested and working with the unitmarker add-on. I only made a tiny change to it to include the turn 1 message.
Yep, that would do it. I didn't even think about that because I was so sure it was some lua witchcraft. Fixed and uploaded! Many thanks.
The_Gnat wrote:So that means the woses, wolves, naga, merman, saurian, khalifate, drakes, gryphons, falcons, and maybe the monsters could do with a new unique trait. I think the most important are the drakes, woses, and khalifate. Any ideas?
Well, woses already have a unique trait, sort of. They never get traits, which I think was an intentional nerf. That makes them special enough, imo. In fact, I think adding traits to all those small races would just be a bunch of details for players to memorize; they wouldn't be worth the complication, or the effort to make.

I agree that drakes and khalifate could use one, though. Here's one that i'm not sure if I like or not: "agile" for drakes, giving them +5% defense on all terrains. In macro play, I think that would have the same effect as +5% hitpoints, or about 2 for most lvl 1 drakes.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (1.12 MP mod)

Post by The_Gnat »

Samonella wrote:I agree that drakes and khalifate could use one, though. Here's one that i'm not sure if I like or not: "agile" for drakes, giving them +5% defense on all terrains. In macro play, I think that would have the same effect as +5% hitpoints, or about 2 for most lvl 1 drakes.
I like the idea of agile, but increased hitpoints would only be a variation of 'resilient' so instead i think it should +10% defense in appropriate terrains (as to not give a to large advantage it would only plus defense in village, castle, flat, and maybe a few others.) What do you think of that?
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (1.12 SP/MP mod)

Post by Samonella »

I meant that +5% defense is about equal to +5hp, so it's easier to think about the balance implications. The ability would still change terrain defense. Also, my "math" was completely wrong. This equation (i think) is accurate:
(Effective total hitpoints) * (Chance to hit, [or 1 - terrain defense]) = (Original hitpoints)
Because, in macro play, to kill a unit with (original hitpoints) you effectively have to dedicate attacks that, if they hit every time, could deal much more damage. If you miss (terrain defense) percent of the time, the total damage potential you have to use equals the original hitpoints if you multiply it by the chance to hit. I believe this equation is right because it also has the expected behavior for 0% and 100% defense: 0% terrain defense means that (effective total hitpoints) = (original hitpoints) and 100% defense means that it is impossible to equal (original hitpoints) damage (in other words, no matter how much you attack, the unit will never die).

So, for units of circa 40 hitpoints (like drakes) adding 5% terrain defense is the same as adding:
3.3 HP, if the unit originally always had 20% defense,
4.4 HP, if the unit originally always had 30% defense,
6.1 HP, if the unit originally always had 40% defense.
In other words, agile has a greater effect if you keep the unit on high defense terrain, but it's usually worth between 4 and 6 extra HP for lvl 1s, therefore being worth close to the same amount as Resilient.

How does this change for level twos? Drake level twos have between 55 and 66 hitpoints (with the exception of the scout). At 60 hp, the unit effectively gains between 5 and 9 hp, noticeably more than resilient. Level three drakes would effectively gain as much as 12, if they carefully stuck to 40% defense terrains.

EDIT: Oh, I forgot that the drake scouts have better terrain defenses. That would make "agile" be worth 4.8HP, 10HP, and 12HP for levels 1, 2, and 3 respectively. Or slightly better, if the drake was also resilient.

:lol: Who ever said calculus has no real life applications?
The_Gnat wrote:I like the idea of agile, but increased hitpoints would only be a variation of 'resilient' so instead i think it should +10% defense in appropriate terrains (as to not give a to large advantage it would only plus defense in village, castle, flat, and maybe a few others.) What do you think of that?
I don't really like the idea of choosing only some terrains that "agile" affects for two reasons: 1) it means "agile" would be more or less useful, depending on the map, 2) imo it's a violation of KISS.

Also, after thinking a bit more, I don't really like "agile" for drakes because (according to wesnoth) drakes are kinda slow and clumsy; giving them a special trait that is opposite this seems like a bad idea (even though it could just mean agile compared to other drakes).
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (1.12 SP/MP mod)

Post by The_Gnat »

In response to your last statement (which disregards the rest) : i agree drakes and agility don't go together well. We could consider giving the khalifate an agile trait. That could possibly fit and also i can imagine an agile desert traveler... but do you think the agile trait will be a to big OP.

As for the drakes we could give them

A.
Bonus for resistance. All resistances or only a particular resistance that the name of the trait would explain (for example fiery -> +20% resistance to fire or something like that)
B.
Bonus for ToD. Maybe named sombre or cynical and gives them no negative at night but only +15% at day. (that might be excessive but with calculations a correct amount could be decided upon)

This also could be named lustre, and gives them 35% bonus for day and -35% at night or something like that.

Thirdly this could be a dawn/dusk trait that gives +5 or +10 % at those times of day.
C.
Bonus for upkeep. Named valiant this would decrease their xp by 5% or some small amount and -1 for their upkeep (so level 1 cost 0, level 2 cost 1, and so on)
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (1.12 SP/MP mod)

Post by Samonella »

The_Gnat wrote:In response to your last statement (which disregards the rest) : i agree drakes and agility don't go together well. We could consider giving the khalifate an agile trait. That could possibly fit and also i can imagine an agile desert traveler... but do you think the agile trait will be a to big OP.
I always thought OP stood for "Over powered." :hmm:
Anyway, agile seems fitting for khalifate, but +5% defense probably would be too strong, since they generally have higher terrain defenses to begin with. It's hard to be sure, since the khalifate are much more diverse than drakes (more units, wider variety in original HP, wide variety in base terrain defenses). There are just a lot more combinations to consider. From the handful I've looked at, +5% defense would be pretty [acronym=whatever you want as long as it means "too strong." xD]OP.[/acronym] Using +3% or something is a thought... but imagine moving the cursor around and seeing numbers like 53%, 43% etc. I could live with multiples of five, but other than that it seems pretty weird.
The_Gnat wrote: As for the drakes we could give them

A.
Bonus for resistance. All resistances or only a particular resistance that the name of the trait would explain (for example fiery -> +20% resistance to fire or something like that)
This crossed my mind, but it leads to weird stuff. Normal traits (strong, intelligent) have effects that you can see just by looking at the info on the right side of the screen. Bonus resistances would be basically invisible. In fact, what would show if an enemy hovered over one of its units attacks, so it shows the damage vs. various enemy units, counting for their resistances? Does it just list "Drake Burner" once for 50% resistance, and again for 70%? Plus, when you're considering which units to attack, you'd have to carefully check through and see which ones had this trait, since it's invisible any other way. Overall, just too complicated imo.
The_Gnat wrote: B.
Bonus for ToD. Maybe named sombre or cynical and gives them no negative at night but only +15% at day. (that might be excessive but with calculations a correct amount could be decided upon)

This also could be named lustre, and gives them 35% bonus for day and -35% at night or something like that.

Thirdly this could be a dawn/dusk trait that gives +5 or +10 % at those times of day.

I like this idea. The other ones have improved drakes' ability to defend, which is what they're famously bad at. It seems like a racial trait should improve their ability to attack or move quickly, since those are their specialties, and this kind of trait would do that. I'd want to be very, very, careful, though. Consider that ToD is a multiplier, so even small percents will have a big effect on high level units compared to lvl 1s.
The_Gnat wrote: C.
Bonus for upkeep. Named valiant this would decrease their xp by 5% or some small amount and -1 for their upkeep (so level 1 cost 0, level 2 cost 1, and so on)
I don't think messing with upkeep is a good idea. It would just be too hard to balance, especially since it would give a bigger advantage on big maps, which drakes already have an advantage on (due to mobility).
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
Samonella
Posts: 382
Joined: January 8th, 2016, 5:41 pm
Location: USA

Re: Orc Racial Trait (1.12 SP/MP mod)

Post by Samonella »

Ok, this is driving me mad. "Aggressive" just can seem to get along with "resilient." There is some insane little bug that no matter what I try messes up hitpoints of any units that have both traits. Seriously, I've tried a lot of stuff to fix or get around it. Until I get this worked out (probably never) I'm taking down the add-on.
The last few months have been nothing but one big, painful reminder that TIMTLTW.

Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
User avatar
The_Gnat
Posts: 2217
Joined: October 10th, 2016, 3:06 am
Contact:

Re: Orc Racial Trait (1.12 SP/MP mod)

Post by The_Gnat »

Oh, i was wondering what the hp problem was... Hopefully you are able to fix it!
Post Reply