Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 @@ -575,6 +575,7 @@ This page lists all the individual contributions to the project by their author.
- Randomized anims for several behaviors
- Fix customized `WarpAway` anim's wrong definition
- Shield respawn animation and weapon
- Toggle off laser trail and shake effects
- **NaotoYuuki** - Vertical & meteor trajectory projectile prototypes
- **handama** - AI script action to `16005 Jump Back To Previous Script`
- **TaranDahl (航味麻酱)**:
Expand Down
13 changes: 12 additions & 1 deletion docs/User-Interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,15 @@ HealthBar.Permanent=false ; boolean
HealthBar.Permanent.PipScale=false ; boolean
```

### Light flash effect toggling
### Visual effects toggling

- It is possible to toggle certain light flash effects off. These light flash effects include:
- Combat light effects (`Bright=true`) and everything that uses same functionality e.g Iron Curtain / Force Field impact flashes.
- Alpha images attached to ParticleSystems or Particles that are generated through a Warhead's `Particle` if `[AudioVisual] -> WarheadParticleAlphaImageIsLightFlash` or on Warhead `Particle.AlphaImageIsLightFlash` is set to true, latter defaults to former.
- Additionally these alpha images are not created if `[AudioVisual] -> LightFlashAlphaImageDetailLevel` is higher than current detail level, regardless of the `HideLightFlashEffects` setting.
- It is possible to toggle shake screen effects (`ShakeX/Ylo/hi`) off by setting `HideShakeEffects=true`.
- Phobos's [Laser Trail effects](New-or-Enhanced-Logics.md#laser-trails) can also be toggled off.
- If a LaserTrailType has `CanBeHidden=false`, it can't be toggled off by setting `HideLaserTrailEffects=true`.

In `rulesmd.ini`:
```ini
Expand All @@ -205,10 +208,18 @@ LightFlashAlphaImageDetailLevel=0 ; integer
Particle.AlphaImageIsLightFlash= ; boolean
```

In `artmd.ini`:
```ini
[SOMETRAIL] ; LaserTrailType name
CanBeHidden=true ; boolean
```

In `RA2MD.INI`:
```ini
[Phobos]
HideLightFlashEffects=false ; boolean
HideLaserTrailEffects=false ; boolean
HideShakeEffects=false ; boolean
```

### Low priority for box selection
Expand Down
3 changes: 3 additions & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ ToolTipDescriptions=true ; boolean
ToolTipBlur=false ; boolean
SaveGameOnScenarioStart=true ; boolean
HideLightFlashEffects=false ; boolean
HideLaserTrailEffects=false ; boolean
HideShakeEffects=false ; boolean
```

### For Map Editor (Final Alert 2)
Expand Down Expand Up @@ -452,6 +454,7 @@ New:
- [Unlimbo Detonate warhead](New-or-Enhanced-Logics.md#unlimbo-detonate-warhead) (by FlyStar)
- [Attack](New-or-Enhanced-Logics.md#attack-technos-underground) and [damage](New-or-Enhanced-Logics.md#damage-technos-underground) technos underground (by TaranDahl)
- Fast access structure (by FlyStar)
- Toggle off laser trail and shake effects (by Ollerus)

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 src/Ext/Bullet/Hooks.DetonateLogics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ DEFINE_HOOK(0x4690D4, BulletClass_Logics_NewChecks, 0x6)
}

// Check for ScreenShake
if (Phobos::Config::HideShakeEffects)
return SkipShaking;

auto&& [_, visible] = TacticalClass::Instance->CoordsToClient(*pCoords);

if (pExt->ShakeIsLocal && !visible)
Expand Down
3 changes: 3 additions & 0 deletions src/New/Entity/LaserTrailClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
// Returns true if drawn, false otherwise.
bool LaserTrailClass::Update(CoordStruct location)
{
if (Phobos::Config::HideLaserTrailEffects && this->Type->CanBeHidden)
return false;

bool result = false;

if (!this->LastLocation.isset())
Expand Down
2 changes: 2 additions & 0 deletions src/New/Type/LaserTrailTypeClass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void LaserTrailTypeClass::LoadFromINI(CCINIClass* pINI)
this->CloakVisible.Read(exINI, section, "CloakVisible");
this->CloakVisible_DetectedOnly.Read(exINI, section, "CloakVisible.DetectedOnly");
this->DroppodOnly.Read(exINI, section, "DropPodOnly");
this->CanBeHidden.Read(exINI, section, "CanBeHidden");
}

template <typename T>
Expand All @@ -71,6 +72,7 @@ void LaserTrailTypeClass::Serialize(T& Stm)
.Process(this->CloakVisible)
.Process(this->CloakVisible_DetectedOnly)
.Process(this->DroppodOnly)
.Process(this->CanBeHidden)
;
}

Expand Down
2 changes: 2 additions & 0 deletions src/New/Type/LaserTrailTypeClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class LaserTrailTypeClass final : public Enumerable<LaserTrailTypeClass>
Valueable<bool> CloakVisible;
Valueable<bool> CloakVisible_DetectedOnly;
Valueable<bool> DroppodOnly;
Valueable<bool> CanBeHidden;

LaserTrailTypeClass(const char* pTitle = NONE_STR) : Enumerable<LaserTrailTypeClass>(pTitle)
, DrawType { LaserTrailDrawType::Laser }
Expand All @@ -42,6 +43,7 @@ class LaserTrailTypeClass final : public Enumerable<LaserTrailTypeClass>
, CloakVisible { false }
, CloakVisible_DetectedOnly { false }
, DroppodOnly { false }
, CanBeHidden { true }
{ }

void LoadFromINI(CCINIClass* pINI);
Expand Down
4 changes: 4 additions & 0 deletions src/Phobos.INI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ bool Phobos::Config::ShowHarvesterCounter = false;
bool Phobos::Config::ShowPowerDelta = true;
bool Phobos::Config::ShowWeedsCounter = false;
bool Phobos::Config::HideLightFlashEffects = true;
bool Phobos::Config::HideLaserTrailEffects = true;
bool Phobos::Config::HideShakeEffects = true;
bool Phobos::Config::ShowFlashOnSelecting = false;
bool Phobos::Config::UnitPowerDrain = false;
int Phobos::Config::SuperWeaponSidebar_RequiredSignificance = 0;
Expand Down Expand Up @@ -102,6 +104,8 @@ DEFINE_HOOK(0x5FACDF, OptionsClass_LoadSettings_LoadPhobosSettings, 0x5)
Phobos::Config::ShowHarvesterCounter = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "ShowHarvesterCounter", true);
Phobos::Config::ShowWeedsCounter = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "ShowWeedsCounter", true);
Phobos::Config::HideLightFlashEffects = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "HideLightFlashEffects", false);
Phobos::Config::HideLaserTrailEffects = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "HideLaserTrailEffects", false);
Phobos::Config::HideShakeEffects = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "HideShakeEffects", false);
Phobos::Config::ShowFlashOnSelecting = CCINIClass::INI_RA2MD.ReadBool(phobosSection, "ShowFlashOnSelecting", false);
Phobos::Config::SuperWeaponSidebar_RequiredSignificance = CCINIClass::INI_RA2MD.ReadInteger(phobosSection, "SuperWeaponSidebar.RequiredSignificance", 0);

Expand Down
2 changes: 2 additions & 0 deletions src/Phobos.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class Phobos
static bool ShowWeedsCounter;
static bool ShowPlanningPath;
static bool HideLightFlashEffects;
static bool HideLaserTrailEffects;
static bool HideShakeEffects;
static bool ShowFlashOnSelecting;
static bool UnitPowerDrain;
static int SuperWeaponSidebar_RequiredSignificance;
Expand Down