Giter Site home page Giter Site logo

vinifera-developers / vinifera Goto Github PK

View Code? Open in Web Editor NEW
39.0 4.0 10.0 1.62 MB

Vinifera is a C&C: Tiberian Sun engine extension implementing new logics and fixing bugs.

License: GNU General Public License v3.0

CMake 1.52% C++ 88.77% C 9.71%
open-source command-and-conquer westwood-studios tiberian-sun

vinifera's People

Contributors

cchyper avatar mailaender avatar rampastring avatar tomsons26 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vinifera's Issues

[Vanilla Bug] Objects with Sensors=yes cause nearby cloaked allied objects to uncloak

Description:

An object with Sensors=yes causes cloaked objects to uncloak. This is good and works otherwise, but it also causes objects of your allies to uncloak. When checking if an object should be uncloaked due to a nearby unit with sensors, the game checks whether the object with sensors and the cloaked object share the same owner; it does not check if the owners of the objects are allies.

Steps To Reproduce:

  1. Give Sensors=yes to an infantry or a unit type
  2. Have an ally with a densely built cloaked base
  3. Move through the base with your unit and you'll notice your unit uncloaking everything as it moves

Additional Files:

Bugfix code in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/fix_allied_decloaking.asm

[Vanilla Bug] Neutral units with weapons are not attacked automatically

Description:

Your units and defensive buildings do not automatically fire at armed, hostile objects of the Neutral house (like Visceroids). This, for example, allows Visceroids to cause major damage to your base while your defenses are just ignoring them, which is annoying for the majority of players.

Implementation Concers:

Some high-level players on CnCNet might dislike auto-fire, but it's generally considered a major QoL improvement among modders. It might be necessary to make this a toggleable option (like it already is on ts-patches).

Only neutral units with weapons should be targeted automatically; your units should still not automatically open fire at civilians and other unarmed objects of the Neutral house.

Additional Files:

This is implemented in ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/attack_neutral_units.asm

[New Feature] Make it possible to refer to multiplayer houses in trigger actions

Description:

Vanilla TS offers no way to utilize multiplayer houses in triggers. This severely limits multiplayer mapping capabilities, and practically makes building singleplayer mission style co-op missions impossible.

Possible Implementation:

CnCNet hacks the House_From_HouseType function to return multiplayer houses if the requested house index is 50 or greater. This then allows building maps that use multiplayer houses if one adds 50 fake house entries (plus 1 for each player house) to the map in FinalSun. Hacking this function allows the multiplayer houses to be referred to in various trigger events and actions, as the related function is used in many of them. https://github.com/CnCNet/ts-patches/blob/master/src/hack_house_from_house_type.asm

This is probably not the cleanest solution to this problem however, as having to add 50 fake houses to a map is not very great. It is better than nothing though.

[New Feature] Define what weapon projectiles do if their target becomes unavailable

Description:

As raised in issue #19 , homing projectiles will simply disappear if their target object becomes unavailable while the projectiles are mid-flight. This happens in two main cases:

  • a target object that is destroyed while homing projectiles are inbound
  • a target object that cloaks while homing projectiles are inbound

Possible Implementation:

New tag added to weapon projectile code: "TargetLoss=N" (N is integer from 0 to 2)
This tag tells the projectile what to do once its target becomes unavailable (is destroyed, or cloaks)

  • TargetLoss=0 -> projectile simply disappears from game (as per vanilla settings)
  • TargetLoss=1 -> projectile self-destructs right where it is, dealing full weapon damage at that point using the weapon warhead
  • TargetLoss=2 -> projectile re-targets to the cell that was last occupied by the target object before it became unavailable, and keeps flying until it hits said cell

[New Feature] Seeing all queued action lines

Description:

Tiberian Sun allows you to queue many move orders for a unit with the Q key. However, the game only draws the action line for the current move order and there is no visual indication that you have more moves queued. It would make the Q feature clearer if all the action lines were drawn. CnCNet TS has this implemented in a way that by default the game only displays the current move order, but you can see all the action lines by holding Q (which also means that you see the action lines for all queued orders as you assign them). CnCNet TS can also display the TarCom line and movement order lines separately, which is nice for turreted vehicles that can move and shoot at the same time.

Possible Implementation:

CnCNet ts-patches implementation: https://github.com/CnCNet/ts-patches/blob/master/src/draw_all_action_lines.asm

Screenshot of this in action in DTA. The MCV was given multiple queued move orders.
Action lines

[New Feature] Produce Cash/Oil Derricks Logic

Description:

The produce cash logic drives the Oil Derricks in Red Alert 2. Port this system over to Tiberian Sun with some additional options described below.

Possible Implementation:

ProduceCashStartup=<integer> Amount of credits given to the capturing house when this building is captured.
ProduceCashAmount=<integer> The number of credits to grant every delay cycle.
ProduceCashDelay=<integer> The frame delay between each credits bonus.
ProduceCashBudget=<integer> The total available budget for this building.
ProduceCashRequiresPower=<boolean> Does this building require power to produce credits?
ProduceCashIsNegative=<boolean> Does it drain credits from the house instead of giving granting them?

Open to discussion.

[Vanilla Bug] Particle weapons missing their targets on elevation.

Description:

Particle weapons such as Devil Tongue miss their targets if the unit itself is standing on a slope or of the target is standing on one.

Expected Behaviour:

The weapon should damage the target.

Actual Behaviour:

The weapon misses the target.

Additional Files:

ParticleBugDemo

ParticleBugDemo2

[Vanilla Bug] Only a single repair facility can repair aircraft

Description:

The game otherwise supports multiple repair facilities without any issues, but for repairing aircraft there's an extra check that the repair facility matches the structure defined in [General] RepairBay= in Rules.ini. This check is for most purposes entirely pointless and can be removed without negative effects on the rest of the game.

Steps To Reproduce:

  1. Have two different repair bay type buildings in the game
  2. Have an aircraft
  3. Point the aircraft at both of the repair bays

Expected Behaviour:

The Enter cursor should be displayed for both of the repair bays.

Actual Behaviour:

The Enter cursor is only displayed for the repair bay pointed to by [General] RepairBay=.

Alternative Implementation:

Theoretically there could be a case where a modder wants one type of a repair facility to be able to repair aircraft, while they don't want other repair facilities to be able to do this. If this kind of customization is desired, a new boolean-type BuildingTypeClass key like AircraftRepair= could be added to make this customizable per-building.

Additional Files:

Fixed in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/aircraft_repair.asm

[Vanilla Bug] Fix bug that allows a player to prevent enemy carryalls from landing

Description:

A player can prevent an enemy carryall from landing by constantly clicking its landing cell with another aircraft selected. This is considered an annoying exploit.

Implementation

According to dkeeton:

;;; The fix is to skip over the section of code that makes sure no other
;;; Aircraft has selected the same landing zone. -dkeeton

Additional Files:

https://github.com/CnCNet/ts-patches/blob/master/src/carryall_click_under_glitch.asm

[Vanilla Bug] Using [Basic] Theme= stops the game from playing music after the specific track has been played

Description:

If a scenario has a music track specified in [Basic] Theme=, the music player stops playing music after playing the specified track once.

Expected Behaviour:

The music player should continue playing tracks, moving either to the next track or a random one depending on the player's IsScoreShuffle preference.

Actual Behaviour:

No music is played at all after the track has been played once.

Additional Files:

Fixed in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/basic_theme_fix.asm

[New Feature] Define a weapon to fire at death

Description:

Allows for a weapon type to be defined, to be fired at the time of object death, targeting the cell occupied by the object at time of death.

Possible Implementation:

Create new tag: "DeathWeapon=N" (N must be a defined weapon type)
When the unit (vehicle, inf, building, aircraft) dies, weapon N fires at the occupied cell

This should allow for proper suicide-bomber units that explode regardless of whether they fire their primary or not; also allows for structures to fire a death-weapon (e.g. nuke plants)

[New Feature] Change SelfHeal from a global to a unit setting

Description:

Instead of having the SelfHeal logic defined on a global level (to determine the number of HP healed per game time increment), move this down to a unit level and keep the global setting only as a default.

Possible Implementation:

Create new tag: "SelfHealPoints=N" (N is an integer >0)
Unit with this tag will heal N hit points per global game time increment.

Optionally:
Create secondary tag: "SelfHealROF=M (M is an integer >0)
If present on the unit, the SelfHealPoints=N amount will be applied every M time increments; if not present, default to the global time increment setting.

[Vanilla Bug] Pathfinding bug near cliffs with Tiberium

Description

If Tiberium spawns on cells adjacent to certain cliff tiles, pathfinding near those cells will break for all ground units.

Detailed Description

This bug has a rather convoluted explanation behind it.

The CliffBackImpassability key in rules.ini, as its name suggests, toggles the passability of cells hidden behind cliff tiles. CliffBackImpassability=0 enables movement to any cell behind cliffs while CliffBackImpassability=2, the default value in the vanilla game, disables it. However, the effect "bleeds" into visible, empty cells adjacent to certain cliff tiles (Image 2).

In addition, the effect only works if these cells have the default clear tile (ClearTile). Any other tile set overrides the passability setting and other cell properties with its own.

The pathfinding bug occurs if these four requirements are met:

  1. CliffBackImpassability is set to 2.
  2. Tiles from a non-ClearTile tile set are placed onto cells behind/adjacent to cliffs that would otherwise be impassable.
  3. That tile set allows Tiberium to spawn on it (has AllowTiberium=true).
  4. Tiberium spawns on the aforementioned cells.

For example, placing grass on these cells will manifest the bug, while pavement will not. Grass allows Tiberium to grow on it while pavement does not.

Although it may sound complicated, this is actually a very common scenario, especially in fanmade maps.

Expected Behaviour

Obviously, no tile should cause pathfinding issues when placed behind or next to cliffs, whether it allows Tiberium growth or not. While cliff backs are almost always left clear and thus impassable in vanilla maps, there are a few examples where Westwood deliberately placed dirt roads etc. behind cliffs, allowing units to move to places they normally wouldn't be able to.

In addition, my recommendation is to stop the effect from "bleeding" into visually empty cells next to cliffs, although this may or may not cause problems with existing maps designed with the impassable cells in mind.

Steps To Reproduce

  1. Place any tile that is both passable and has AllowTiberium=true to cells behind or next to cliffs. For example grass or sand.
  2. Place or let Tiberium spread onto the cells.
  3. Order units to move around the cliff.

See the images below for demonstration.

Screenshots

cw38FaU
Image 1: Visually clear yet impassable cells.

0efR1wn
Image 2: No Tiberium on aforementioned cells. Pathfinding OK.

QrAxYoe
Image 3: Tiberium on aforementioned cells. Pathfinding broken.

[New Feature] Auto-save in multiplayer

Description:

You can never predict when a sync error or a crash happens, so to counter them, it's handy for the game to automatically save the game in multiplayer every so often.

Possible Implementation:

Current CnCNet ts-patches has a frame-based timer for auto-saves in multiplayer, which has worked well. Each time the timer goes down to zero, the game host initiates a SAVEGAME event which causes all players in the match to save the game. The amount of frames between each auto-save is configurable with the int-type spawn.ini key AutoSaveGame. If > 0, auto-saves are enabled, otherwise the auto-save logic is disabled.

If a human player disconnects from the game, auto-saves should be disabled for the rest of the session to avoid confusing users (and the CnCNet client) with saved games where not all players who started the match are actually present.

Additional Files:

CnCNet code:
https://github.com/CnCNet/ts-patches/blob/master/src/Hook_Main_Loop.c
https://github.com/CnCNet/ts-patches/blob/master/src/mods/dont_save_without_all_players.asm

[Vanilla Bug] Veins keep attacking a cell regardless if there's a target.

Description:

As veins spread they attack everything that's a obstacle, they will attack buildings.
If the building is say a Firestorm wall segment and is occupied by infantry the veins will keep attacking the cell after the segment is destroyed as long as the infantry stand on it.

Expected Behaviour:

Veins stop attacking when the building is destroyed.

Additional Files:

TmA1Fg1h0H.mp4
DI0i6ZccLa.mp4

[New Feature] Ability to rebind Q-move hotkey.

Description:

Q-move is currently the only hotkey in TS (as far as I can see anyway) that you can't re-bind to another hotkey, would be great if one was able to set it to whatever they want.

[Vanilla Bug] Vehicles do not track moving targets with their hull (between shots)

Description:

If a vehicle has Turret=No, it will not constantly track the location of a moving target that is within range. This creates an issue when turretless vehicles fire beam weapons at fast-moving targets.

Steps To Reproduce:

  1. On the Disruptor code entry, set Turret=no
  2. In-game, tell the now-turretless Disruptor to fire at a unit moving perpendicular to its hull facing

Expected Behaviour:

If the Disruptor still had a turret, the turret would track and follow the moving target in real time. Without a turret, we would expect the hull to now also turn and track the target.

Actual Behaviour:

The hull remains facing the cell where the target unit initially was upon firing the beam, while the beam continues to be drawn between the Disruptor hull and the moving target; if the target moves fast and far enough, you have a beam coming out of the side of the Disruptor.

Only when the Disruptor stops firing, and reacquires the target for the second shot, will it realign its hull again.

Finally: this issue is technically also present on other turretless vehicles - e.g. Tick Tank - but considerably less noticeable due to them not using beam weapons.

Suspected hiccups:

The vehicle hull facing is probably governed by the movement locomotors more so than by the weapon's targeting logic. Not sure if it can actually be fixed.

[Vanilla Bug] IonBlastClass crash

Description:

As with many other transparent effects (WaveClass and lasers), IonBlastClass causes crashes with DetailLevel=2.

Conditions:

If the user has DetailLevel=2 in SUN.ini, the Ion Cannon shock-wave effect causes the game to crash when fired at the bottom of the screen.

Additional Files:

Fixed in CnCNet ts-patches by forcing the effect to be drawn as if the user had DetailLevel=1 in game settings.
https://github.com/CnCNet/ts-patches/blob/master/src/IonBlastClass_crash.asm

[Vanilla Bug] Fix Fog of War related crashes

Description:

Fog of War has some blitter crashes that overflow a buffer and cause the game to crash. It seems to be related to drawing buildings that are covered under fog. IIRC this is partially fixed in the modern CnCNet renderers (ts-ddraw and cnc-ddraw) by allocating larger buffers and it is also partially fixed in CnCNet-supported distributions by skipping exceptions, and combined these techniques seem to solve the Fog of War crashes completely on some systems. But to be safe it'd be better to still have a proper fix for the crashes in the blitters themselves.

Additional Files:

CnCNet exception skipping code: https://github.com/CnCNet/ts-patches/blob/master/src/exception_catch.c

Bittah Commander once created a good testmap for this.

[Vanilla Bug] Aircraft on pads stop reloading if told to attack and they have no ammo left

Description:

When an aircraft with 0 ammo is reloading on a helipad and is told to attack, it will not lift off of the pad, but it will still stop loading.

Steps To Reproduce:

  1. Get a Helipad and some aicraft (for example an Orca)
  2. Deplete the Orca's ammunition
  3. Land the Orca on a helipad for reloading
  4. Before it has reloaded any ammo point, tell the Orca to attack something

Expected Behaviour:

The aircraft should ignore the attack order (as it has no ammo) and continue reloading.

Actual Behaviour:

The aircraft partially ignores the attack order (it doesn't lift off), but it stops reloading. To fix this, the user has to lift it up and tell it to land again.

Additional Files:

Partially fixed in ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/aircraft_not_reloading_fix.c

[New Feature] Type select all across the map

Description:

TS doesn't let you select a type of unit across an entire map unlike in RA2. How I expect it to do is when select a unit and I press T (Type select key) twice, it should select that type of unit across an entire map.

[New Feature] Proper Attack-Move

Description:

I did some testing on attack move from YR and guard move from TS and these are the results I got:
In YR, it's 2 flak tracks VS a Grizzly Tank (the tank is modified to have a longer range. The map is shrouded btw) When using attack move way past the flak tracks, the tank stops to attack the flak track. When the tank is done with the first flak track, the tank moves a bit before engaging the second flak track.
In TS, the map is the same except it's 2 Buggies VS a Titan (no mods this time and the map is shrouded). When doing the guard move way past the buggies, it will issue a move command instead and therefore the titan will ignore the buggies. (It'll probably attack the buggies on the move if it can do that.) Remove the shroud and the guard move works. When doing a guard move past the buggies, the Titan will stop and engage a buggy when it's under attack and then move a bit until the second buggy attacks. What if we issue a guard move on the buggies? The Titan uses its range to attack first.
What do we learn from this? Attack move from YR is better because it engages when it finds an enemy and you can do it on shroud.

Possible Implementation:

add EnableAttackMove in the [General] section from rules.ini and make it default to yes. Also, add PreventAttackMove in conjunction with this feature.

[New Feature] Displaying briefing screen on mission start

Description:

Red Alert displays the briefing screen on mission start after the FMVs, which is handy. Tiberian Sun does not do this, which means that the player has to manually press Options -> Restate Briefing at the start of each mission, unless they realized the objectives from potential FMVs (which no mod has to a significant degree).

Tiberian Sun should also display the briefing screen on mission start.

Optional User/Mission Configuration:

This could potentially be made configurable through SUN.INI or even with a mission-based key ([Basic] ShowBriefingOnMissionStart= for example), although I personally would just leave it always enabled.

Additional Files:

Implemented in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/briefing_screen_mission_start.asm

Issue Template

This issue is a example template, please use one or more of the following and use style for all issues.

Description:

Detailed Description:

Possible Implementation:

Related Issue:

Expected Behaviour:

Steps To Reproduce:

Screenshots (if appropriate):

[New Feature] Placing factory rally points without holding Alt

Description:

Tiberian Sun allows you to place rally points for factories. However, the vanilla game requires you to hold Alt while placing rally points, because of which most players were never aware of this functionality until CnCNet TS came along and changed the game to allow setting rally points like RA2, without needing you to hold any special keys.

What makes this a bit trickier for TS is Mobile War Factories: being able to place rally points without holding Alt prevents the player from undeploying deployed Mobile War Factories. Unless a patch is made to allow undeploying them by holding Alt instead.

Possible Implementation:

CnCNet TS-patches implementation: https://github.com/CnCNet/ts-patches/blob/master/src/factory_rallypoints.asm

[Vanilla Bug] Flying JumpJet VehicleTypes being invincible to all types of damage except railguns.

Description:

This bug/limitation happens when a JumpJet VehicleType flies and therefore can only be damaged by AA railguns.

Conditions:

I've added the code below to CAR (it can be any VehicleType but the FlightLevel should be low enough for the railgun to reach the VehicleType) and changed LtRail's (Ghost Stalker's weapon) projectile to Invisible3 (this projectile has AA capabilities).

Locomotor={92612C46-F71F-11d1-AC9F-006008055BB5}
MovementZone=Fly
FlightLevel=1200
Landable=yes

Expected Behaviour:

The JumpJet Vehicle should still be vulnerable to all AA weapons when flying.

Actual Behaviour:

The JumpJet Vehicle becomes invincible to all AA weapons except railguns when flying.

[New Feature] Center Camera on Team when quickly tapping the team's number twice

Description:

A familiar QoL improvement from Red Alert 2 and more modern C&C games as well as the Remasters. If you for example have a group of units in team 1, you can press the "select team 1" button (by default, the '1' key) twice to center the camera on that group.

Possible Implementation:

dkeeton implemented this for CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/center_team.asm
The CnCNet implementation has the downside that it works with a frame-based timer rather than a system time based timer, so how fast you need to press the "select team" hotkey twice for the camera to get centered depends on game speed.

[Vanilla Bug] AI is limited to choosing between only GDI and NOD.

Description:

When creating a Skirmish or Network game, the allocated AI slots can only choose between GDI and NOD (or entries 0 and 1 from the HouseTypes in RULES.INI).

Conditions:

This bug/limitation does not require any specific conditions.

Ideal Behaviour:

Allow the game to choose between all defined HouseTypes from RULES.INI.

[Enhancement] Improve performance on modern systems by not allocating surfaces to VRAM

Description:

AlexB has a very detailed write-up of this on his site: http://www.stuffhost.de/files/cnc/
CnCNet ts-patches has this included as well: https://github.com/CnCNet/ts-patches/blob/master/src/graphics_patch.asm

The dimetric Command & Conquer games use several temporary graphics to draw to. Some of them are allocated in Video RAM, some of them are allocated in system RAM. When the game wants to draw something, the data has to be copied from VRAM to system RAM, which is an expensive operation and it gets more obvious the more objects (units, debris, ...) are on the map. The patch changes the game to not allocate surfaces in VRAM in the first place, so this cannot become an issue.

The following bytes need to be changed. This is not optimized. If you understand the raw assembler instructions, you can optimize it by putting a jmp there.

Game Offset Original Patched
Tiberian Sun 0008AC2F 3C 01 75 0C 90 90 90 90

[New Feature] Newly built start Harvesters should start harvesting automatically.

Description:

Harvesters built from a war factory should start harvesting automatically. This was a QOL change in Red Alert 2.

Possible Implementation:

This can be implemented in one of two ways;

  • Changing the default behaviour of all Harvesters to act this way.
  • Add a new INI key for the UnitTypes, for example; AutoHarvest=<boolean>

Open to discussion.

[New Feature] Skipping briefing animations with user input

Description:

Briefing lines in the Tiberian Sun "Restate Briefing" screen appear painfully slow at times, especially when you're testing a mission and you've already seen the briefing a dozen times. It would be nice if you, as the player, would be able to entirely skip the animation and make all of the lines appear instantly with user input (like with a mouse click).

[Vanilla Bug] Homing projectiles disappear once their target object is unavailable

Description:

Homing projectiles (weapon projectile ROT>0) - noticeably missiles, and the CyCommando plasma cannon - will disappear mid-flight if their target becomes unavailable (is destroyed, or cloaks).

Conditions:

Weapon projectile must have ROT>0

Steps To Reproduce:

  1. Use a unit with homing projectiles (e.g. Hover MLRS) to fire at a target unit (e.g. Titan)
  2. Use a second unit to deal massive damage to the Titan while the HMLRS rockets are in mid-flight (enough to destroy the Titan)

Expected Behaviour:

The homing projectiles should keep flying towards the last known position of the now-destroyed (or now-cloaked) unit.

Actual Behaviour:

Homing projectiles just disappear mid-air.

[New Feature] Move visceroid merger logic to unit level

Description:

Instead of having a global setting to determine which UnitType is the small visceroid and which is the large visceroid that forms when 2x small visceroids get close enough, move this to a unit level. This should allow different small-to-large merger options, and different combinations.

Possible Implementation:

New tag on unit level: "MergesInto=N" (takes single UnitType of InfantryType input)

  • if a unittype M has this tag, it uses visceroid logic to scan for another unit of type M in vicinity
  • if close enough to trigger visceroid logic, the two instances of M combine and give 1x N belonging to the same owner that owned M

Additionally:

  • could add a second tag "MergesWith=K"
  • this means that unittype M with this tag, will not look for another M to merge with, but will look for a K
  • "MergesInto=N" must then be present to define which new unit is created after the merger; if not defined, default to a global

Additional Files:

[Vanilla Bug] Fix mission restart difficulty reset bug

Description:

When the user restarts the first mission of a campaign (or a single non-campaign mission) through Options -> Abort Mission -> Restart, the player house's difficulty level gets reseted to Normal from whatever they had selected in the mission selector (or, nowadays, in the client).

Steps To Reproduce:

  1. Edit Rules.ini [Difficult], set the cost multiplier to be something higher than 1.0.
  2. Start a campaign mission on Hard, notice objects costing more than usual for you.
  3. Go to Options -> Abort Mission -> Restart (or lose the mission and restart it through the "Would you like to replay the mission" dialog)
  4. Suddenly things cost normal for you again, like you had selected Normal as your difficulty level instead of Hard.

Additional Files:

Fix in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/fix_mission_restart_difficulty_bug.asm

[Vanilla Bug] Fix refinery blocking exploit

Description:

Description taken from comment in bugfix code in CnCNet ts-patches: https://github.com/CnCNet/ts-patches/blob/master/src/harvester_block_ref_exploit.asm

;;; This fixes a trick where one playerA can block another playerB's refinery
;;; by unilaterally allying playerB and using Alt to force a playerA harvester
;;; into the playerB's refinery bay. Additionally if playerA continually allies
;;; multiple times the harvester could explode and destroy the refinery
;;; In the function Can_Enter_Cell, Is_Ally is only checked in one direction. 

[Vanilla Bug] "MaxPlayers" is not loaded for MultiMissions

Description:

The INI key MaxPlayers= is not loaded from .PKT entries and MinPlayers is loaded again by mistake and the result stored in the MaxPlayers entry value.

Conditions:

This bug/limitation does not require any specific conditions.

[New Feature] Replace the games audio engine to support HQ formats.

Description:

Replace the games audio engine with an alternative (such as OpenAL) to allow higher quality AUD files, or other formats, to be used.

Possible Implementation:

Implemented as an optional alternative to the existing audio engine. The new interface would only be enabled if an external DLL is found in the same directory as the games executable.

[New Feature] Helicopter rotor blades animation

Description:

Unlike in Red Alert 2 [and Yuri's Revenge of course], currently the Tiberian Sun engine doesn't allow you to introduce animations for voxels or SHPs using the usual HVA files. This results in weird rotor-less helicopters and VTOLs, and it forces modelers in the best case to either make static rotor blades which look very odd, or in the worse case, to ditch them out entirely.

While it was experimented on before, using both the TurretSpin method or the HVA one, the results were as expected. They don't really work.

Screenshots (if appropriate):
Here you can see as an example, the Harpy [NOD], on a clear green background, missing the rotor blades.
image

An animated example worth looking at is the OpenRA iteration, one version with short rotor blades, and one with longer rotor blades, though as you can clearly see, the shadow for the rotor blades is missing.
image

[New Feature] Replacing Shroud with Fog of War

Description:

It would be a nice game option if the map was unshrouded at the beginning of the game, but instead the map was covered in fog of war. Like how modern RTS games have it. Effectively, the shroud would be replaced by fog.

Possible Implementation:

This could technically be a game session option. Maybe a new function could be added that reveals the shroud of the map, but leaves the fog un-revealed?

Additional Files:

dkeeton attempted to implement this in CnCNet ts-patches, effectively replacing shroud with fog, but IIRC the implementation is broken in some way and was never finished.
https://github.com/CnCNet/ts-patches/blob/master/src/easy_shroud.c

[Vanilla Bug] Build-anywhere bug

Description:

When an AI-controlled armed transport engages enemies while moving on a high bridge, the game starts to glitch severely. The most noticable glitch is that players are suddenly able to build any building anywhere, on any terrain or obstacle (although still bound by build radius).

Symptoms of this bug include, but are not limited to:

  • Buildings can be placed anywhere within the build radius, on any terrain, even on top of other TechnoTypes
  • Buildup animations stop working
  • Buildings are erected instantly (although if sold, the reverse buildup anim still plays)
  • Units still move normally, although at least AI vehicles will exit the Weapons Factory through any direction (not just through the door).
  • On some buildings when built, the animations are layered incorrectly.
  • The AI becomes unable to build any new buildings, only rebuild lost ones
  • The AI may deploy units directly on the factory bib, causing production to get stuck
  • FreeUnit stops working
  • Units can cross the visible edge of the map, but they get deleted when doing so.

If manifested on a mission scenario, this issue persists even if you restart the mission.

Conditions:

The vanilla game has no transports with weapons, so this bug goes unnoticed unless you play with modified rules or a customized mission. I have attached a test mission map below where this bug can be reproduced.

Unzip the map file to your game folder and start the Nod campaign (not Firestorm). After some time, the GDI AI will send an APC team to the Nod base. The bug will manifest when the APC attacks the lasers while traveling on the bridge (the APC has been modified with a missile launcher).

Steps To Reproduce:

Aside from playing the aforementioned test mission, here are the steps you can follow to reproduce the issue:

  1. Give any ground or air transport unit a weapon.
  2. Make the AI build transport teams with the modified transport.
  3. Play on a map with high bridges.
  4. Make the AI transport teams engage any enemy object while moving on or near the bridge.

Additional Files:

Preview of the test scenario, and the bug

Download the Test Scenario

[New Feature] Chat to Allies function

Description:

In vanilla Tiberian Sun, you can only send chat messages to everyone or individual players. In larger team games (3v3, 4v4 etc.) a key that allows you to send a chat message to all of your allies at once comes in handy.

Possible Implementation:

This would function like the global chat (using F8), but would have another key assigned to it. The message should only be delivered to players whose controlled house the local player's house is allied with.

Additional Files:

CnCNet implementation: https://github.com/CnCNet/ts-patches/blob/master/src/chatallies.asm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.