Difference between revisions of "Saabie's Advanced add-ons"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
(Tasks)
(Tasks)
 
(One intermediate revision by the same user not shown)
Line 89: Line 89:
  
 
'''MonthNames''' (Text) - The name of each month. Use %MonthNames[%Month%]% to print current month.
 
'''MonthNames''' (Text) - The name of each month. Use %MonthNames[%Month%]% to print current month.
 +
 +
'''MoonDesc''' (Text) - Descriptions of the Moon for each lunar phase. Use %MoonDesc[%LunarPhase%]% to describe the appearence of the moon in the sky when outdoors. Its position in the sky is also determined by %LunarPhase%, being near the Sun when %LunarPhase%=1 and opposite it when %LunarPhase%=16.
  
 
=== Character Properties ===
 
=== Character Properties ===
Line 110: Line 112:
 
'''Setup character ages''' - Executes automatically at game start.
 
'''Setup character ages''' - Executes automatically at game start.
  
The SAL library executes the following after it increments the %Date% when its clock reaches midnight.
+
The SAL library executes the following tasks after it increments the %Date% when its clock reaches midnight.
 
You should call them if you increment one of the Date variables.
 
You should call them if you increment one of the Date variables.
  

Latest revision as of 02:03, 22 July 2014

This library is a very large collection of ADRIFT add-on functionality that covers a wide range of different features, each of which is stored in its own folder under the "Saabie Libraries\Additions to Standard Library\" folder.

Most of these add-ons are fairly simple additions to the standard library that add a specific feature.

If you don't want a specific feature, then you can just delete that folder from your game, but note that the contents of the "General" folder are required by the other libraries.

General

Objects

The World - ADRIFT only supports global variables of type "text" and "number", so we provide this hidden static object as a place to store locations, characters, objects, state lists and value lists as properties. These properties are marked "private" to "the World" so that they don't clutter-up the property sheets of other objects.

< Nothing > - A special object that can be selected for object or item properties to signify that they are not set to any actual object.

Characters

< Nobody > - A special character that can be selected for character or item properties to signify that they are not set to any actual character.

Groups

[EVERYBODY] - A character group in which you must manually select every character in the game so that library tasks can loop over every character when performing a search. It performs the same function as the [Everywhere] location group in the standard library.

Variables

X, Y, Z, S1, S2 - These are used to hold temporary values during calculations within tasks, or when more than one value needs to be passed to a called task. You can use them for your own temporary variables. X, Y and Z are numbers, S1, S2 are text.

Player movement

Pushable objects

Switching player character

Search and Examine

Taste

Feel

Hear

See

Smell

Debug

Put Under or Behind

NoRepeatRand

Owned objects

Conversations

Decorations

Decorations are objects that the player may try to refer to, but which have not been implimented in the game as actual objects. This library allows you to specify which objects you want to be simple decorations.

s_NoDesc - Text variable.

This contains a list of nouns of things which are likely to be found in outdoor locations but which have not been implimented as objects. If the player tries to examine one of these they will get a message that it is just scenery and not important, instead of the default message that it doesn't exist.

Floor Covering - Statelist property of locations with property "Location type = Building"

This allows you to select the type of floor covering for each room inside of buildings, and the player will see appropriate messages if they try to do anything with the floor.

Ground covering - Statelist property of locations with property "Location type = outdoor"

This allows you to select the type of ground covering for each outdoor area, and the player will see appropriate messages if they try to do anything with the ground.

Adverbs

Bodyparts (general)

Date and Age

This module keeps track of the current date and the ages and birthdays of the characters in the game.

Variables

Year (Number) - The current year AD, eg. 2014. Years BC could be stored as a negative number but you will need to allow for the non-existant year 0 if you cross BC to AD.

Month (Number) - The month of the year as a number 1 to 12.

Date (Number) - The day of the month (1 to 28, 30 or 31).

DayOfWeek (Number) - 1 = Monday, 7 = Sunday.

LunarPhase (Number) - Approximate lunar phase as 30 day cycle. 0 = new moon, 15 = Full moon.

Arrays (Lookup tables)

Weekdays (Text) - Monday to Sunday. Use %Weekdays[%DayOfWeek%]% to print the current day.

MonthLengths (Number) - The number of days in each month of the year. (Ignoring leap years)

MonthNames (Text) - The name of each month. Use %MonthNames[%Month%]% to print current month.

MoonDesc (Text) - Descriptions of the Moon for each lunar phase. Use %MoonDesc[%LunarPhase%]% to describe the appearence of the moon in the sky when outdoors. Its position in the sky is also determined by %LunarPhase%, being near the Sun when %LunarPhase%=1 and opposite it when %LunarPhase%=16.

Character Properties

Current Age (Number) - How old this character is. (s_Age)

This characters initial age is (State) - Determines how this characters age is calculated when the game starts (s_StartAge)

Birthday know to the player (selection) - Select if the player knows this character well enough to know their birthday (s_BirthdayKnown)

Birthday Month (Value) - This characters birthday month (s_MonthOfBirth)

Date of Birth 1..31 (Number) - Day of month of birthday (s_DateOfBirth)

Year of Birth (Number) - The difference between this year and the current year can be used to calculate their age (s_YearOfBirth)

Tasks

None of these are commands. Execute them from task actions when needed.

# Setup a characters initial age from DOB - The following task automatically calls this task for every character in the [EVERYBODY] group.

Setup character ages - Executes automatically at game start.

The SAL library executes the following tasks after it increments the %Date% when its clock reaches midnight. You should call them if you increment one of the Date variables.

Check if date exceeds days in current month - If beyond end of month then subtract %MonthLengths[%Month%]% from %Date% and increment %Month%.

Check if month exceeds 12 - If beyond end of year then increment year and subtract 12 from Month.

Check if day of week exceeds day 7 - If %DayOfWeek% exceeds 7 (Sunday) then reset it back to 1 (Monday).

Check if LunarPhase exceeds 30 - Ensure %LunarPhase% remains in range 1..30

Breakable

Throw

Species and Attributes

Dig

Open and Close

Inventory Management