Page 1 of 1

Severe punishment

Posted: Sun Jun 01, 2008 6:15 pm
by *cat
I've often read "the player IS the ship". So I'm guessing that there's no way of serious criminals ending up in an astromine convicts ship? With no money and having to buy (or wait) their time out, or escape from under the noses of the hovering Vipers? Might be a fun OXP for the "been there done that" Elite millionaires.

Posted: Sun Jun 01, 2008 6:49 pm
by Frame
While i foresee a great deal of scripting for this to become a reality, and troubles

there is just one thing...

If you sentence the player to astro mining... in some crappy ship, whats to keep pirates from blasting him ;-). especially if you take away his beam/military lasers.

if it is not a crappy ship... whats to keep the player from blasting the vipers.

a paradox... ehh :-S

Posted: Mon Jun 02, 2008 7:13 am
by Commander McLane
A method for changing the player's ship - and preferably somehow storing his old ship and its equipment, in order to give it back to him at a later time - has been desired for a long time, and would of course allow for tons of very cool scripting (putting him in an astromine, and the garage-thing where you can have two ships and change between them, are really only the tip of the iceberg).

I can for instance imagine a lot of mission-related ship-switching, where the player, along with a difficult mission, gets a special ship which is the only one that allows him to successfully do the mission. Or a very special, not-for-purchase ship, that is only awarded to the player on completing a string of missions. And lots of other ideas. (To use that example - and inspiration - again, I could mention that the games of the Escape Velocity-series make use of this feature, although the storing-and-returning option is not implemented. If you get a new ship, you have it.)

It hasn't been implemented so far, however, and when it was discussed last time, it didn't seem easy to implement.

Posted: Mon Jun 02, 2008 12:59 pm
by Frame
Commander McLane wrote:
A method for changing the player's ship - and preferably somehow storing his old ship and its equipment, in order to give it back to him at a later time - has been desired for a long time, and would of course allow for tons of very cool scripting (putting him in an astromine, and the garage-thing where you can have two ships and change between them, are really only the tip of the iceberg).

I can for instance imagine a lot of mission-related ship-switching, where the player, along with a difficult mission, gets a special ship which is the only one that allows him to successfully do the mission. Or a very special, not-for-purchase ship, that is only awarded to the player on completing a string of missions. And lots of other ideas. (To use that example - and inspiration - again, I could mention that the games of the Escape Velocity-series make use of this feature, although the storing-and-returning option is not implemented. If you get a new ship, you have it.)

It hasn't been implemented so far, however, and when it was discussed last time, it didn't seem easy to implement.
Well with java scripting mission Varibles are stored in the player save file... now i have not made a single mission OXP but from what i can read...

would´nt it be possible to set some mission varible to the players old ship,

looking up in my commander save file, yeah sure i have all sorts of old mission varibles there from various OXPs

One of them could very easy be named "cobra3-player" for example, and you could go on with storing all sorts of Equipment and so, and the benifit is that it is also saved in the Commander save file..

The real issue though is to... Award a Player a Ship...

looking up in the code current linux trunk... i see these methods

Code: Select all

// JS name					Function					min args
	{ "awardEquipment",			PlayerAwardEquipment,		1 },	// Should be deprecated in favour of equipment object model
	{ "removeEquipment",		PlayerRemoveEquipment,		1 },	// Should be deprecated in favour of equipment object model
	{ "hasEquipment",			PlayerHasEquipment,			1 },
	{ "equipmentStatus",		PlayerEquipmentStatus,		1 },
	{ "setEquipmentStatus",		PlayerSetEquipmentStatus,	2 },
	{ "launch",					PlayerLaunch,				0 },
	{ "awardCargo",				PlayerAwardCargo,			1 },
	{ "canAwardCargo",			PlayerCanAwardCargo,		1 },
	{ "removeAllCargo",			PlayerRemoveAllCargo,		0 },
	{ "useSpecialCargo",		PlayerUseSpecialCargo,		1 },
	{ "commsMessage",			PlayerCommsMessage,			1 },
	{ "consoleMessage",			PlayerConsoleMessage,		1 },
	{ "setGalacticHyperspaceBehaviour",	PlayerSetGalacticHyperspaceBehaviour,	1 },
	{ "setGalacticHyperspaceFixedCoords",	PlayerSetGalacticHyperspaceFixedCoords,	1 },
	{ 0 }
I dont really see an "award ship" function here...

if we go by the wiki,.. which is terrible outdated i think..
i do not see a method for aquiring the players fuel...

player.fuel.. and this also seems undocumented in the trunk (am i looking at the right trunk) ?

http://svn.berlios.de/viewcvs/oolite-li ... iew=markup

but i know that works, since for my work for the fuel collector...

i use this

Code: Select all

player.fuel += 0.2
So while i´m not able to see it in the linux trunk, i know for a fact player.fuel works in 1.71.2

EDIT:from the wiki

"The Player class is an Entity representing the player, and the player’s ship – the two are inseperable. The Player has all the properties and methods of a Ship, and several others. There is always exactly one Player object in existence, which can be accessed through the player global property. "

DOH! thats why i can get fuel, its located in the model for all ships

namely

Code: Select all

{
	// Property IDs
	kShip_shipDescription,		// name, string, read-only
	kShip_shipDisplayName,		// name displayed on screen, string, read-only
	kShip_roles,				// roles, array, read-only
	kShip_roleProbabilities,	// roles and probabilities, dictionary, read-only
	kShip_primaryRole,			// Primary role, string, read-only
	kShip_AI,					// AI state machine name, string, read/write
	kShip_AIState,				// AI state machine state, string, read/write
	kShip_fuel,					// fuel, float, read/write
	kShip_bounty,				// bounty, unsigned int, read/write
	kShip_subEntities,			// subentities, array of Ship, read-only
	kShip_hasSuspendedAI,		// AI has suspended staes, boolean, read-only
	kShip_target,				// target, Ship, read/write
	kShip_escorts,				// deployed escorts, array of Ship, read-only
	kShip_temperature,			// hull temperature, double, read/write
	kShip_heatInsulation,		// hull heat insulation, double, read/write
	kShip_entityPersonality,	// per-ship random number, int, read-only
	kShip_isBeacon,				// is beacon, boolean, read-only
	kShip_beaconCode,			// beacon code, string, read-only (should probably be read/write, but the beacon list needs to be maintained.)
	kShip_isFrangible,			// frangible, boolean, read-only
	kShip_isCloaked,			// cloaked, boolean, read/write (if cloaking device installed)
	kShip_isJamming,			// jamming scanners, boolean, read/write (if jammer installed)
	kShip_groupID,				// group ID, integer, read-only
	kShip_potentialCollider,	// "proximity alert" ship, Entity, read-only
	kShip_hasHostileTarget,		// has hostile target, boolean, read-only
	kShip_weaponRange,			// weapon range, double, read-only
	kShip_scannerRange,			// scanner range, double, read-only
	kShip_reportAIMessages,		// report AI messages, boolean, read/write
	kShip_withinStationAegis,	// within main station aegis, boolean, read/write
	kShip_maxCargo,				// maximum cargo, integer, read-only
	kShip_speed,				// current flight speed, double, read-only
	kShip_desiredSpeed,			// AI desired flight speed, double, read/write
	kShip_maxSpeed,				// maximum flight speed, double, read-only
	kShip_script,				// script, Script, read-only
	kShip_isPirate,				// is pirate, boolean, read-only
	kShip_isPlayer,				// is player, boolean, read-only
	kShip_isPolice,				// is police, boolean, read-only
	kShip_isThargoid,			// is thargoid, boolean, read-only
	kShip_isTrader,				// is trader, boolean, read-only
	kShip_isPirateVictim,		// is pirate victim, boolean, read-only
	kShip_scriptInfo,			// arbitrary data for scripts, dictionary, read-only
	kShip_trackCloseContacts	// generate close contact events, boolean, read/write
};

So there is not a method that will award a ship.

That is really what is missing, an award ship method...

You cant work around it since the player will allways have, his ship and equipment, that will act as credits if he goes to the buy ship screen...

would be cool, if the you could mess with "ship_trade_in_factor" and set that to zero, and remove all of the players Equipment.. that however involves removing all special OXP equipment too like the Rock hermit locator. fuel tank, you name it.

Imagining That we solve these special problems, and the player gets to buy a ship with no Equipment other than a Mining laser to fufill his work

how do we get player safely from the station to the punishment camp... we cant simply change his posistion... which would be very cool if we could... however i beleive save games, are only possible at the main stations...

you cant save in rock hermits or can you :S...

Testing... coming back in a bit... Oolite just gobbled up all 1.5 gb of memory :S

with nothing than the Rock hermit locator installed.. and now vista starts to recache... :/...

oright, my memory served my right... you cant save in a rock hermit... alas it also makes sense that you only can save in the main station, since no information is stored in regard to where in the system you are... that means you cant save at OXP stations either..

however i did run into rock hermit City... 3 rock hermits next to each other...

maybe i should rename the bouys to reflect that.. Rock Hermit (insert random name here) bouy... not sure that is possible though...

ahh side tracking, back on subject...

bottom line, if you can make a way to force the player into buying a stripped down ship with no Equipment and low speed, while at the same time make sure he can make it from point A to B... this punishment OXP could very well be possible.

You can store his credits, and Equipment in mission Varibles i believe, until he has done his "time"... :-P