Ambrosia Garden Archive
    • Debugging a simple plug


      curse, mumble, groan

      Did you ever notice that although multitudes of escape pods get used throughout the Novaverse, you never see any drifting around. Especially in uninhabited systems. And even when you eject in your own escape pod (you do always purchase one, don't you?) the description that pops up says:

      "After several weeks of sensory deprivation as you drift aimlessly in space , trying to stay sane in the tiny little cabin of your escape pod, a passing prospector picks up your distress beacon and is kind enough to come to your rescue."

      So I thought I would create a disabled "Drifting Escape Pod" përs and give it a rescue type LinkMission similar to the existing derelict passenger rescue mission. And then I could have yet another way to earn credits or gain status points or acquire goodies. I chose to use përs RID 1151, the last përs available according to the Nova Bible, which states that there are 1024 përs resources starting at RID 128. I also used the existing Escape Pod shďp(895) for the përs ship. But try as I might, I couldn't get that darned përs(1151) to appear. And yes, I did all the right things like always starting a new pilot and specifying the new përs with a 100% probability of appearance via a s˙st resource. But all to no avail. Drove me crazy for the past three days trying to get this theoretically simple plug to work.

      To make a long story short, I found three things that caused all my frustration.

      First day's bug:
      Contrary to what the Nova Bible states, a përs resource with an RID of 1151 just will not appear. Period. It just does not get created. Ever. When I changed the përs RID to 1150, Shazaam- the përs appeared. Hooray!!

      Second day's bug:
      But (oops) where's my LinkMission? Guess what? Any LinkMission specified for përs(1150) will never be offered. Period. Apparently there's something anomalous going on at the upper bounds of the përs resource handling routines in the game-engine. Changed my përs RID again down to RID 1149 and everything's OK. Except...

      Third day's bug:
      Well, maybe not really a bug, just undocumented behavior. We all know that ships specified with zero armor will immediately self-destruct upon being created. But, did you know that ships with an armor value of even 1, 2, or 3 will also self-destruct IF the shield value is specified as zero as well? I didn't know that. Took me a day to find that one.

      After all that, I figured it would be best to share my experience in the hope of saving someone else all that frustration and work.

      p.s.- This is all on EV:N 1.0.8

    • But it was an good idea. :unsure:

    • Hey, I've thought of doing something similar to this. In my idea you would rescue the pod by loading it into the cargo bay. Then the pod must disappear from screen - any ideas on how one might achieve that?

    • you should have the escape pod unable to turn, but still have engines. It behaves like those annoying traders that say "can you take my cargo?"

      When they send out a distress signal like so, you are given passengers instead of cargo, and the pod continues on it's aimless way.

      mainly because escape pods drift...

      This post has been edited by Insomniac : 22 August 2005 - 02:46 AM

    • This is a great idea for a plug-in. When you're finished, I'll definately be downloading it.

    • Arturo, on Aug 22 2005, 12:22 AM, said:

      Third day's bug:
      Well, maybe not really a bug, just undocumented behavior. We all know that ships specified with zero armor will immediately self-destruct upon being created. But, did you know that ships with an armor value of even 1, 2, or 3 will also self-destruct IF the shield value is specified as zero as well? I didn't know that. Took me a day to find that one.View Post

      That's an odd bug/feature. Sounds somewhat similar to the problems with DeathDelay being too low.
      Anyway, I like the idea for your plug. I hope you don't run into any more bugs...

      Guy, on Aug 22 2005, 01:46 AM, said:

      Hey, I've thought of doing something similar to this. In my idea you would rescue the pod by loading it into the cargo bay. Then the pod must disappear from screen - any ideas on how one might achieve that?View Post

      If you're using përses, you could just replace their ship with a self-destructing ship without any explosions (strip the explosions off the escape pod and see if Arturo's first bug extends to düdes).

      Edwards

    • Weird... but cool. And weird. And cool. But weird.

      I can't even imagine what sort of code would prevent linkmissions associated with përs 1150 from starting. Maybe some sort of iteration that loops 1 number before it's supposed to, but... oh well. Glad you were able to diagnose the problems, and gladder still that you shared them with the independent developers here, many of whom might need to work around them.

      Thanks Arturo.

    • Guy, on Aug 22 2005, 12:46 AM, said:

      In my idea you would rescue the pod by loading it into the cargo bay. Then the pod must disappear from screen - any ideas on how one might achieve that?
      View Post

      Edwards, on Aug 22 2005, 09:45 AM, said:

      If you're using përses, you could just replace their ship with a self-destructing ship without any explosions (strip the explosions off the escape pod and see if Arturo's first ( I think you meant third ) bug extends to düdes).
      View Post

      Sorry, but that isn't possible. I just tried it and it's a definite no-go. It seems like every time I try something that's specified in the Nova Bible but that wasn't actually used in the default scenario, it doesn't work.

      Keep in mind that it's not possible to hail a përs ship that has a gövt with the "disabled ships" flag set. That's a bug that's already been reported. It's also not possible to board a përs ship unless it is disabled.

      If you have a non-disabled përs with flag 0x0040 (replace përs shďp with mďsn SpecialShip) set and you don't have flag 0x0200 (offer LinkMission when boarding) set, then the ship replacement occurs just fine as soon as the player accepts the LinkMission. However if you have a disabled përs with both flag 0x0040 and flag 0x0200 set, then here's what happens:

      1st, the mďsn SpecialShip won't show up until the player lands on a spöb and then takes off.

      2nd, the original përs ship never goes away. It's still there when the player takes off.

      So you wind up with a dead in space përs ship and an alive mďsn SpecialShip. And evidently the "refuel a stranded ship" option bypasses all of this, since that works fine. Yet another Nova weirdity.

    • I dont understand your problems exactly, but If one of them revolves around the escape pod being there every single time, there is a pers flag (0x0100) That removes the pers once it is rescued.

      Also, those oddities with the upper bound might relate to old data on which persons are dead and which alive. Try it again with a new pilot (though a fencepost error of this nature is certainly plausible. I doubt it would go back two though.)

      I feel like i am missing something in the previous post, I don't see any real bugs in the behavior of pers and linkmissions, I have had quite a number of them work properly.

      The final thing i can think of... remember to leave a death delay of about 20 or the ship never completely dies.

    • Neb,

      The përs 0x0100 flag causes the përs with a LinkMission to only appear once. The effect that Guy suggested was to make the përs ship disappear as soon as the LinkMission was accepted. Flag 0x0100 doesn't do that.

      In the topic opener I clearly stated that "I did all the right things like always starting a new pilot..." so that any old alive-dead përs status bits were reset every time I tried it out. The problems of përs(1151) never appearing and përs(1150)'s LinkMission never being offered are very reproducible bugs (for me anyway).

      I too have created over 100 përs resources with LinkMissions that all worked as expected. Until I tried to use përs RIDs 1151 and 1150. Maybe you or anyone else that's interested enough could try creating përs 1151 and 1150 with a LinkMission and let us know if you can get either of them to work.

      Actually I've been able to use a DeathDelay as low as 2 that still causes the ship sprite to completely die and disappear. But that's academic at this point because using the LinkMission to replace the përs ship with a SpecialShip doesn't work the way that's needed for Guy's suggestion.

    • Arturo, on Aug 24 2005, 09:58 PM, said:

      Actually I've been able to use a DeathDelay as low as 2 that still causes the ship sprite to completely die and disappear.
      View Post

      Does that value vary between machines?

      Here's a couple of ideas:

      1. Give the ship a cloak so that as soon as you rescue it it cloaks.

      2. Make it a xenophopic planet-type ship armed with planet-type weapon that will damage itself, so that as soon as you rescue it it fires at you but kills itself instead.

    • Guy,

      Getting the NPC ship to destroy itself isn't the problem. Getting the approachable përs ship to be swapped at the appropriate moment for a self-destructing ship is where the problem exists.

      I have no way of knowing if the DeathDelay is platform dependent. Someone else (like yourself) would have to run some DeathDelay tests to see if it's the same for their make and model of personal computer. My suspicion is that the DeathDelay functionality would not be platform dependent, but could very well be EV:N version dependent.

    • edit

      This post has been edited by NebuchadnezzaR : 24 August 2005 - 08:12 PM

    • Arturo, on Aug 25 2005, 12:18 AM, said:

      Getting the NPC ship to destroy itself isn't the problem. Getting the approachable përs ship to be swapped at the appropriate moment for a self-destructing ship is where the problem exists.
      View Post

      Ah, I see, but why don't you just make invisible mission which you can get from anywhere to create the escape pod somewhere and not use a pers at all?

      This post has been edited by Guy : 24 August 2005 - 09:14 PM

    • Sorry, i misunderstood the bit about having to land on a spob. I thought you were complaining about the pod being rescuable every day.

      Does anyone know what happens if you have a ship with zero armor in a rescue mission? If it is allowed to be disabled, then an invisible rescue ship mission would convert it from forced disabled into its natural state, that is, autodestruct.

      This might work.

      This post has been edited by NebuchadnezzaR : 24 August 2005 - 08:27 PM

    • How do you make a disabled pers?

    • Give him the always disabled govt. But for my second idea, i meant a normal dude in a rescue mission.

    • Bah, just realised the "rescue" goal doesn't actually repair the ship. That's my ideas out the window.

    • ?

      I thought it did. The bible seems to think so.

    • NebuchadnezzaR, on Aug 24 2005, 06:21 PM, said:

      Does anyone know what happens if you have a ship with zero armor in a rescue mission? If it is allowed to be disabled, then an invisible rescue ship mission would convert it from forced disabled into its natural state, that is, autodestruct.
      This might work.
      View Post

      Neb,
      That was a good idea. But ... sorry, it doesn't work. When the rescue SpecialShip is switched in, it immediately disappears (armor = 0) instead of going disabled until boarded as you thought might happen. Good try though.

      The way I have it set up right now is a non-disabled përs in a ship with zero Speed, Accel, and Turn values, plus përs Flags2 0x0001 "starts with zero fuel" is also set. The përs LinkMission has ShipDüde that has a "disabled ships" gövt and a ShipGoal of 5 "Rescue Them".

      The përs sends out a general "Distress signal" type hail specified by the përs Hail parameter. When the player opens communications with the përs, the LinkMission offer dësc appears asking to be rescued. If the players accepts, then the mďsn ShipDüde is switched in, goes disabled, and sends out an automatic "Waiting for docking" hail. The player then boards the SpecialShip at which time the "Survivor" cargo is loaded, the SpecialShip is then no longer disabled by the misn but goes nowhere because of its "disabled ships" gövt. The player then takes the survivors to their ReturnStel destination for cargo unload, mission completion and payoff.