Page 3 of 4

Re: Alien Systems OXZ

Posted: Wed Dec 04, 2024 8:08 pm
by Redspear
Wildeblood wrote: Wed Dec 04, 2024 6:11 am
Is this creating a variable called _alienVisa in the global namespace/scope/terminology-you-prefer, not restricted to your world script?
I believe so...
Wildeblood wrote: Wed Dec 04, 2024 6:11 am
If yes, then why?
Because
  • I need it to remain valid across various this statements
  • I am a fool
  • the other method that I know (var) won't cut it when I try to use it to achieve the same

Wildeblood wrote: Wed Dec 04, 2024 6:11 am
I've apparently forgotten how variable scoping works
Because I've 'Iearned' piecemeal, as a non-programmer, I wasn't even familiar with that term. Had I been, I'd probably have looked it up...

If there's a better way then likewise:
Wildeblood wrote: Wed Dec 04, 2024 6:11 am
insightfulize me, please

Cholmondely wrote: Wed Dec 04, 2024 7:01 am
Are you using the ability in Library.oxp’s P.A.D. to define your home system? (Default is Lave)
No but then I think it works best with the assumption that the player 'character' is human.
I suppose that with it being only one system then an exception could be made.

Re: Alien Systems OXZ

Posted: Wed Dec 04, 2024 8:21 pm
by Redspear
Redspear wrote: Wed Dec 04, 2024 8:08 pm
If there's a better way...
'Global variables'... got it. Thanks.

Re: Alien Systems OXZ

Posted: Thu Dec 05, 2024 7:28 am
by Nite Owl
Is there a way to get the Messages to appear at all of the possible Stations in a System instead of only at the Main Station? Have several vague ideas on how this might be accomplished but before the Tweaking Experiments begin would like the opinion of some better JavaScript writers than myself. My Ooniverse uses Additional Planets and Stations for Extra Planets. Thanks in advance for all advice.

Re: Alien Systems OXZ

Posted: Thu Dec 05, 2024 8:21 am
by Redspear
Nite Owl wrote: Thu Dec 05, 2024 7:28 am
Is there a way to get the Messages to appear at all of the possible Stations in a System instead of only at the Main Station?
Hi Nite Owl,

Yes, I think so and (to my surprise) I may even know how to do it...

If I'm right then the key would be in swapping the main station part of the check so that it was instead for any station. I'm not in a position to check this right now but will likely report back soon.

Re: Alien Systems OXZ

Posted: Thu Dec 05, 2024 11:35 pm
by Redspear

Code: Select all

this.$sendMessageTimer = function $sendMessageTimer () {
    var p = player.ship;
    var stn = system.mainStation;
    var dist = p.position.distanceTo(stn.position);
    if (dist < stn.scannerRange) { // only send a message if the player is within scanner range
        if (p.alertCondition != 3) { // only send if the player is not at condition red
            this.$sendStationMessage();
        }
    }
}
The code above checks for proximity to the main station but to check for any station I think you might have to use a check scanner function and then see if the array contained any instances of station... I think...

Also be aware of the individual group messages currently being defined as emanating from the main station like so:

Code: Select all

system.mainStation.commsMessage("[bird-messages]", 6);

Re: Alien Systems OXZ

Posted: Fri Dec 06, 2024 1:26 am
by Nite Owl
Your first code block is the one that is causing me concern. My current thinking is that the only way to make it work is to do a long array that contains all of the Stations that the Messages should appear at. There is no equivalent for system.mainStation that would encompass all of the Stations in a system, such as system.allStations.

As for your second code block that one was easy.

Code: Select all

if(system.info.inhabitants.match(birds)
    {
        player.commsMessage(expandDescription("[bird-messages]"), 10);
    }
Unfortunately this second code change will only take effect once the first one is coded properly. Am in the midst of one of my twice yearly RPG game blitzes at the moment so Oolite has been on a back burner for the past few weeks. Once back at it the solution will be found.

Re: Alien Systems OXZ

Posted: Fri Dec 06, 2024 6:08 am
by Wildeblood
Redspear wrote: Thu Dec 05, 2024 11:35 pm

Code: Select all

this.$sendMessageTimer = function $sendMessageTimer () {
    var p = player.ship;
    var stn = system.mainStation;
    var dist = p.position.distanceTo(stn.position);
    if (dist < stn.scannerRange) { // only send a message if the player is within scanner range
        if (p.alertCondition != 3) { // only send if the player is not at condition red
            this.$sendStationMessage();
        }
    }
}
The code above checks for proximity to the main station but to check for any station I think you might have to use a check scanner function and then see if the array contained any instances of station... I think...
Ignoring the question at hand, you've got the easiest check (What is the contents of player.ship.alertCondition?) last. Could I be so bold as to suggest this re-arrangement for clarity:

Code: Select all

this.$sendMessageTimer = function $sendMessageTimer () {
    var p = player.ship;
    if (p.alertCondition == 3) {
            return; // only continue if the player is not at condition red
    }
    var station = system.mainStation;
    var distance = p.position.distanceTo(station.position);
    if (distance < station.scannerRange) { // only send a message if the player is within scanner range
        this.$sendStationMessage();
    }
}
Or this:

Code: Select all

this.$sendMessageTimer = function $sendMessageTimer () {
    var p = player.ship;
    if (p.alertCondition != 3) { // only continue if the player is not at condition red
        var station = system.mainStation;
        var distance = p.position.distanceTo(station.position);
        if (distance < station.scannerRange) { // only send a message if the player is within scanner range
            this.$sendStationMessage();
        }
    }
}
(My two examples are equivalent once compiled.)

I'm not a fan of the checks and bail-outs at the top of the block style, but this seems like a case where it could save some unnecessary calculation when it actually matters, as well as making the intention clearer.

Re: Alien Systems OXZ

Posted: Fri Dec 06, 2024 8:15 am
by Redspear
Wildeblood wrote: Fri Dec 06, 2024 6:08 am
you've got the easiest check (What is the contents of player.ship.alertCondition?) last. Could I be so bold as to suggest this re-arrangement for clarity:
Certainly...
Wildeblood wrote: Fri Dec 06, 2024 6:08 am
it could save some unnecessary calculation when it actually matters,
I think I get it: why do the expensive check first when it also has to pass an inexpensive one?

Thanks, I'll change it for the next version.

Re: Alien Systems OXZ

Posted: Tue Dec 10, 2024 8:49 pm
by Cholmondely
May of the political systems have specific stations of their own (royal hunting lodges, SLAPUs, Imperial AstroFactories, etc).

What about the species? There is Wasps with its own station. And PAGroove's variants which you added to SFEP. But how about lobstoid stations?

And. Species has a list of allied OXPs towards the bottom of the page (ships and things...).

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 12:34 am
by Redspear
Cholmondely wrote: Tue Dec 10, 2024 8:49 pm
May of the political systems have specific stations of their own (royal hunting lodges, SLAPUs, Imperial AstroFactories, etc).

What about the species? There is Wasps with its own station. And PAGroove's variants which you added to SFEP. But how about lobstoid stations?

And. Species has a list of allied OXPs towards the bottom of the page (ships and things...).
Stop giving out spoilers :lol:

I'm on it, I'm on it. So much planned but logistics/permissions/coding to work out.

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 6:51 am
by Cholmondely
If stations are a possibility, then an obvious question is “do all species systems get them?”.

Eg.: If a system is insectoid and communist does it get both the generic insectoid (Wasps?) and the generic commie stations (astrogulag/CZGF/SLAPU)? Or just one set?

More generally, how do the commie insectoids think of themselves? Insects who happen to be commie - or commies who happen to be insects?




Or is “special station” presence in a system determined by wealth/TL? (As with all the other political systems stations bar possibly astrogulags)

Or by the politics of the system (eg. Only in Confederacies and better?)

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 8:32 am
by Wildeblood
Cholmondely wrote: Wed Dec 11, 2024 6:51 am
More generally, how do the commie insectoids think of themselves? Insects who happen to be commie - or commies who happen to be insects?
Commies are always commies first, comrade. Communist theory says that anyone who puts any other loyalty ahead of the communist party is "racist".

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 8:37 am
by Cholmondely
Wildeblood wrote: Wed Dec 11, 2024 8:32 am
Cholmondely wrote: Wed Dec 11, 2024 6:51 am
More generally, how do the commie insectoids think of themselves? Insects who happen to be commie - or commies who happen to be insects?
Commies are always commies first, comrade. Communist theory says that anyone who puts any other loyalty ahead of the communist party is "racist".
But what about insectoid theories/ideology?

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 10:29 am
by Wildeblood
Cholmondely wrote: Wed Dec 11, 2024 8:37 am
Wildeblood wrote: Wed Dec 11, 2024 8:32 am
Cholmondely wrote: Wed Dec 11, 2024 6:51 am
More generally, how do the commie insectoids think of themselves? Insects who happen to be commie - or commies who happen to be insects?
Commies are always commies first, comrade. Communist theory says that anyone who puts any other loyalty ahead of the communist party is "racist".
But what about insectoid theories/ideology?
Do insect(oid)s have theory-forming minds? Before speculating how closely analogous insectoid communism is to human theories of communism, we must first interrogate Oolite's theory of insectoid psychology.

Terrestrial insects have incredibly simple brains and behaviour, and it is possible to fully model insect behaviour algorithmically. Insects like ants, bees and termites are obviously communist, probably the only examples of true, uncorrupted communism. But are those simple creatures even conscious beings? Certainly, I don't think so, which is why I have no hesitation in visiting mass-murder upon them when I find ants in my kitchen; I pour boiling water onto them from my (wi-fi enabled, internet connected) kettle, flushing them down the sink; simultaneously burning, boiling and drowning them to death in what could reasonably be described as a sadistic orgy of anti-ant violence.

So insect communism is, to my mind, purely an emergent phenomenon. It has no motivation in the realm of theories. Given sufficient time to evolve could insects become technological, industrial, space-faring? All without evolving consciousness? Possibly.

So, that's my theory of insect psychology - they have none, beyond what could be described by behaviourism.

But, what is Oolite's theory of insectoid psychology? Are they like unto terrestrial insects, just bigger and with more advanced technology? Or does the descriptor "insectoid" imply merely, "has ten limbs, six legs, four wings"? Are we meant to think of them as human-like intelligences who just happen to inhabit insect-like bodies?

Re: Alien Systems OXZ

Posted: Wed Dec 11, 2024 10:41 am
by Redspear
[
Cholmondely wrote: Wed Dec 11, 2024 6:51 am
If... If... Or... or... Or... Or...
I have considered such things for some time, certainly with regards this oxp and don't want to reveal very much at present.

However, if a system is both insect inhabited and communist then I don't see why both couldn't be represented in some manner.

I'm not meddling with government types directly this time, just inhabitants.

Please PM me if you want to know more and don't care about spoilers. Hope that helps.