Make your own free website on Tripod.com
RTSA Scripting Package
By
Deva Bryson Winblood and Jeremy Greene

Click here is you want to return to the projects home page for Deva & Jeremy

INTRODUCTION:

      The  RTSA Scripting Package is short for (Real Time Strategy Adventure) which is the term Deva coined for RTS - Harvest of Souls which was a prototype project to see how one of these games would play.   It was so successful that a sequel was a must.   Actually, people were clamoring for more maps, more teams, etc.   To do this would mean more modules.   Adding more teams to HoS was not feasible.   Thus, the most ambitious scripting project that either of us have heard of was born.

      The RTSA Scripting Package will provide you with a complete set of scripts that can be used as a foundation for a module.   This module then could have from 1 to 12 unique teams with up to 50 unit types per team.   It also supports freelance players who are unaffiliated with any team and simply wander around the game.   Support for 0 to 9 resource types is provided.    It CAN be setup with no scripting needed.   However, it is a VERY extensive package and thus, will take some time to balance your units and setup all the waypoints.   LOTS AND LOTS of waypoints are required to set this up.   This may seem to be a pain at first but, when you get around to having to change things you will be happy that it is setup this way as you can instantly make some pretty major changes without editing any scripts.   It also supports a lot of custom scripting hooks to extend it.    The documentation will be as thorough as that found in Deva's NPC ACTIVITIES script.  It will probably be as lengthy as well.

     This script is designed for the module maker who wants to incorporate intricate team play that vastly changes the way Neverwinter Nights plays (it is a lot more fun).   It is a COMPLETE package and could be used to make a war like module fairly quickly.

FEATURES:

  • Support for up to 12 teams
  • 50 unit types per team supported
  • Unit creation/upgrade supported
  • Over 40 commands available to units
  • Trading
  • Messengers
  • Random Placeable control
  • Up to 9 resource types and gold supported
  • Special commands to describe creature behaviour available for units
  • Garrisons supported
  • Custom scripting supported
  • Up to 64 players supported (32 only so far) with 12 allowed to be team leaders and the rest can only be freelance agents who do not start out the game affiliated with any team.
  • Control of respawn and death on a team basis, and on an alignment basis for freelance agents
  • Custom placeable weapons such as ballistae, catapults, and canons supported through a customizable script that can be used to define an infinite variety of such weapons with no scripting required.
  • Functions provided for scripters to script AI controlled teams
  • resources harvestable as one time use (like mana pools in HoS), harvest multiple times, harvest by damage (chop down tree, or mine a boulder), and by domination points.
  • Victory conditions supported are PLOT VICTORY, ELIMINATION, FIRST TO HARVEST X AMOUNT OF RESOURCE, AND DOMINATION.
  • LOCKING AND UNLOCKING GAME to prevent joining is possible during play
  • Leaving and rejoining a game is permissible provided it is set to UNLOCKED.
  • Multiple types of resource storage methods supported
  • Long distance pathing across multiple areas supported in the script with anti-stuck code
  • All commands are enabled/disabled on a per unit basis

This is all in one scripting package for the module maker to use.   When you install the script and follow the instructions in the documentation you have almost 100% control over all the above features within your module.  The majority of the features can be accessed and handled without requiring any scripting.

UNIT COMMANDS AND THEIR STATUS

*=Implemented +=Tested and Fully Functional

# & Status COMMAND DESCRIPTION
1*+ FOLLOW Follow its leader around at either 3 meter or 7 meter distance (like henchmen do)
2*+ PROTECT Follow the last unit you spoke to (like follow but, NPC follows another NPC)
3* GUARD LOCATION Have the NPC guard a specific location from several choices available
4* ATTACK LOCATION Have the NPC move to and attack at a specific location from several choices
5*+ ROAM Wander about and only leave the area about 12% of the time
6*+ SEEK AND DESTROY Look for enemy units and attack them
7*+ SCOUT Scout out resources, interesting NPCs, other team leaders, and artifacts and send messenger birds, and bats back to the base with the information.
8* HEAL Return to the heal location in the lair and rest until healed
9* HIDE Use HIDE and MOVE SILENTLY to try and sneak attack enemies that come near your location.
10* SEARCH Search for traps and attempt to disarm them
11*+ RECON Walk ahead of the leader 3,7,10,15,20, or 30 meters in the direction they are facing.  (Kind of like the opposite behavior of follow)
12*+ BURROW Dig a hole in the ground and spring forth from it if an enemy passes nearby
13* DESTROY OBJECT Destroy an object I specify
14* TRADE Trade resources with other teams
15 MESSENGER Deliver a message to another teams starting location
16* BUILD Build a placeable
17* CRAFT Craft an item
18*+ UPGRADE Upgrade to a different type of unit
19* BREED Breed a specific type of unit over time
20* OPEN OBJECT Attempt to unlock and open the object specified
21*+ GUARD LAIR Wander around within the lair but, do not leave it
22*+ STAND Stand at the location specified
23* SLEEP Activate the rest routine to recover spells, etc.
24*+ PATROL Patrol between 1 to 4 points
25* DIE Die (if you wish to get rid of a unit)
26*+ MANAGE INVENTORY You can manage the inventory of units who have this command enabled
27* HEAL NEARBY The unit will attempt to hear nearby leader PCs and raise/ressurrect killed units or PCs with a challenge rating greater than 3.  Don't want them wasting the spells on CR 0.33 creatures.
28* RETREAT Unit will retreat to the lair or to a specified point and will not engage the enemy
30+# HARVEST Harvest 0=gold, 1-9 = other resources  11 = domination type
no number*+ RUN Switch to RUN movement
no number*+ WALK Switch to WALK movement
no number* PEACE Switch to PEACEFUL stance (do not engage in fighting unless attacked)
no number* FIGHT Switch to an AGGRESSIVE stance (default)
no number* HOW MANY KILLS Tell how many kills you have made
no number* CURRENT ORDERS Tell what your current orders are
no number*+ RANGED Switch to a ranged weapon if you have one
no number*+ MELEE Switch to a melee weapon if you have one
 

That is a list of commands on a PER UNIT basis.  The module designer can specify which of the #ed commands they want any particular unit type to be able to do.

There are also MANY features that can be given to units but, they will not be discussed at this time.

Some of these commands can be issued to all units within hearing distance who hear you.

Hopefully, that is enough to wet your appetite and see why we are so excited about this project.

MORE INFO ON THE RTSA SCRIPTING PACKAGE:

UNIT ADVANTAGES/DISADVANTAGES/and PRODUCTIONS:

PRE

TYPE

DESCRIPTION

DEF

DEFAULTS

Add defaults from RTS_UNIT_DEFAULTS to this units definition.

NB

No Build

This is used to keep the unit from appearing on the BUILD menu this unit is an UPGRADE only.

I#

Taxes in per hour

 

O#

Taxes out per hour

 

R#_#

Resource # cost #

building cost

P#_#

Produce Resource #

Produce Resource # amount # per hour

U#_#

Use Resource #

Use Resource # amount # per hour

RV

Revolution

If not paid resources and taxes will revolt and turn to HOSTILE faction

LS#

Light Sensitive

Sunlight sensitivity

M#

Mana at spawn in

Has a max of # personal mana

LF#

Light Fatal

Sunlight is fatal to this creature  #d4 damage per 2 seconds

A1_res

Animate Dead advantage

can spend 1 personal mana to create a skeleton from the death of something nearby.  this resref is for a placeable that will be designed to look eerie and eventually create the unit.

A2

Feast on Corpse

Can feast on corpses to heal self

A3_res

Create creature from death

Can create a new unit 25% chance for each death near – resref is for a placeable that will do a timed creation of the unit

A4

Blinking

 

A5

Cocoon Death

Cocoons victims on death

A6

Gore Death

Victims killed by this creature die a gory body part exploding death

A7_res

On death alter

On death change to this creature…

A8_#

Spell effect #

Apply spell effect # at location on death

A9_#

Can swallow

Swallow creature whole  max size #

A10

Heal in Sunlight

Heals in sunlight at rate of 1+CON bonus HP per hour

A11#_#

Create Resource #

Create resource # or amount # when this creature kills something

A12tag/#

Heal when near

Heal 1 HP per 10 seconds when within # meters of object with TAG

A13script

Special death script

This unit has a special death script to run when it dies

A14script

Special kill script

This unit has a special script that should be run when it kills something.

A15script

Special damaged script

This unit has a special script it should run whenever it is damaged

A16script

Special spell script

This unit has a special script it should run whenever a spell is cast at them

A17script

Special heartbeat script

This unit has a special heartbeat script it should run

A18

Use Appear spawn in

Creature come from out of the sky when created

IT_tag/#

Item required

Item required to create    #, 0=not consumed  1=consumed

[can apply to upgrades as well]

CO_var/#

To exist requires

To exist the team must have # of items controlled for this creature

[ DOES NOT APPLY TO UPGRADES ]

MX#

Maximum # of this unit type allowed

 

UR_tag

Unit required in team

This unit must be controlled by this team before this unit can be created

UP_res

Upgradeable to

(this assumes UP for you also)

TU#_res

Timed Upgrade

it grows or changes over time

D#_#

On Death resource drop

When dies it drops Resource # in the amount #

PV_#

Point value #

used for scoring at the end of the game

C#_res

Craft # res

Craftable item

B#_res

Buildable # res

Buildable placeable

PL_tag

Placeable required in lair

The lair of the team must have a placeable with specific TAG for this unit to be constructed.

PF#

Persistent Effect

One persistent effect may be applied to creatures of this type.

OD_res

On Death drop item

On death drop item with resref

MSD

Must sleep during day

Must sleep during the day

MSN

Must sleep at night

Must sleep at night

SPtag/var/#

Must have special item to create

Variable on the item VAR must be equal to or greater than #.  The item is consumed on unit creation.

[ DOES NOT APPLY TO UPGRADES ]

VF#

Visual Summon Effect #

Use this visual effect when summoning.  If not specified the default is used.  These effects are supported:

1=Summon Monster 1 [default], 2=Summon Monster 2,

3=Summon Monster 3, 4=Summon Undead, 5=Summon Celestial,

6=Summon Gate, 7=Smoke Puff, 8=Lightning Strike, 9=Sun Strike, 10=No Visual Effect

The advantages and disadvantages are provided to further enhance and make your units unique.  They can dramatically enhance the way the game plays.   The DEF advantage is provided so, if you are going to have some common traits that every unit in the game shares you can just define them using the DEF settings and not have to keep retyping them for each unit.  This speeds things up substantially.  It also provides a way to make quick global changes to all the units in the module.

RESOURCES AND HOW THEY ARE HANDLED:

Currently, resource support is provided for the following types of resource gathering.  More can be added by anyone willing to script them.

ONE TIME USAGE:  A placeable setup as this type of resource is USABLE a single time.  At that point it can create an item in the users inventory, and/or provide x amount of resource y to the team the user comes from.  The placeable will then vanish.   This is how Mana worked in Harvest of Souls.   We setup similar mana pools in ALOE that work identical to how they worked in HoS.

HARVEST MULTI-USAGE:  Works the same as the ONE TIME USAGE but, an amount of uses can be assigned.  There must be a pause between uses.

HARVEST BY DAMAGE:  You can make a resource placeable (like a log) that can be physically attacked.  For each point of damage a resource is provided or a resource item.  This means things capable of damaging it more can harvest the material quickly.  We were going to make it only work with specific types of damage but, the GetDamageDealtByType() function is not currently very usable.

DOMINATION:    A domination placeable is unique in that it can give X amount of a VARIABLE as either a fixed amount or as a cummulative amount over time.  This works good because, some units can require a variable setup.  Only one domination type resource per team is currently allowed.  In ALOE the Sylvan team will dominate trees known as Wyrdwood Trees.  The trees grow over time in size.   The Sylvan team will only be able to build units based on how many trees they have in place.   A second aspect of the DOMINATION type resource is that if destroyed they can be directed to transform into a different placeable.  In ALOE other teams will be chopping down a wyrdwood tree to change them into logs that they can harvest wyrdwood from.   You can already see the contention possible.  The Sylvan's need the trees standing and dominated.  Many of the other teams will be encouraged to chop them down to get Wyrdwood.   Also, supported by the domination type resource are the ability to specify a default (on game start) controller, and the ability to trigger a custom conversation on usage.

Those are the resource methods we have implemented and tested at this time.   The next part we call RESOURCE PROCESSORS.   It is where you place your resources.  It is how the harvesters get them back to team.

INSTANT:  It is possible for a resource to instantly be transferred to your stores but, that eliminates a lot of the fun of being able to attempt to loot resources from other player's bases.

PROXIMITY:  If you setup a proximity resource then once per hour it will check to see if any resource items are within X distance of it and will give the resource amount of that item to the stores for the team.  This is how the Mana Vaults worked in Harvest of Souls.

INSIDE: You can setup containers with RTSA that work identical to the proximity type above but, instead look at their own contents once per hour.

EAT RESOURCE: This item when used will check the users inventory and EAT (destroying) and resource items corresponding to this resource processor and will transfer the corresponding amounts to the the teams storage.  This is how the Soul Receptacle was setup in HoS.

CONTAINER CONTENTS CONSTANT:  This will store the amount of resources inside that correspond to the amount of resources the team has.   This will be great for lumber piles, ore storage bins, etc.   It does NOT update hourly.  It only updates when opened or closed.