Question about SDL variables

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Question about SDL variables

Postby Gbadji » Mon May 12, 2008 3:25 am

I said some time ago I will have question. Time is gone :)

I used a first set of SDL variables without problem in a previous version of my age. Now I would like to add an other set for an other part.
I use my SDL variables only from Python file.

--I write what follows of memory, you will see after why --
I wrote my Python file using the new SDL variables and added them in my SDL file.
As long as I only read the SDL variables I had no problem. But I started to change the values and I can't enter in my age, URU stopped when I go throught the book.
I changed my SDL file to include an other version for STATEDESC including all the SDL variables and I went back in the first version with only the first set of SDL variables.
I can enter in the age but my new SDL variables were unknown.
That was last night.

This morning, for ask my question here I wanted to follow again all the steps I made yesterday, so I modified my SDL file with only one version for STATEDESC with all the SDL variables. No more SDL variable is available, even the one from the first set.

Code: Select all
(05/12 11:43:14)   File "G:/DATA_Torilacha/Python_source/TorilachaFocus1.py", line 94, in OnServerInitComplete
(05/12 11:43:14)     ageSDL = PtGetAgeSDL()
(05/12 11:43:14) KeyError: Age Global SDL for Torilacha does not exist!


I tried to suppress my book from ULM and added it again, no change.

My question would be "How to add a set of new SDL variables", now my question is "How to have SDL variables again?"

Thanks.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: Question about SDL variables

Postby D'Lanor » Mon May 12, 2008 4:08 am

It should be no problem to add SDL variables. You could try deleting the sav file for your age in the sav folder, although I never had to do that when changing SDL variables.

If that doesn't help, can you post the contents of the SDL file here?


Edit: As a note of interest about SDL versions, some of the Cyan SDL files contain the following warning.

Code: Select all
#==============================================================
# READ:   When modifying an SDL record, do *not* modify the
#   existing record. You must copy and paste a new version
#   below the current one and make your changes there.
#==============================================================

However, there is no need to increase the SDL version number as long as your age has not been released. And even then it would only matter for server compatibility in the online game. Still, we have to make ages with the online game in mind (cautious optimism).
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Question about SDL variables

Postby Gbadji » Mon May 12, 2008 1:31 pm

D'Lanor, I suppressed my .sav file without success.

You can find my SDL file here.

Thanks for your help.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: Question about SDL variables

Postby D'Lanor » Mon May 12, 2008 2:22 pm

You probably should add [1] to your new SDL variables. Upon investigation that seems to indicate the length of the list. So apparently you can store multiple values into one SDL (although Cyan rarely uses this).
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Question about SDL variables

Postby Gbadji » Tue May 13, 2008 1:42 am

I added [1] for each SDL variables, no difference except I can't go in the age until I suppress the .sav file once.

I created again the second STATEDESC in the SDL file, no more success, the error message was still here.
Maybe as it's said in comment at the begining of the SDL file, I have *corrupted* the vault.

Have I a chance to correct it without uninstall URU and install it again? If I have to install it again, can I keep the .sav files for the other ages ?
With my daughter -- 5 years old -- we just finished the 4 first ages and get the 4 pillars in her relto, I can finish an age quickly but not all until she comes back from school, unless playing all the day ... :D.

Thanks.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am

Re: Question about SDL variables

Postby D'Lanor » Tue May 13, 2008 3:34 am

Just to be sure, you replaced this...
Code: Select all
    VAR INT BoutonCode1 DEFAULT=0
    VAR INT BoutonCode2 DEFAULT=0
    VAR INT BoutonCode3 DEFAULT=0
    VAR INT BoutonCode4 DEFAULT=0
    VAR INT BoutonCode5 DEFAULT=0
    VAR INT BoutonCode6 DEFAULT=0
    VAR INT BoutonCode7 DEFAULT=0
    VAR INT BoutonCode8 DEFAULT=0
    VAR INT BoutonCode9 DEFAULT=0
    VAR INT PlaqueCodeJardin DEFAULT=0

...with this?
Code: Select all
    VAR INT BoutonCode1[1] DEFAULT=0
    VAR INT BoutonCode2[1] DEFAULT=0
    VAR INT BoutonCode3[1] DEFAULT=0
    VAR INT BoutonCode4[1] DEFAULT=0
    VAR INT BoutonCode5[1] DEFAULT=0
    VAR INT BoutonCode6[1] DEFAULT=0
    VAR INT BoutonCode7[1] DEFAULT=0
    VAR INT BoutonCode8[1] DEFAULT=0
    VAR INT BoutonCode9[1] DEFAULT=0
    VAR INT PlaqueCodeJardin[1] DEFAULT=0


And leaving no legacy record does not corrupt the vault. As far as I know that is not a Cyan remark, but an interpretation of it by the age builder who wrote the old tutorial. Cyan says this:
Code: Select all
#===============================================
# Changing an SDL record? Be sure to leave the
# legacy record intact and make changes in
# a new copy of the record. - eap
#===============================================

Or this:
Code: Select all
#==============================================================
# READ:   When modifying an SDL record, do *not* modify the
#   existing record. You must copy and paste a new version
#   below the current one and make your changes there.
#==============================================================


There is no mention of corrupting the vault there. What could get corrupted is the sav file (which strictly speaking is not part of the vault) but you already deleted that.

Anyway, I do not think a reinstall of Uru would help.

I have no idea why your whole SDL is not recognized. Where are you calling PtGetAgeSDL() in the Python script?
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Question about SDL variables

Postby Gbadji » Tue May 13, 2008 5:19 am

Yes, I made that the modifications.

And I have a good news :). To answer your last post, I extract the lines corresponding to Torilacha from Python.0.elf file and I saw something I missed this morning: my Python file Torilacha.py was not found too. So I built again my .pak file and the error is gone. :roll:
I do nothing with SDL variables in Torilacha.py so I don't understand what appened but which importance, it's working :). (no it's false, I'm not happy with that, but I accept to not understand -- yet)

Sorry for the time spent for this "false" problem and thanks again.

For information : I call PtGetAgeSDL in the OnServerInitComplete function and in functions called by OnNotify. In TorilachaFocus1.py for the first set of SDL variables and in TorilachaFocus3.py for the second set.

Ok, now I have to do something with my SDL variables.
The French's Mystpedia age Project - http://www.mystpedia.net
To find me in the Cavern: Gbadji KI #6911493 or Alatan KI#7869109
User avatar
Gbadji
 
Posts: 73
Joined: Sat Feb 02, 2008 5:59 am


Return to Scripting

Who is online

Users browsing this forum: No registered users and 12 guests