Random Hits issues/questions

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
flimflam_machine
Above Average
Above Average
Posts: 20
Joined: Fri Jun 20, 2008 12:05 pm

Random Hits issues/questions

Post by flimflam_machine »

I've just installed Random Hits, what a great expansion to the game! [/hat]

A couple of minor questions:

Problem 1: Is it possible to flip between the bulletin board and a galactic map? I'd like to be able to see whether I'm required to travel most of the way across the galaxy to 'retire' someone. As it stands, I get the bulletin board when I dock, but once I exit it I can't get back to it without launching and re-docking. This wouldn't be a huge crisis except for:

Problem 2: Even though the bulletin board says something like "Currently viewing message 1 of 3", when I flip through the contracts and return to the first page contract 1 of 3 is now different from what it was originally. This makes it impossible to choose the best of the contracts available, because I never know what will be there when I return to message 1. On the wiki it does say that missions will sometimes change when you are browsing, but it always happens.

Out of interest, is surrounding themselves with hired thugs in mantas a standard tactic for those with a price on they're head (didn't do him any good, heh!)?
User avatar
Commander Mysenses
Deadly
Deadly
Posts: 214
Joined: Sat Mar 08, 2008 9:30 am
Location: Devon, a backward little planet scourged by evil weather

Post by Commander Mysenses »

'Fraid it ain't possible as it stands.
I have a paper workaround for that problem... I've printed out a grid map of the Galaxy and a list of planets with grid references. I've only prepped the first two galaxy maps with gridlines so far (the basic ones are on the wiki). I have rearranged the star systems spreadsheet (also on the wiki) into alphabetical order0 which helps.

So download the maps and spreadsheet from th wiki... or I can send you my modded versions if you like.
User avatar
Commander Mysenses
Deadly
Deadly
Posts: 214
Joined: Sat Mar 08, 2008 9:30 am
Location: Devon, a backward little planet scourged by evil weather

Post by Commander Mysenses »

Oh and the jobs offered DO pop up again if you keep flippimg through a few times.
My trick is to keep flipping through til I find a well paying local hit. If one doesn't turn up, it can be worth launching and docking to see if new ones turn up. If that doesn't help, fly to the station, save, end game, restart game fly to bar, peruse anew. Or jump out/jump back to system might work.

And lastly, those with a price on their head(s) find many devious ways to defend themselves!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

On 1) Not yet. It is possible to do this, and I'll add this feature for the next version (when RL isn't so busy :wink: ), but at the moment you can't. The fees paid are pretty high though and part of this is to reflect that on average you will have to make 5 - 6 jumps to get to the target system. Everything in the OXP is randomly generated though so you can be lucky and get a hit on your doorstep or unlucky and its miles away. There is no time limit though so you can just take a hit and do it when you happen to be there (and take other mission or jobs to help boost your income as you trade your way over to the hit system).

On 2) Ok this is a bit complex, but it works like this:- Pretty much each word is randomly generated by an independent dice role. Eg a victim may for example be described as "a pedantic green feline". This is generated by roling a 150 sided dice three times a role of 1, 1, 1, 1. would produce this description as 'landing on' some phrases tells Oolite to role again for further randomization. Eg:-

Code: Select all


	<key>random_hits_prejective1a</key>
	<array>
	<string>a pedantic</string>
	<string>an amoral</string>
	<string>an oddball</string>
	<string>an unprincipled</string>
	<string>an unscrupulous</string>
	<string>a dreadful</string>
	<string>a small-minded</string>
	<string>a sneaky</string>
	<string>a strange</string>
	<string>a nerdy</string>
	<string>an unpleasant</string>
	<string>a nasty</string>
	<string>an exuberant</string>
	<string>a murderous</string>
	<string>an odd</string>
	<string>an old</string>

and so on and so on!

	<key>random_hits_prejective2a</key>
	<array>
	<string>[random_hits_coloura]</string>
	<string>[random_hits_coloura]-skinned</string>
	<string>tiny</string>
	<string>dangerous</string>
	<string>scantily-clad</string>
	<string>transparent</string>
	<string>iridescent</string>
	<string>harmless</string>
	<string>colourless</string>
	<string>edible</string>
	<string>lesser-spotted</string>
	<string>robotic</string>
	<string>small</string>
	<string>oblong</string>
	<string>octagonal</string>
	<string>rectangular</string>
	<string>[random_hits_coloura]-speckled</string>
	<string>glowing</string>
	<string>luminous</string>
	<string>[random_hits_gas]-breathing</string>

and so on and so on.

	<key>mark_race_part2</key>
	<array>
	<string>feline</string>
	<string>rodent</string>
	<string>bovine</string>
	<string>bird</string>
	<string>human</string>
	<string>[random_hits_sports] fan</string>
	<string>estate agent</string>
	<string>brain in a jar</string>
	<string>lobster</string>
	<string>insect</string>
	<string>wolfoid</string>
	<string>treeoid</string>
	<string>goat</string>
	<string>stand up comic</string>
	<string>scientist</string>
	<string>geekoid</string>
	<string>arts graduate</string>
	<string>poet</string>
	<string>piscine</string>
	<string>[random_hits_elements]-based [spacebar-greeting7c]</string>

and so on..

Each message is made up of 200 to 300 words, so if Oolite was an old-syle DM rolling dice the chances of the same advert comming up again would be trillions to one. However Oolite uses a seed number. This produces a sting of numbers seemingly random, but which reapeats after a certain number of rolls. So if rolls 1 2 and 3 produce 1, 1, 1, then so will roles 1001, 1002 and 1003. Its only when you make a hyperspace jump that a new seed number is chosen.

If there is a hit you want to do on page 1, flip through the board a few times and it'll re-appear. On each docking you should get 2 - 3 different Easy Medium and Hard hits (ie pages 1 2 and 3). The first time you return to page 1 from page 3, the hit on page 1 will probabley have changed but as the number sequence repeats it'll come back. I could standards this so that you only get three different hits (one for each page) on each docking, but that would mean that its quite likley that there will be no hit near you. The way it is ATM if you filp though the board a few times, you should find a hit near you by the law of averages. Once you've found a hit you'd like to do, just don't make a jump flip and keep flipping through until it comes back again. It should pop up again after you've viewed all of the pages 2 or 3 times (ie you'll get about 9 different hits every time you dock without making a jump).
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
flimflam_machine
Above Average
Above Average
Posts: 20
Joined: Fri Jun 20, 2008 12:05 pm

Post by flimflam_machine »

Ooookay, thanks CM and LB for the explanations. It does make sense that part of the high return rate for hits is all the travelling. I may well download the map, any chance of a direct linky CM?

Thanks for explaining the randomisation LB, so I will get back to exactly the same missions if I run through the pages enough times. I was really confused by the "1 of 3" text, in fact, wherefore "1 of 3" if there are roughly 9 independent missions? Even if the "3" denotes easy, medium or hard it's a bit confusing.

What would be really lovely is a layout of all the available contracts in a form like the commodity markets i.e., fields for name, ship, system, reward, likely difficulty, with an option to see the destination on a map, from which you can click through to the detailed description. However I wouldn't want to lose all the lovely "texture" that makes RH so satisfying to play.
User avatar
Commander Mysenses
Deadly
Deadly
Posts: 214
Joined: Sat Mar 08, 2008 9:30 am
Location: Devon, a backward little planet scourged by evil weather

Post by Commander Mysenses »

Wiki maps and spreadsheet here,
http://wiki.alioth.net/index.php/Oolite_planet_list

What galaxy are you on?
I'll upload my edited maps and spreadsheet later, when I get back to my PC
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Trouble is that each contract is generated as the page is displayed. Oolite roles about 500 dice to make the message. If you accept the hit then the details are stored as a load of mission variables, but otherwise the dice just get re-rolled and the mission is gone (until the seed numbers repeat). I can't think of any easy way to know at what point the seed numbers will repeat and so tell Oolite that it has reached the last page of new missions. By experimenting usually, you'll get about 3 different hits of each type before the seed numbers repeat resulting in a hit you've seen before repeating.

I'll get rid of the page numbers though and just have it as "Currently viewing an easy / moderate / difficult hit" and the choices for moving screen as "view an easier / more difficult removal job". The best solution (and this would do away with the need to look at the Galatic chart), would be just to be able to display on the screen offering the hit how far the target system is to your current location. Eg:-

"Distance to Lave System : 34.6 Light Years"

Then you could just flick though until you found a hit nearby and take it there and then.

When you select a system on the F6 screen, Oolite displays the distance, so the game does "know" how far any system is from your current location.

? for the code masters:-

Is there a way using planet_number to calculate this in an OXP.

I know the planet_number of the target system (stored as a mission variable) and I know the planet_number of the player's current location (stored as a mission_varaiable when the Script for the hit generation is run - the script only runs when docked at a bar). Can I do some maths with a Java Script to convert these numbers into a distance?

Eg If the player is at Reidquat (planet number 46) docked at the Worlds End Bar and a hit is generated at Lave (planet number 7) the game "knows" that those systems are 6.8 LY apart. Is there a relationship between those two planet numbers that is related in any way mathmeticly to the distance? If so can I use that to produce a variable that is the distance?

I'd also then have a number for distance, so I could incease or decrease the base fee for the hit (which is base on difficulty) to reflect your travelling. Eg you might get offered 1,000 Credits to hit an Adder 30 light years away or the same money to hit a Cobra III 9 light years away.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

I am not entirely sure how you could get the planet coordinates, but if there is a way to store them, then it is really easy to calculate distance and store it in a variable.
Assuming that you have Planet1 with coordinates (x1, y1) and Planet2 with coordinates (x2, y2), the distance d between Planet1 and Planet2 will be

d = 0.4 * sqrt( (x2-x1) * (x2-x1) + ((y2-y1)/2) * ((y2-y1)/2) )
User avatar
Commander Mysenses
Deadly
Deadly
Posts: 214
Joined: Sat Mar 08, 2008 9:30 am
Location: Devon, a backward little planet scourged by evil weather

Post by Commander Mysenses »

My Oolite files are here


I have edited the planet guide so that each galaxy fits on a single A4 page (landscape), get that here

I have edited the first two galaxy charts, added gridlines and labelled axis and make them printer friendly.

Here they are,

Galaxy 1

Galaxy 2
flimflam_machine
Above Average
Above Average
Posts: 20
Joined: Fri Jun 20, 2008 12:05 pm

Post by flimflam_machine »

Thanks again LB and CM.

I have to say that despite my whingeing I actually really like the interface as it is. The atmosphere and the "texture" created by the randomised messages and missions does add some wonderful feel to the game. I think it's entirely in keeping with the slightly anarchic feel of the hitman business that the missions are not overly detailed or organised, and that someone might snap up a good opportunity for a whacking while you're scrolling the board. As such, I think that adding only the distance to the miscreant's current system would be good. Does the pay actually increase for hits in distant systems, or are the rewards unaffected by the number of jumps required?

Just out of interest, if it was to be made more structured (which, as I said, I don't now think that it actually needs), is it possible to "roll the dice" just once when the player docks at the bar the first time after jumping into a system in order to generate a list of missions, and then hold all, say, 10 missions in the memory until they jump out of the system again? I suspect that this would be pretty heavy on memory, but is it completely unfeasible?

Also just out of interest, are hired thugs part of the OXP?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Hired Thugs are part of the OXP (some victims have henchmen and escorts). The price ATM is based purely on how difficult the hit is (with a random element thrown in as well) but is not related to jumps needed to complete it.

The dice get rolled every time you change screen but the number sequence generated and when it repeats is related to the seed number. Some seed numbers may only produce 3 or 4 different combinations some more than this. I could have a ten page (consistent) set of missions with the dice roled once and the text stored as a tempory variable (would only use a few k of memory as its all just text). But sometimes you'd get 10 different missions and sometimes you get mission repeated on different pages, as it would depend on the seed number Oolite choses for its random maths. (this seed number is part of the hard-wired part of Oolite rather than OXPs. OXPs just use the random command but its Oolite itself that choses the seed number).

As you are not the only bounty hunter at the Bar, I guess it is "realistic" for missions to change as you browse due to other hunters taking them and new hits being posted. :wink:

On the distance though, I don't know how to access the target system's co-ordinates, but if I could then I could use C_M's formula to display the distance and also tweak the price variable to up or lower the base price based on the distance.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

LittleBear wrote:
On the distance though, I don't know how to access the target system's co-ordinates, but if I could then I could use C_M's formula to display the distance and also tweak the price variable to up or lower the base price based on the distance.
It should not be so difficult to create a JS function to return the calculation. Internally there is a function that is called often: distanceBetweenPlanetPositions() e.g. in Universe.m:

Code: Select all

- (NSArray*) nearbyDestinationsWithinRange:(double) range
{
	Random_Seed here = [self systemSeed];
	int i;

	// make list of connected systems
	for (i = 0; i < 256; i++)
	{
		double dist = distanceBetweenPlanetPositions(here.d, here.b, systems[i].d, systems[i].b);
		if ((dist > 0) && (dist <= range) && (dist <= 7.0))	// limit to systems within 7LY
		{
           		[deleted stuff]
		}
	}
}
It should be easy to add a function like:

Code: Select all

- (double) distanceToSystem:(int) destination
{
	Random_Seed here = [self systemSeed];

		double dist = distanceBetweenPlanetPositions(here.d, here.b, systems[destination].d, systems[destination].b);
                return dist;
}
This one then could be called over a new to be implemented JS method.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2882
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Post by LittleBear »

Hmm. Being a bit slow Eric. Do you mean its doable with Oolite's code (so a Java Command could be added in the next version) ?

Something that did something like getdistance [planetnumber], [planetnumber] ?
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

LittleBear wrote:
Hmm. Being a bit slow Eric. Do you mean its doable with Oolite's code (so a Java Command could be added in the next version) ?

Something that did something like getdistance [planetnumber], [planetnumber] ?
Yes but not with the above code. I forgot that LY is not a linear distance. Galactic wide this function will give extreme, unusable numbers.

But there is an other internal function that divides this distance in 7LY chunks and calculates the number of jumps. It just does not return an easy number but an array of data. But using this function you can get a jumpcount and it saves to write something completely new. And jumpcount is probably enough as answer. At least is takes all possible routes in account.
Post Reply