ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Upgrades: Difference between revisions

From ModEnc
Jump to navigation Jump to search
m Took out the "flag" header
Updating evillinks
Line 1: Line 1:
{{flag|name=Upgrades|files=rules(md).ini|values=Integer|special=None|default=0|types=BuildingTypes|games=TS, FS, RA2, YR}}
{{Flag
|name={{PAGENAME}}
|files={{Categ|Rules(md).ini}}
|values=unsigned integers
|special=None
|default=0
|types={{Categ|BuildingTypes}}
|games=[[TS]], [[RA2]], [[YR]]
}}


This flag specifies the max amount of upgrades this [[BuildingType]] can accept. See the tutorial section for more upgrade coding.
This flag specifies the max amount of upgrades this [[BuildingTypes|BuildingType]] can accept. See the tutorial section for more upgrade coding.


== Tutorial ==
== Tutorial ==
Line 9: Line 17:
  ; Rules(md).ini
  ; Rules(md).ini
  [PARENT_BUILDING]
  [PARENT_BUILDING]
  Upgrades=3  ;how many upgrade slots does this building have?
  Upgrades=3  '';how many upgrade slots does this building have?''
   
   
  [UPGRADE_BUILDING]
  [UPGRADE_BUILDING]
  [[PowersUpBuilding]]=parent_building  ;which building can be upgraded by this upgrade? Takes one building and one building only.
  [[PowersUpBuilding]]=parent_building  '';which building can be upgraded by this upgrade? Takes one building and one building only.''
  [[PowersUpToLevel]]=-1  ;-1 means "take first available slot", whereas positive values specify the exact slot# to use.
  [[PowersUpToLevel]]=-1  '';-1 means "take first available slot", whereas positive values specify the exact slot# to use.''
   
   
  ; Art(md).ini
  ; Art(md).ini
  [PARENT_BUILDING]
  [PARENT_BUILDING]
  [[PowerUp#Anim]]=  ;The animation to add to this building when powered up by one level
  [[PowerUp1Anim|PowerUp#Anim]]=  '';The animation to add to this building when powered up by one level''
  [[PowerUp#AnimDamaged]]=  ;Damaged version of the animation to add to this building when powered up by one level
  [[PowerUp1AnimDamaged|PowerUp#AnimDamaged]]=  '';Damaged version of the animation to add to this building when powered up by one level''
  [[PowerUp#LocX]]=  ;The x offset from the buildings draw position for this powerup animation
  [[PowerUp1LocX|PowerUp#LocX]]=  '';The x offset from the buildings draw position for this powerup animation''
  [[PowerUp#LocY]]=  ;The x offset from the buildings draw position for this powerup animation
  [[PowerUp1LocY|PowerUp#LocY]]=  '';The x offset from the buildings draw position for this powerup animation''
  [[PowerUp#LocZ]]=  ;Adjustment to normal Z when rendering this animation. This could be used to make the animation appear behind the building.
  [[PowerUp1LocZ|PowerUp#LocZ]]=  '';Adjustment to normal Z when rendering this animation. This could be used to make the animation appear behind the building.''
  [[PowerUp#YSort]]=  ;Amount to add to anims sorting position so that it renders in the correct order relative to other objects
  [[PowerUp1YSort|PowerUp#YSort]]=  '';Amount to add to anims sorting position so that it renders in the correct order relative to other objects''


Where # references a specific upgrade slot (numbered from 1 to rules(md).ini -> [PARENT] -> Upgrades= ).
Where # references a specific upgrade slot (numbered from 1 to rules(md).ini -> [PARENT] -> Upgrades= ).
If the PowerUp#Anim(Damaged) is not specified, it will simply use [UPGRADE]Image= animation. The PowerUp#Anim(Damaged) should be omitted, because specifying the Image= on the upgrade itself is the correct way to do this.
 
If the Location is unspecified (can be done on all 1x1 structures), (0,0,0) will be used.
If the <tt>PowerUp#Anim(Damaged)</tt> is not specified, it will simply use [UPGRADE]Image= animation. The <tt>PowerUp#Anim(Damaged)</tt> should be omitted, because specifying the Image= on the upgrade itself is the correct way to do this.
 
If the Location is unspecified, (0,0,0) will be used.


Known upgrade problems:
Known upgrade problems:


* Upgrades can not act as Radars or Spy Satellites.
* Upgrades can not act as Radars or Spy Satellites.
* Upgrades can not add/override the ([[UndeploysInto|Un]])[[DeploysInto]]= on their parent building.
* Upgrades can not add/override the {{TTL|DeploysInto}}/{{TTL|UndeploysInto}}= on their parent building.
* Upgrades can not have two different weapons (both [[Primary]]= and [[Secondary]]= must point to the same weapon, if your upgrade is to provide it). If you set them to be two different weapons, they will fire only if both weapons can hit the target.
* Upgrades can not have two different weapons (both {{TTL|Primary}} and {{TTL|Secondary}} must point to the same weapon, if your upgrade is to provide it). If you set them to be two different weapons, they will fire only if both weapons can hit the target.
 
In short, the upgrades only implement functions that were possible in Tiberian Sun.


[[Category:Tutorials]]
[[Category:Tutorials]]
[[Category:INI_Flags]]
[[Category:rules(md).ini Flags]]
[[Category:BuildingTypes Flags]]

Revision as of 09:45, 12 June 2006

Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: Upgrades
File(s): Rules(md).ini
Values: unsigned integers
Special Values: None
Default: 0
Applicable to: BuildingTypes


This flag specifies the max amount of upgrades this BuildingType can accept. See the tutorial section for more upgrade coding.

Tutorial

If you have ever played Tiberian Sun, you surely remember the upgrade system that GDI had. If you haven't, well, upgrades are buildings placed on top of other buildings that provide things like extra power or different weapons. This effect is fully recreateable in RA2/YR.

; Rules(md).ini
[PARENT_BUILDING]
Upgrades=3  ;how many upgrade slots does this building have?

[UPGRADE_BUILDING]
PowersUpBuilding=parent_building  ;which building can be upgraded by this upgrade? Takes one building and one building only.
PowersUpToLevel=-1  ;-1 means "take first available slot", whereas positive values specify the exact slot# to use.

; Art(md).ini
[PARENT_BUILDING]
PowerUp#Anim=  ;The animation to add to this building when powered up by one level
PowerUp#AnimDamaged=  ;Damaged version of the animation to add to this building when powered up by one level
PowerUp#LocX=  ;The x offset from the buildings draw position for this powerup animation
PowerUp#LocY=  ;The x offset from the buildings draw position for this powerup animation
PowerUp#LocZ=  ;Adjustment to normal Z when rendering this animation. This could be used to make the animation appear behind the building.
PowerUp#YSort=  ;Amount to add to anims sorting position so that it renders in the correct order relative to other objects

Where # references a specific upgrade slot (numbered from 1 to rules(md).ini -> [PARENT] -> Upgrades= ).

If the PowerUp#Anim(Damaged) is not specified, it will simply use [UPGRADE]Image= animation. The PowerUp#Anim(Damaged) should be omitted, because specifying the Image= on the upgrade itself is the correct way to do this.

If the Location is unspecified, (0,0,0) will be used.

Known upgrade problems:

  • Upgrades can not act as Radars or Spy Satellites.
  • Upgrades can not add/override the Template:TTL/Template:TTL= on their parent building.
  • Upgrades can not have two different weapons (both Template:TTL and Template:TTL must point to the same weapon, if your upgrade is to provide it). If you set them to be two different weapons, they will fire only if both weapons can hit the target.

In short, the upgrades only implement functions that were possible in Tiberian Sun.