Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Well Known Wingmen (Wingpersons)

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Well Known Wingmen (Wingpersons)

Post by Ganelon »

I use both the Personalities and Hired_Guns OXPs and I think it'd be neat if there was an OXP that sort of combined the concepts. Like if there was a chance when you hit a station or seedy bar or etc that you might see people like you "meet" in space with the Personalities OXP available for hire as an escort to the next system.

It should be a small chance, and only possible in systems or Galaxies those people are known to frequent. The sort of station where you'd find them should be consistent with the person/character and their usual legal rating, and they might only be willing to "sign on" with someone of a specific legal rating or experience level.

It would be short trips, usually only to the next system, so with a bit of dialog and their possibly unique or unusual ship, it would add variety and might give a reasonable illusion of contact with another player for a little bit.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Ganelon, it sounds like a perfect opportunity for you to get stuck in! Have a look under the bonnet - so to speak - and see if you can create a hybrid oxp...

You might be amazed at what you can actually do! :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Post by Ganelon »

Ok, I'll think on it and see if I can maybe come up with something.
Sleep? Who needs sleep? Got game. No need sleep.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

You could take the basic framework of HG but where it spawns the relevant escorts, you just have a larger list and be a little more specific.

Of course the thing to remember is to spawn exactly the same ones after a witchspace jump etc. But that's not too difficult.
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 »

Thargoid wrote:
Of course the thing to remember is to spawn exactly the same ones after a witchspace jump etc. But that's not too difficult.
Why not really letting it follow you?

I just wrote a small ship script and saved it:

Code: Select all

this.name      = "followPlayer"; 
this.author    = "eric walch"; 
this.description = "testscript";
this.version   = "1.00"; 


this.playerWillEnterWitchspace = function ()
{
    this.ship.fuel = 7;
    this.ship.exitSystem(player.ship.targetSystem);
}
I just targeted a ship and typed in the console: PS.target.setScript("followPlayer.js")

The ship now had the script. At the moment the player jumps, the ship gets a signal, he knows the players target system and jumps himself to that system. Than when the player arrives, the exact same ship with all js variables etc will be there. I just tested it and it definitely works. It is the same entity arriving at the other side.

One problem is when the ship is to close to the player: The ship jumps first. You even see it generate a wormhole. When that wormhole is to close to the player, the jump of the player gets blocked. The player could now even follow the ship through the ships wormhole. Only when that wormhole collapses before the player follows, the entity will be removed from memory. but that can easy be changed by a distance check. When to close just move the ship to another position. (but that would be cheating :lol: )

Its all code that is available since 1.74.

I now replaced the whole script, but you could add just this handler in an existing script.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Maybe make the escort target a suitable position a safe distance from the player in readiness for a jump - preferably in some blind spot?

You could use the playerStartedJumpCountDown & playerCancelledJumpCountdown events to trigger the 'ready for jump' mode... :)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
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 »

Kaks wrote:
Maybe make the escort target a suitable position a safe distance from the player in readiness for a jump - preferably in some blind spot?

You could use the playerStartedJumpCountDown & playerCancelledJumpCountdown events to trigger the 'ready for jump' mode... :)
Yes that 15 second countdown should be enough time to fly away far enough as long the player does not follow him. But that gives the player also a responsibility to only jump from locations were the escorts can follow him or he loses his escorts.

Making it fool-proof takes probably much more programming. I assume someone will take the challenge to turn it into a real thing. :roll:
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16073
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Well Known Wingmen (Wingpersons)

Post by Cody »

Ganelon wrote:
Like if there was a chance when you hit a station or seedy bar or etc that you might see people like you "meet" in space with the Personalities OXP available for hire as an escort to the next system.

It should be a small chance, and only possible in systems or Galaxies those people are known to frequent. The sort of station where you'd find them should be consistent with the person/character and their usual legal rating, and they might only be willing to "sign on" with someone of a specific legal rating or experience level.
I'd happily sign-up Carver's bunch of rascals as escort for one of my 'runs'.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Darkbee
---- E L I T E ----
---- E L I T E ----
Posts: 335
Joined: Mon Aug 09, 2004 8:40 pm
Location: Space... man!
Contact:

Post by Darkbee »

Well known Wingman: Barney Stinson

sorry, I couldn't resist. It won't happen again! shoot, who am I kidding... it will happen again.
Darkbee
Oolite: A grOovy Kind of Love
Image
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I wrote HG before 1.74, but yes you are right that it is possible to do now. However I'm not sure the increased complexity over the current method (just respawning them in the new system) is worth the effort, especially as the spawning itself could be done slightly differently to ensure you got the same ships again.

Yes by the follow method you would get the same ships (as in same energy levels, equipment, missiles etc) but the difference in terms of gameplay I think would be small.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

The 'proper' fix would be to add the escort ships to the players' wormhole - which I'm not entirely sure off the top of my head actually exists, but shouldn't be too difficult to add.

This could then also allow pirates to follow the player if they reach his wormhole in time too *G*
The glass is twice as big as it needs to be.
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 »

Micha wrote:
The 'proper' fix would be to add the escort ships to the players' wormhole - which I'm not entirely sure off the top of my head actually exists, but shouldn't be too difficult to add.

This could then also allow pirates to follow the player if they reach his wormhole in time too *G*
No, players don't generate wormholes. Probably because there is nobody left to see it.

I put all the handlers in sync:

Code: Select all

	[self doScriptEvent:@"shipWillEnterWitchspace" withArgument:(standard ? @"standard jump" : @"wormhole")];
	[UNIVERSE allShipsDoScriptEvent:@"playerWillEnterWitchspace" andReactToAIMessage:@"PLAYER WITCHSPACE"];
	
	if (standard && malfunc)
	{
			[self doScriptEvent:@"playerJumpFailed" withArgument:@"malfunction"];
			return;
	}
	
	[UNIVERSE removeAllEntitiesExceptPlayer:NO];
One thing that strikes as odd was that the "playerJumpFailed" could fire after the "shipWillEnterWitchspace" handler. I think its a bug. This failure was not yet present in 1.74, its added in trunk. But when a script gets a "shipWillEnterWitchspace" message, it should be able to rely on that info.

EDIT
After retesting, I was not mass locked at all by the wormhole. The masslock check was already performed before firing the handlers. By pure coincidence I sustained the newly added damage. That broke my jump off and made it possible that I witnessed the wormhole of the ship, that did jump.
With 1.74 it would have just always worked as far as I can see. I think the location of the new malfunction in trunk has to change.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Eric Walch wrote:
No, players don't generate wormholes. Probably because there is nobody left to see it.
Micha wrote:
but shouldn't be too difficult to add.


:)

The way I thought it could work would be for a Wormhole to be added to the 'scanned_wormholes' of the player object so it sticks around, then give any ships in the vicinity a chance to jump into it before all entities in the universe are destroyed. 'vicinity' would be if entity is closer than entities maxSpeed * wormhole collapse time, and it would depend on their AI as to whether or not they actually would.

Then when the player pops out the other end (universe populates new system), all the ships in the wormhole are automatically disgorged too - and at the correct time delays based on how long it took them to get to the wormhole.

Just a thought anyways.
The glass is twice as big as it needs to be.
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 »

Micha wrote:
Then when the player pops out the other end (universe populates new system), all the ships in the wormhole are automatically disgorged too - and at the correct time delays based on how long it took them to get to the wormhole.

Just a thought anyways.
That would be more realistic. Since at least 1.65 we already have the AI command "enterTargetWormhole" that lets ships magically follow the player as long there is a wormhole in the system. Its mainly mend for a player follow a pirate through a wormhole and make sure the remaining pirates are also following. Adding a time delay for reappearance at the other side makes things more realistic. When the player would create a wormhole himself, that ships could always use that function when the player leaves. And even when the player does not create a wormhole, the timedelay could still be added to "enterTargetWormhole" because it always felt like a cheat function as immediately as it works now.

NB my previous edit was added at the same time you posted your message. When relocating the new malfunction, the real problems are over. Its actually not a new malfunction but because of some recent refractory the code just looks different. What has changed is that the jump is aborted when taking internal damage on jump start. Before you ended at the other side with this damage. But it still means that the code must be relocated now it can abort a jump.
Ganelon
---- E L I T E ----
---- E L I T E ----
Posts: 534
Joined: Fri Jul 02, 2010 11:45 am
Location: Around Rabiarce or Lasoce

Post by Ganelon »

My apologies for being quiet on this topic for a day or so. I've been going through some python tutorials to get a bit more up to speed and also going over the code of the Hired_Guns and Personalities OXPs.

As it is done in HG at present, the illusion that the escorts follow you through the wormhole on a witchspace jump (or misjump, for that matter) is reasonably convincing. I never considered that the escorts were respawning with no damage and full fuel tanks, since that isn't really visible to the player.

I think the question of whether that is good enough or if it might be better to have the ships functionally following through the player's wormhole (with fuel stats and damage carried over) largely depends on how the escorts are likely to be used. If it's just for some help on making it to the next system's station safely, then fuel and carried over damage aren't likely to be noticeable.

But it is possible to take the escorts on quite a long haul. Through multiple systems, witchspace misjumps (at least the intentional ones and so I assume also accidental ones) and so on, so long as one doesn't land at a main station. I'm not sure, but I think the Save_Anywhere oxp would also terminate the escort contract, since it seems to function by bouncing the player through the main station of the system to allow the manual save.

But if one is up for playing risky, without saving for quite a few jumps, escorts can go along for quite a long trip. So far I haven't seen much sign of the HG being used that way by most players, but it's possible. On something like a cargo contract involving contraband items, where one usually wants to avoid the main stations anyway, it might be halfway across a galaxy. My thought is if we actually went with carrying over fuel levels and damage, then there'd also have to be a way provided for the NPC escort to stop in for fuel and repairs. That might lead to more complication than this little OXP would be worth, for how it is most likely to be used.

So if, hypothetically, the NPC escort spawns fresh after a jump, the possible problem would be game balance. I think that if the "celebrity" NPCs are limited to only being available in maybe one specific system where the player from the forum or fiction character is known to frequent, it will be a rare enough occasion that it shouldn't be a problem.

The other possibility I can see would be to have the "well known wingperson" say sayonara and depart from the player's company when the NPC's fuel runs low. But that doesn't seem "in character" for most of the Oolite "celebrities" that would be likely candidates for such a mission in the first place.
Sleep? Who needs sleep? Got game. No need sleep.
Post Reply