Jump to content


Photo

Branch/Research/Perk Tutorial


  • Please log in to reply
1 reply to this topic

#1 Allied General

Allied General

    C&C Guild

  • Hosted
  • 6,922 posts
  • Location:United Kingdom
  • Projects:AGSA
  •  Modder

Posted 24 August 2010 - 07:13 PM

As implemented in AGSA - http://forums.revora...showtopic=59794 and other modifications

Effect: A 0x0 structure which provides a permanent benefit for a player. The effect is similiar to performing "research" in other games. The
catch is that you must "place" the branch/research/perk whatever on the map but since its a 0x0 structure it technically does not "exist" and thus is not subject
to targeting and pathfinding by the player (AI is slightly different in regards to targeting)

Usage: Access to new build options (permanently) or a structure effect for example - ore purifier bonus, auto healing, oil derrick logic

Coding:

RULES/MD.ini

This is basically a placeholder building. The 0x0 may perform any function of a structure but do not add weapons or things like refinery logic obviously.
I would advise using this as sample code and adjusting things like cost and effects.

[EXAMPLE]
UIName=Name:EXAMPLE
Name=Example
BuildCat=Combat
TechLevel=9
Insignificant=yes important for short game purposes
Strength=1
Powered=false
Adjacent=255
Armor=wood
Unsellable=yes
LegalTarget=no
Sight=0
Nominal=yes
Immune=yes important so structure cannot be destroyed by splash damage
Selectable=no
Owner=British,French,Germans,Americans,Alliance,Russians,Confederation,Africans,
Arabs,YuriCountry
Cost=100
Points=1
Power=0
Capturable=false
ThreatPosed=0
AIBuildThis=no
BuildLimit=-1 important so build option will disappear i.e. once you have "research" you shouldn't build again
Prerequisite=NATECH,NACNST

ART/MD.ini

[EXAMPLE]
Cameo=exampleicon
Foundation=0x0 important this works
CanBeHidden=yes
CanHideThings=no


In regards to the art, you may consider adding a invisible active anim which plays a report sound when the "structure" is first built.

Notes:

Do not let AI build 0x0, it cannot handle them and will forever be stuck trying to build

Do not add Primary/Secondary to a 0x0, the AI will attempt to attack and destroy a object which does not exist

Use additional code such Negative Prerequisite present in Ares/NPatch to restrict build options, etc.

Upgrade system from ts system is limited. Ares solves the prerequisite issue but not the functionality or "permanent" effect of a 0x0 structure - more information on upgrade logic here - http://modenc.renega...ts.com/Upgrades
Posted Image

#2 Caspa

Caspa

    title available

  • Members
  • 938 posts
  • Location:Sunderland
  •  Shine On, Lurk Moar

Posted 24 August 2010 - 07:20 PM

A nice little addition which I'm sure most of us hadn't given too much though to. Thanks AG
Hostile is a cunt.

Thought I'd have that here to save time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users