In interstellar space? I might have the wrong end of the stick, but it does carry on spawning 'things'.spara wrote:Does it just keep on running, possibly spawning new things?
mission control
Moderators: winston, another_commander
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: mission control
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!
Re: mission control
Again, if you know the location in advance, you can override it in planetinfo. If not, you do have the option of overriding general interstellar space in planetinfo, and then manually calling the default function for anywhere you don't want to override - of course, that's incompatible with any other OXP wanting to do the same.spara wrote:Ok. Old skool methods then. How about repopulator in witchspace? I assume that it can't be overridden either. Does it just keep on running, possibly spawning new things?
I'll keep thinking about providing JS overrides of interstellar space in time for 1.82. It should be possible.
Re: mission control
Thank you for patiently answering my questions . I seem to have misunderstood you earlier as I though you meant overriding the populator in runtime. I get it now . However, it seems a bit harsh to take over the populator in planetinfo, so JS override would be nice. At least with scriptedMisjump. If taking over the populator would be tied to scriptedMisjump, it could act as a flag for OXPs that something big is going to happen in witchspace and maybe act accordingly.cim wrote:Again, if you know the location in advance, you can override it in planetinfo. If not, you do have the option of overriding general interstellar space in planetinfo, and then manually calling the default function for anywhere you don't want to override - of course, that's incompatible with any other OXP wanting to do the same.spara wrote:Ok. Old skool methods then. How about repopulator in witchspace? I assume that it can't be overridden either. Does it just keep on running, possibly spawning new things?
I'll keep thinking about providing JS overrides of interstellar space in time for 1.82. It should be possible.
Re: mission control
Changing the populator is an automatic flag to OXPs - they all get out of the way, unless they've specifically arranged to also have something for your new populator function name. And if I can get it scriptable, you can do it inspara wrote:If taking over the populator would be tied to scriptedMisjump, it could act as a flag for OXPs that something big is going to happen in witchspace and maybe act accordingly.
shipWillEnterWitchspace
just fine. (There's some race condition potential with scriptedMisjump
in that function, as multiple OXPs can turn it on and off independently of each other in arbitrary sequence ... but if you're running stuff through the populator functions if you end up in the wrong place it should be possible to failsafe)Re: mission control
Testing rerouting interstellarspace populator functions and repopulator does not seem to get overridden. Maybe I'm just tired, but I don't see any error here.
planetinfo.plist:
and an odd worldscript has these:
When misjumping, this.xsInterstellarSpaceWillPopulate fires, but this.xsInterstellarSpaceWillPopulate does not and instead thargoids start spawning.
planetinfo.plist:
Code: Select all
{
"interstellar space" = {
"populator" = "xsInterstellarSpaceWillPopulate";
"repopulator" = "xsInterstellarSpaceWillRepopulate";
};
}
Code: Select all
this.xsInterstellarSpaceWillPopulate = function() {
log("test", "populator");
}
this.xsInterstellarSpaceWillRepopulate = function() {
log("test", "repopulator");
}
Re: mission control
That looks like it should work. When there, what's the values of
in the debug console?
Code: Select all
system.info.populator
system.info.repopulator
Re: mission control
These don't give anything. Not in normal space or in interstellar space. Are these properties readable from system.info object as for example system.info.description works just fine?cim wrote:That looks like it should work. When there, what's the values ofin the debug console?Code: Select all
system.info.populator system.info.repopulator
Re: mission control
"Nothing" would imply "unset, use hard-coded default", in this case.
All planetinfo properties should be accessible through
All planetinfo properties should be accessible through
system.info.<property>
(and with a few necessary exceptions, writable in regular space)Re: mission control
It looks like there is something wrong somewhere. I tested with this in planetinfo.plist:
Lave gives this:
Interstellar space gives this:
However interstellar space remained empty and my logging functions show that the custom populators are used.
The weird thing is that when I strip planetinfo.plist to thisAfter jumping to interstellar space logging functions stay dead and thargoids make sure that I'm shortly too.
Code: Select all
{
"interstellar space" = {
"populator" = "xsInterstellarSpaceWillPopulate";
"repopulator" = "xsInterstellarSpaceWillRepopulate";
};
"0 7" = {
"populator" = "xsInterstellarSpaceWillPopulate";
"repopulator" = "xsInterstellarSpaceWillRepopulate";
};
}
Code: Select all
> system.info.populator
xsInterstellarSpaceWillPopulate
> system.info.repopulator
xsInterstellarSpaceWillRepopulate
Code: Select all
> system.info.repopulator
> system.info.populator
The weird thing is that when I strip planetinfo.plist to this
Code: Select all
{
"interstellar space" = {
"populator" = "xsInterstellarSpaceWillPopulate";
"repopulator" = "xsInterstellarSpaceWillRepopulate";
};
}
Re: mission control
Okay - I'll set aside some time this weekend to look at this. I've also got an idea now for how to allow interstellar setting via JS.
Re: mission control
There was a bug where if a property was only used in interstellar space, it would not be processed. That's fixed now, though there's more to do.spara wrote:The weird thing is that when I strip planetinfo.plist to thisAfter jumping to interstellar space logging functions stay dead and thargoids make sure that I'm shortly too.Code: Select all
{ "interstellar space" = { "populator" = "xsInterstellarSpaceWillPopulate"; "repopulator" = "xsInterstellarSpaceWillRepopulate"; }; }
Re: mission control
Thanks cim, you're amazingly fast in delivering requested changes . The new setInterstellarProperty appears to be working nicely and offers a lot of flexibility for OXPs wanting to "own" the interstellar space for a while.
For those interested, claiming the populator and repopulator for interstellar space before going in is now this easy:And of course you need to have customInterstellarSpaceWillPopulate and customInterstellarSpaceWillRepopulate somewhere and make them actually do something.
When finished, jump out and revert the populator/repopulator back to basics:
A couple of minor notes. There's some debug message left in that should be removed at some point and the order of parameters in wiki did not match the order in game (according to the game layer should come after tosystem). I fixed wiki to match game.
The next obvious question is: How to query interstellar properties? Especially populator.
For those interested, claiming the populator and repopulator for interstellar space before going in is now this easy:
Code: Select all
SystemInfo.setInterstellarProperty(0, 7, 55, 2, "populator", "customInterstellarSpaceWillPopulate");
SystemInfo.setInterstellarProperty(0, 7, 55, 2, "repopulator", "customInterstellarSpaceWillRepopulate");
When finished, jump out and revert the populator/repopulator back to basics:
Code: Select all
SystemInfo.setInterstellarProperty(0, 7, 55, 2, "populator", null);
SystemInfo.setInterstellarProperty(0, 7, 55, 2, "repopulator", null);
Code: Select all
16:57:20.580 [i.debug]: interstellar: 0 7 55
The next obvious question is: How to query interstellar properties? Especially populator.