Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
edaa346
First commit
FS-21 Sep 5, 2023
21f0bb6
Force AI to stop moving
FS-21 Sep 8, 2023
dc8236a
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Sep 8, 2023
702e5b9
More docs
FS-21 Sep 8, 2023
4848da8
EditorConfig things
FS-21 Sep 8, 2023
9c15f28
Added missing pointer invalidation
FS-21 Sep 8, 2023
5e29154
Applied feedback
FS-21 Sep 13, 2023
a38ef52
Merge branch 'develop' into feature/web-net
FS-21 Sep 13, 2023
06eaaba
EditorConfig fixes
FS-21 Sep 13, 2023
a40849a
Point to latest YRpp
FS-21 Sep 13, 2023
0b69a8f
Merge branch 'develop' into feature/web-net
FS-21 Sep 22, 2023
f90fc07
Merge branch 'develop' into feature/web-net
FS-21 Sep 25, 2023
262d95f
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Mar 10, 2024
c66abda
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Mar 10, 2024
0aad4b9
Merge branch 'develop' into feature/web-net
FS-21 Mar 12, 2024
ef1df3e
Fix bug
FS-21 Mar 16, 2024
5807611
Fix crash
FS-21 Mar 23, 2024
a656099
Merge branch 'develop' into feature/web-net
FS-21 Apr 27, 2024
1dc4b98
Removed 1 obsolete declaration
FS-21 May 14, 2024
4ed51aa
Merge branch 'develop' into feature/web-net
FS-21 Jul 12, 2024
1f53c14
Merge branch 'develop' into feature/web-net
FS-21 Jul 14, 2024
87553f2
Merge branch 'develop' into feature/web-net
FS-21 Aug 28, 2024
97c1fce
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Aug 30, 2024
9e95c2a
Added ForceWeapon support
FS-21 Aug 30, 2024
f924a30
Merge branch 'develop' into feature/web-net
FS-21 Aug 30, 2024
bf2b20c
Merge branch 'develop' into feature/web-net
FS-21 Oct 27, 2024
9c4cc68
Merge branch 'develop' into feature/web-net
FS-21 Oct 28, 2024
ff290bf
Merge branch 'develop' into feature/web-net
FS-21 Feb 18, 2025
56a6148
Merge branch 'develop' into feature/web-net
FS-21 May 20, 2025
38cd421
Compilation fix
FS-21 May 20, 2025
0725cd9
Merge branch 'develop' into feature/web-net
FS-21 May 24, 2025
0b229b7
Applied some feedback
FS-21 May 29, 2025
fe4e0f1
Merge branch 'develop' into feature/web-net
FS-21 May 29, 2025
6a25a3d
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 May 30, 2025
3e5fd04
Added Map Event when a tagget soldier is under Webby logic
FS-21 May 30, 2025
32c9163
Merge branch 'develop' into feature/web-net
FS-21 Jun 7, 2025
dccf7de
Merge branch 'develop' into feature/web-net
FS-21 Jun 7, 2025
c6a9f21
Merge branch 'develop' into feature/web-net
FS-21 Jun 7, 2025
783b4d1
Merge branch 'develop' into feature/web-net
FS-21 Jun 8, 2025
5d71a17
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Jul 6, 2025
a9a7e25
Merge branch 'develop' into feature/web-net
FS-21 Aug 7, 2025
376f56e
YRpp update
FS-21 Aug 7, 2025
cacccde
Merge branch 'develop' into feature/web-net
FS-21 Sep 2, 2025
61e809b
Fixed a crash
FS-21 Dec 9, 2025
0e51bf0
Merge branch 'develop' into feature/web-net
FS-21 Dec 9, 2025
4a84d04
applied feedback
FS-21 Aug 22, 2026
9ff0107
merge from develop
FS-21 Aug 22, 2026
df86a40
applied feedback
FS-21 Aug 22, 2026
bedf107
applied feedback
FS-21 Aug 22, 2026
c7040a2
.
FS-21 Aug 22, 2026
cf046fd
Merge branch 'develop' into feature/web-net
FS-21 Aug 24, 2026
9119187
Merge remote-tracking branch 'origin/develop' into feature/web-net
FS-21 Aug 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ This page lists all the individual contributions to the project by their author.
- Event 606: AttachEffect is attaching to a Techno
- Linked superweapons
- Unit & infantry auto-conversion on ammo change
- Web logic against infantry
- Restore the ScriptType action#24 `Play speech` from Tiberian Sun
- Modify ammo on impact
- **Starkku**:
Expand Down
10 changes: 10 additions & 0 deletions docs/AI-Scripting-and-Mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,16 @@ ID=EventCount,...,606,2,0,[AttachEffectType],...
...
```

### `607` A webby weapon hit the tagged infantry

In `mycampaign.map`:
```ini
[Events]
...
ID=EventCount,...,607,0,0,...
...
```

## Teams

### Adjust recruitable status on team member liberate
Expand Down
37 changes: 37 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,43 @@ UnlimboDetonate.KeepSelected=true ; boolean
`UnlimboDetonate` cannot be used in conjunction with `Parasite`.
```

### Web logic against infantry

- Infantry will be temporally paralyzed by warheads with `Webby=true`.
- `Webby.Duration` specifies the duration, in frames, of the warhead's web effect.
- `Webby.DurationVariation` allows for random variance to the duration of the warhead's web effect.
- When `Webby.Anims` contains more than 1 animation then the new animation will be picked randomly.
- `Webby.Cap` works like in EMP logic developed by Ares.
- `Webby.Cap=-1` case: The target’s web counter is set to this absolute number of frames specified by `Web.Duration`, unless the target’s web counter is already greater than this.
- `Webby.Cap=0` case: Makes this web effect stackable, but uncapped.
- `Webby.Cap >0` case: Makes this web effect stackable, but maximum value capped to `Webby.Cap` value.
- Infantry can define a duration multiplier with `Webby.Modifier` to modify the duration of the web effect applied to them, as well as an optional `Webby.DurationVariation` to override the warhead's variation.
- Infantry with `ImmuneToWeb=true` are not affected by `Webby=true` warheads.
- `ForceWeapon.Webby` specify what weapon should use the attacker against the affected unit.

In `rulesmd.ini`:
```ini
[SOMEWARHEAD] ; Warhead
Webby=false ; boolean
Webby.Anims= ; list of animations
Webby.Duration=0 ; integer, game frames
Webby.DurationVariation=0 ; integer
Webby.Cap=-1 ; integer

[SOMEINFANTRY] ; InfantryType
ImmuneToWeb=false ; boolean
Webby.Anims= ; list of animations
Webby.Modifier=1.0 ; floating point value, duration multiplier
Webby.DurationVariation= ; integer, overrides the warhead variation if set

[SOMETECHNO] ; TechnoType
ForceWeapon.Webby=-1 ; integer
```

```{warning}
`Webby.Anims` animations must be played in infinite loop with `LoopCount=-1` in artmd.ini
```

### Customize whether warhead can prevent crew escape from techno

- Now you can customize on warheads whether to prevent survivors/passengers/occupant infantry from appearing when destroying a target.
Expand Down
3 changes: 3 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,8 @@ HideShakeEffects=false ; boolean
#### New:
- [Customized transport plane for teams](AI-Scripting-and-Mapping.md#customized-transport-plane-for-teams) (by FlyStar)
- [Modify ammo on impact](New-or-Enhanced-Logics.md#modify-ammo-on-impact) (by FS-21)
- [Web logic against infantry](New-or-Enhanced-Logics.md#web-logic-against-infantry) (by FS-21)
- [Event 607: A webby weapon hit the tagged infantry](AI-Scripting-and-Mapping.md#607-a-webby-weapon-hit-the-tagged-infantry) (by FS-21)
- [Customize whether mind-controlled Insignificant technos can be auto-targeted](Fixed-or-Improved-Logics.md#customize-whether-mind-controlled-Insignificant-technos-can-be-auto-targeted) (by Noble_Fish)
- [AutoDeath based on player power status and player credits](New-or-Enhanced-Logics.md#kill-object-automatically) (by Flactine)
- [Roof production anim](New-or-Enhanced-Logics.md#roof-production-anim) (by Noble_Fish)
Expand Down Expand Up @@ -1026,6 +1028,7 @@ HideShakeEffects=false ; boolean
- Allow toggling `Infantry/UnitsGainSelfHeal` for `MultiplayPassive=true` houses (by Starkku)
- Customizable straight trajectory detonation & snap distance and pass-through option (by Starkku)
- Airstrike & spy plane fixed spawn distance & height (by Starkku)
- Web logic against infantry (FS-21)
- Allow enabling application of `Verses` and `PercentAtMax` for negative damage (by Starkku)
- In addition to `PlacementGrid.Translucency`, allow to set the transparency of the grid when `PlacementPreview` is enabled, using the `PlacementGrid.TranslucencyWithPreview` tag (by Belonit)
- Show briefing screen on singleplayer mission start (by Starkku)
Expand Down
16 changes: 16 additions & 0 deletions src/Ext/TEvent/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ std::optional<bool> TEventExt::Execute(TEventClass* pThis, int iEvent, HouseClas
return TEventExt::CellHasAnyTechnoTypeFromListTEvent(pThis, pObject, pHouse);
case PhobosTriggerEvent::AttachedIsUnderAttachedEffect:
return TEventExt::AttachedIsUnderAttachedEffectTEvent(pThis, pObject);
case PhobosTriggerEvent::AttachedIsUnderWebby:
return TEventExt::AttachedIsUnderWebbyTEvent(pObject);


// If it requires an additional object as like mapping events 7 or 48, please fill it in here.
Expand Down Expand Up @@ -339,6 +341,20 @@ bool TEventExt::AttachedIsUnderAttachedEffectTEvent(TEventClass* pThis, ObjectCl
return false;
}

bool TEventExt::AttachedIsUnderWebbyTEvent(ObjectClass* pObject)
{
if (!pObject)
return false;

if (const auto pTechno = abstract_cast<TechnoClass*, true>(pObject))
{
const auto pExt = TechnoExt::Fetch(pTechno);
return pExt->IsWebbed();
}

return false;
}

// =============================
// container

Expand Down
2 changes: 2 additions & 0 deletions src/Ext/TEvent/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ enum PhobosTriggerEvent
CellHasTechnoType = 604,
CellHasAnyTechnoTypeFromList = 605,
AttachedIsUnderAttachedEffect = 606,
AttachedIsUnderWebby = 607,

_DummyMaximum,
};
Expand Down Expand Up @@ -102,6 +103,7 @@ class TEventExt final : public AbstractExt

static bool CellHasAnyTechnoTypeFromListTEvent(TEventClass* pThis, ObjectClass* pObject, HouseClass* pHouse);
static bool CellHasTechnoTypeTEvent(TEventClass* pThis, ObjectClass* pObject, HouseClass* pHouse);
static bool AttachedIsUnderWebbyTEvent(ObjectClass* pObject);

static bool AttachedIsUnderAttachedEffectTEvent(TEventClass* pThis, ObjectClass* pObject);

Expand Down
40 changes: 40 additions & 0 deletions src/Ext/Techno/Body.Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ void TechnoExt::OnEarlyUpdate()
if (this->CheckDeathConditions())
return;

if (this->WebbyDurationTimer.IsTicking())
this->WebbyUpdate();

this->ApplyInterceptor();
}

Expand Down Expand Up @@ -134,6 +137,43 @@ void TechnoExt::ApplyInterceptor()
}
}

void TechnoExt::WebbyUpdate()
{
auto const pThis = this->OwnerObject();

if (!TechnoExt::IsActive(pThis) || pThis->WhatAmI() != AbstractType::Infantry)
return;

if (this->WebbyDurationTimer.Completed())
{
this->WebbyDurationTimer.Stop();

if (this->WebbyAnim && this->WebbyAnim->Type) // If this anim doesn't have a type pointer, just detach it
{
this->WebbyAnim->TimeToDie = true;
this->WebbyAnim->UnInit();
}

this->WebbyAnim = nullptr;
pThis->Target = nullptr;
auto const pLastTarget = static_cast<TechnoClass*>(this->WebbyLastTarget);

// Restore previous action
if (pLastTarget && pLastTarget->Health > 0 && pLastTarget->IsAlive && pLastTarget->IsOnMap)
{
pThis->SetDestination(this->WebbyLastTarget, false);
pThis->SetTarget(this->WebbyLastTarget);
pThis->QueueMission(this->WebbyLastMission, true);
this->WebbyLastTarget = nullptr;
this->WebbyLastMission = Mission::Sleep;
}
else
{
pThis->QueueMission(Mission::Guard, true);
}
}
}

// TODO : Merge into new AttachEffects
bool TechnoExt::CheckDeathConditions(bool isInLimbo)
{
Expand Down
9 changes: 9 additions & 0 deletions src/Ext/Techno/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,6 +1104,11 @@ int TechnoExt::GetSight()
return static_cast<int>(sight);
}

bool TechnoExt::IsWebbed() const
{
return this->WebbyDurationTimer.HasTimeLeft();
}

bool TechnoExt::CanReceiveEvent(TechnoClass* pThis, HouseClass* pHouse)
{
if (pThis->Berzerk)
Expand Down Expand Up @@ -1218,6 +1223,10 @@ void TechnoExt::Serialize(T& Stm)
.Process(this->LastTargetCrdClearTimer)
.Process(this->ShouldBeDead)
.Process(this->PreventCrewEscape)
.Process(this->WebbyDurationTimer)
.Process(this->WebbyAnim)
.Process(this->WebbyLastTarget)
.Process(this->WebbyLastMission)
;
}

Expand Down
11 changes: 11 additions & 0 deletions src/Ext/Techno/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ class TechnoExt : public RadioExt, public Detach::Listener<AirstrikeClass>

bool ShouldBeDead;

CDTimerClass WebbyDurationTimer;
AnimClass* WebbyAnim;
AbstractClass* WebbyLastTarget;
Mission WebbyLastMission;

int DropCrate; // Drop crate on death, modified by map action
Powerup DropCrateType;

Expand Down Expand Up @@ -134,6 +139,10 @@ class TechnoExt : public RadioExt, public Detach::Listener<AirstrikeClass>
, LastTargetCrd { CoordStruct::Empty }
, LastTargetCrdClearTimer {}
, ShouldBeDead { false }
, WebbyDurationTimer {}
, WebbyAnim { nullptr }
, WebbyLastTarget { nullptr }
, WebbyLastMission { Mission::Sleep }
, DropCrate { -1 }
, DropCrateType { Powerup::Money }
, PreventCrewEscape { false }
Expand Down Expand Up @@ -182,7 +191,9 @@ class TechnoExt : public RadioExt, public Detach::Listener<AirstrikeClass>
void ResetDelayedFireTimer();
void UpdateTintValues();
void UpdateLastTargetCrd();
void WebbyUpdate();
int GetSight();
bool IsWebbed() const;

static bool CanReceiveEvent(TechnoClass* pThis, HouseClass* pHouse);

Expand Down
18 changes: 18 additions & 0 deletions src/Ext/Techno/Hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <Utilities/Helpers.Alex.h>
#include <Utilities/AresHelper.h>
#include <Utilities/AresFunctions.h>
#include <Ext/TEvent/Body.h>
#include <Misc/FlyingStrings.h>

#pragma region GetTechnoType
Expand Down Expand Up @@ -1101,6 +1102,23 @@ DEFINE_HOOK(0x5F4021, ObjectClass_Update_FallingDown_ToDead, 0x6)

#pragma endregion

DEFINE_HOOK(0x518FBC, InfantryClass_DrawIt_DontRenderSHP, 0x6)
{
enum { SkipDrawCode = 0x5192B5 };

GET(InfantryClass*, pThis, EBP);

if (!pThis)
return 0;

auto pExt = TechnoExt::Fetch(pThis);

if (pExt->IsWebbed())
return SkipDrawCode;

return 0;
}

#pragma region SetTarget

DEFINE_HOOK_AGAIN(0x4DF3D3, FootClass_UpdateAttackMove_SetTarget, 0xA)
Expand Down
19 changes: 19 additions & 0 deletions src/Ext/TechnoType/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ int TechnoTypeExt::SelectForceWeapon(TechnoClass* pThis, AbstractClass* pTarget)
{
forceWeaponIndex = this->ForceWeapon_UnderEMP;
}
else if (this->ForceWeapon_Webby >= 0)
{
const auto pTargetExt = TechnoExt::Fetch(pTargetTechno);

if (pTargetExt->IsWebbed())
forceWeaponIndex = this->ForceWeapon_Webby;
}
}

if (forceWeaponIndex == -1
Expand Down Expand Up @@ -921,6 +928,7 @@ void TechnoTypeExt::LoadFromINIFile(CCINIClass* const pINI)
this->ForceAAWeapon_InRange.Read(exINI, pSection, "ForceAAWeapon.InRange");
this->ForceAAWeapon_InRange_Overrides.Read(exINI, pSection, "ForceAAWeapon.InRange.Overrides");
this->ForceAAWeapon_InRange_ApplyRangeModifiers.Read(exINI, pSection, "ForceAAWeapon.InRange.ApplyRangeModifiers");
this->ForceWeapon_Webby.Read(exINI, pSection, "ForceWeapon.Webby");
this->ForceWeapon_Buildings.Read(exINI, pSection, "ForceWeapon.Buildings");
this->ForceWeapon_Defenses.Read(exINI, pSection, "ForceWeapon.Defenses");
this->ForceWeapon_Infantry.Read(exINI, pSection, "ForceWeapon.Infantry");
Expand All @@ -936,6 +944,7 @@ void TechnoTypeExt::LoadFromINIFile(CCINIClass* const pINI)
|| this->ForceWeapon_Cloaked >= 0
|| this->ForceWeapon_Disguised >= 0
|| this->ForceWeapon_UnderEMP >= 0
|| this->ForceWeapon_Webby >= 0
|| !this->ForceWeapon_InRange.empty()
|| !this->ForceAAWeapon_InRange.empty()
|| this->ForceWeapon_Buildings >= 0
Expand Down Expand Up @@ -1008,6 +1017,11 @@ void TechnoTypeExt::LoadFromINIFile(CCINIClass* const pINI)
this->SpawnsPipSize.Read(exINI, pSection, "SpawnsPipSize");
this->SpawnsPipOffset.Read(exINI, pSection, "SpawnsPipOffset");

this->Webby_Anims.Read(exINI, pSection, "Webby.Anims");
this->ImmuneToWeb.Read(exINI, pSection, "ImmuneToWeb");
this->Webby_Modifier.Read(exINI, pSection, "Webby.Modifier");
this->Webby_DurationVariation.Read(exINI, pSection, "Webby.DurationVariation");

this->Convert_Undeploy.Read(exINI, pSection, "Convert.Undeploy");
this->Convert_HumanToComputer.Read(exINI, pSection, "Convert.HumanToComputer");
this->Convert_ComputerToHuman.Read(exINI, pSection, "Convert.ComputerToHuman");
Expand Down Expand Up @@ -1586,6 +1600,7 @@ void TechnoTypeExt::Serialize(T& Stm)
.Process(this->ForceAAWeapon_InRange)
.Process(this->ForceAAWeapon_InRange_Overrides)
.Process(this->ForceAAWeapon_InRange_ApplyRangeModifiers)
.Process(this->ForceWeapon_Webby)
.Process(this->ForceWeapon_Buildings)
.Process(this->ForceWeapon_Defenses)
.Process(this->ForceWeapon_Infantry)
Expand Down Expand Up @@ -1647,6 +1662,10 @@ void TechnoTypeExt::Serialize(T& Stm)
.Process(this->SpawnsPipSize)
.Process(this->SpawnsPipOffset)

.Process(this->Webby_Anims)
.Process(this->ImmuneToWeb)
.Process(this->Webby_Modifier)
.Process(this->Webby_DurationVariation)
.Process(this->DroppodType)

.Process(this->TiberiumEaterType)
Expand Down
12 changes: 12 additions & 0 deletions src/Ext/TechnoType/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class TechnoTypeExt : public ObjectTypeExt
Valueable<int> ForceAAWeapon_Infantry;
Valueable<int> ForceAAWeapon_Units;
Valueable<int> ForceAAWeapon_Aircraft;
Valueable<int> ForceWeapon_Webby;

Valueable<bool> Ammo_Shared;
Valueable<int> Ammo_Shared_Group;
Expand Down Expand Up @@ -246,6 +247,11 @@ class TechnoTypeExt : public ObjectTypeExt
Nullable<Point2D> SpawnsPipSize;
Valueable<Point2D> SpawnsPipOffset;

ValueableVector<AnimTypeClass*> Webby_Anims;
Valueable<bool> ImmuneToWeb;
Valueable<double> Webby_Modifier;
Nullable<int> Webby_DurationVariation;

Valueable<TechnoTypeClass*> Convert_Undeploy;
Valueable<TechnoTypeClass*> Convert_HumanToComputer;
Valueable<TechnoTypeClass*> Convert_ComputerToHuman;
Expand Down Expand Up @@ -613,6 +619,7 @@ class TechnoTypeExt : public ObjectTypeExt
, ForceAAWeapon_Infantry { -1 }
, ForceAAWeapon_Units { -1 }
, ForceAAWeapon_Aircraft { -1 }
, ForceWeapon_Webby { -1 }

, Ammo_Shared { false }
, Ammo_Shared_Group { -1 }
Expand Down Expand Up @@ -666,6 +673,11 @@ class TechnoTypeExt : public ObjectTypeExt
, SpawnsPipSize {}
, SpawnsPipOffset { { 0,0 } }

, Webby_Anims {}
, ImmuneToWeb { false }
, Webby_Modifier { 1.0 }
, Webby_DurationVariation {}

, DroppodType {}
, TiberiumEaterType {}

Expand Down
Loading
Loading