Progress
Moderators: winston, another_commander
Re: Progress
For "rapid-fire" launch tubes in case of attack to get defenders out fast, it may be better simulating it with script and a dummy dock. A quasi-example of this is in Liners, when the Emerald arrives and can launch multiple ferry shuttles at once.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- Shipbuilder
- ---- E L I T E ----
- Posts: 877
- Joined: Thu May 10, 2012 9:41 pm
- Location: Derby
Re: Progress
I like the idea of the rapid fire launch tubes.
It would also be interesting to look in to the 2 separate docking bay issues that have been discussed in the past.
It would also be interesting to look in to the 2 separate docking bay issues that have been discussed in the past.
The GalTech Industries Corporation - Building ships to populate the galaxies.
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
Increase the variety of ships within your Ooniverse by downloading my OXPs
Flying the [wiki]Serpent_Class_Cruiser[/wiki] "Thargoid's Bane"
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Progress
Subentity dictionaries can now have
Example:
If you spawn a
script_info
entries. These are merged with any script_info
in the subentity’s shipdata entry’s script_info
, with the subentity dictionary taking precedence. The obvious use case is for tagging subentities of interest to a script, instead of relying on indices.Example:
Code: Select all
{
"my_super_entity" =
{
// Other shipdata stuff goes here…
subentities =
(
{
subentity_key = "my_sub_entity";
position = (100, 0, 0);
script_info =
{
my_tag = "this is important";
bar = 42;
};
}
);
};
"my_sub_entity" =
{
// Other shipdata stuff goes here…
script_info =
{
foo = "Fred";
bar = 0;
};
};
}
my_super_entity
, its ship.subEntities[0].scriptInfo
will be:
Code: Select all
{
bar: 42,
foo: "Fred",
my_tag: "this is important"
}
E-mail: [email protected]
Re: Progress
A change to
If you maintain an OXP which intentionally marks a system in one script and unmarks it in another, you may have to rewrite that bit of code. Unfortunately because
There's also a
A few other small changes:
- a bunch of wormhole bugs fixed, including the "ghost wormhole" bug most often spotted around zero-distance doubles
- bounty award rules now the same for the player and NPCs, where possible
- traders will dump cargo for hostile NPCs, not just the player
- offenders won't call for help from bounty hunters or the police.
- new world script event "
mission.markSystem
/mission.unmarkSystem
- this now has a separate "marked systems" list for each script. So if I mark a system, and then you mark the same system, and I then unmark it, it stays marked until you also unmark it. This works in a similar way to mission.setInstructions
.If you maintain an OXP which intentionally marks a system in one script and unmarks it in another, you may have to rewrite that bit of code. Unfortunately because
markSystem
and unmarkSystem
take a list of system IDs as parameters, it's not possible to do what setInstructions
does and add a worldscript key as an extra parameter.There's also a
mission.markedSystems
function which returns an object with properties named after the world scripts currently marking systems. Each of those properties is an array of system IDs.A few other small changes:
- a bunch of wormhole bugs fixed, including the "ghost wormhole" bug most often spotted around zero-distance doubles
- bounty award rules now the same for the player and NPCs, where possible
- traders will dump cargo for hostile NPCs, not just the player
- offenders won't call for help from bounty hunters or the police.
- new world script event "
dayChanged(newday)
" fires at 00:00:00 (or possibly a bit later, if the clock is adjusting)- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Progress
Oh good!cim wrote:... a bunch of wormhole bugs fixed, including the "ghost wormhole" bug most often spotted around zero-distance doubles
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- 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:
Re: Progress
cim wrote:<a bunch of code changes over the last weeks/months; thus becoming deeper and deeper involved in Oolite development>
Give the man a cookie!
And a promotion from his current 'Commodore' title seems to be in order, if I may humbly suggest so.
- Fatleaf
- Intergalactic Spam Assassin
- Posts: 1988
- Joined: Tue Jun 08, 2010 5:11 am
- Location: In analysis mode on Phaelon
- Contact:
Re: Progress
Indeed! Hip Hip Huzzah !Commander McLane wrote:And a promotion from his current 'Commodore' title seems to be in order, if I may humbly suggest so.
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
Holds the Ooniversal record for "Thread Necromancy"
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Progress
That could potentially break several of my missions. In the case of a target to be killed, I normally unmarked the systems and set new systems in the ship script of the target. I understand the problem of a unknown number of parameters in the currentcim wrote:If you maintain an OXP which intentionally marks a system in one script and unmarks it in another, you may have to rewrite that bit of code. Unfortunately becausemarkSystem
andunmarkSystem
take a list of system IDs as parameters, it's not possible to do whatsetInstructions
does and add a worldscript key as an extra parameter.
markSystem
and unmarkSystem
methods. But maybe we should limit those to one system instead and add the mission as second parameter, because it is very pleasant to be able to set it from within any script. I cant remember any oxp setting more than one system at once (I have a vague memory though, that I used it in one oxp). You can always rename the current code to markSystems
and unmarkSystems
as the method that still uses a list of systems.UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Fatleaf
- Intergalactic Spam Assassin
- Posts: 1988
- Joined: Tue Jun 08, 2010 5:11 am
- Location: In analysis mode on Phaelon
- Contact:
Re: Progress
Commander McLane's Anarchies with the amnesty offer sets two system's at once.Eric Walch wrote:I cant remember any oxp setting more than one system at once
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
Holds the Ooniversal record for "Thread Necromancy"
Re: Progress
Lovecats unmarks two at once a few times. Though it does that from a ship script so would need adjusting anyway.Fatleaf wrote:Commander McLane's Anarchies with the amnesty offer sets two system's at once.Eric Walch wrote:I cant remember any oxp setting more than one system at once
On the other hand, Feudal States already expects it to be working in the way that
setInstructions
does, with the option to take an array to set more than one system at once. It works, too, because of how type conversion works in the JS libraries.The parameter is only a convenience, of course, so if the code is to be rewritten anyway:
Code: Select all
// in world script
this._unmarkSystem = function(id) {
mission.unmarkSystem(id);
}
// in ship script
this.shipDied = function() {
worldScripts.foo._unmarkSystem(system.ID);
}
mission.markSystemAs(id,script)
is a possibility.Looking up how the JS to native type conversion works, there is another possibility:
mission.markSystem(12,17,213,"other world script");
. I don't like it at all syntactically, but it would work as expected in both 1.76 and 1.77 (in 1.76, the final parameter converts to NaN and is ignored; in 1.77 I could make it so that the conversion of the last parameter to NaN would make it try again as a string)Re: Progress
What about using a numeric array for the id locations followed by a string? Like this:cim wrote:Looking up how the JS to native type conversion works, there is another possibility:mission.markSystem(12,17,213,"other world script");
. I don't like it at all syntactically, but it would work as expected in both 1.76 and 1.77 (in 1.76, the final parameter converts to NaN and is ignored; in 1.77 I could make it so that the conversion of the last parameter to NaN would make it try again as a string)
mission.markSystem([12,17,213],"other world script");
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Progress
That would also require a rewrite of existing oxps. The above suggestion of Cim above to call a function in the worldScript is the best because it already works in current Oolite. It allows to write code that works now and in trunk.Switeck wrote:What about using a numeric array for the id locations followed by a string? Like this:
mission.markSystem([12,17,213],"other world script");
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- 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:
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Progress
Indeed. And very well deservedCommander McLane wrote:… and congratulations to your promotion, cim!
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Fatleaf
- Intergalactic Spam Assassin
- Posts: 1988
- Joined: Tue Jun 08, 2010 5:11 am
- Location: In analysis mode on Phaelon
- Contact:
Re: Progress
Well said that flying disc thing and gourd! Congratulations Cim.Smivs wrote:Indeed. And very well deservedCommander McLane wrote:… and congratulations to your promotion, cim!
So... where is the party?
Find out about the early influences of Fatleaf here. Also his OXP's!
Holds the Ooniversal record for "Thread Necromancy"
Holds the Ooniversal record for "Thread Necromancy"