characters.plist in 1.71.1

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

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 »

That explains it then. Thanks!
You are welcome. But the only official example of a character was inside Oolite, introduced in version 1.65. Even this one was wrong and didn't set up a missionscreen. I don't think it ever showed his text. I noticed it while rewriting the stuff into JS. The character inside 1.71 does work and sets up a proper missionscreen when free, otherwise attaching its text below an existing one. I would advise not to use much text so it is possible for more than one character to put up a short text simultaneously. (like normal messages for escapepods). Just to prevent missionscreen clashing because you never know for sure you have the only scripted character on docking. When you want to display a full screen, just set up a variable and display a message like an ordinary message.

On your earlier message of not always seeing an pilot escaping:

That is the biggest problem with those pilots. Just spawning an escapepod with a pilot always works, but the official way of letting the pilot jumping in the escapepod himself sometimes fails. But still, this is the most realistic approach. Whenever the remaining energy of a ship drops below the 10% the pilot starts thinking of abandoning ship. When he does, the ship turns into a hulk (white on your scanner). The big problem is that the pilot needs time to get into his pod. To extract a pilot you must give him time to bail ship. When shooting a small, low energy ship with military lasers the ship is often destructed with pilot on board. When energy drops below 10% one additionally laser-shot is often enough to completely vaporise the ship. Whenever I need to capture a pilot I made it a habit to keep a few seconds between shots from the moment on that is starts to throwing sparks.

Somehow this should become common knowledge among players. Maybe someone should write an oxp completely dedicated to "extracting" pilots from ships. UPS has several but none of the pilots is crucial. The only crucial ones are spawned as escape pods. Local_heroes also does spawn them to make sure a pilot ejects. Maybe this is wrong. Only capturing one is crucial for he mission. I think Svengali should change this and just accept that not all Harkovs than will produce the pods. It will be more realistic it the player realy has to extract the pods. And by giving the Harkovs a custom escapepod, the escapepod is still executing its script on scooping.

One final think about bailing pilots. I also witnessed several times an escaping pilot (two white blibs on the radar) and than the pilot smashed into pieces against his own hulk. Probably this is a general problem of ejection from ships that are wide on their tail (like the Boa-MK2 or Anaconda). Also with normal flying my Boa ejected cargo often hits my tail. To do it save I have to pull up my nose when ejecting stuff.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Eric Walch wrote:
Local_heroes also does spawn them to make sure a pilot ejects. Maybe this is wrong. Only capturing one is crucial for he mission. I think Svengali should change this and just accept that not all Harkovs than will produce the pods. It will be more realistic it the player realy has to extract the pods. And by giving the Harkovs a custom escapepod, the escapepod is still executing its script on scooping.
True, yes so true. If I remember right (just took a look in my old developernotes) I have tried to use characters for that purpose and it wasn't working (in v1.69.1). Maybe the bounty-thing? I don't know it anymore - only that there was the problem that the script wasn't executed inflight. Anyway. The whole thing needs a complete overhaul - and it will get it, if I'm able to do these things. But luckily there is a nice forum where I can get some help... :-)
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 »

Svengali wrote:
- only that there was the problem that the script wasn't executed inflight.
Yes, I remember, but that was the code the character runs on docking, but you could have code running on scooping the escape-pod itself. That would be in-flight.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Eric Walch wrote:
Yes, I remember, but that was the code the character runs on docking, but you could have code running on scooping the escape-pod itself. That would be in-flight.
For sure. And it will be so. But why should I do it on my own? We are rich (or will become rich) - remember? So - who wants this job?
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 »

Eric Walch wrote:
Svengali wrote:
- only that there was the problem that the script wasn't executed inflight.
Yes, I remember, but that was the code the character runs on docking, but you could have code running on scooping the escape-pod itself. That would be in-flight.
How can I do that? For my OXP I actually don't want to put up a thank-you-message, but set a variable. This variable will lead to a mission-screen when docking the next time. The script_actions of the character are only executed on docking, so a mission-screen would pop up only on the second tickle after docking, right?

Thus I would very much like to set the variable instantly when the pod is scooped. I just don't know how to. So I would be thankful for an explanation.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Post by Svengali »

Commander McLane wrote:
How can I do that?
Attach a ship-script to the pod. Use the this.shipWasScooped event-handler and voila...
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. So in that case I do need a shipdata-entry for the pod. (That was a yet unanswered question of mine up-thread.)

Thanks! I think with this hint I can do it. (Oh, the new and exciting world of ship-scripts... :) (hm, there is no emoticon for :thrilled: ).)

EDIT: Hmmm, yet another question (or two):

(1) I take it that escape_pod_model does not refer to a dat-file, but a shipdata.plist-entry. Correct?

(2) Do I have to give the custom escape pod the same pilot again as the spawning ship? Or isn't it necessary to give it a pilot at all?

EDIT2: Okay, forget my questions. I finally did the obvious thing and had a look into Localhero for reference. :oops:
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 »

For my OXP I actually don't want to put up a thank-you-message, but set a variable. This variable will lead to a mission-screen when docking the next time. The script_actions of the character are only executed on docking, so a mission-screen would pop up only on the second tickle after docking, right?
On this point there is probably still a small bug in Oolite. In ups I have one character that only sets up a variable on docking, nothing else. On docking you then get an empty arrival screen. Probably this is were the messages should go, but when printing text, nothing happens. When I started on UPS, the only working oxp witch a character.plist was lovecats.oxp. So I used his way to set up my message.

One thing you have to take into account.: When scooping up an escapepod, the pilot is added to the slaves inventory of your ship. On docking they are removed again. The same is true for a scripted character. He will disembark on the very first docking. That could be a rock hermit. When you have a story make sure this fits in your story and don't act like the pilot is disembarking at the main station.
(2) Do I have to give the custom escape pod the same pilot again as the spawning ship? Or isn't it necessary to give it a pilot at all?
EDIT2: Okay, forget my questions.
I see you found it out. A ship has by default a pilot, even when no character was specified. This pilot just jumps into the pod before the ship explodes. When there was already one pilot in the pod, they would probably have to fight about this pod.

But when you spawn the pod (In my opinion not the most realistic way), you have to add the character to the pod yourself. In UPS I have barrels with a character attached to it. I think any scoopable cargo can have a character in it.
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 »

Commander McLane wrote:
(1) I take it that escape_pod_model does not refer to a dat-file, but a shipdata.plist-entry. Correct?
Just to everybody's knowledge, and because it isn't mentioned in the shipdata.plist-documentation (although I will change that (EDIT: done)): escape_pod_model takes the role of the custom escape pod as an argument, not the entry-name!
Post Reply