[RELEASE] Jaguar Company 2.5r29
Moderators: winston, another_commander
-
- Dangerous
- Posts: 106
- Joined: Fri Jan 31, 2014 1:08 am
Re: [RELEASE] Jaguar Company 2.4
How about getting invited to join Jaguar Company ...
Location - Galaxy 5 : Python Explorer : Elite
'Death by Wife is fast becoming a real world OXP mission'
'Death by Wife is fast becoming a real world OXP mission'
- Tricky
- ---- E L I T E ----
- Posts: 821
- Joined: Sun May 13, 2012 11:12 pm
- Location: Bradford, UK. (Anarchic)
Re: [RELEASE] Jaguar Company 2.4
Well... you kind of do get invited, just not told about it.Diogenese Senna wrote:How about getting invited to join Jaguar Company ...
(Just under 75 more updated threads to read now)
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: [RELEASE] Jaguar Company 2.5.29
Jaguar_Company_2.5.29.oxz is in the wiki from now due to Tricky's server is down.
Re: [RELEASE] Jaguar Company 2.5r29
Still no markets at JC bases (just to let you know)
Flying Python Class Cruiser, Chapter & Verse IV
Re: [RELEASE] Jaguar Company 2.5r29
If anyone is maintaining this, there are some updates needed for Oolite 1.82+.
Re: [RELEASE] Jaguar Company 2.5r29
I spent a time as a fugitive, reduced my bounty by helping police and finally paid a small fine to get back to clean.
Since I was in an Anarchy system, there was a Jaguar Company base and JC ships around, and while I was a fugitive they attacked me on sight... being a firm believer in the right for self-defense, I usually fought back.
Now, I'm clean, but JC ships still attack me on sight.... I looked into the code:
a) if the player hits a JC ship more than 5 times, even if it's attacking the player first, the player is flagged an attacker and the palyer ship's ID stored;
b) if the player helps JC enough times, the player ship ID is removed from the attackers list, but the attacker flag isn't reset;
c) the only way to reset the attacker flag is by jumping to a new galaxy.
Now (a) is not something I like, since it doesn't take into account who started the fight, but I can live with it, but not resetting the attacker flag in (b) seems like a bug to me
Since I was in an Anarchy system, there was a Jaguar Company base and JC ships around, and while I was a fugitive they attacked me on sight... being a firm believer in the right for self-defense, I usually fought back.
Now, I'm clean, but JC ships still attack me on sight.... I looked into the code:
a) if the player hits a JC ship more than 5 times, even if it's attacking the player first, the player is flagged an attacker and the palyer ship's ID stored;
b) if the player helps JC enough times, the player ship ID is removed from the attackers list, but the attacker flag isn't reset;
c) the only way to reset the attacker flag is by jumping to a new galaxy.
Now (a) is not something I like, since it doesn't take into account who started the fight, but I can live with it, but not resetting the attacker flag in (b) seems like a bug to me
Re: [RELEASE] Jaguar Company 2.5r29
I agree, (a) is intended behavior, (b) seems like a bug. Although, if you actually killed some JC ships, they might very well hold a grudge even if you stop attacking them and starting helping, I think they should stop attacking you at that point as long as your legal status is clean.
phkb and I are collaborating on an update for this OXP so we can look at this too. What I would do here is keep the attacker flag (so they remember their grudge, and limit how "friendly" they can become with you) but have them not attack you if your legal status is clean.
phkb and I are collaborating on an update for this OXP so we can look at this too. What I would do here is keep the attacker flag (so they remember their grudge, and limit how "friendly" they can become with you) but have them not attack you if your legal status is clean.
Re: [RELEASE] Jaguar Company 2.5r29
The attacker flag is important because we can't rely solely on the attacker list stored: it uses the ship's personality to identify the attacker, and the player can change that with Ship Respray, or the whole ship with HyperSpaceHangar.Milo wrote: ↑Fri Jul 10, 2020 2:30 pmI agree, (a) is intended behavior, (b) seems like a bug. Although, if you actually killed some JC ships, they might very well hold a grudge even if you stop attacking them and starting helping, I think they should stop attacking you at that point as long as your legal status is clean.
phkb and I are collaborating on an update for this OXP so we can look at this too. What I would do here is keep the attacker flag (so they remember their grudge, and limit how "friendly" they can become with you) but have them not attack you if your legal status is clean.
I don't know if checking for clean legal status would make any difference: I think JC ships would still attack the player on sight if the player is not clean, even if the attacker flag is reset.
This is my fix (untested):
Code: Select all
diff -Nuwr jaguarCompany-2.5.29/Scripts/jaguar_company.js jaguarCompany-2.5.30/Scripts/jaguar_company.js
--- jaguarCompany-2.5.29/Scripts/jaguar_company.js 2020-07-10 10:08:43.335754113 -0300
+++ jaguarCompany-2.5.30/Scripts/jaguar_company.js 2020-07-10 10:27:04.514610470 -0300
@@ -29,7 +29,7 @@
this.copyright = "© 2012-2013 Richard Thomas Harrison (Tricky)";
this.license = "CC BY-NC-SA 3.0";
this.description = "Script to initialise the Jaguar Company.";
- this.version = "2.5";
+ this.version = "2.5.30";
/* Private variables. */
var p_main = {},
@@ -375,6 +375,11 @@
missionVariables.jaguar_company = JSON.stringify(this.$playerVar);
}
+ if (this.$playerVar.attacker === true && this.$playerVar.reputation[galaxyNumber] >= this.$reputationHelper) {
+ // there was a bug in version <= 2.5.29 where the player ship was removed from the attackers list but the attacker flag wasn't cleared
+ this.$playerVar.attacker = false;
+ }
+
/* Setup the private main variable + some public variables. */
this.$setUp();
/* Remove join navy variable. */
diff -Nuwr jaguarCompany-2.5.29/Scripts/jaguar_company_ships.js jaguarCompany-2.5.30/Scripts/jaguar_company_ships.js
--- jaguarCompany-2.5.29/Scripts/jaguar_company_ships.js 2020-07-10 10:08:43.311754486 -0300
+++ jaguarCompany-2.5.30/Scripts/jaguar_company_ships.js 2020-07-10 10:16:41.256310021 -0300
@@ -1255,6 +1255,7 @@
if (p_ships.logging && p_ships.logExtra) {
logMsg += ", removing (player turned from the dark side)";
}
+ p_ships.mainScript.$playerVar.attacker = false;
/* Remove the player from the real attackers array. */
this.$removeAttacker(attackerKey);
Code: Select all
12:02:17.602 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (jaguar_company_patrol.js 1.10): TypeError: this.$friendList is undefined
12:02:17.602 [script.javaScript.exception.unexpectedType]: AddOns/jaguarCompany-2.5.30.oxz/Scripts/jaguar_company_ships.js, line 553.
Re: [RELEASE] Jaguar Company 2.5r29
I think the intended/desired behavior is to remember that the player was an attacker (keep the flag), but not attack when the player is clean. Your fix removes the flag, which I think is incorrect. To put it another way, JC shouldn't be attacking clean legal status even if attacker flag is true. Except, maybe, in interstellar space, where they might well decide to take revenge...
Re: [RELEASE] Jaguar Company 2.5r29
True, but what will you use the attacker flag for when the player is clean? If it doesn't change anything after the player is clean it should be reset...
Perhaps it could add to the reputation thresholds? Help threshold is 5 if not-attacker, 2*5 if attacker? And perhaps store the timestamp of last attack and clear the attacker flag after some time from the last attack and a certain reputation threshold being surpassed and bounty less than another threshold (low offender, bounty < 5?, or whatever the cops use)
Perhaps it could add to the reputation thresholds? Help threshold is 5 if not-attacker, 2*5 if attacker? And perhaps store the timestamp of last attack and clear the attacker flag after some time from the last attack and a certain reputation threshold being surpassed and bounty less than another threshold (low offender, bounty < 5?, or whatever the cops use)
Re: [RELEASE] Jaguar Company 2.5r29
I would use attacker to override the "don't attack if clean" rule when interstellar without witnesses (no non-JC/non-Thargoid ships). It represents some JC pilots holding a grudge and wanting revenge ... when they think they can get away with it. They might even shoot you along with the Thargoids! It already clears when you jump galaxy so I don't think it needs to expire otherwise. I would also change the condition to gain the attacker flag from 5 hits to actually killing a JC ship or a JC escape pod (including by collision). Hitting them only should subtract from your JC reputation.
After looking into the code, I am less convinced that the current behavior is a bug. It seems very deliberate. You are given warnings when shooting at JC ships, and you are designated as an attacker if you ignore the warnings and hit them repeatedly or if you kill one of them. Maybe the attacker status should be cleared if you gain enough reputation with them, but if you kill one, JC reputation should be set to -1000 so it's quite difficult to earn forgiveness. I don't think JC would care nearly as much about your current legal status as they do about your past interactions with them.
After looking into the code, I am less convinced that the current behavior is a bug. It seems very deliberate. You are given warnings when shooting at JC ships, and you are designated as an attacker if you ignore the warnings and hit them repeatedly or if you kill one of them. Maybe the attacker status should be cleared if you gain enough reputation with them, but if you kill one, JC reputation should be set to -1000 so it's quite difficult to earn forgiveness. I don't think JC would care nearly as much about your current legal status as they do about your past interactions with them.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: [RELEASE] Jaguar Company 2.5r29
Has this been updated to use GNN yet?
Or is it still on Snoopers (and, much more importantly, the wiki page is still accurate!)?
Or is it still on Snoopers (and, much more importantly, the wiki page is still accurate!)?
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?
•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?
- phkb
- 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: [RELEASE] Jaguar Company 2.5r29
I have a version that has been converted, but I have a bit more work to do on it to get it as up-to-date as I'd like.
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: [RELEASE] Jaguar Company 2.5r29
Got these error messages when I ran it:
Code: Select all
10:53:14.281 [oxp-standards.deprecated] OOStandardsInternal (OODebugStandards.m:92): Old style sub-entity declarations are deprecated in jaguar_company_template
10:53:14.281 [oxp-standards.deprecated] OOStandardsInternal (OODebugStandards.m:92): Old style sub-entity declarations are deprecated in jaguar_company_template
10:53:14.281 [oxp-standards.deprecated] OOStandardsInternal (OODebugStandards.m:92): Old style sub-entity declarations are deprecated in jaguar_company_template
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?
•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?
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: [RELEASE] Jaguar Company 2.5r29
Any chance of seeing the updated script for GNN?
I can then post it on the wiki as an example of how to update Snoopers to GNN.
jaguar_company.js (lines 2847 - 2923 at the end of the file)
Code: Select all
/* NAME
* $sendNewsToSnoopers
*
* FUNCTION
* Send news to Snoopers (if available).
*
* INPUTS
* message - news to show
* agency - agency to use (optional)
*/
this.$sendNewsToSnoopers = function (message, agency) {
var news = {},
result,
index;
if (!worldScripts.snoopers) {
/* Snoopers not installed. */
return;
}
if (!agency || typeof agency !== "number") {
/* Random agency. [1, 2 or 3] */
agency = Math.floor(Math.random() * 3.0) + 1;
}
news.ID = this.name;
news.Message = message;
news.Agency = agency;
result = worldScripts.snoopers.insertNews(news);
index = result + 5;
if (result < 0) {
/* Save for later. Snoopers only allows one news item at a time. */
this.$playerVar.newsForSnoopers.push(news);
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::Saving news for later.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result >= -5 ? ") " + p_const.snoopersErrorCodes[index] : ""));
}
} else if (result > 0) {
/* Problem. */
log(this.name, "$sendNewsToSnoopers::Problem with news.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + (result <= 30 ? ") " + p_const.snoopersErrorCodes[index] : ""));
} else {
/* News inserted. */
if (this.$logging && this.$logExtra) {
log(this.name, "$sendNewsToSnoopers::News inserted.\n" +
"* ID: '" + this.name + "'\n" +
"* Message: '" + message + "'\n" +
"* Agency: " + agency + "\n" +
"* result: " + result + ") " + p_const.snoopersErrorCodes[index]);
}
}
};
/* NAME
* newsDisplayed
*
* FUNCTION
* Called by Snoopers when the news item has been displayed.
* Check for any more news available and send it.
*/
this.newsDisplayed = function () {
var news = this.$playerVar.newsForSnoopers.shift();
if (news) {
/* More news available. Send it to Snoopers. */
this.$sendNewsToSnoopers(news.Message, news.Agency);
}
};
}.bind(this)());
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?
•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?