Skip to content
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ This page lists all the individual contributions to the project by their author.
- Customize particle system of parasite logic
- Fix an issue where parasites that have infected infantry do not provide a refund when the infected infantry enters a Grinding building
- Fix the issue that `PassengerDeletion` dont consider passenger's passenger, parasite and hijacker
- New bounty logic
- **Apollo** - Translucent SHP drawing patches
- **ststl**:
- Customizable `ShowTimer` priority of superweapons
Expand Down
48 changes: 48 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ This page describes all the engine features that are either new and introduced b
- `DisableWeapons` can be used to disable ability to fire any and all weapons.
- On TechnoTypes with `OpenTopped=true`, `OpenTopped.CheckTransportDisableWeapons` can be set to true to make passengers not be able to fire out if transport's weapons are disabled by `DisableWeapons`.
- `Unkillable` can be used to prevent the techno from being killed by taken damage (minimum health will be 1).
- `Bounty` can be used to override the option with the same name in TechnoTypes, enabling it for TechnoTypes that originally did not have the Bounty Hunter ability, or conversely, disabling it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be best if the value of the holder's bounty could also be adjusted through AE.

- If multiple AEs with this setting exist simultaneously, the last AE applied and in effect shall prevail.
- It is possible to set groups for attach effect types by defining strings in `Groups`.
- Groups can be used instead of types for removing effects and weapon filters.

Expand Down Expand Up @@ -149,6 +151,7 @@ ReflectDamage.Override= ; integer
ReflectDamage.UseInvokerAsOwner=false ; boolean
DisableWeapons=false ; boolean
Unkillable=false ; boolean
Bounty= ; boolean
LaserTrail.Type= ; LaserTrailType
Groups= ; comma-separated list of strings (group IDs)

Expand Down Expand Up @@ -2167,6 +2170,51 @@ TiberiumEater.Anims.Tiberium3= ; List of AnimationTypes
TiberiumEater.AnimMove=true ; boolean
```

### New bounty logic

- Similar to [Ares' bounty logic](https://ares-developers.github.io/Ares-docs/new/bounty.html), but with more configurable options and easier to use.
- `Bounty.Enable` is the master switch for the new bounty logic; it must be turned on first to utilize the new bounty system.
- `Bounty.Enablers` specifies the TechnoTypes that grant the bounty capability, not limited to buildings.
- If this list is empty, the bounty logic is enabled without requiring any prerequisite TechnoTypes.
- `Bounty.Multiplier` is the multiplier applied to the bounty a hunter receives when a victim is killed. This is defined on the victim.
- `Bounty.Value` is the fixed amount of funds a hunter receives when a victim is killed. This is also defined on the victim.
- If `Bounty.Value` is not 0, the base value is the amount set by `Bounty.Value`; otherwise, the base bounty value is the victim's actual cost multiplied by `Bounty.Multiplier`.
- `Bounty.KillerMultiplier` is the multiplier applied to the bounty received when killing a target. This is defined on the hunter.
- `Bounty.Display` controls whether the bounty amount is shown, displayed on the hunter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be allowed to be displayed on the head of the prey.


In `rulesmd.ini`:
```ini
[General]
Bounty.Enable=false ; boolean
Bounty.Enablers= ; list of TechnoTypes
Bounty.Default=false ; boolean
Bounty.Multiplier=1.0 ; double
Bounty.KillerMultiplier=1.0 ; double

[AudioVisual]
Bounty.Display=false ; boolean
Bounty.Display.Houses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)

[SOMETECHNO] ; TechnoType
Bounty= ; boolean, default to [General] -> Bounty.Default
Bounty.Multiplier= ; double, default to [General] -> Bounty.Multiplier
Bounty.Multiplier.Veteran= ; double, default to [TechnoType] -> Bounty.Multiplier
Bounty.Multiplier.Elite= ; double, default to [TechnoType] -> Bounty.Multiplier
Bounty.Value=0 ; integer
Bounty.Value.Veteran= ; integer, default to [TechnoType] -> Bounty.Value
Bounty.Value.Elite= ; integer, default to [TechnoType] -> Bounty.Value
Bounty.KillerMultiplier= ; double, default to [General] -> Bounty.KillerMultiplier
Bounty.KillerMultiplier.Veteran= ; double, default to [TechnoType] -> Bounty.KillerMultiplier
Bounty.KillerMultiplier.Elite= ; double, default to [TechnoType] -> Bounty.KillerMultiplier
Bounty.Display= ; boolean, default to [AudioVisual] -> Bounty.Display
Bounty.Display.Houses= ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all), default to [AudioVisual] -> Bounty.Display.Houses
Bounty.Display.Offset=0,0 ; X,Y, pixels relative to default
```

```{note}
Do not use this alongside Ares' bounty logic; although it will not cause a crash, the hunter will receive a bounty from each logic.
```

### Weapons fired on warping in / out

- It is now possible to add weapons that are fired on a teleporting TechnoType when it warps in or out. They are at the same time as the appropriate animations (`WarpIn` / `WarpOut`) are displayed.
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ New:
- Allow jumpjet climbing ignore building height (by TaranDahl)
- [Allow draw SuperWeapon timer as percentage](User-Interface.md#allow-draw-superweapon-timer-as-percentage) (by NetsuNegi)
- Customize particle system of parasite logic (by NetsuNegi)
- [New bounty logic](New-or-Enhanced-Logics.md#new-bounty-logic) (by NetsuNegi)

Vanilla fixes:
- Fixed sidebar not updating queued unit numbers when adding or removing units when the production is on hold (by CrimRecya)
Expand Down
3 changes: 3 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/CREDITS.po
Original file line number Diff line number Diff line change
Expand Up @@ -1635,6 +1635,9 @@ msgid ""
"passenger, parasite and hijacker"
msgstr "修复了 `PassengerDeletion` 未考虑乘客的乘客、寄生者和偷车贼的问题"

msgid "New bounty logic"
msgstr "新版赏金逻辑"

msgid "**Apollo** - Translucent SHP drawing patches"
msgstr "**Apollo** - 半透明 SHP 绘制补丁"

Expand Down
80 changes: 80 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,19 @@ msgid ""
" damage (minimum health will be 1)."
msgstr "`Unkillable` 可用于防止科技类型因受到伤害而死亡(最低为 1)。"

msgid ""
"`Bounty` can be used to override the option with the same name in "
"TechnoTypes, enabling it for TechnoTypes that originally did "
"not have the Bounty Hunter ability, or conversely, disabling it."
msgstr ""
"`Bounty` 可用于覆盖科技类型上的同名设置,以使得本没有赏金猎人能力的单位可以启动它,或反过来禁用赏金猎人能力。"

msgid ""
"If multiple AEs with this setting exist simultaneously, the last AE "
"applied and in effect shall prevail."
msgstr ""
"若同时存在多个带有该设置的 AE 则以最后赋予且处于生效状态的 AE 为准。"

msgid ""
"It is possible to set groups for attach effect types by defining strings "
"in `Groups`."
Expand Down Expand Up @@ -4793,6 +4806,73 @@ msgid ""
"the TechnoType."
msgstr "若 `TiberiumEater.AnimMove` 设为 true 则动画会跟随单位移动。"

msgid "New bounty logic"
msgstr "新版赏金逻辑"

msgid ""
"Similar to [Ares' bounty logic](https://ares-developers.github.io/Ares-"
"docs/new/bounty.html), but with more configurable options and easier to "
"use."
msgstr ""
"类似于 [Ares 的赏金逻辑](https://ares-developers.github.io/Ares-"
"docs/new/bounty.html),但允许更多设置项且更加易用。"

msgid ""
"`Bounty.Enable` is the master switch for the new bounty logic; it must be"
" turned on first to utilize the new bounty system."
msgstr ""
"`Bounty.Enable` 是整个新版赏金逻辑的总开关,只有先打开它才能使用新版赏金逻辑。"

msgid ""
"`Bounty.Enablers` specifies the TechnoTypes that grant the bounty "
"capability, not limited to buildings."
msgstr ""
"`Bounty.Enablers` 指定给予所属方赏金能力所需的科技类型,不局限于建筑。"

msgid ""
"If this list is empty, the bounty "
"logic is enabled without requiring any prerequisite TechnoTypes."
msgstr ""
"若该列表为空,则所属方无需任何科技类型作为前提即可启动赏金逻辑。"

msgid ""
"`Bounty.Multiplier` is the multiplier applied to the bounty a hunter "
"receives when a victim is killed. This is defined on the victim."
msgstr ""
"`Bounty.Multiplier` 用于在猎物上设置其被击杀时猎人所得赏金的倍率。"

msgid ""
"`Bounty.Value` is the fixed amount of funds a hunter receives when a "
"victim is killed. This is also defined on the victim."
msgstr ""
"`Bounty.Value` 用于在猎物上设置其被击杀时猎人所得的固定资金额度。"

msgid ""
"If `Bounty.Value` is not 0, the base value is the amount set by "
"`Bounty.Value`; otherwise, the base bounty value is the victim's "
"actual cost multiplied by `Bounty.Multiplier`."
msgstr ""
"若 `Bounty.Value` 非 0 则以 `Bounty.Value` 设定的值作为基准值,否则使用"
"猎物的实际造价乘以 `Bounty.Multiplier` 。"

msgid ""
"`Bounty.KillerMultiplier` is the multiplier applied to the bounty "
"received when killing a target. This is defined on the hunter."
msgstr ""
"`Bounty.KillerMultiplier` 用于在猎人上设置击杀目标是所得赏金的倍率。"

msgid ""
"`Bounty.Display` controls whether the bounty amount is shown, displayed "
"on the hunter."
msgstr ""
"`Bounty.Display` 控制是否在猎人身上显示赏金金额数值。"

msgid ""
"Do not use this alongside Ares' bounty logic; although it will not cause "
"a crash, the hunter will receive a bounty from each logic."
msgstr ""
"不要和 Ares 的赏金逻辑共同使用,虽然这不会导致崩溃,但猎人会从两个逻辑各获得一份赏金。"

msgid "Weapons fired on warping in / out"
msgstr "武器在传送时开火"

Expand Down
5 changes: 5 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/Whats-New.po
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,11 @@ msgstr ""
msgid "Customize particle system of parasite logic (by NetsuNegi)"
msgstr "自定义寄生粒子系统(by NetsuNegi)"

msgid ""
"[New bounty logic](New-or-Enhanced-Logics.md#new-bounty-logic) (by "
"NetsuNegi)"
msgstr "[新版赏金逻辑](New-or-Enhanced-Logics.md#new-bounty-logic)(by NetsuNegi)"

msgid "Vanilla fixes:"
msgstr "原版问题修复:"

Expand Down
15 changes: 15 additions & 0 deletions src/Ext/Rules/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,14 @@ void RulesExt::ExtData::LoadBeforeTypeData(RulesClass* pThis, CCINIClass* pINI)

this->PenetratesTransport_Level.Read(exINI, GameStrings::CombatDamage, "PenetratesTransport.Level");

this->Bounty_Enable.Read(exINI, GameStrings::General, "Bounty.Enable");
this->Bounty_Enablers.Read(exINI, GameStrings::General, "Bounty.Enablers");
this->Bounty_Default.Read(exINI, GameStrings::General, "Bounty.Default");
this->Bounty_Multiplier.Read(exINI, GameStrings::General, "Bounty.Multiplier");
this->Bounty_KillerMultiplier.Read(exINI, GameStrings::General, "Bounty.KillerMultiplier");
this->Bounty_Display.Read(exINI, GameStrings::AudioVisual, "Bounty.Display");
this->Bounty_Display_Houses.Read(exINI, GameStrings::AudioVisual, "Bounty.Display.Houses");

this->UnitsUnsellable.Read(exINI, GameStrings::General, "UnitsUnsellable");

// Section AITargetTypes
Expand Down Expand Up @@ -672,6 +680,13 @@ void RulesExt::ExtData::Serialize(T& Stm)
.Process(this->DefaultToGuardArea)
.Process(this->CylinderRangefinding)
.Process(this->PenetratesTransport_Level)
.Process(this->Bounty_Enable)
.Process(this->Bounty_Enablers)
.Process(this->Bounty_Default)
.Process(this->Bounty_Multiplier)
.Process(this->Bounty_KillerMultiplier)
.Process(this->Bounty_Display)
.Process(this->Bounty_Display_Houses)
.Process(this->UnitsUnsellable)
;
}
Expand Down
16 changes: 16 additions & 0 deletions src/Ext/Rules/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ class RulesExt

Valueable<int> PenetratesTransport_Level;

Valueable<bool> Bounty_Enable;
ValueableVector<TechnoTypeClass*> Bounty_Enablers;
Valueable<bool> Bounty_Default;
Valueable<double> Bounty_Multiplier;
Valueable<double> Bounty_KillerMultiplier;
Valueable<bool> Bounty_Display;
Valueable<AffectedHouse> Bounty_Display_Houses;

Valueable<bool> UnitsUnsellable;

ExtData(RulesClass* OwnerObject) : Extension<RulesClass>(OwnerObject)
Expand Down Expand Up @@ -582,6 +590,14 @@ class RulesExt

, PenetratesTransport_Level { 10 }

, Bounty_Enable { false }
, Bounty_Enablers {}
, Bounty_Default { false }
, Bounty_Multiplier { 1.0 }
, Bounty_KillerMultiplier { 1.0 }
, Bounty_Display { false }
, Bounty_Display_Houses { AffectedHouse::All }

, UnitsUnsellable { false }
{ }

Expand Down
Loading
Loading