- Joined
- Jan 7, 2008
- Messages
- 5,814
- Reaction score
- 869
- Points
- 203
- Location
- Earth
- Website
- orbides.org
- Preferred Pronouns
- she/her
Several years ago i made a scripting system for Orbiter - Sdvig.
It was designed to allow interactive events in Orbiter, like missions and advanced controls, with both capabilities demonstrated by "Orbiter: First Mission" rescue scenario and hover engine control modification script based on even older Intermod add-on.
The system was a fiasco, for many reasons i know, like a lack of documentation and enigmatic script code, and others i don't know.
Sdvig is based on an emerging pascal compiler i called Paser, the scripts look and work like pascal programs, a syntax, that is both versatile and had newbie teaching in design.
For example, the most of the script to change the default behavior of hover engine control keys looks like that (Lines starting with // are comments):
The scripts can be scenario-dependent, that is achieved by putting some lines into the scn file.
For example, Orbiter: First mission scn file definition:
And that about finishes a general description.
The point of this thread, then, is to find out, does anyone want a system like that?
And that is not in terms of using the missions, which is obviously wanted (is it, btw?), but in terms of making the missions and scripts, since it will come with hardly anything included - a rescue mission and some demos.
Condensing it together, is it worth developing further? And if yes, what are to be expected from it? I'm open to ideas and opinions.
-------------------------------
The current relatively stable version you can try the system in action on could be found here:
http://orbides.1gb.ru/orbf/sdvig_0.7_alpha_080517.zip
The reference documentation is the "script\Sdvig-Reference.exe" file.
The scripts are in "script" directory, mission and demo script-enabled scenarios are in "Scenarios\script" directory.
Global scripts, like Intermod, are run in every scenario if active.
"Scripting config" Launchpad button allows to select active global scripts.
-Orbiter: First mission code is scripts\missions\ofm.pas
-Intermod code is script\intermod.pas
-Scripting demos are in script\demos
Well, and some screenshots:
Text and info displays:
Camera sequences (cut-scenes and pseudo-movies):
Mission timer:
It was designed to allow interactive events in Orbiter, like missions and advanced controls, with both capabilities demonstrated by "Orbiter: First Mission" rescue scenario and hover engine control modification script based on even older Intermod add-on.
The system was a fiasco, for many reasons i know, like a lack of documentation and enigmatic script code, and others i don't know.
Sdvig is based on an emerging pascal compiler i called Paser, the scripts look and work like pascal programs, a syntax, that is both versatile and had newbie teaching in design.
For example, the most of the script to change the default behavior of hover engine control keys looks like that (Lines starting with // are comments):
Code:
//Hover throttle
//getkey(key) checks for the keypress of the "key", if key is pressed returns true, otherwise false.
if not getkey(VK_CONTROL) then begin
if getkey(VK_INSERT) then begin
//If the ins wasn't pressed, save the current thrust level, assume it's pressed, and set full thrust
if not othm then begin othl:=get_thrust_level(cvn,THGROUP_HOVER); othm:=true; end;
set_thrust_level(cvn,THGROUP_HOVER,1);
end;
if not getkey(VK_INSERT) then begin
//If the ins was pressed, restore the current thrust level, and assume it's not
if othm then begin set_thrust_level(cvn,THGROUP_HOVER,othl); othm:=false; end;
end;
//Kill thrust
if getkey(VK_DELETE) then set_thrust_level(cvn,THGROUP_HOVER,0);
end;
if getkey(VK_CONTROL) then begin
//Increment thrust and save it as current
if getkey(VK_INSERT) then begin set_thrust_level(cvn,THGROUP_HOVER,get_thrust_level(cvn,THGROUP_HOVER)+0.01); othl:=get_thrust_level(cvn,THGROUP_HOVER); end;
//Decrement thrust and save it as current
if getkey(VK_DELETE) then set_thrust_level(cvn,THGROUP_HOVER,get_thrust_level(cvn,THGROUP_HOVER)-0.01);
end;
The scripts can be scenario-dependent, that is achieved by putting some lines into the scn file.
For example, Orbiter: First mission scn file definition:
Code:
BEGIN_Sdvig
MFD_Mode=Screen
Scenario_Script=missions\ofm
# Event handlers - redundant
ontimer=ontimer
ondraw=ondraw
onstateload=onstateload
onstatesave=onstatesave
END
And that about finishes a general description.
The point of this thread, then, is to find out, does anyone want a system like that?
And that is not in terms of using the missions, which is obviously wanted (is it, btw?), but in terms of making the missions and scripts, since it will come with hardly anything included - a rescue mission and some demos.
Condensing it together, is it worth developing further? And if yes, what are to be expected from it? I'm open to ideas and opinions.
-------------------------------
The current relatively stable version you can try the system in action on could be found here:
http://orbides.1gb.ru/orbf/sdvig_0.7_alpha_080517.zip
The reference documentation is the "script\Sdvig-Reference.exe" file.
The scripts are in "script" directory, mission and demo script-enabled scenarios are in "Scenarios\script" directory.
Global scripts, like Intermod, are run in every scenario if active.
"Scripting config" Launchpad button allows to select active global scripts.
-Orbiter: First mission code is scripts\missions\ofm.pas
-Intermod code is script\intermod.pas
-Scripting demos are in script\demos
Well, and some screenshots:
Text and info displays:
Camera sequences (cut-scenes and pseudo-movies):
Mission timer:
