[WIP] Bounty system OXP

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: [WIP] Bounty system OXP

Post by phkb »

Bug fix version 0.4.2 now available.
  • When a scanned ship goes through a wormhole and has their bounty reset, you can now rescan the ship in the destination system to re-reveal their bounty.
  • Corrected misspelled variable "galaxyNumber". (Thanks, Rustem!)
  • General source code spelling corrections.
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: [WIP] Bounty system OXP

Post by Nite Owl »

As a matter of curiosity you have a bit of code in bountysystem_scanner.js that automatically switches from M.F.D. Mode to Console Mode if no M.F.D. slot is available. As follows:

Code: Select all

// automatically switch to Non-MFD mode if there are no available slots
	if (s._outputMode === 0 && s.$isMFDSlotAvailable() === false) s._outputMode = 1;
There is no code to do the opposite. That is automatically switch from Console Mode to M.F.D. Mode if an M.F.D. slot is available. As follows:

Code: Select all

// TWEAK: automatically switch to MFD mode if there is an available slot
	if (s._outputMode === 1 && s.$isMFDSlotAvailable() === true) s._outputMode = 0;
Without the Tweaked code a player has to prime the scanner and then manually switch to M.F.D. Mode in order for that mode to be active. This Tweak prevents players from having to run through the long list of primable equipment to set the scanner back to an available M.F.D. slot. Understood that not everyone will have an M.F.D. slot available. However, using your excellent Station Dock Control OXZ one slot will usually free up once a player leaves the immediate area of a station since the M.F.D. from Station Dock Control is only active within the immediate area of the station.

P.S.
An easy Tweak for a JavaScript novice like me as all it entailed was reversing the variables from your original code.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
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: [WIP] Bounty system OXP

Post by phkb »

Thanks, Nite Owl. I'll look to include your tweak in the next release.
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Sun Feb 24, 2013 11:52 am

Re: [WIP] Bounty system OXP

Post by Bogatyr »

What exactly are the conditions that determine "destroying another ship" as a crime? So destroying a fugitive makes you a fugitive? Only if a cop sees? Etc.... (the wiki does not make this clear).

Do you need to scan a target first in order to get the bounty after killing the ship?

It would make sense that all bounty-carrying ships would have revealed bounties if within range of any station, like for example the criminal vs. hunter furballs (that are quite fun) that arise around RandomHits space bars. It would be less fun if one had to scan all those ships first before collecting the bounties in situations like that.

It doesn't make sense that scanning a cop would be considered a hostile act. The bounty system is legal. Who knows, maybe the cop is a renegade? After all, scanning for a bounty is harmless, "if you have nothing to hide."

To be consistent, shouldn't all ships be marked only as "tentatively clean" until scanned? After all, you have no idea if a ship is an offender or a fugitive unless you've performed the scan.
User avatar
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 556
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: [WIP] Bounty system OXP

Post by Nite Owl »

Bogatyr:

Starting from the bottom of your post and working our way up.
To be consistent, shouldn't all ships be marked only as "tentatively clean" until scanned? After all, you have no idea if a ship is an offender or a fugitive unless you've performed the scan.
Use the POLICE IFF SCANNER UPGRADE to determine who is an offender/fugitive and who is not.
It doesn't make sense that scanning a cop would be considered a hostile act. The bounty system is legal. Who knows, maybe the cop is a renegade? After all, scanning for a bounty is harmless, "if you have nothing to hide."
There is a setting in the scanner from this OXZ that allows the scanner to only scan ships with offender/fugitive status. This setting can be set via primable equipment, code tweak, or LIBRARY.
Do you need to scan a target first in order to get the bounty after killing the ship? It would make sense that all bounty-carrying ships would have revealed bounties if within range of any station, like for example the criminal vs. hunter furballs (that are quite fun) that arise around RandomHits space bars. It would be less fun if one had to scan all those ships first before collecting the bounties in situations like that.
The bounties revealed by the scanner from this OXZ are ADDITIONAL bounties. The standard bounties will apply even if a ship is not scanned. To reveal these standard bounties you need the BOUNTY INFORMER.
What exactly are the conditions that determine "destroying another ship" as a crime? So destroying a fugitive makes you a fugitive? Only if a cop sees? Etc.... (the wiki does not make this clear).
Killing an innocent (non offender/fugitive) in front of surviving witnesses (Vipers or other innocents) will generally lead to a bounty being placed on you. This is not a steadfast rule. Have run into situations where firing first on an offender/fugitive in front of Vipers has lead to those Vipers then attacking me. The BROADCASTCOMMS MFD has a semi solution for this. It allows you to "taunt" a target which may prompt them into firing at you first. This does not always work but is worth the attempt.

Hope this helps. Fly Safe and Dock Straight.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
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: [WIP] Bounty system OXP

Post by phkb »

Bogatyr wrote:
To be consistent, shouldn't all ships be marked only as "tentatively clean" until scanned? After all, you have no idea if a ship is an offender or a fugitive unless you've performed the scan.
Just to expand on Nite Owl's answer, the Bounty System is trying to augment the default game behaviour. In the standard game, some ships will appear as Offender or Fugitive. That hasn't changed with the Bounty System OXP. However, from the OXP's point of view, these bounties are considered "system-level" bounties, ie. the bounty that ship has accumulated in that system only, which is automatically applied whenever they jump into that system. This is the same for the player. But there could be bounties in other systems, and this is where the Warrant Scanner is used to show those bounties locally.
Bogatyr wrote:
Do you need to scan a target first in order to get the bounty after killing the ship?
Yes. If you don't scan them, all you receive is whatever the visible bounty of the ship is.
Bogatyr wrote:
It doesn't make sense that scanning a cop would be considered a hostile act.
Police vessels should ignore any scans made on their ships, as they are never given a hidden bounty and thus have nothing to hide. I haven't explored the option of having corrupt police - I think other gameplay elements need to be added in order for this to make sense in-game (eg having systems declare independence from GalCop, going "rogue", having pirates take over a station, etc).
Bogatyr
---- E L I T E ----
---- E L I T E ----
Posts: 281
Joined: Sun Feb 24, 2013 11:52 am

Re: [WIP] Bounty system OXP

Post by Bogatyr »

Thanks, guys, for the answers! That clarifies matters a lot. I'm usually hesitant to change fundamental game play mechanics (I really love vanilla elite/oolite for the infinite player flexibility) but this system does sound very interesting and like a great addition to the game. I'm going to try it out!
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] Bounty system OXP

Post by Milo »

In my ongoing quest to reduce the need for primeable equipment, I have a suggested addition to bountysystem_scanner.js at line 201 (in the shipTargetAcquired callback just after the !ts check):

Code: Select all

	if (!player.ship.weaponsOnline && !target.hasHostileTarget && target.alertCondition !== 3) return; // don't auto-scan when weapons are offline, unless target won't react (has a hostile target or is in red alert)
The conditions used here are based on the check in $npcReaction later in the script.

The intention is to provide another form of control for players who don't want to attract hostile attention by scanning too freely, without requiring a manual trigger. Just disable your weapons before targeting a ship if you don't want to scan them (once you've targeted them, you can turn your weapons back on). If they are busy fighting or in red alert, however, you can still get away with it. Also, even if you accidentally targeted a ship you didn't want to scan, as long as you untarget them in less than 2 seconds you can avoid provoking them (based on the existing code in $scanProcess).

With this tweak, the auto scan options that already are available through Library configuration become more attractive. Along with this, I would like the primeable equipment to be replaced by a passive version when either of the auto-scan modes is configured.

To go with this, here is a revision of the scanner description in equipment.plist:
Police version of the warrant scanner that automatically scans a targeted ship (only offenders or worse, by default) for bounties outstanding in other systems and sectors. Runs a little faster, and at greater range. Must be within 20kms of target to use, and use will generally be viewed as a hostile act. Non-combatant targets will not be scanned automatically when your ship's weapons are turned off.
Adjust slightly for the non-police version.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] Bounty system OXP

Post by Milo »

When viewing F5 during flight, I got the following exception in the log:
Exception: TypeError: rt2 is null
Active script: BountySystem_MostWanted 0.14
bountysystem_mostwanted.js, line 2980:
var arr = dta.departureTime + (rt2.time * 3600);
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: [WIP] Bounty system OXP

Post by phkb »

Thanks for that. I’ll add the fix to the release I’ve got in the works.
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: [WIP] Bounty system OXP

Post by phkb »

New versions of Bounty System and GalCop's Most Wanted have just been released, which address the issues/feature requests noted above.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] Bounty system OXP

Post by Milo »

Thanks for the new passive mode feature. The passive equipment still says "primable" in its equipment.plist description, which I think is not displayed in-game outside F3 purchase so not an issue now but maybe in the future it will be possible to view descriptions of all your installed equipment (I was just thinking the other day about making a station interface to display this info).

For compatibility, it might be a good idea to rename the _scanRange and _scanTime properties added to player.ship.script to use a unique prefix (e.g., _bountysystem_scanTime) as they are fairly generic (at least scanRange is, since every ship has a scanner [the radar type, not the bounty type]).
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: [WIP] Bounty system OXP

Post by Milo »

I have a damaged passive warrant scanner and the option to repair it does not appear in F3 although the tech level is sufficient. Changing the conditions script like this allowed me to repair it:
this.allowAwardEquipment = function(equipment, ship, context) {
if (context === "scripted") return true;
var p = player.ship;
switch (equipment) {
case "EQ_WARRANT_SCANNER":
if (p.equipmentStatus("EQ_WARRANT_SCANNER_PASSIVE") != "EQUIPMENT_UNAVAILABLE") return false;
break;
case "EQ_WARRANT_SCANNER_PASSIVE":
if (ship.equipmentStatus(equipment) === "EQUIPMENT_DAMAGED") return true;
return false;

}
return true;
}
Before repairing, I attempted to reconfigure it (in Library) from mode 1 to mode 0, and got the following error:
Exception: ReferenceError: egsts is not defined
Active script: Lib_Config 1.7.1
bountysystem_core.js, line 3004:
if (eqsts == "EQUIPMENT_OK" || egsts == "EQUIPMENT_DAMAGED") {
I manage to hit all the bugs, it seems.
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: [WIP] Bounty system OXP

Post by phkb »

Milo wrote: Mon Jun 29, 2020 12:33 am
I manage to hit all the bugs, it seems.
Well, from my point of view, this is excellent feedback! I apologise for the current frequency at which you've been uncovering them, but I'm very glad you are, and are being so diligent in reporting everything I need to get things patched.
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: [WIP] Bounty system OXP

Post by phkb »

Bugs fixed in v0.6.
Post Reply