Changing the Simulation's variable files is also covered in the example movies on the Noble Ape site.
Comments
/* <some text here> */
/* This is a comment */
/*
The file format supports comments. Previous versions used // line comments. This has been replaced to allow only /* */ comments.
Objects and Variables
The Noble Ape file format is based on objects and variables. The central elements are three letters that identify both objects and variables. An object includes a number of variables. The example definition of object 'obj' and variable 'var', is as follows;
obj{
Multiple values can be given for particular variables too. For example;
rav = 123, 222, 111;
The Noble Ape Simulation supports two kinds of variables. One byte integers with values between 0 and 255 (inclusive), and two byte integers with values between 0 and 65535 (inclusive). Some variables will only accept one byte integers. In the file format variable definitions below, one_byte denotes a one byte value expected two_bytes denotes a two byte value expected.
sim{
Signature
sig = two_bytes;
As the Noble Ape file format is now accepted by two programs and possibly more in the future, the signature value identifies which program created the file and also, potentially, which programs can accept the file. The signature value for the Noble Ape Simulation is 20033.
Version
ver = two_bytes;
This shows the version of the Noble Ape Simulation that saved the file. It is also a good test for compatibility. Currently the Noble Ape Simulation will only open files with version numbers less than or equal to the version of the Noble Ape Simulation.
lnd{
Random Seed
rnd = two_bytes, two_bytes;
rnd = 3452, 16786;
This is the random seed at the time the file is saved. The two numbers change pseudo-randomly through the Simulation.
Time
tim = two_bytes;
tim = 1205;
The time shows the number of minutes since midnight.
Date
dat = two_bytes;
dat = 216;
The date shows the number of days since the Simulation started running (in simulation time!)
Generator
gen = two_bytes, two_bytes;
gen = 23461,49283;
The generator numbers are the random seed when the landscape is created. They represent the specific landscape generated.
Weather
wea = one_byte;
wea = 3;
The weather currently supported in the simulation also encodes the time of day. If this is not correct the weather is recalculated based on the time of day.
This is also a comment
*/
var = 123;
};
Simulation Header
The Simulation Header identifies the Noble Ape Simulation and the Simulation version.
sig = 20033;
ver = 672;
};
sig = 20033;
ver = 672;
Landscape
The landscape description contains all the environment related information.
rnd = 26592, 20360;
tim = 9;
dat = 0;
gen = 56049, 59146;
wea = 4;
};
0 1 2 3 4 5 6
Condition | Daytime Sun Daytime Cloudy Daytime Rain Nighttime Clear Nighttime Cloudy Nighttime Rain Sunrise/Sunset |
bng{
Location
loc = two_bytes, two_bytes;
loc = 2342, 3324;
The location variables give the x and y axis co-ordinates of the being. The movement resolution is shown relative to the Simulation area in the following table.
loc = 16100, 32;
fac = 49;
spd = 0;
nrg = 3847;
idn = 18424;
dob = 0;
sta = 0;
brn = 171, 0, 146, 86, 501, 73;
};
Edge Width
Environment Size Simulation Resolution Ape Movement Resolution | 12.8 km 50 metres 78 1/8 cm 8 miles 54 2/3 yards 30 2/3 inches 256 |
Facing
fac = one_byte;
fac = 24;
The facing information describes the direction the ape is facing (0-63). The numbers rotate clockwise with 48 is north facing and 0 is east facing.
Speed
spd = one_byte;
spd = 10;
This number represents a unit speed per minute. There is no nice conversion for this number. The speed result is linear. Two relative extremes are shown here.
spd = 1;
spd = 20;
Energy
nrg = two_bytes;
nrg = 2543;
This is the being's current total energy. This amount should never fall below about 1000, and typically won't go above about 3840. The ape eats roughly three times per day. They can consume upwards of 2560 energy units in a single sitting.
Identification Number
idn = two_bytes;
idn = 39858;
The being's identification number can roughly be equated to ape genetics. If the number is even, the being is male.
Date Of Birth
dob = two_bytes;
dob = 0;
The being's date of birth relating to the Simulation's date value. Technically all beings starting the Simulation at initially will have a 'Date of Birth' of 0. This isn't ideal. But together with the state value(see below) this is new in-development technology with the Simulation.
State
sta = two_bytes;
sta = 0;
The being's state - this is in-development technology with the Simulation that covers injuries and effects like pregancy. It is still being developed in the Simulation and will be implemented fully in later versions.
Brain Values
brn = two_bytes, two_bytes, two_bytes, two_bytes, two_bytes, two_bytes;
brn = 171, 0, 146, 86, 501, 73;
The brain values are used by the cognitive simulation. The basic brain formula is;
b(t+1) = a*l + b(t)*m + (b(t)-b(t-1))*n;
The first three brain variables are l, m, n for awake, then l, m, n for asleep.
936 seconds (roughly 15 minutes) to travel 10 meters
0.64 meters per minute
46.8 seconds to travel 10 meters
12.8 meters per minute
Partial Files
The file format supports partial files. If the user wants to change just the landscape characteristics or the time etc, they can create files that only change those variables.