Opened 10 years ago

Closed 8 years ago

Last modified 8 years ago

#2445 closed enhancement (fixed)

[PATCH] Implement team civ bonuses

Reported by: sanderd17 Owned by: sanderd17
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Patch:

Description

Team bonuses should be something like technologies, but that act on allies instead of the own player.

You can already add a team bonus by placing an aura on the CC (say, when your ally doesn't have a CC anymore, it won't be much of a good partner). Auras can modify stats of allied players, but it might sound a bit hacky.

Another way is given in the patch below, where the alliance is a requirement for an auto-researched tech. The drawback of using techs is that they don't revert.

So now the questions are waether auras are good enough (not too hacky), and weather it should revert when an alliance is disbanded or not.

Attachments (10)

teambonus.diff (3.2 KB ) - added by sanderd17 10 years ago.
teambonus_withauras.diff (4.6 KB ) - added by fatherbushido 8 years ago.
use global aura to implement team bonus
teambonus_withauras.2.diff (4.6 KB ) - added by fatherbushido 8 years ago.
teambonus_withauras.3.diff (2.9 KB ) - added by fatherbushido 8 years ago.
teambonuses.7z (537 bytes ) - added by fatherbushido 8 years ago.
to unzip in simulation/data/auras/
teambonus_withauras.4.diff (3.7 KB ) - added by fatherbushido 8 years ago.
fix a diplomacy issue
teambonus_withauras.5.diff (3.4 KB ) - added by fatherbushido 8 years ago.
teambonus_withauras.6.diff (4.7 KB ) - added by fatherbushido 8 years ago.
teambonus_withauras.7.diff (6.4 KB ) - added by fatherbushido 8 years ago.
add delian league teambonus
teambonuses.2.7z (771 bytes ) - added by fatherbushido 8 years ago.

Download all attachments as: .zip

Change History (25)

by sanderd17, 10 years ago

Attachment: teambonus.diff added

comment:1 by Niek, 10 years ago

I think Aura's are an easy way to do so, just make them global. But the aura would be lost if all CC's are destroyed, isn't it?

In that case I think it's better to check the team bonuses when a diplomacy is changed.

comment:2 by O.Davoodi, 10 years ago

If we are going for Auras, couldn't we assign them to the "player" entities (and make them global)? That way the problem with changing alliances and such will be fixed.

comment:3 by sanderd17, 10 years ago

Auras are given to templates, and there's only one Player template for all civs. So you can't give different bonuses to different civs this way. There's also no other way currently to enable or disable Auras.

So that way would need some work.

in reply to:  3 comment:4 by O.Davoodi, 10 years ago

Replying to sanderd17:

Auras are given to templates, and there's only one Player template for all civs. So you can't give different bonuses to different civs this way. There's also no other way currently to enable or disable Auras.

So that way would need some work.

And if we make the said aura civ specific by adding a new optional tag? It would only require a relatively small change in the Aura code. And we don't really need to "enable" and "disable" them. We only need to check for diplomacy changes and the aura code handles it well enough.

comment:5 by sanderd17, 10 years ago

It would still make the player template a bit of a mess by adding a dozen of auras to it. And it wouldn't be clear by looking at the player template to see which auras apply to which civs.

in reply to:  5 comment:6 by leper, 9 years ago

Replying to sanderd17:

It would still make the player template a bit of a mess by adding a dozen of auras to it. And it wouldn't be clear by looking at the player template to see which auras apply to which civs.

We do now support civ specific player templates.

comment:7 by Nikos, 9 years ago

Maybe slightly off-topic, but I'd suggest that Team Bonuses apply to all of the team, including the giving player. It makes more sense realistically, especially if you check the specifics of most chosen civ bonuses.

comment:8 by fatherbushido, 8 years ago

Two years later, it seems we have more tools to do that with auras.

comment:9 by fatherbushido, 8 years ago

Keywords: review added
Milestone: BacklogAlpha 21

comment:10 by fatherbushido, 8 years ago

Sum up CIV BONUSES (CV) and TEAM BONUS (TB) described in design docs

ATHEN

CB1 Name: Silver Owls.

done as phase_city_athen and phase_town_athen techs

CB2 Generic Name: Hellenization.

done as theatron aura

TB Name: Delian League.

doable with the patch

BRIT

CB1 Name: Ardiosmanae

done as rotary_mill aura

CB2 Name: Deas Celtica Effect: Druids increase attack rates of soldiers near them slightly.

can be done with a druid aura

TB1 Name: Druides Effect: Bonus to tech speed.

to do needs #3930

CART

CB1 Name: Triple Walls

done as civbonus_triple_walls tech

CB2 Name: Roundup Effect: Horses, elephants, and camels can be captured in the wild and placed in the Corral. Unlike normal corralled animals that generate food, the corralled horses, elephants, and camels functions similarly to a relic as in AoK. As long as it/they remain(s) in the Corral, the resource cost of training horse-mounted units (cavalry), War Elephant Champion Units, and camel caravans (traders) is reduced by a fixed amount of –5% per animal corralled appropriate to kind.

needs #1310 #997 #1907

TB1 Name: Trademasters

done as special_exploration tech, cart_dock cart_market templates (Market/InternationalBonus), cart_ship_merchant (Trader/GainMultiplier).

GAUL

CB1 Name: Ardiosmanae

done as rotary_mill aura

CB2 Name: Deas Celtica

can be done with a druid aura

TB1 Name: Druides Effect: Bonus to tech speed.

to do needs #3930

IBER

CB1 Name: Harritsu Leku

done as walls at start

CB2 Name: Zaldi Saldoa Effect: Horses can be captured in the wild and placed in the corral. Unlike normal corralled animals that generate food, the corralled horse functions similarly to a relic as in Age of Mythology: As long as it/they remain(s) in the corral, the resource cost of training horse-mounted units (cavalry) is reduced by a fixed amount of -5% per animal corralled.

needs #1310 #997 #1907

TB1 Name: Saripeko Effect: For allies, infantry and cavalry citizen-soldier skirmishers -50% cost (does not apply to champions also armed with the javelin).

doable with patch

MACE

CB1 Generic Name: Hellenic League. Effect: All Macedonian units have a +10% attack bonus vs. Persian and Hellenic factions (but also -5% attack debonus vs. Roman units).

can be done with attack bonus in unit templates

CB2 Generic Name: Syntagma. Effect: Infantry pike units can use the Syntagma formation (without the need to research a technology). The Syntagma formation is very slow, gives a high pierce attack bonus, and is nearly invincible from the front. However, it is extremely vulnerable from the rear and prone to being flanked unless guarded adequately.

done but currently useless

CB3 Generic Name: Hellenization.

done as theatron aura

TB Name: Standardized Currency. Effect: Tribute and trade between allies of the metal resource is bonused ~ 15%.

to do

MAUR

CB1 Generic Name: Emperor of Emperors

done as civbonus_maur_popcap tech

CB2 Generic Name: Warrior Caste. done as mauryans have 4 kinds of champs

TB Name: Evangelism. History: Ashoka the Great sent embassies West to spread knowledge of the Buddha. Effect: All allied Temple technologies -50% cost and research time.

to do needs #3930

PERS

CB1 Name: Ability to Corral Camels and Horses. Effect: Camels and horses can be captured in the wild and placed in the Corral. Unlike normal corralled animals, which generate food, the Corralled Camel/Horse? functions similarly to a relic. As long as it remains in the Corral, the resource cost of training camel-mounted units (the Trader, specifically) or horse-mounted units (as appropriate) is reduced by a fixed amount.

needs #1310 #997 #1907

CB2 Name: Great King's Levy done as civbonus_pers_popcap tech

~TB1 Name: The Royal Road. ~Effect: Higher income (+25%) from land trade routes, for the player's traders and his ally's ~traders. ~mostly done as pers_support_trader template

PTOL

CB1 Generic Name: Mercenary Army.

done as ptol can build mercenary colony

CB2 Generic Name: Nile Delta. Effect: The Ptolemaic Egyptians receive 3 additional farming technologies (see below) above and beyond the maximum number of farming technologies usually available to a faction.

to do

CB3 Generic Name: Roundup. Effect: Can capture gaia elephants and camels. Hosting these animals at the corral structure reduces the cost of training elephant and camel units.

needs #1310 #997 #1907

TB Name: Breadbasket of the Mediterranean. Effect: All allies automatically gain a slow trickle of food income.

can be done in several ways

ROM

CB1 Name: Testudo Formation. done but currently useless

CB2 Name: Citizenship Effect: Any Roman citizen-soldier fighting within Roman territory gains a non-permanent +10% bonus in armor.

can be done as a cc range aura

TB1 Name: Socii. Effect: Allied citizen-soldiers gain a +10% attack when in Roman territory.

can be done as a cc range aura

SEL

CB1 Generic Name: Cleruchy.

done as sele can build military colony

CB2 Generic Name: Military Reforms. Effect: At the City Phase, the Seleucids are given the choice of unlocking one of two sets of Champions

done

TB Name: Syrian Tetrapolis. History: The political core of the Seleucid Empire consisted of four 'sister' cities: Antioch (the capital), Seleucia Pieria, Apamea, and Laodicea. Effect: Allied Civic Centers are 20% cheaper.

to do, doable with the patch

SPART

CB1 Name: Othismos. Effect: Spartans can make use of the Phalanx formation without researching a technology.

done but actually useless

~CB2 Name: Laws of Lycurgus. ~Effect: The Spartan rank upgrades at the Barracks cost no resources, except time.

~mostly done as commandos swordmen unit

CB3 Generic Name: Hellenization.

done as theatron aura

TB1 Name: Peloponnesian League. Effect: Allied team members can train Spartiates.

to do, needs perhaps a copy of a spartiate template

Last edited 8 years ago by fatherbushido (previous) (diff)

comment:11 by fatherbushido, 8 years ago

Summary: [PATCH] Implement team bonuses[PATCH] Implement team civ bonuses

comment:12 by fatherbushido, 8 years ago

I edited the aura code so that player entity (wich has no ownership) can have a global aura. I add two functions that can be moved imo to simulation/helpers/Player.js. The seleucids and iberians team civ bonus are set as example.

Last edited 8 years ago by fatherbushido (previous) (diff)

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.diff added

use global aura to implement team bonus

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.2.diff added

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.3.diff added

by fatherbushido, 8 years ago

Attachment: teambonuses.7z added

to unzip in simulation/data/auras/

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.4.diff added

fix a diplomacy issue

comment:13 by sanderd17, 8 years ago

I don't think that sending 2 messages would be a good thing to do. It may double the workload (f.e. doing the territory checks) on places that are only interested to know if it's changed.

It would be better to add a second attribute (like "otherPlayer") to the message. So components that are interested in both players (like the auras) have both player ids to check against.

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.5.diff added

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.6.diff added

by fatherbushido, 8 years ago

Attachment: teambonus_withauras.7.diff added

add delian league teambonus

by fatherbushido, 8 years ago

Attachment: teambonuses.2.7z added

comment:14 by sanderd17, 8 years ago

Owner: set to sanderd17
Resolution: fixed
Status: newclosed

In 18115:

Implement team bonuses. Patch by fatherbushido. Fixes #2445

comment:15 by sanderd17, 8 years ago

Keywords: design review removed
Note: See TracTickets for help on using tickets.