Scripting requests

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

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!
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

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.
User avatar
Uncle Reno
---- E L I T E ----
---- E L I T E ----
Posts: 648
Joined: Mon Apr 24, 2006 12:54 pm
Location: UK

Post by Uncle Reno »

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!
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
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:

Post by Arexack_Heretic »

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....
Riding the Rocket!
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

AI method of

Code: Select all

launch: role
just like LaunchDefenseShip, only you can launch a ship with a uniqely_named_role from a Carrier or a station...
Bounty Scanner
Number 935
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Thread split

Post by JensAyton »

Non-scripting-request stuff regarding asteroids moved elsewhere.
User avatar
nijineko
---- E L I T E ----
---- E L I T E ----
Posts: 353
Joined: Wed Jul 04, 2007 3:37 pm
Location: two strange quarks short of a graviton....
Contact:

Post by nijineko »

rouge long range wormholes of unknown and unknowable destination? would that fall into scripting? or would that still be breaking the hard-fast 7ly rule. i was thinking that if the destination is random (other galaxy even?) then it would be a real dice roll, and not be something to be traded on. ^^
arukibito ga michi wo erabu no ka, michi ga arukibito wo erabu no deshou ka?

Image
Play games. Win Amazon gift cards! Brag. Repeat.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2867
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Think what A means is that you are not asking for a new command for use in an OXP. :wink:

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.
User avatar
nijineko
---- E L I T E ----
---- E L I T E ----
Posts: 353
Joined: Wed Jul 04, 2007 3:37 pm
Location: two strange quarks short of a graviton....
Contact:

Post by nijineko »

aaaaah! gotcha. will post new threads instead of here then until i think of one.
arukibito ga michi wo erabu no ka, michi ga arukibito wo erabu no deshou ka?

Image
Play games. Win Amazon gift cards! Brag. Repeat.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

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 )
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.

So I guess for all of us that means one thing: learn Javascript! :? :shock: :roll: :wink:
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

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.
User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1878
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:

Post by Arexack_Heretic »

request: dynamic subentity handling.

LIKE:
IF: player.hasEquipment(EQ_ADV_SHIELD)
DO: AddSubEnitity(player.shiptype, advanced_shield.dat)
Riding the Rocket!
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

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...
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

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.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Ahruman, I love you!

I'm feeling like with Father Christmas here: You submit a request, and it gets fulfilled!!!

Joy! :D :D :D :D :D

(Sorry, you may as well delete this enthusiastic outburst of mine when you've read it. :oops:)
Post Reply