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

Ship variant probabilities

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

Moderators: winston, another_commander

User avatar
Judebert
Dangerous
Dangerous
Posts: 88
Joined: Sat Aug 19, 2006 4:56 pm
Location: Orlando, FL
Contact:

Ship variant probabilities

Post by Judebert »

So, I've decided that implementing the "Boas ejecting escorts" observation from another thread would be an easy OXP. (Oy, vey. Look what I'm getting myself into this time.)

I've already updated the shipdata.plist for my new variants, which I call "microcarriers". I copied some of the stuff from the rusty ships OXP. Soon I'll be embarking on a microcarrierAI.plist, and I've found the standard AIs on the wiki. I'll save those questions for later.

I want the ships to show up as variants; say, 10% of the Boas you see should carry escorts. The rusties use a condition where the tech level of the world should be less than 6, but I expect that just eliminates them from consideration in other worlds. The selection is probably still done on the trader(0.2) or whatever other roles are called for.

So, instead of adding them to a role like trader or pirate, is there a way I can specify a ship to replace 10% of "boa" or "anaconda" requests? Will the game actually call the ship name as a role after it figures out the actual role?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
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 »

I don't think there is a way to specifically replace Boas. The native code populates a system with a certain number of ships with the role "trader", depending on the Govenment Type. With no OXPs in, only the Native traders are on the list, with all the OXP traders are on the list (probabley about 50 odd!). OXP designers in their scrips also somtimes call on Oolite to add traders, police, thargoids or pirates at certain points to a system.

Wombat did this in Thargoid Wars and I've done it with Assassins to create NPC battles during the Thargoid Invasion and BattleBot missions.

Heretic was able to replace a certain percentage of cargo cannisters with his custom ones, but I think this was because he gave all his new cannisters have the role cargo. So when Oolite "wanted" to add cargo cannisters, his were on the list to be added.

You might just want to give it the role trader, rather than trader (o.2), as the ship will be pretty rare for players with all the OXPs in just because of the number of ships on the list.

Alternativley, you could call the ship by the role eg: specialboa and then have in the script:-

Code: Select all


{
	conditions = (
						"d100_number greaterthan 80",
						"systemGovernment_number equal 6",
						"status_string equal STATUS_EXITING_WITCHSPACE" 
					); 
	do = ( "checkForShips: specialboa", 
	{ conditions = ( "shipsFound_number equal 0" ); 
	do = ("addShips : specialboa 3"); 
						}, 
					); 
				},
That would add the 3 ships at random places in the system, but only at Democracy and Corporate States and then only 20% of the time.
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
Judebert
Dangerous
Dangerous
Posts: 88
Joined: Sat Aug 19, 2006 4:56 pm
Location: Orlando, FL
Contact:

Post by Judebert »

Thanks for the reply. I believe adding the like-ship attribute gives it the same chance of appearance as any other like ship, and that has the overall effect that 50% of all Boas will be a carrier Boa.

Not exactly what I was looking for, but close enough. It's not like I'm trying to script a mission or anything. (Man, how'd you ever get through building Assassins? I've crashed the game seven times with just this tiny little thing!)
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
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 »

Like-shipping won't do it!

Like-ship just tells Oolite "This new ship that I'm doing is the same as a Boa except where I enter a different value in this ship-entry."

In Assassins (for example) most Characters are in brand new OXP ships, but 2 fly Classic Elite Ships. The Soin Clan Sisters Mambas are liked shiped to normal mambers, but they are still a different ship as far is Oolite is concerned. They have the role "revenge1" and so only appear when Oolite calls for a ship with the role revenge1. Oolite never does this of course, my OXP script adds the ships and then only if other mission related conditions are met and only in certain places. If however, I'd given them the role pirate, say then they would be called by Oolite when looking for pirates to be added to a system.

As for how many times I crashed the game deving Assassins - Lots! If you look at the Random Assassination Contracts (Suggestion Box), you'll see that I knew virtually nothing about OXPing at the start and learned how to do each trick I wanted as I went along.

One thing that really got me stuck was like_shiping. Though bitter frustration I now know, you must include <model> in the shipdata even if the model is the same as the liked ship. :roll: In case it helps I've posted the code for the Soin Clan Mega Mamba. (A super mamba, whose commanders one aim in life is to insult the player with Hails and then kill him.)

Code: Select all



<key>revenge1</key>
  <dict>
	<key>like_ship</key>
	<string>mamba</string>
	<key>model</key>
	<string>mamba_redux.dat</string>
	<key>bounty</key>
	<integer>0</integer>
	<key>roles</key>
	<string>revenge1</string>
	<key>name</key>
	<string>Soin Clan Sister : Mega Mamba</string>
	<key>has escape_pod</key>
	<real>0.0</real>
	<key>forward_weapon_type</key>
	<string>WEAPON_MILITARY_LASER</string>
	<key>laser_color</key>
	<string>orangeColor</string>
	<key>has_ecm</key>
	<true/>
	<key>fuel</key>
	<integer>20</integer>
	<key>has_fuel_injection </key>
	<real>1.0</real>
	<key>max_missiles</key>
	<integer>6</integer>
	<key>max_energy</key>
	<real>1100</real>
	<key>energy_recharge_rate</key>
	<real>8</real>
	<key>max_flight_pitch</key>
	<real>2</real>
	<key>max_flight_roll</key>
	<real>3</real>		
	<key>max_flight_speed</key>
	<real>450</real>
	<key>ai_type</key>
	<string>revenge1AI.plist</string>
	<key>smooth</key>
	<true/>
	<key>death_actions</key>
	<array>
	<string>set: mission_assassins assassins_STAGE3b</string>
	<string>commsMessage: [sister-death]</string>
	</array>
	</dict>

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
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Re: Ship variant probabilities

Post by Captain Hesperus »

Forget 'microcarriers', you want something like this!
Image[/img]

Captain Hesperus
"Would it be easier if I simply surrendered now and avoided the hassle of being blown to stardust?"
User avatar
Star Gazer
---- E L I T E ----
---- E L I T E ----
Posts: 633
Joined: Sat Aug 14, 2004 4:55 pm
Location: North Norfolk, UK, (Average Agricultural, Feudal States,Tech Level 8)

Post by Star Gazer »

Goodness! What's that little gem..?
Very funny, Scotty, now beam down my clothes...
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2310
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post by Captain Hesperus »

Actually it's a Raider Carrier from the Babylon 5 TV series (I scabbed the image from here)....

But it could work as a pirate version of a Behemoth.

Captain Hesperus
"THAT'S a PIRATE!!! May His Holy Processor never crash, get us the hell out of here!"
User avatar
Judebert
Dangerous
Dangerous
Posts: 88
Joined: Sat Aug 19, 2006 4:56 pm
Location: Orlando, FL
Contact:

Post by Judebert »

LittleBear wrote:
One thing that really got me stuck was like_shiping. Though bitter frustration I now know, you must include <model> in the shipdata even if the model is the same as the liked ship. :roll:
Thanks, but... well, I've like-shipped the Anacondas and Boas. Since they don't look any different from the regular ones, I just left off the <model> tag. To test, I added a <role>microcarrier</role> and made a script.plist that created one microcarrier whenever I exit witchspace. The models are showing up and working like regular Boas and Anacondas, thus far.

I'm not interested in using them specifically, like a special mission or anything. I just want to make them appear as some portion of the ones you normally find. So after I get the AI sorted out, I intend to remove the custom role. (Maybe I'll just make it look more like a regular one and add microcarrier, just in case.)

I'm going to post another question on AIs as another topic. I've already done a scan of everything in the Expansions forum, but I'll look through your Assassins question again before I embarrass myself.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Hope you don't mind if I throw in my 2 pence worth, I'm a traditionalist so my view would be that the Boa and Anaconda carriers look identical to the normal ones from a distance, but be slightly different close up, eg bomb bay doors type of thing. Also not to be able to differentiate with the target scanner, the whole idea being that you cannot tell the difference between a normal or carrier version.

In the versions I played that had this feature, you didn't know what reaction you'd get untill you opened fire and then they always dropped a sidewinder, worms would need to be toughened up somewhat to give any effective defence.

Thanks for doing what you are doing.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Judebert
Dangerous
Dangerous
Posts: 88
Joined: Sat Aug 19, 2006 4:56 pm
Location: Orlando, FL
Contact:

Post by Judebert »

I gave Wings a quick look for the "Pimp My Cobra" competition, and as a (former) professional 3D modeler, that thing scares me! I might just be able to make minor mods, but texturing drove me crazy.

I'm right with you on the scanner thing. If I can ever get this to work, you won't be able to tell whether you're beating up a poor, defenceless Boa or about to face four additional Sidewinders. Until they start popping out. In that vein, I don't really want to change their appearance at all. I figure the escorts are small enough to slip out the cargo hatch. (It's probably pretty big. Who wants to load those containers one at a time? You want to let at least four robots through at once.)

On the other hand, I'm trying to duplicate somebody's old Elite experience. If the carrier Boas and Anacondas actually had a different appearance, tell me so (again) and I'll buckle down and figure out how to texture a bomb bay onto the ships.
TGHC wrote:
Thanks for doing what you are doing.
Oh, great, now I've got PRESSURE. :lol: I sure hope I can get this thing to work.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Hey no pressure :)

I don't recall there being any difference in appearance, so don't bust a nut on the 3D thing, it was just my idea of adding to the fun by sneaking up and taking a look before deciding whether to attack or not.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
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 »

You might need to give them a mini-docking slot (reduced to Worm sized), as Roberto tried every trick in the book to get his Shark ship to eject an item and couldn't get Oolite to eject anything except cargo from the cargo hatch.
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
Judebert
Dangerous
Dangerous
Posts: 88
Joined: Sat Aug 19, 2006 4:56 pm
Location: Orlando, FL
Contact:

Post by Judebert »

Funny you should mention it. I'm having trouble with that. I've tried using various addShip methods, to no avail. My debugging shows the code is getting called, but nothing shows up.

I'm still reading through the rest of the Assassins questions. As I recall, there's a missile somewhere that spawns more missiles when it's ECM'd. If I can't copy that, I'll open a new thread for spawning. That way other prospective OXP writers can find their answers more easily.
User avatar
Dr. Nil
---- E L I T E ----
---- E L I T E ----
Posts: 983
Joined: Thu Sep 28, 2006 5:11 pm
Location: Nearest Hoopy Casino
Contact:

Post by Dr. Nil »

Image

300 billboards in Your Ad Here!
Astromines and more in Commies.
AVAILABLE HERE along with other Oolite eXpansion Packs.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2868
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 »

That was Roberto's problem! They would work in Shipdata as death_actions, but if you tried to tell Oolite to Spawn a ship in AI (where you need it to be to launch ships when attacked), Oolite won't do it.

If however, you put a "lauchdefenceship", in all the parts of the normal traderAI that relate to the ship being attacked, then it will launch worms from the mini-docking port or ports if you added several.

In shipdata for the new ship, you'd have to speicify that the is_carrier is true and set the defenseshiprole to the special worm and give it a large number of defenceships. You'd need to define a special worm (as normal worms are unarmed), but you'd just need to likeship to a worm, give it interceptorAI (that makes it attack whichever ship attacked the ship that launched it), arm it with a front gun and give it the role specialworm.
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.
Post Reply