Recently I got an idea for an OXP, and I decided to put it in development. I already work in Java so I'm not completely in the dark about programming, and I have started to work my head around the scripting and the plist files.
The idea is for an immersive OXP - basically offering the player a new option in the F4 screen (when docked to a station) to take a walk on the station and witness a random event that could need a player choice and have some immediate consequences, nothing too complex for now, just to enhance the atmosphere and provide something like a diversion.
I have a plan about this, but for now I want to create a prototype with a generic structure that will manage every event I'll implement, categorized for station type, system government-economy-tech level. If this work go ahead I will open an official thread and proceed with the development.
But now I have an issue, I used the wiki, searched for java associative arrays around the net, but I still haven't solved it.
The thing is: I'm using missiontext.plist to store events text and available choices (to display on screen), and the consequences related to the choices (in a separated map), something like this:
Code: Select all
"gen1action" = {
"gen1c1" = "credits:-5|go:gen1_1";
"gen1c2" = "credits:-1|go:gen1_1";
"gen1c3" = "go:gen1_2";
};
Can I store the "gen1action" object in a local variable so I can pick the values from a Javascript function?
If there's no way I could move these data directly into a js file and read them from there, but I wanted to keep everything together in one place.
Thank you in advance!