Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: Oomek on March 20, 2017, 03:14:12 PM

Title: Is there a way to save layout config from the script?
Post by: Oomek on March 20, 2017, 03:14:12 PM
I can't believe  there is no alternative to get_config() like set_config().
Is there any other way of storing a permanent value from the script which can be recovered next time you run AM.
Title: Re: Is there a way to save layout config from the script?
Post by: Oomek on March 20, 2017, 03:53:59 PM
Ok, there is one non-volatile table "fe.nv" which I could use, but as far I understand it right it's shared across all layouts, so the data stored in it can be wiped by another layout, or maybe I'm not understanding it properly?

There is no information of how to use it. Any input will be appreciated.
Title: Re: Is there a way to save layout config from the script?
Post by: keilmillerjr on March 20, 2017, 04:24:49 PM
Ok, there is one non-volatile table "fe.nv" which I could use, but as far I understand it right it's shaded across all layouts, so the data stored in it can be wiped by another layout, or maybe I'm not understanding it properly?

There is no information of how to use it. Any input will be appreciated.

Store all your data in a hash labeled with the layout name and your data would be less likely to be changed by another layout. While I haven’t tried it, I assume fe.nv would be used as a hash itself and you could push your hash to it?
Title: Re: Is there a way to save layout config from the script?
Post by: Oomek on March 20, 2017, 04:41:53 PM
I don't thing It will change anything since every layout can do whatever it wants with that array, without a clear guideline of how to store the values there my data will most likely be deleted.