The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 871 - File: showthread.php PHP 7.4.33 (Linux)
File Line Function
/showthread.php 871 errorHandler->error




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Patch for powered units (issue 617)
#1
This patch implements issue #617. It adds the tag PoweredBy=<BuildingType> to all TechnoTypes, so one building can power multiple unit types, and a player can have more than one of those buildings. Powered units are only deactivated when all <BuildingType>s of the same owner are offline or destroyed. I took care that deactivated units are only reactivated when they are both powered and not affected by EMP. The logic is completely separate from the Robot Control Center's, but they are compatible (not on the same unit). It would be better to just replace the RCC logic, but I don't know how to hook that up.

If you also set EMP.Threshold=inair and the unit is in the air, it will crash when it goes offline. Meant for helicopters like the BlackHawk.

I tested it on vehicles, aircraft and balloonhover vehicles (the BlackHawk).

Minor issue: EVA doesn't play robot tanks online/offline messages.

I know this feature isn't targetted for 0.2 or 0.3, but it's something I and other people would like to have, so here it is.

Example:
Code:
[MGTK]
PoweredBy=GATECH ; mirage tank needs battle lab online to function
; these are optional:
VoiceSelectDeactivated=RobotTankSelectDeactivated
ActivateSound= RobotTankOnline
DeactivateSound= RobotTankOffline

[GATECH]
Powered=yes ;already there but you need this if you want powered units to deactivate when low power.

If you want to disable Westwood's powered unit control (so you can build multiple RCCs):
Code:
[ROBO]
PoweredBy=GAROBO

[GAROBO]
;PowersUnit=ROBO ; remove this tag.

Download the patch file here and save it as poweredunits.patch. Then apply the patch to ares/trunk/src with SVN. Then rebuild Ares.
Reply


Messages In This Thread
Patch for powered units (issue 617) - by A Mystery Guest - 20.02.2011, 21:49:56
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 21.02.2011, 02:40:43
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 22.02.2011, 02:11:47
RE: Patch for powered units (issue 617) - by A Mysterious Guest - 22.02.2011, 18:02:57
RE: Patch for powered units (issue 617) - by Mysterious Guest - 04.06.2011, 11:37:51
RE: Patch for powered units (issue 617) - by Mysterious Guest - 06.06.2011, 17:00:26
RE: Patch for powered units (issue 617) - by hogo - 07.06.2011, 14:44:46



Users browsing this thread: 1 Guest(s)