Page 1 of 1
Thargoid robot related q's
Posted: Sat Dec 10, 2022 1:20 pm
by cbr
1]
When a thargoid mothership is destroyed, the robot fighters power down.
When a new mothership arrives should they revive?
2]
When a thargoid mothership is destroyed, the robot fighters power down, they clutter the area,
is there some cleanup oxp which tows/hauls them ( back to the station within certain radius )?
Re: Thargoid robot related q's
Posted: Sat Dec 10, 2022 1:28 pm
by Cody
cbr wrote: ↑Sat Dec 10, 2022 1:20 pm
When a new mothership arrives should they revive?
They should revive, but whether they do is another matter.
Re: Thargoid robot related q's
Posted: Sun Dec 11, 2022 10:48 am
by Cholmondely
cbr wrote: ↑Sat Dec 10, 2022 1:20 pm
2]
When a thargoid mothership is destroyed, the robot fighters power down, they clutter the area,
is there some cleanup oxp which tows/hauls them ( back to the station within certain radius )?
Not that I've come across - but my feeble combat skills mean that I've not played with the various Thargoid-adding oxp's. There
is a "Navy Thargon Collector" tucked away inside the Behemoth.oxp - but I'm not sure that it actually does anything.... and when I see a battle involving Behemoths and Thargoids, I usually scarper and don't watch what goes on too closely.
Edited to add picture
Re: Thargoid robot related q's
Posted: Mon Jan 16, 2023 9:32 am
by Cholmondely
Another thought - other commodities (because disabled Thargons are now a commodity, no?) are sometimes scooped by NPC's, and sometimes just disappear after a certain amount of time. Are Thargons really treated that differently in-game? Admittedly, the variety of NPC's present after a battle royal with the bugs is likely to differ from those I see outside a regular orbital scooping the debris of "accidents", but still...
By the way, peering into the murky entrails of Behemoth:
Spara's ncc_collector.js is this:
Code: Select all
"use strict";
this.name = "ncc_thargon_collector";
this.author = "spara";
this.copyright = "2013 Mika Spåra";
this.description = "ship script for thargon collector";
this.licence = "CC BY-NC-SA 3.0";
this.version = "1.0";
this.shipSpawned = function () {
this.$mother = system.shipsWithRole("behemoth", ship)[0];
ship.primaryRole = "defense_ship";
};
this.shipScoopedOther = function() {
if (!this.$mother || ship.position.distanceTo(this.$mother) > 25600)
ship.AIState = "DOCK_WITH_STATION";
}
But his ncc_carrier.js has this:
Code: Select all
"use strict";
this.name = "ncc_carrier";
this.author = "spara";
this.copyright = "2014 Mika Spåra, Eric Walch";
this.description = "ship script for navy class carrier";
this.licence = "CC BY-NC-SA 3.0";
this.shipSpawned = function () {
this.ship.displayName = this.ship.name + ": " + this.ship.scriptInfo.name;
this.$scanTimer = new Timer(this, this.$scanForThargons, 0, 10);
}
this.$collectors = 3;
this.$scanForThargons = function () {
function $isDeadThargon(entity)
{
if (entity.hasRole && (entity.hasRole("tharglet") || entity.hasRole("thargon")) && entity.isCargo) {
return true;
}
return false;
};
if (this.$collectors > 0) {
if (ship.AI === "nccCarrierInterceptAI.plist" && ship.AIState !== "ATTACK_SHIP") {
if (system.filteredEntities(this, $isDeadThargon, ship, 25600).length > 0) {
ship.launchShipWithRole("ncc-thargon-collector");
this.$collectors--;
}
}
}
};
this.otherShipDocked = function(whom)
{
if (whom.hasRole("ncc-thargon-collector")) this.$collectors++;
}
//the rest is from behemoth-carrier.js script from behemoth oxp.
this.shipTargetCloaked = function ()
{
this.cloakedTarget = this.ship.target;
if(this.cloakingTimer) this.cloakingTimer.start()
else this.cloakingTimer = new Timer(this, this.statusCheck, 1, 1);
};
this.statusCheck = function ()
{
if (!this.ship || !this.ship.isValid) this.cloakingTimer.stop();
if (this.cloakedTarget)
{
if (this.cloakedTarget.isCloaked) return;
else
{
this.ship.target = this.cloakedTarget;
this.ship.reactToAIMessage("TARGET_DECLOAKED");
}
}
if (this.cloakingTimer)
{
this.cloakingTimer.stop();
delete this.cloakingTimer;
}
};
this.playerWillEnterWitchspace = this.shipDied = function ()
{
if (this.cloakingTimer) {this.cloakingTimer.stop(); delete this.cloakingTimer}
};
this.shipBeingAttackedByCloaked = function ()
{
function isCloaked(entity) {
return (entity.isShip && entity.isCloaked);
};
if (!this.cloakedTarget) {
this.cloakedTarget = system.filteredEntities(this, isCloaked, this.ship)[0];
};
if (this.cloakedTarget && this.cloakedTarget.isCloaked)
{
if (this.cloakingTimer) this.cloakingTimer.start()
else this.cloakingTimer = new Timer(this, this.statusCheck, 1, 1);
};
};
this.shipBeingAttacked = this.offenceCommittedNearby = function (who)
{
if (this.ship.target && this.ship.target != who && (who.bounty * who.maxEnergy > this.ship.target.bounty * this.ship.target.maxEnergy || who.isPlayer) && who.scanClass !== "CLASS_POLICE")
{
this.ship.reactToAIMessage("SWITCH_TARGET");
this.ship.target = who;
}
};
It appears to this dumb pilot that there is scooping-related code in the carrier .js file, but
not in the collector .js file.
Re: Thargoid robot related q's
Posted: Fri Jan 27, 2023 10:28 pm
by hiran
Cholmondely wrote: ↑Mon Jan 16, 2023 9:32 am
It appears to this dumb pilot that there is scooping-related code in the carrier .js file, but not in the collector .js file.
It seems you are beginning to see the matrix and start understanding. Truely impressive! Not long until you can tweak it to your needs...
Re: Thargoid robot related q's
Posted: Sun Jan 29, 2023 10:39 am
by Cholmondely
hiran wrote: ↑Fri Jan 27, 2023 10:28 pm
Cholmondely wrote: ↑Mon Jan 16, 2023 9:32 am
It appears to this dumb pilot that there is scooping-related code in the carrier .js file, but not in the collector .js file.
It seems you are beginning to see the matrix and start understanding. Truly impressive! Not long until you can tweak it to your needs...
My dear Hiran, every attempt at tweaking so far has ended in dismal failure - unless somebody like NiteOwl comes galloping to my rescue. I currently understand too little - and make too many mistakes.
I've been trying to put some of the fiction in the form of books for the ship's library, but there is a lot of text and I've obviously included too many mistakes. I've been having major problems finding software
which points out the mistakes in my code. The only thing which works (just on .plists, and just on shorter files) is the AppleMac's own "plutil" command on its Terminal programme. I have gotten nowhere with SubEthaEdit & Visual Studio Code.
Re: Thargoid robot related q's
Posted: Sun Jan 29, 2023 7:47 pm
by hiran
Cholmondely wrote: ↑Sun Jan 29, 2023 10:39 am
My dear Hiran, every attempt at tweaking so far has ended in dismal failure - unless somebody like NiteOwl comes galloping to my rescue. I currently understand too little - and make too many mistakes.
That is perfectly ok. Nobody became a master of anything without trying (and erroring). You are trying, that is important.
Cholmondely wrote: ↑Sun Jan 29, 2023 10:39 am
I've been trying to put some of the fiction in the form of books for the ship's library, but there is a lot of text and I've obviously included too many mistakes. I've been having major problems finding software which points out the mistakes in my code. The only thing which works (just on .plists, and just on shorter files) is the AppleMac's own "plutil" command on its Terminal programme. I have gotten nowhere with SubEthaEdit & Visual Studio Code.
It seems what could help you is a tool that would read your plist file and tell you about problems. I am not sure how plutil works in detail, but basically what you need is a kind of
linter. This could be built from scratch - I tried it until I stumbled over ready-made libraries to do the job. Here are some resources that might help:
-
https://stackoverflow.com/questions/877 ... rom-plutil
-
https://docs.python.org/3/library/plistlib.html
-
https://github.com/takahashi-akari/apple-plist-parser
-
https://github.com/baleyko/plistlint
The most impressive (that I could not test myself) seems this one, and I hope I am not suggesting payware:
https://getpenguin.app/
Edit: looking at my post again it seems odd to just point you to tools and let you sort it out yourself.
Maybe we can create something together that helps you in the long run?
Re: Thargoid robot related q's
Posted: Mon Jan 30, 2023 8:21 pm
by Cholmondely
hiran wrote: ↑Sun Jan 29, 2023 7:47 pm
Maybe we can create something together...
Thou hast been 'pm'-ed!