Changes

Jump to: navigation, search

Howto:Persistent Nasal configuration

579 bytes added, 12 January
m
https://forum.flightgear.org/viewtopic.php?f=6&p=359868#p359868
{{Stub}}
 
== Objective ==
Demonstrate how to save/load a Nasal hash with variables for serialization/persistence purposes
 
== Background ==
It is pretty common for more sophisticated Nasal scripts (or even Addons) to have some configuration values, i.e. default values and custom settings/configuration
 
== Problem ==
Conceiving a custom file format and implementing a custom parser can quickly become tedious and redundant.
 
== Approach ==
Thus, we will be using a Nasal hash that is treated like JSON and then use this to serialize/unserialize the data as needed
 
== Implementation ==
Consider the following setup
18,434
edits

Navigation menu