Page 1 of 1

SDL Modification

PostPosted: Thu Jun 10, 2010 4:46 am
by Wamduskasapa
I understand the policy of the copy, paste and version number incrementation

I understand the Variable Default argument
I also understand the Variable Booleen function (0 = off & 1 = on)

But I am totally confused with the portion of the Var Byte Function - Just what values are usable???

Specially within the Neighborhood IE

# Performance variables
VAR BYTE nb01CallSoundChance[1] DEFAULT=0 DEFAULTOPTION=VAULT

# State variables
VAR BYTE nb01Ayhoheek5Man1State[1] DEFAULT=1 DEFAULTOPTION=VAULT
VAR BYTE nb01CommunityAreaState[1] DEFAULT=0 DEFAULTOPTION=VAULT
VAR BYTE nb01CityLightsArchState[1] DEFAULT=0 DEFAULTOPTION=VAULT
VAR BYTE nb01LakeLightState[1] DEFAULT=4 DEFAULTOPTION=VAULT
VAR BYTE nb01PrivateRoomsState[1] DEFAULT=0 DEFAULTOPTION=VAULT
VAR BYTE nb01PuzzleWallState[1] DEFAULT=0 DEFAULTOPTION=VAULT

VAR BYTE nb01StainedWindowOption[1] DEFAULT=0 DEFAULTOPTION=VAULT

# Randomized object appear/disappear
VAR BYTE nb01YeeshaPage07Chance[1] DEFAULT=0 DEFAULTOPTION=VAULT
VAR BYTE nb01DarkShapeSwimsChance[1] DEFAULT=0 DEFAULTOPTION=VAULT
VAR BYTE nb01BahroBoatsChance[1] DEFAULT=0 DEFAULTOPTION=VAULT

Re: SDL Modification

PostPosted: Thu Jun 10, 2010 5:15 am
by diafero
That depends on the age. BYTE values can be between 0 and 255, but which values are valid and which values mean what is defined by the python script which connects the SDL variables to objects/states in the age. There are also variables that Cyan left in there without anything being affected by them.

Btw, if you use the Offline KI, you should not edit SDL files. Not only will the files be reset when the next Offline KI upgrade is installed, when or if I have to upgrade the SDL structure (and the hood SDL *will* be updated next release), you have old data with "your" version X in the vault, while the SDL now defines another structure for version X. It's much more convenient, and future-proof, to use the /setsdl command in-game: You can immediately see the result of what you did (provided it's somewhere close to you), and it will be saved in your age state, not in the SDL, to it will survive an upgrade.

Re: SDL Modification

PostPosted: Thu Jun 10, 2010 5:31 am
by D'Lanor
Wamduskasapa wrote:But I am totally confused with the portion of the Var Byte Function - Just what values are usable???


It depends. SDL variables are only part of the whole process.
An SDL variable is monitored by a Python file. This Python file compares the SDL value with the parameter(s) it receives from the prp file. If there is a match it will do its thing. This usually happens when a. the age loads, b. the SDL value changes.

This "thing" it does could be for example: show object 1 at value 1, show object 2 at value 2, show object 3 at value 3 etc. Or it could run a different responder for each value.

So basically you do not know which values to use until you either reverse engineer the process or figure it out by trial and error.