Page 4 of 17

Posted: Wed Dec 10, 2008 10:37 pm
by Thargoid
In a little more detail:

  • As Eric says, you can now land on any planet or moon in the system (but not the sun, even at night).
  • It is now possible to have variation on what's available etc on each of those types, and you see where you're docked (although I've not yet had time to code the variations up).
  • There are some (I hope useful) variables set within the OXP, accessable from other OXPs, which should allow missions to be offered/triggered etc by other coders.
  • I'm working on making landing a little more tricky than just flying at the planet (in collaboration with Eric). In my current version you request landing permission en-route in, and cannot land until you actually receive it (if you try you'll crash).
That last one I'm still working on (literally at the moment, although not for much longer tonight). Eric also has some suggestions I need to review, so between us I hope it should be something nice.

Anyway, after that it'll just be sorting out specific items to dock with, as previously mentioned. But that's a little way off I think for the moment.

Give me a day or two and I'll issue another update, and maybe even a beta version of the new code. :D [/color]

Posted: Thu Dec 11, 2008 12:43 am
by Arexack_Heretic
nice work there.

I'd suggest keeping away from too much visualization and keep things as 'retro' as possible.
The freelancer landing cutscene is a good example of a way that looks nice and feels nice.

I'm curious as to what you're up to next with this.

Posted: Mon Dec 15, 2008 7:50 am
by Thargoid
OK I'm near to having the next version ready for release. At the moment there are the following "places of interest" available randomly when you land:

Planets (main and added):
  • Planetary Capital City
  • Shipyard
  • Factory (for industrial systems)
  • Farm (for agricultural systems)
  • Waste disposal sector (industrial - no trading here)
  • Open fields (agricultural - no trading here)
Moons:
  • Colony dome
  • Mine
  • Research complex (for high-tech systems)
  • Lunar Wasteland (no trading here)
Can anyone think of any other places that may be worth including?

Once this is done, I just need to figure out how to implement commodities.plists for them and then this update can be released. After that I'll look at making the above specifically target-landing sites rather than random selections, but that will be a second update.[/color]

commodities

Posted: Mon Dec 15, 2008 8:00 am
by Lestradae
Thargoid wrote:
Once this is done, I just need to figure out how to implement commodities.plists for them and then this update can be released.
I'd have a commodities.plist for the Planetary Capital City I already created, that works fine for me, if you want to use it just put it in:
  • <key>Capital_City</key>
    <array>
    <array>
    <string>Food</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>5</integer>
    <integer>1</integer>
    <integer>5</integer>
    <integer>50</integer>
    <integer>1</integer>
    <integer>1</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Textiles</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>10</integer>
    <integer>-0.5</integer>
    <integer>4</integer>
    <integer>40</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Radioactives</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>50</integer>
    <integer>3</integer>
    <integer>-1</integer>
    <integer>40</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Slaves</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>150</integer>
    <integer>5</integer>
    <integer>-2</integer>
    <integer>8</integer>
    <integer>4</integer>
    <integer>4</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Liquor/Wines</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>45</integer>
    <integer>5</integer>
    <integer>-2</integer>
    <integer>35</integer>
    <integer>3</integer>
    <integer>3</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Luxuries</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>199</integer>
    <integer>-4</integer>
    <integer>4</integer>
    <integer>20</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Narcotics</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>41</integer>
    <integer>1</integer>
    <integer>-3</integer>
    <integer>12</integer>
    <integer>3</integer>
    <integer>3</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Computers</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>175</integer>
    <integer>-2</integer>
    <integer>4</integer>
    <integer>25</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Machinery</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>125</integer>
    <integer>4</integer>
    <integer>3</integer>
    <integer>35</integer>
    <integer>4</integer>
    <integer>4</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Alloys</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>67</integer>
    <integer>2</integer>
    <integer>-3</integer>
    <integer>40</integer>
    <integer>4</integer>
    <integer>4</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Firearms</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>75</integer>
    <integer>10</integer>
    <integer>-5</integer>
    <integer>40</integer>
    <integer>4</integer>
    <integer>4</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Furs</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>75</integer>
    <integer>10</integer>
    <integer>-4</integer>
    <integer>50</integer>
    <integer>4</integer>
    <integer>4</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Minerals</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>20</integer>
    <integer>1</integer>
    <integer>-2</integer>
    <integer>40</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>0</integer>
    </array>
    <array>
    <string>Gold</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>87</integer>
    <integer>3</integer>
    <integer>-4</integer>
    <integer>35</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>1</integer>
    </array>
    <array>
    <string>Platinum</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>150</integer>
    <integer>3</integer>
    <integer>-4</integer>
    <integer>25</integer>
    <integer>2</integer>
    <integer>2</integer>
    <integer>1</integer>
    </array>
    <array>
    <string>Gem-Stones</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>38</integer>
    <integer>2</integer>
    <integer>-4</integer>
    <integer>22</integer>
    <integer>1</integer>
    <integer>1</integer>
    <integer>2</integer>
    </array>
    <array>
    <string>Alien Items</string>
    <integer>0</integer>
    <integer>0</integer>
    <integer>200</integer><!-- base price x 1/4 -->
    <integer>-2</integer><!-- price adjust -->
    <integer>1</integer><!-- quantity adjust -->
    <integer>0</integer><!-- base quantity -->
    <integer>2</integer><!-- price mask -->
    <integer>2</integer><!-- quantity mask -->
    <integer>0</integer><!-- units -->
    </array>
    </array>
Cheers :wink:

L

Re: commodities

Posted: Mon Dec 15, 2008 10:39 am
by Eric Walch
Thargoid wrote:
Once this is done, I just need to figure out how to implement commodities.plists for them and then this update can be released.
Its explained in the wiki in one of the old documents. When you put that formula in a spreadsheet you see how the price and availability range changes with input values.

Posted: Mon Dec 15, 2008 11:13 am
by Griff
re: 'places of interest'
Maybe a sort of refuge colony or somewhere where you can free slaves or alternatively, some sort of criminal gang where you can drop off hitch-hickers for a lifetime of endless toil in a tree grub processing factory

Posted: Mon Dec 15, 2008 11:41 am
by Svengali
Griff wrote:
Maybe a sort of refuge colony or somewhere where you can free slaves or alternatively, some sort of criminal gang where you can drop off hitch-hickers for a lifetime of endless toil in a tree grub processing factory
free slaves, hehe. Try the new vector, hehe. Maybe you will know how GRS chairmen are making money, hehe.

Posted: Mon Dec 15, 2008 2:37 pm
by Eric Walch
Griff wrote:
re: 'places of interest'
Maybe a sort of refuge colony or somewhere where you can free slaves ....
Sounds familiar. In the slave series of UPS you also have to free slaves on a surface mission.

Posted: Mon Dec 15, 2008 3:03 pm
by Thargoid
Griff wrote:
re: 'places of interest'
Maybe a sort of refuge colony or somewhere where you can free slaves or alternatively, some sort of criminal gang where you can drop off hitch-hickers for a lifetime of endless toil in a tree grub processing factory
Well Anarchy planets and moons now have a chance of offering you seedy bars to visit (with apologies or possibly a franchise payment to LB ;) ).

I was thinking more locations than actions that the player could do. I'll leave that sort of coding to mission-writers who can use Planetfall as a support OXP. With the way the current one works they can even add their own locations to the random pool (if I later add the specific location landing, I'll keep that in too for landing away from those locations).

Posted: Mon Dec 15, 2008 3:26 pm
by LittleBear
If you set the variable "mission_random_hits_docked" to TRUE when the player landed at a bar then the BB code for Random Hits Bars would be run. You'd need to reset to null / undefined when you launched the player though. Obviously, it would only do anything if RH was installed, but it wouldn't do any harm if the player didn't have it installed. :wink:

Posted: Mon Dec 15, 2008 5:34 pm
by Disembodied
For "places of interest": how about active markets or auctions? I think Commander McLane built a system for price negotiation into Anarchies.oxp ... being able to bargain for stuff would make trading a lot more interesting.

Would there be any mileage in varying the PoI by government type?

Posted: Mon Dec 15, 2008 5:54 pm
by Thargoid
Some of them already do, or something similar (by tech level or economy). For example the factories and farms are different depending on economy (at least in terms of name if nothing else yet), the new seedy bar will only appear at the moment in Anarchy systems, and the research complex will depend on tech level (and the moon/sub-planet ones will of course depend on having an OXP loaded to provide them).

I'm trying not to rely too much on external oxps, but I can certainly tie them in if it's quite simple (like the Random Hits one for example). I'll have a good look at Anarchies snd see if there's possibility there.

It's just to add a little interest and variation, and to make planet landing a bit more worthwhile... :D

Posted: Mon Dec 15, 2008 8:46 pm
by Frame
as this.enteredPlanetaryVicinity in Oolite 1.72 and 1.72.1

Only works when Moons is overlapping the main planetĀ“s vicinity, i wrote a function for the fuel collector, that manually checks for if the ship is in the vicinity of the main planet...

It should be usefull to your OXP too... You need to call it from a timer though, id say with 5 or 10 second interval, it should work

Anyway, here is the code

Code: Select all

this.toclosetoanyplanet = function()
{
	if(system.planets.length == 1 && this.theplayer.position.distanceTo(system.planets[0]) < system.planets[0].radius*3) // single planet system checking..
	{				
		this.toclosetoplanet = 0
		//log("we are to close at the planet in a single globe system")
		return System.planets[0]
	}
	for(var i=0 ;i<system.planets.length;i++)
	{
		if(this.theplayer.position.distanceTo(system.planets[i]) < system.planets[i].radius*3)
		{
			//log("we are to close at multiple globe system")
			this.toclosetoplanet = i
			return system.planets[i]
		}
		
	}
	
	//log("we are not to close")	
	
	return false
}

Posted: Mon Dec 15, 2008 9:27 pm
by Thargoid
Thanks. To be honest I'm not certain that adding another timer is meritted to just have a pop-up message appear (in my OXP case).

Now if you could get shipdata conditions working then I'd be a happy bunny, as that little glitch is messing up what I'm trying to do :(

planetary stations

Posted: Mon Dec 15, 2008 9:38 pm
by Lestradae
Thargoid wrote:
Can anyone think of any other places that may be worth including?
Perhaps you might want to have a look at Dr Beeb's thoughts about that topic here:

https://bb.oolite.space/viewtopic.ph ... &start=165

... he seems to have spent quite some time with generating a program to create variations on just that.

Perhaps also interesting to Frame concerning the Solar Systems oxp? Planetfall, that and System Redux would be a logical triangle anyways :wink:

Cheers

L