FreeCraft Configuration Language Description: Research
___________ _________ _____ __
\_ _____/______ ____ ____ \_ ___ \____________ _/ ____\/ |_
| __) \_ __ \_/ __ \_/ __ \/ \ \/\_ __ \__ \\ __\\ __|
| \ | | \/\ ___/\ ___/\ \____| | \// __ \| | | |
\___ / |__| \___ >\___ >\______ /|__| (____ /__| |__|
\/ \/ \/ \/ \/
______________________ ______________________
T H E W A R B E G I N S
FreeCraft - A free fantasy real time strategy game engine
(C) Copyright 2002-2003 by The FreeCraft Project. Distributed under the
"GNU General Public License"
FreeCraft
Readme
FAQ
CCL
PREV
NEXT
Index
check-dependency
define-allow
define-dependency
define-modifier
define-upgrade
define-upgrade-wc-names
get-dependency
Intro - Introduction to research functions and variables
Everything around researching and upgrades.
Functions
check-dependency
Description
NOT WRITTEN YET.
Syntax
(check-dependency)
- .
- .
Example
(check-dependency)
.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
define-allow
Description
Define what unit-types and upgrades are enabled for each player during
a level.
Syntax
(define-allow name str16)
- name
- Name of an unit-type or an upgrade to be defined.
- str16
-
The initial allow state for the unit-type or upgrade at level start:
- A - Allowed
- E - Enabled, allowed by level but currently forbidden
- F - Forbidden
- R - Researched or acquired
- Q - Acquired but currently forbidden (does it make sense?:)
Each player has his own character, the first is for player 0 and the last
is for player 15.
Example
(define-allow 'unit-catapult "AAAAAAAAAAAAAAAA")
Allow the catapult for all 16 players.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
define-dependency
Description
Define the dependencies for an unit-type or an upgrade. The dependency
must be full filled before an unit or research can be used.
Syntax
(define-dependency unit-type/upgrade '( unit-type/upgrade count ... )
['or '( unit-type/upgrade count ... ) ...] )
(define-dependency unit-type/upgrade '( required-part )
['or '( optional-or-part ) ...] )
- required-part
unit/upgrade [count]
A list of unit-types or upgrades required.
- unit/upgrade
- Unit-type name or upgrade name required.
- count
- Optional count, how many units of the unit-type are required.
- 'or optional-or-part
unit/upgrade [count]
Optional list of or parts. One or list must be complete full filled.
- unit/upgrade
- Unit-type name or upgrade name required.
- count
- Optional count, how many units of the unit-type are required.
Example
(define-dependency 'upgrade-sword2 '(upgrade-sword1))
The second sword upgrade is only possible, if the first sword upgrade is
researched.
(define-dependency 'upgrade-ranger '(unit-keep) 'or '(unit-castle))
The ranger upgrade is only available if a keep or castle is available.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
define-modifier
Description
Define the effects (modifier) of an upgrade. An upgrade can have multiple
modifiers. It can activate, enable or disable other upgrades and allows
complex reactions.
Syntax
(define-modifier name '(effect1 effect1-arg) ...)
- name
- Name of the upgrade, which has this effects. See
(define-modifier). All effects change all old
units and any new unit of a player.
- '(effectN effectN-arg)
- A list of effects of the upgrade. Here are all possible effects:
- '(attack-range N)
- Change the attack range of all units of the unit-types given with
'(apply-to ...). Note it can be increased with positive numbers and decreased
with negative numbers.
- '(sight-range N)
- Change the sight range of all units of the unit-types given with
'(apply-to ...).
- '(basic-damage N)
- Change the basic damage of all units of the unit-types given with
'(apply-to ...).
- '(piercing-damage N)
- Change the piercing damage of all units of the unit-types given with
'(apply-to ...).
- '(armor N)
- Change the armor of all units of the unit-types given with
'(apply-to ...).
- '(speed N)
- Change the speed of all units of the unit-types given with
'(apply-to ...). Attention: This changes only the displayed value
and not the real unit-speed!
- '(hit-points N)
- Change the hit points of all units of the unit-types given with
'(apply-to ...).
- '(time-cost N)
- Change the time costs (research time or build time) of all unit-types
or upgrade-ids given with '(apply-to ...).
-
- '(gold-cost N)
- Change the gold costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(wood-cost N)
- Change the wood costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(oil-cost N)
- Change the oil costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(ore-cost N)
- Change the ore costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(stone-cost N)
- Change the stone costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(coal-cost N)
- Change the coal costs of all unit-types or upgrade-ids given with
'(apply-to ...).
- '(allow unit-type-id N) or '(allow upgrade-id N)
- Change the state of an unit-type or upgrade. N can be
- A - Allowed
- E - Enabled, allowed by level but currently forbidden
- F - Forbidden
- R - Researched or acquired
- Q - Acquired but currently forbidden (does it make sense?:)
FIXME: The correct possible changed must be described.
- '(apply-to unit-type-id) or '(apply-to upgrade-id)
- The modifiers are applied to this unit-type or upgrade.
- '(convert-to unit-type-id)
- All units of the unit-types given with '(apply-to ...) are converted
into this unit-type.
Example
(define-modifier 'upgrade-sword1
'(piercing-damage 2)
'(apply-to unit-footman) '(apply-to unit-knight) '(apply-to unit-paladin)
'(apply-to unit-dwarves) '(apply-to unit-d_____) '(apply-to unit-l_____)
'(apply-to unit-u____-l___________) '(apply-to unit-t_______))
This is the default effect of the first sword upgrade. The piercing damage
of the listed units is increased.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
define-upgrade
Description
Define an upgrade, how it is shown and how much it costs.
Syntax
(define-upgrade name 'icon icon-id 'costs #( costs ... ))
- name
- Name of the upgrade, used in buttons (define-button) and
(define-modifier).
- 'icon icon-id
- Name of the upgrade icon, shown in buttons or during the research of the
upgrade. The icon is defined with
(define-icon) or
(define-icon-alias)
- 'costs #( time resource1 resource2 resource3 resource4 resource5 resource6)
- This are the costs for the upgrade. The costs (resource1-resource6) could
be redefined, the default is: 'costs #( time gold wood oil ore stone coal).
Example
(define-upgrade 'upgrade-sword1 'icon 'icon-sword2
'costs #( 200 800 0 0 0 0 0))
This is the default definition of the first sword upgrade. The icon
"icon-sword2" is shown in buttons and during the upgrade. The upgrade costs
200 frame cycles to research and 800 gold from the store.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
define-upgrade-wc-names
Description
.
Syntax
(define-upgrade-wc-names sword1 sword2 ...)
- .
- .
Example
(define-upgrade-wc-names 'upgrade-sword1 'upgrade-sword2 ...)
.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
get-dependency
Description
NOT WRITTEN YET.
Syntax
(get-dependency)
- .
- .
Example
(get-dependency)
.
Used
$LIBARYPATH/ccl/upgrade.ccl ,
$LIBARYPATH/ccl/human/upgrade.ccl ,
$LIBARYPATH/ccl/orc/upgrade.ccl
Last changed: $Id: research.html,v 1.7 2003/02/05 00:35:02 jsalmon3 Exp $
All trademarks and copyrights on this page are owned by their respective owners.
(c) 2002-2003 by
The FreeCraft Project