NPC ships overheating and heat shielding

An area for discussing new ideas and additions to Oolite.

Moderators: another_commander, winston

chaos syndrome
Above Average
Above Average
Posts: 30
Joined: Thu Jun 28, 2007 2:19 pm

NPC ships overheating and heat shielding

Post by chaos syndrome »

After installing sunskimmers, I often end up in dogfights close to the star. Quite a few of these end with the NPC spontaneously exploding, which I guess is caused by the ships overheating.

It would be nice to have these ships having some kind of response to getting to high temperatures (a kind of "run away from the sun" similar to the "run away from the enemy ship" response to low shields).

Plus I do wonder if these ships have heat shielding. What kind of nutter goes anywhere near the star without heat shielding? Is there some way to modify sunskimmers to ensure the ships generated on the witchpoint-sun route have heat shields?
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 »

Sunskimmers is using ordinary, unmodified Oolite ships. There is not even a shipdata.plist in the OXP. So there is nothing to modify.

Some pilots probably are just stupid. (In general I'd say that sunskimming is stupid unless there is a very good reason for it (no main station, trumbles...). The fuel costs are negligible, so economically there is no need for sunskimming IMHO.)
United Blobs
Competent
Competent
Posts: 45
Joined: Sat Mar 24, 2007 7:51 pm

Post by United Blobs »

Couldn't you modify the default shipdata.plist (\Oolite\oolite.app\Resources\Config) to give the ships heat shields?
User avatar
Captain Hesperus
Grand High Clock-Tower Poobah
Grand High Clock-Tower Poobah
Posts: 2312
Joined: Tue Sep 19, 2006 1:10 pm
Location: Anywhere I can sell Trumbles.....

Post by Captain Hesperus »

United Blobs wrote:
Couldn't you modify the default shipdata.plist (\Oolite\oolite.app\Resources\Config) to give the ships heat shields?
I'm reasonably sure it's possible. After all, the infamous Dr. Nil did something similar to his SLAPUs and CZGFs to prevent them going ka-boom if they are too close to a sun.

Captain Hesperus
The truth, revealed!!
Image
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
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'd work if you added to each native ship:-

Code: Select all

<key>has_heat_shield</key>
<true/>
Not totally sure though if heat_shield is the right "tag" for this equipment, but in principle it should work. This would only give the native ships heat shields though. You'd have to add it to each OXP ship (which would be a pain!). The heat shield is quite a new piece of kit, so a lot of OXP ships don't have it included. It makes no odds to the ships (unless it happens to be near the sun). The Doc's sunskimmers just adds ships with a role "pirate", trader, police etc. So a Viper called by sunskimmers would have the heatshield, but a Condor woudn't unless you also added it to the Condor's shipentry.[/code]
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 »

These are a couple of reasons not to do it just so.

Any change that fiddles with the files included in Oolite.app (or .exe, for that matter) are not advisable for the general public, unless there is a general agreement among at least the coders, to change something for the next release. (E.g. there seemed to be something in the direction of an agreement as to make standard the external views of externalviews.oxp by integrating them into the original shipdata.)

If there is an agreement to let all ships of the basic set have let's say a chance of having a heat-shield, I am not against it.

Code: Select all

<key>has_heat_shield</key> 
<real>0.7835951037</real>
Still OXP-ships would have that chance only if their individual creator has given it to them.
chaos syndrome
Above Average
Above Average
Posts: 30
Joined: Thu Jun 28, 2007 2:19 pm

Post by chaos syndrome »

I guess what might work would be to give the sunskimmers a custom role and a whole new set of ships which have heat shielding by default, which would basically mean creating a new copy of shipdata.plist.

Can multiple different types of ship have the same display name?
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 »

Yes, they can and that's of course a possible solution. You can ask Dr. Nil to update (actually re-program, because that would make it many times bigger) his OXP. Or do a sunskimmers v1.0 yourself. The Dr. gave it version number 0.1, so it's clear he didn't consider it "ready" himself. But he is the only one who knows if he already has done some overhauling on it.
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 »

chaos syndrome wrote:
I guess what might work would be to give the sunskimmers a custom role and a whole new set of ships which have heat shielding by default, which would basically mean creating a new copy of shipdata.plist.
This is where like_ship comes in handy. :-)

Non-player ships can’t have heat shielding as an equipment item. However, they can have a heat_insulation setting; the default is 1.0, heat shielding for the player raises it to 2.0. The downside to this is that it can’t be set as a fuzzy boolean (probability) as McLane suggested.
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 »

Commander McLane wrote:
Some pilots probably are just stupid. )
<Holds hand up>
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
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 »

Ahruman wrote:
However, they can have a heat_insulation setting; the default is 1.0, heat shielding for the player raises it to 2.0.
The first time I hear about it. But it's nice. And AFAIK not documented in the shipdata document of the wiki. As are some other settings you just mentioned somewhere.

Therefore a request: Could yo bring the shipdata document up to date, including all methods and settings unknown to us ordinary people?
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 »

Yeah, after 1.69.1 (which doesn’t look far off now).
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 »

I almost went and did it, but then I remembered the Golden Rule of Project Management: if at all possible, get someone else to do it. Some people might use euphemisms like “delegation”, but I’m not going to insult your intelligence. I may well have missed some. Don’t hesitate to ask pertinent questions.

The first column contains keys, the second contains types, the thord contains defaults if not 0/false/empty.

Types: i = integer (whole number), f = floating-point (decimal points meaningful), + = nonnegative (0 or greater) b = boolean, z = fuzzy boolean (boolean or probability as number between 0 and 1)

Settings used in ship loading:

Code: Select all

like_ship                       ship key
max_flight_speed                +f
max_flight_roll                 +f
max_flight_pitch                +f
max_flight_yaw                  +f                  =max_flight_pitch
thrust                          +f
accuracy                        f (previously i)
max_energy                      +f
energy_recharge_rate            +f
forward_weapon_type             weapon type         WEAPON_NONE
aft_weapon_type                 weapon type         WEAPON_NONE
weapon_energy                   +f
scanner_range                   +f (metres)         25600
missiles                        +i
has_ecm                         z
has_scoop                       z
has_escape_pod                  +i
has_energy_bomb                 z
has_fuel_injection              z
has_cloaking_device             z
has_military_jammer             z
has_military_scanner_filter     z
fragment_chance                 z                    0.9
has_shield_booster              z
has_shield_enhancer             z
fuel                            +i
bounty                          +i
ai_type                         AI name              nullAI.plist
max_cargo                       +i
likely_cargo                    +i
extra_cargo                     +i                   15
cargo_carried                   commodity name
cargo_type                      cargo type           CARGO_NOT_CARGO
model                           model name
materials                       material dictionary
shaders                         material dictionary
smooth                          b
density                         +f                   1
name                            string
roles                           role list
exhaust                         exhaust array
is_hulk                         b
subentities                     subentity list
frangible                       b                    yes
laser_color                     colour specifier     redColor
scanClass                       scan class           CLASS_NOT_SET
launch_actions                  plist script actions
script_actions                  plist script actions
death_actions                   plist script actions
setup_actions                   plist script actions
escorts                         +i
beacon                          string
rotational_velocity             quaternion
track_contacts                  b
weapon_position_forward         vector               auto from bounding box
weapon_position_aft             vector               auto from bounding box
weapon_position_port            vector               auto from bounding box
weapon_position_starboard       vector               auto from bounding box
scoop_position                  vector
heat_insulation                 +f                   1
pilot                           character key
unpiloted                       z
Settings used at other times:

Code: Select all

escort-role                     ship role
escort-ship                     ship key
cargo_carried                   cargo type string
missile_launch_position         vector
missile_role                    ship role            90% chance "EQ_MISSILE", otherwise "missile"
escape_pod_model                ship role            escape-capsule
aft_eject_position              vector               auto from bounding box
auto_ai                         b
Settings specific to player:

Code: Select all

extra_equipment                 dictionary
hud                             hud name
view_position_forward           vector               auto from bounding box
view_position_aft               vector               auto from bounding box
view_position_port              vector               auto from bounding box
view_position_starboard         vector               auto from bounding box
custom_views                    array
Settings specific to stations/dockable ships:

Code: Select all

rotating                        b
defense_ship                    ship key
defense_ship_role               ship role
hasShipyard                     b or plist script condition
Notes:
  • accuracy: aiming accuracy modifier. For missiles, it must be in the range [-5..10] and is added to 85 to generate an aiming precision rating on a 0-100 scale (not really a percentage of anything); if not specified, a random value will be used. For ships, it is used to determine firing range; essentially a modifier to a random roll used to decide whether to shoot, with a default of 1, and higher values increasing the chance of long-range shots. The maximum range of the selected weapon type will never be exceeded.
  • script_actions: “used by cargo-containers with CARGO_SCRIPT_ACTION when you scoop them, used by Stations when you dock with them, used during custom system set up too.”
  • setup_actions: this is run very early in set-up -- specifically, before the stuff that’s listed after it above is even loaded.
  • track_contacts: this appears to be experimental stuff by Giles, possibly part of Remora Torpedo support or another of his mysterious scribbled notes. It causes a number of additional AI messages to be sent regarding nearby objects, specifically "CLOSE CONTACT", "POSITIVE X TRAVERSE", "NEGATIVE X TRAVERSE", "POSITIVE Y TRAVERSE", "NEGATIVE Y TRAVERSE", "POSITIVE Z TRAVERSE" and "NEGATIVE Z TRAVERSE". Unless someone finds something useful to do with these, I’ll probably remove/disable this in the stable release.
  • auto_ai: it is by now well-established that I’m utterly incapable of explaining the point of this, but it was added to address the problem discussed here. Generally speaking, if a ship uses more than one of the generic roles, and does not use a custom AI, it should probably have auto_ai set. The most common generic roles are: trader, pirate, hunter. See also: autoAImap.plist.
  • has_escape_pod: looks like a flag, but is actually a count.
  • escape_pod_model: role (not model) for first/main escape pod. Additional escape pods always use role “escape-capsule”.
Special types:
  • ship key: string identifying a ship (key in shipdata.plist, not a role).
  • weapon type: any of WEAPON_NONE, WEAPON_PLASMA_CANNON, WEAPON_PULSE_LASER, WEAPON_BEAM_LASER, WEAPON_MINING_LASER, WEAPON_MILITARY_LASER, WEAPON_THARGOID_LASER
  • cargo type: any of CARGO_NOT_CARGO, CARGO_SLAVES, CARGO_ALLOY, CARGO_MINERALS, CARGO_THARGOID, CARGO_RANDOM, CARGO_SCRIPTED_ITEM, CARGO_CHARACTER
  • material dictionary: documented here.
  • colour specifier: documented here.
  • scan class: any of CLASS_NOT_SET, CLASS_BUOY, CLASS_CARGO, CLASS_MILITARY, CLASS_MISSILE, CLASS_POLICE, CLASS_ROCK, CLASS_STATION, CLASS_THARGOID. There are a few others, but using them is probably a bad idea.
Last edited by JensAyton on Mon Jul 23, 2007 8:51 pm, edited 2 times in total.
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 »

Thanks for your work so far!
Ahruman wrote:
track_contacts: this appears to be experimental stuff by Giles, possibly part of Remora Torpedo support or another of his mysterious scribbled notes. It causes a number of additional AI messages to be sent regarding nearby objects, specifically "CLOSE CONTACT", "POSITIVE X TRAVERSE", "NEGATIVE X TRAVERSE", "POSITIVE Y TRAVERSE", "NEGATIVE Y TRAVERSE", "POSITIVE Z TRAVERSE" and "NEGATIVE Z TRAVERSE". Unless someone finds something useful to do with these, I’ll probably remove/disable this in the stable release.
Please don't remove it, as there has already been found something useful to do with it:

Murgh has used it (and marked it as experimental) in tugs.oxp. The curses the tuggers throw at you when you're coming too close are triggered by the "CLOSE CONTACT"-message.
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 »

Hey, McLane, I notice you haven’t used the spiffy info you requested to update and clean up the wiki. ;-)
Post Reply