Scripters cove

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

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 »

This isn't really a priority but if its easy to add could we have an spawnShipWithCloud type command, so that when a ship is added it emerges from a Hyperspace cloud? I've been sitting at the witch point a lot playtesting and other ships entering the system look really cool as the emergy from their entry cloud. Somthimes in a script you want to call ships to a position as if they've just jump in. Although you can do this with an addships they then just pop into existance, which looks a bit odd if the player is there to observe it.
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
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post by Arexack_Heretic »

I thought ships always got the cloud even if called by an addShips method.

maybe the cloud animation on entry got left behind in the conversion to JS?
Riding the Rocket!
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

I also think that the cloud effect is always there. For instance when a thargoid carrier is spawned with addShips, there are huge blue disks emanating from it and filling half the sky, even if the ship itself is not even in my current view.

What's that, if not an exiting-hyperspace effect?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Arexack_Heretic wrote:
maybe the cloud animation on entry got left behind in the conversion to JS?
No; all the current JS ship-adding methods just call the old ones. (And I also thought they created hyperspace clouds…)
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 »

Pretty sure they don't. I'm currently adding a spacebar, asteroids, mining machines, a mining hopper and a bunch of thargoids at the witchpoint to playtest the new AI for the bars and hunters and the collection / launch AIs for hopper and autominers. The ships added with addships just appear, its only the ships being added at the w/p with the system populator that have an entry cloud. This is different to the blue sphere you get when a ship exits a system by making a jump. Its like a ripple in space from which the ship emerges. Looks very nice! 8)
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
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Okay, you're right.

Some testing reveals that the witchspace-exit cloud appears when addShips is used.

It does not appear when any other method of the family is used, namely addSystemShips, addShipsAt, addShipsAtPrecisely and addShipsWithinRadius.

And it certainly is not supposed to appear with spawn, because this method's special purpose is to replace one entity with another (like a ship with a model of its wreck). It wouldn't make sense to have the replacement pop out of witchspace.
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

One question. Is it possible to have a ship bound to a character and have that character unique (that is, you can meet him until he's alive) ?

Where could I find documentation about that ?
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
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 »

saint wrote:
One question. Is it possible to have a ship bound to a character and have that character unique (that is, you can meet him until he's alive) ?
You mean something like this? Than you should look inside lovecats.oxp. That uses such characters. You could also look in ups-courier that contains such characters.
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Exactly that... I need it for a red TIE sporting the cross of the Deutsch Ritterorden... :)
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
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 »

If you also want the model of the ship to be unique, its probabley easier just to create a mission ship version of the normal one. Just put an entry in shipdata and give it a unique role. Then when you want him to appear spawn that particular unique ship.
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
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Thank you very much...
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Frame
---- E L I T E ----
---- E L I T E ----
Posts: 1477
Joined: Fri Mar 30, 2007 8:32 am
Location: Witchspace

Post by Frame »

Ahruman wrote:
Arexack_Heretic wrote:
maybe the cloud animation on entry got left behind in the conversion to JS?
No; all the current JS ship-adding methods just call the old ones. (And I also thought they created hyperspace clouds…)
this was never "fixed" or modified to allow for scriptability in regard to wheter a cloud should be drawn or not...


as only the two token version will draw a hyperspace cloud..

Code: Select all

- (void) addShips:(NSString *)roles_number
{
	NSMutableArray*	tokens = ScanTokensFromString(roles_number);
	NSString*   roleString = nil;
	NSString*	numberString = nil;
	
	if ([tokens count] != 2)
	{
		OOLog(kOOLogSyntaxAddShips, @"***** SCRIPT ERROR: in %@, CANNOT addShips: '%@' (expected <role> <count>)", CurrentScriptDesc(), roles_number);
		return;
	}
	
	roleString = [tokens objectAtIndex:0];
	numberString = [tokens objectAtIndex:1];
	
	int number = [numberString intValue];
	if (number < 0)
	{
		OOLog(kOOLogSyntaxAddShips, @"***** SCRIPT ERROR: in %@, can't add %i ships -- that's less than zero, y'know..", CurrentScriptDesc(), number);
		return;
	}
	
	OOLog(kOOLogNoteAddShips, @"DEBUG: Going to add %d ships with role '%@'", number, roleString);
	
	while (number--)
		[UNIVERSE witchspaceShipWithPrimaryRole:roleString];
}
in particular the last of the function

Code: Select all

[UNIVERSE witchspaceShipWithPrimaryRole:roleString];
will draw a witchspace cloud, by calling the function

Code: Select all

[ship leaveWitchspace]
Bounty Scanner
Number 935
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

saint wrote:
One question. Is it possible to have a ship bound to a character and have that character unique (that is, you can meet him until he's alive)?
This is a bit creepy, you know. :shock:
User avatar
saint
Dangerous
Dangerous
Posts: 75
Joined: Fri Jul 24, 2009 5:17 pm
Location: 45.371747 N, 12.011885 E - Sol III
Contact:

Post by saint »

Commander McLane wrote:
saint wrote:
One question. Is it possible to have a ship bound to a character and have that character unique (that is, you can meet him until he's alive)?
This is a bit creepy, you know. :shock:
Yep :) :), while he's alive!!!!
Image
Cmdr. Saint, Golden Gladstone with 4 leaves Clovers of the Most Noble Order or The B.D.c.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

Commander McLane wrote:
saint wrote:
One question. Is it possible to have a ship bound to a character and have that character unique (that is, you can meet him until he's alive)?
This is a bit creepy, you know. :shock:
Says the Commander who wrote the Flying Dutchman ;)
Post Reply