Communications Pack A

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Communications Pack A

Post by phkb »

hiran wrote: Sun Mar 10, 2024 4:25 pm
So the problem is not with the expansions themselves, it is with either the hosting site or the connectivity between Github and that hosting site.
Agreed. What can be done to debug the GitHub connectivity? Are there default timeout settings that can be extended, for instance.
User avatar
hiran
Theorethicist
Posts: 2403
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Communications Pack A

Post by hiran »

phkb wrote: Sun Mar 10, 2024 10:37 pm
hiran wrote: Sun Mar 10, 2024 4:25 pm
So the problem is not with the expansions themselves, it is with either the hosting site or the connectivity between Github and that hosting site.
Agreed. What can be done to debug the GitHub connectivity? Are there default timeout settings that can be extended, for instance.
Not sure here When the job runs we get some server from a big pool of servers and have no control. On top we have no control on the network between that pool and the hosting site. Even if we find out we would not be in a position to change it.

And I would prefer not to involve Github as that job is not about building software but indexing all expansions. It might be beyond their free plan.

So far I am more surprised since that problem did not exist in the beginning. But when checking in a browser the download works so something is strange.

I can check what timeout is in use. Maybe a small modification here is sufficient.
Sunshine - Moonlight - Good Times - Oolite
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Communications Pack A

Post by phkb »

The easiest solution may be to move the mods to the wiki like the majority of the others.
Zafrusteria
Above Average
Above Average
Posts: 18
Joined: Sat Jul 22, 2017 8:08 am

Re: Communications Pack A

Post by Zafrusteria »

Hi

I'm having a problem understanding how to get this setup for the PriorityAI.

Code: Select all

 oolite_entityClass = ship.shipClassName
 oolite_entityName = ship.shipUniqueName
I would like to be able to reference some of the comms messages in my own OXP but keep seeing that [oolite_entityName] is not being expanded for the player.

Any examples would be useful.

This is when running oolite 1.90 on Ubuntu Linux. I'm not sure what else you need to help with this.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Communications Pack A

Post by phkb »

Zafrusteria wrote: Thu Apr 18, 2024 8:57 am
would like to be able to reference some of the comms messages in my own OXP but keep seeing that [oolite_entityName] is not being expanded for the player.
Comms Pack A is about NPC comms, not player comms. You can work around it, but you'll have to manually do the expansions in your "expandDescriptions" call, by passing a dictionary with all the relevant expansions, like this:

Code: Select all

var msg = expandDescription("[commsPackA_defenseship_killedTarget]", {"oolite_entityName":player.ship.target.displayName, "oolite_entityClass":player.ship.target.shipClassName});
Zafrusteria
Above Average
Above Average
Posts: 18
Joined: Sat Jul 22, 2017 8:08 am

Re: Communications Pack A

Post by Zafrusteria »

phkb wrote: Thu Apr 18, 2024 11:56 am
Comms Pack A is about NPC comms, not player comms. You can work around it, but you'll have to manually do the expansions in your "expandDescriptions" call, by passing a dictionary with all the relevant expansions, like this:

Code: Select all

var msg = expandDescription("[commsPackA_defenseship_killedTarget]", {"oolite_entityName":player.ship.target.displayName, "oolite_entityClass":player.ship.target.shipClassName});
Ah, When I said "expanded for the player", I meant that the player would see it, not that it referenced or was about the player's ship in any way. :)
The ship that I am generating the comms message for will always be an NPC.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Communications Pack A

Post by phkb »

Zafrusteria wrote: Thu Apr 18, 2024 12:24 pm
The ship that I am generating the comms message for will always be an NPC.
Ah, got it. What role(s) does your NPC have? And are they using the Priority AI system?
User avatar
Cholmondely
Archivist
Archivist
Posts: 5364
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Communications Pack A

Post by Cholmondely »

Zafrusteria wrote: Thu Apr 18, 2024 12:24 pm
The ship that I am generating the comms message for will always be an NPC.
As far as I understand it, there are 4 OXPs.

*Communications Pack A creates NPC "personalities" with a range of messages for each
*Death Comms does the same - but only for death cries
*Communications MFD allows the player to look at old communications
*Broadcast Communications MFD allows the player to interract with NPCs. The players conversation choice will initiate a response (verbal or otherwise) from the NPC - in effect "adding" to the NPC's AI

The whole thing seems to have been Murgh's fault. He crafted some OXPs back around 2006 where the ships had "personalities" and appropriate communications to drive this home (cheeky Boyracers, desperate Refugee Adders, villainous Hotrods, etc.).


Reference: https://wiki.alioth.net/index.php/Communication
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Zafrusteria
Above Average
Above Average
Posts: 18
Joined: Sat Jul 22, 2017 8:08 am

Re: Communications Pack A

Post by Zafrusteria »

phkb wrote: Thu Apr 18, 2024 12:36 pm
Zafrusteria wrote: Thu Apr 18, 2024 12:24 pm
The ship that I am generating the comms message for will always be an NPC.
Ah, got it. What role(s) does your NPC have? And are they using the Priority AI system?
Yes they use the priority AI system.

From the AI priority js script

Code: Select all

    ai.setCommunicationsRole("sr_extremist");
    ai.setCommunicationsPersonality("ShrewsRights_extremist");
From the shipdata.plist

Code: Select all

        roles = "sr_extremist";
The ships themselves are all copies of t=from the vanilla game, for example

Code: Select all

        like_ship           = "oolite_template_moray";
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Communications Pack A

Post by phkb »

My understanding of this system is limited (I haven't played with it very much), but I think what you need to do is this:
Based on your role and personality, you would need to decide which comms events you want to cover. For instance, in Comms Pack A, for a "hunter"/"vigilante", the following comm events are covered:

Code: Select all

					  "attackLowEnergy",
					  "beginningAttack",
					  "beginningAttackThargoid",
					  "beginningFight",
					  "continuingAttack",
					  "continuingAttackThargoid",
					  "distressResponseAggressor",
					  "distressResponseSender",
					  "engageWitchspaceDriveFlee",
					  "engageWitchspaceDriveGroup",
					  "friendlyFire",
					  "groupIsOutnumbered",
					  "incomingMissile",
					  "killedTarget",
					  "quiriumCascade",
					  "selectedStation",
					  "startFleeing",
					  "surrender",
					  "thanksForHelp",
					  "thargoidAttack",
					  "waypointReached"
If we assume those are the events you want to have unique comms for, in a "startUp" function somewhere, you'd do something similar to comms pack A (and I'm going to assume you want to leverage some of the Comms Pack A data here):

Code: Select all

this.startUp = function() {
	var comms = {
		sr_extremist: {
			commsPackA_ShrewsRights_extremist: this._makeComms("ShrewsRights_extremist",
				  [
					  "attackLowEnergy",
					  "beginningAttack",
					  "beginningAttackThargoid",
					  "beginningFight",
					  "continuingAttack",
					  "continuingAttackThargoid",
					  "distressResponseAggressor",
					  "distressResponseSender",
					  "engageWitchspaceDriveFlee",
					  "engageWitchspaceDriveGroup",
					  "friendlyFire",
					  "groupIsOutnumbered",
					  "incomingMissile",
					  "killedTarget",
					  "quiriumCascade",
					  "selectedStation",
					  "startFleeing",
					  "surrender",
					  "thanksForHelp",
					  "thargoidAttack",
					  "waypointReached"
				  ]),
		},
	};
	worldScripts["oolite-libPriorityAI"]._setCommunications(comms);
}

this._makeComms = function(specific, entries)
{
	var result = {};
	for (var i=entries.length-1;i>=0;i--)
	{
		var entry = entries[i];
		result["oolite_"+entry] = "["+this.$commsPrefix+"_"+specific+"_"+entry+"]";
	}
	return result;
}
Then, in descriptions.plist, your descriptions would look like this (note: I've left the original comms in place, but obviously this is where you'd replace the text with your own, suited to the personality):

Code: Select all

{
	"commsPackA_ShrewsRights_extremist_attackLowEnergy" = ("You may kill me, but you won't escape justice forever!","This criminal in a [oolite_entityClass] is getting the better of me…","[commsPackA_generic_attackLowEnergy]","[commsPackA_generic_attackLowEnergy]","[commsPackA_generic_attackLowEnergy]");

	"commsPackA_ShrewsRights_extremist_beginningAttack" = ("Die, criminal!","Your [oolite_entityClass] won't save you now…","This is for the [nom1].","For %H!","[commsPackA_generic_beginningAttack]","[commsPackA_generic_beginningAttack]");

	"commsPackA_ShrewsRights_extremist_beginningAttackThargoid" = ("For the Cooperative!","Die, Thargoid!","You'll never take %H, Thargoid!","We'll blast you back into witchspace!","[commsPackA_generic_beginningAttackThargoid]");

	"commsPackA_ShrewsRights_extremist_beginningFight" = ("Your crimes end here!","Death to pirates!","It's the [oolite_entityName]. Open fire!","You'll pay for your crimes, [oolite_entityCrew]!","It's time to clean up %H…","Confirmed on the [oolite_entityClass]; wanted dead or alive in [commsPackA_number] systems…","Pick your targets and break to attack!","Offender targets acquired…");

	"commsPackA_ShrewsRights_extremist_continuingAttack" = ("No quarter for pirates!","%H will be safer when you're dead!","[commsPackA_generic_continuingAttack]","[commsPackA_generic_continuingAttack]","[commsPackA_generic_continuingAttack]");

	"commsPackA_ShrewsRights_extremist_continuingAttackThargoid" = ("Get back into witchspace!","You'll never take %H!","Die, Thargoid!","We'll make you feel fear again!");

	"commsPackA_ShrewsRights_extremist_distressResponseAggressor" = ("Pick on someone your own size, [oolite_entityName]!","Cease your attacks or be destroyed!","We've got a live one! Locking on the [oolite_entityClass] now!","Hit those raiders before they do any more damage!","Back off, [oolite_entityClass]. You've just become outnumbered…");

	"commsPackA_ShrewsRights_extremist_distressResponseSender" = ("Hang on, [oolite_entityName]. Help is on the way…","We'll have your attackers on scanners in just a few seconds, [oolite_entityName]…","Distress call acknowledged, [oolite_entityClass]. We're moving to assist…","Protect the [oolite_entityName] while it gets clear.","I can't see the pirates yet, but they'll be close. Arm all weapons.");

	"commsPackA_ShrewsRights_extremist_engageWitchspaceDriveFlee" = ("There's too many of them! Retreat and regroup!","We'll be back for you, pirate!","I'm taking too much fire to carry on. See you back at the station…","We can't fight this many. Follow me out of here!","Charging drive now! Keep dodging just a little longer…");

	"commsPackA_ShrewsRights_extremist_engageWitchspaceDriveGroup" = ("All fighters, form up for witchspace jump.","Preparing for witchspace entry. Be ready for a hostile reception.","Drive powering up now. Follow in pattern [commsPackA_codename].","Let's get those criminals for %H!","Spotters say the pirates have just made their jump. Prepare to follow now.");
	
	"commsPackA_ShrewsRights_extremist_friendlyFire" = ("[commsPackA_generic_friendlyFire]","[commsPackA_generic_friendlyFire]","[commsPackA_generic_friendlyFire]","[commsPackA_generic_friendlyFire]","Check your IFF, [oolite_entityCrew]!","Do I look like an Offender to you?");

	"commsPackA_ShrewsRights_extremist_groupIsOutnumbered" = ("They've got us outnumbered. Retreat and regroup!","Fall back to the station! We can't take on this many!","Break off the attack!","It's a trap! They're too well armed for simple pirates…","Regroup at rendezvous [commsPackA_codename].","Fall back!");
	
	"commsPackA_ShrewsRights_extremist_incomingMissile" = ("[commsPackA_generic_incomingMissile]");

	"commsPackA_ShrewsRights_extremist_killedTarget" = ("One fewer pirate in %H!","That was for the [nom1]…","Target [commsPackA_codename] [commsPackA_number] is down…","I got the [oolite_entityClass]…","Pirate down! Who's next?","[oolite_entityName] destroyed…","Another one down!");

	"commsPackA_ShrewsRights_extremist_quiriumCascade" = ("[commsPackA_generic_quiriumCascade]","[commsPackA_generic_quiriumCascade]","[commsPackA_generic_quiriumCascade]","A Q-mine? What are you thinking?!");

	"commsPackA_ShrewsRights_extremist_selectedStation" = ("Setting course for the [oolite_entityName].","Time to head home…","That's enough for one patrol. Return to base.","We've done what we can for now. Head for the [oolite_entityName] to re-arm.","Time to head home. All ships, form up.","Last leg now. We'll clear up anything between here and the [oolite_entityName] and then call it a day.");
}
I think that's the minimum you'd have to do in order to (a) make the priority AI recognise your role and personality, and (b) leverage Comms Pack A for the generic responses and such. I haven't tested this, but I *think* it should work. Maybe. YMMV!
Post Reply