Page 71 of 71
Re: Random Hits OXP
Posted: Fri Aug 08, 2025 6:33 am
by phkb
Lone_Wolf wrote: ↑Thu Aug 07, 2025 10:23 pm
Manually editing that value to 98 made a fugitive sidewinder special appear in the station aegis.
Nothing indicated that this was my mark, but after killing it a message confirmed the mark had been killed.
Is this normal behavior and where would 71 have put it ?
Given 98 put the mark virtually at the station, 71 would probably put it around 2/3 to 3/4 on the WP <-> Main Station lane, which is different to the WP <-> Planet lane where most other things get spawned.
Re: Random Hits OXP
Posted: Fri Aug 08, 2025 3:09 pm
by LittleBear
When spawned by the mission script, the target's name is added to the displayname, so he should appear as "Sidewinder: Archdruid Smith" (or whatever) when targeted.
Re: Random Hits OXP
Posted: Fri Aug 08, 2025 10:25 pm
by Lone_Wolf
Jumped to tinlebi and back to anlama
targeted station buoy and flew towards it.
I did meet the sidewinder special: Bewitching bargain on that route (offender) .
It did turn hostile and sent a message with the name of the client .
I do have
 Randomshipnames OXP installed and this is listed below randomhits oxp in latest.log
Testing without that oxp now.
Added: after removal of Randomshipnames the sidewinder special is now id'ed as Sidewinder Special: Sheriff Smedley .
(the name of the mark)
So it seems randomnshipnames overrides the namechange by RH .
Re: Random Hits OXP
Posted: Sat Aug 09, 2025 9:16 am
by Lone_Wolf
In Scripts/oolite-random-hits-mark.js i found
Code: Select all
this.shipSpawned = function ()
{
//this.ship.name = "Random Hits Mark"; // name only visible in debugging logs.
if (!worldScripts.randomshipnames)
this.ship.displayName = this.ship.name + ": " + expandDescription("[random_hits_main_name]");
else
this.ship.displayName = missionVariables.random_hits_store_mark_ship_name;
// Show the Criminal's name on the ID Computer when targeted.
this.random_hits_whoshot = "NO_ATTACK"; // start with assuming its no-attack.
// this.ship.inspect(); // this line opens the target inspector on a mac with the debugConsole.oxp installed
this.hasExtraMissileLauncher = this.ship.scriptInfo.extraMissileLauncher;
if (this.hasExtraMissileLauncher === "no") this.hasExtraMissileLauncher = false; // test needed in case the code is in open-step plist
this.level = parseInt(this.ship.scriptInfo.markLevel); // the level of the mark.
this.ship.accuracy = this.level * ( 1 + 4 * missionVariables.random_hits_markposition / 100) - 6; // -4.6 till 7.8
delete this.shipSpawned;
}
from my savegame
Code: Select all
<key>mission_random_hits_store_mark_ship_name</key>
<string>Sidewinder Special: Bewitching Bargain</string>
Looks like the content of that missionvariable is wrong, which probably happens upon accepting the mission ?
Re: Random Hits OXP
Posted: Sat Aug 09, 2025 2:52 pm
by LittleBear
Random Hits checks to see if Random Ship names is installed. If it is then it will assign a name to the target's ship from Random Ships names. The target will be described by their ship name in the mission description eg: "flying a nearly new Sidewinder, the Bewitching Bargain" and they'll appear when targeted as "Sidewinder: Bewitching Bargain" allowing you to identify your target's ship. Using the Random Ship Names (if installed) pool of names is intended. If it is not installed then the target's ship isn't given an name when the mission is generated and his name is added instead. If you had RandomShipNames installed when the mission was first generated, then storing the name of his ship in the mission variable is intended behaviour.
Re: Random Hits OXP
Posted: Sat Aug 09, 2025 3:42 pm
by Lone_Wolf
I was thinking this could be intentional.
I don't remember if the ship name was in the mssion description, but it's not in the F5 - F5 screen.
There the person name of the mark is used, not the ship name.
copied from the savegame
Code: Select all
<key>Random_Hits</key>
<string>Execute Sheriff Smedley flying a structurally unsound Sidewinder Special at Anlama.</string>
Re: Random Hits OXP
Posted: Sun Aug 10, 2025 10:08 am
by Lone_Wolf
It seems the removal of randomshipnames , loading / saving , restoring randomshipnames solved the issue .
Rh mission 2 and 3 did show ther ship name in briefing and on F5-F5 screen.
The save I started with was a 10 year old one and i probably should have started it without any oxps to get it cleaned from obsolete stuff .