Scripting requests
Moderators: winston, another_commander
- Uncle Reno
- ---- E L I T E ----
- Posts: 648
- Joined: Mon Apr 24, 2006 12:54 pm
- Location: UK
Ability to script events dependent on each planets description i.e. with a planet noted for being in the midst of a civil war, a script could check for this and add (for example) warring factions in the surrounding space. Also, while we are considering it, the same ability for the inhabitants of a planet i.e. red slimy lobsters would be more likely to use Moray Starboats.
"Get back or I unleash my lethal spotted batoid!!"
What I do when not reading the Oolite bulletin board!
What I do when not reading the Oolite bulletin board!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Hmm. Given the way the description strings are constructed, I don’t think anything more direct than analyzing the actual strings is practical. This can be done in JavaScript using the system.description property and, probably, JavaScript’s string class to do the analysis.
E-mail: [email protected]
- Uncle Reno
- ---- E L I T E ----
- Posts: 648
- Joined: Mon Apr 24, 2006 12:54 pm
- Location: UK
OK, here's another suggestion. How about a way of setting a random destination within a certain range limitation i.e. return a system number which is within 15-21 LY of the current system? I assume there is something like this for the contracts system but is it accessable for OXPers?
"Get back or I unleash my lethal spotted batoid!!"
What I do when not reading the Oolite bulletin board!
What I do when not reading the Oolite bulletin board!
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
1- ability to define groups other than 'escort'.
say based on role(being_escort/being_defenceship), scanclass or arbitrarily by method.
2- a method to set/reset the group a ship belongs to.
someships should automatically belong to the same group:
-defenceships should belong to the carrier/station that launched them.
-police/thargoids should always be the same group etc.
OK I guess some of this is already ingame somehow.
----
I really do not understand the whole group-system....
say based on role(being_escort/being_defenceship), scanclass or arbitrarily by method.
2- a method to set/reset the group a ship belongs to.
someships should automatically belong to the same group:
-defenceships should belong to the carrier/station that launched them.
-police/thargoids should always be the same group etc.
OK I guess some of this is already ingame somehow.
----
I really do not understand the whole group-system....
Riding the Rocket!
AI method of
just like LaunchDefenseShip, only you can launch a ship with a uniqely_named_role from a Carrier or a station...
Code: Select all
launch: role
Bounty Scanner
Number 935
Number 935
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Thread split
Non-scripting-request stuff regarding asteroids moved elsewhere.
E-mail: [email protected]
- LittleBear
- ---- E L I T E ----
- Posts: 2882
- Joined: Tue Apr 04, 2006 7:02 pm
- Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.
Think what A means is that you are not asking for a new command for use in an OXP.
On that Could we have a NOT as in:-
"gui_screen_string not GUI_SCREEN_MISSION" as a condition.
That would solve the mission screen clash problem. Trying to do it another way, but can't get it working. (See this thread:- https://bb.oolite.space/viewtopic.php?t=3670 )
On that Could we have a NOT as in:-
"gui_screen_string not GUI_SCREEN_MISSION" as a condition.
That would solve the mission screen clash problem. Trying to do it another way, but can't get it working. (See this thread:- https://bb.oolite.space/viewtopic.php?t=3670 )
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Well, we do have it ... in Javascript (Ahruman has already posted the code in the other thread). But Ahruman has also stated quite some times that he won't implement new methods in the old scripting model.LittleBear wrote:Could we have a NOT as in:-
"gui_screen_string not GUI_SCREEN_MISSION" as a condition.
That would solve the mission screen clash problem. Trying to do it another way, but can't get it working. (See this thread:- https://bb.oolite.space/viewtopic.php?t=3670 )
So I guess for all of us that means one thing: learn Javascript!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
As per the Scripter’s Cove thread, ephemeral global variables, i.e. a set of variables shared between all scripts but not saved with the game.
E-mail: [email protected]
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
A method of preventing a station to launch ships.
Sometimes you may want to have a scripted station that the player shall be able to dock with, but the story of your script requires that for sure no ships are launched from that station. E.g. the player could have an encounter with an abandoned station or carrier. Or, right now I want a player to land on a Generation Ship. And it simply makes no sense that this kind of ship (or station) should spit out traders or even a couple of worms (especially in interstellar space).
As far as I've understood this part of a station's behaviour is entirely controled by the engine, without me having the chance to interfere. I am requesting a method that allows me to prevent anything to launch from a station. Perhaps something that sets the internal counter of ships-in-the-station to 0. Even better something that allows me to prevent or allow only certain types of ships to be launched, e.g. traders yes, but no landing craft, or pirates only, or...
Sometimes you may want to have a scripted station that the player shall be able to dock with, but the story of your script requires that for sure no ships are launched from that station. E.g. the player could have an encounter with an abandoned station or carrier. Or, right now I want a player to land on a Generation Ship. And it simply makes no sense that this kind of ship (or station) should spit out traders or even a couple of worms (especially in interstellar space).
As far as I've understood this part of a station's behaviour is entirely controled by the engine, without me having the chance to interfere. I am requesting a method that allows me to prevent anything to launch from a station. Perhaps something that sets the internal counter of ships-in-the-station to 0. Even better something that allows me to prevent or allow only certain types of ships to be launched, e.g. traders yes, but no landing craft, or pirates only, or...
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Added has_npc_traffic key (takes a fuzzy boolean, default yes) and JavaScript property hasNPCTraffic. If initially set (in the plist), it will have no docked shuttles, traders or patrols when created. If set later in a script, it will simply not launch shuttles, traders or patrols when it otherwise would.
E-mail: [email protected]
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact: