Page 2 of 2

PostPosted: Wed May 24, 2006 9:48 pm
by Tsar Hoikas
about the variables, the same thing. just have all the variables start with shell# and then the variable name. shell#[varname] like that. unsure.gif


Nope if you read that above. You cannot have vars like that in python.

PostPosted: Thu May 25, 2006 10:28 am
by Robert The Rebuilder
Looks like everyone is agreeing on the same thing.

Adam: you're right - Python variables cannot start with a number. And Zib realizes this as well. His notation "shell#[varname]" would translate to (e.g. for shell 132 and original variable named AvatarKey) "shell132AvatarKey", which is still valid.

Perhaps we can use a shorthand for the prefix: s# (e.g. s132AvatarKey (for a variable), s132MyScript.py (for Python scripts)?

PostPosted: Thu May 25, 2006 11:55 am
by Tsar Hoikas
Oh sorry ;)

PostPosted: Wed May 31, 2006 6:47 am
by Robert The Rebuilder
I've noticed that, in the age scripts, each ptModifier/ptResponder subclass assigns itself a unique ID in the __init__() method. This begs the question: how do we guarantee a unique ID for each script... in each shell... in each age?

One suggestion is to combine the age sequence prefix and the shell number, and also allow for up to 10 scripts per shell. So, the proposed ID would have the form:

AAASSSX

where AAA is the age sequence prefix (i.e. 189), SSS is the shell number, and X is the script number. For example, if you were writing 3 scripts for shell number 121, the self.id values for each script would be:

1891210
1891211
1891212

This should steer clear of the IDs for each of the Cyan ages; they tend to be under 6000.

PostPosted: Wed May 31, 2006 10:18 am
by Tsar Hoikas
QUOTE ("Robert")

This should steer clear of the IDs for each of the Cyan ages; they tend to be under 6000.
[/quote]

The go into the 7,000 in PotS and since Volcano uses PotS clients....

But I don't think that your id convention will cause any problems there. Perhaps a modified id-convention should be posted on the alcugs (Not AB) wiki and only scripts that conform to that model be allowed on UAM.