Page 25 of 70

Posted: Sun Jun 28, 2009 8:34 pm
by Nemoricus
Is mine in there too, or will I have to find out when you make your next release?

Posted: Sun Jul 12, 2009 1:01 pm
by Capt. Slog
I may have found a bug in the latest version running on 1.72.
After searching in vain for the mark and docking at least once, I hyperspaced to reset the mark's position. During the hyperspace countdown to return I received a message to say I had killed the mark but would be fined for ungentlemanly conduct. I cancelled the jump, dosked and got paid. F5-F5 nolonger shows the mission.

Posted: Sun Jul 12, 2009 3:13 pm
by LittleBear
Is it possible you rammed him? The code should detect 1) player kill with lasers (full price). 2) player kill where the player never hit the mark with a laser - ie ramming e-bombing and q-mining (ungentlemanly - full price on docking but you are fined so you get less net) 3) NPC kill, 4) accident - ie burning up in the sun or dying by colliding with a ship other than the player. I'll have a look at it when I have some time, but I'd thought it was working ok.

Posted: Tue Jul 14, 2009 12:29 pm
by Capt. Slog
I don't think I rammed him. However I had left the system and was about to return, I can't remember whether I'd had to refuel, but I would have thought sufficient time would have elapsed between any contact and leaving the system for me to have been notified. If there had been any ships on my scanner in the last few minutes I would not have left the system.

Posted: Tue Jul 14, 2009 1:28 pm
by LittleBear
Hmm. There's definatley a bug somewhere although generally the code is pretty reliable in detecting who killed the ship and how. RL is pretty busy ATM so it may be a while before I have time to do some more fiddling around with it. Here's the script for kill-detection, if anybody can spot an obviouse howler:-

Code: Select all

/*
this.name = "oolite-random-hits-mark1";
this.author = "LittleBear";
this.copyright = "September 2008 - But do what you like with it in your OXPs!";
this.description	= "Tests who destroyed a RandomHits OXP Victim Ship and how they did it. The main script acts on the setting of variables."
this.version = "2.0";
*/

this.shipSpawned = function ()
{
	if(this.ship.displayName == this.ship.name)
        this.ship.displayName = expandDescription("[random_hits_main_name]") // Show the Victim's name on the ID Computer when targeted.
	  delete this.shipSpawned;
}

this.shipBeingAttacked = function(whom)
{
    if(whom == player.ship)
    {
      missionVariables.random_hits_whoshot = "PLAYER_ATTACK" // Shooter was the player not using an e-bomb, q-mine or cloak. The variable remains undefined if the player e-bombs, q-mines or kills the victim whilst cloaked as thisBeingAttacked does not get run. The main script then awards the player the credit for the kill, but fines him for dishonerable conduct!
    }
    else
    {
     missionVariables.random_hits_whoshot = "NPC_ATTACK" // Shooter was NPC ship. Every time the victim is hit, the variable is reset. Once he's dead the variable is not longer reset. So the last ship to hit him was also the killer!
    }
}

this.shipDied = function(whom)
{

	    if(whom == player.ship)
	    if(missionVariables.random_hits_whoshot == "NPC_ATTACK") // Player has finished off a Mark attacked by an NPC with an e-bomb.
	{
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Victim's ship has been destroyed.
		missionVariables.random_hits_whoshot = null // Reset the attack variable to treat this as a dishonerable player kill.
		return;
	}

	    if(whom == player.ship)
	    if(missionVariables.random_hits_whoshot == null) // Player has e-bombed the Victim's Ship.
	{
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Victim's ship has been destroyed.
		return;
	}


	    if(whom == player.ship) //If the killer was the player...
	    if(missionVariables.random_hits_whoshot == "PLAYER_ATTACK") //... And he didn't use an e-bomb ... 
	    if(Math.random() < 0.25) // Chance of Victim making it to his pod.
	{
		missionVariables.random_hits_status = "PODED" // Victim made it to his Pod! Set the variable to reflect that the player still needs to kill or scoop the Pod!
		this.ship.spawn("random_hits_pod1", 1); // Spawn a Pod. Any shooting or scooping of the Pod is handled by the Pod's own Script.
		return;

	}

	    if(whom == player.ship) //If the killer was the player and no pod was launched ...
	    if(missionVariables.random_hits_whoshot == "PLAYER_ATTACK") //... And he didn't use an e-bomb ... 
	    if(Math.random() < 0.10) // Chance of Victim dropping a q-mine.
	{	
		this.ship.spawn("RANDOM_HITS_MINE", 1); // Spawn a Q-Mine which taunts the player before exploding! Nasty!
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Victim's ship has been destroyed.
		return;
	}
	    if(whom == player.ship) //If the killer was the player and neither a pod nor q-mine was launched ...
	    if(missionVariables.random_hits_whoshot == "PLAYER_ATTACK") //... And he didn't use an e-bomb ...
	{	
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Victim's ship has been destroyed.
	   	return;	
	}
	    if(missionVariables.random_hits_whoshot == "NPC_ATTACK") // If an NPC fired the fatal shot ...
	{	
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Victim's ship has been destroyed.
	   	return;	
	}

	else // Deals with any other situation where cause of death was neither the player nor an NPC Laser. EG: Victim did somthing silly like crashing, burnt up near the Sun or some other odd death!
	{	
		missionVariables.random_hits_status = "KILLED" // Record the fact that the Ship has died!
		missionVariables.random_hits_whoshot = "ACCIDENT" // Any non-player / non-NPC caused death is an accident.
	}
 
	
}


Posted: Sun Jul 19, 2009 7:01 am
by Ark

Code: Select all

[gnustep]: 2009-07-19 09:48:20.296 oolite[1700] could not convert to UTF8 string! bytes=043f1c59 len=6
Just for the record the above do not only affect mac users but windows users also

Posted: Wed Aug 05, 2009 4:01 pm
by LittleBear
Version 1.3.6 (beta) contains a bug-fix for Mac Users.

The previous version of Random Hits contained a character in its descriptions.plist file, which is valid on Vista, but not on the Mac. This update fixes this (thanks to Eric Walsh for finding the needle in the haystack!). If you found that all the Bulletin Boards and other OXP messages came out as gobbledy-gook when you tried to play 1.3.5 then you should update to this version. No other new features are added by 1.3.6, so if 1.3.5 worked fine for you, then there is no need to update.

Version 1.3.6 is now on the Wikki Page for Random Hits. (Follow the link on my signature).

Posted: Wed Aug 05, 2009 6:05 pm
by Tivva
Nemoricus wrote:
Is mine in there too, or will I have to find out when you make your next release?
I can't remember now, too long since I looked.
But have a peek at the 'descriptions.plist' file with a text editer 8)

Posted: Thu Oct 01, 2009 6:41 am
by pmw57
Griffs Space Bar has the commodity lists for Gold, Platinum and Gem Stones listed as type 0 for tons, when they really should be type 1 for Kg or type 2 for grams.

Leaving them like this currently can crash the game.
https://bb.oolite.space/viewtopic.php?p=88684#88684

This has been affecting other OXPs as well, which I suspect is a result of copy/paste code techniques.

Would you kindly update the commodity.plist file so that this issue is fixed.

Posted: Thu Oct 01, 2009 7:26 pm
by Southwark
Hi,

I cannot dock with the space bar. If I fly into the hangar I just get sheild damage, and my docking computer does not lock on. "Could not contact station for docking instructions"

Any ideas?

Posted: Thu Oct 01, 2009 8:24 pm
by Chrisfs
If you have a docking computer, you can ident the space bar and then Shift C to dock with the idented object. It works with Black Monk Monasteries.

Posted: Thu Oct 01, 2009 9:22 pm
by LittleBear
Yep. The docking computer always assumes you want to dock with the main station, so you get the out of range message if you just turn it on near a Space Bar. To auto dock with anything thats not the main station (including the bars, but this goes for any other stations or dockable ships), you have to target the object and then hit SHIFT C.

Manual docking with a bar is harder than with a main station as you don't have a Nav Beacon to line up with. The docking port is the same size as the one on a normal station (and it doesn't rotate!), but if you are going to manually dock you have to be lined up properly or you'll prang bits of your ship on the edges (same as with the main station).

EDIT: Plenty of room! :-

Image

Posted: Thu Oct 01, 2009 9:25 pm
by Southwark
Ah I need to target (with r I assume) and then shift c!

Thanks!

Posted: Sat Oct 03, 2009 12:08 pm
by Screet
Hi,

I just had a very strange thing:
Since I did not find the target on the first run, I did dock and refuel (and saved). Shortly afterwards, I did not run quick enough out of injectors and crashed into one of the guards.

Thus I reloaded and found the target directly in the S area of the station. The target was being hunted by ALL of his guards!

Maybe that requires some additional check to prevent it? I don't know how they came to the idea to hunt their group leader, especially since the game was funning for less than 15 seconds at that time!

I'm also missing my own retirement party. The revenge jumps have increased to over 170 now, but still nothing...

Screet

Posted: Sat Oct 03, 2009 12:49 pm
by LittleBear
Eric has pointed out the first one. Although I switch the escorts AI with the script to the custom AI (which checks for friendly fire). As it takes a few seconds to run, it is possible that the escorts are in bog-standard escort AI when they get hit by the mark, so I really need to add an auto-ai false. It shouldn't happen very often, but it is a known bug.

On the Second one. Is the variable for revenge : YES ? The counter still counts even if the variable is NO, but nothing will happen. I reduced the chance of revenge being taken to 1 in 3 everytime you make a hit, so it will be less frequent. The dice should be re-rolled when you are paid for making a hit. I might have forgotten though to reset the YES / NO roll. Could you pull into a bar and post your variables with a screenie? I pretty busy with RL ATM so may be a while before I can look into it though.