Ambrosia Garden Archive
    • cron not firing?


      I have a cron event which is designed to take place just after the player has taken on either the 'Head to Earth' or 'Head to Neilha Memorial Station' misns near the end of the Polaris storyline.

      Within the standard Nova package (running on Windows), if the player had chosen to Head to Earth, then b315 would be set: if to Neilha Memorial Station, b314 would be set. Once the player finishes that misn and heads back to Ar'Za Iusio (or whatever that place is...), b334 is set, among others.

      I implemented tests for both of those ncbs in my cron's EnableOn string. I also included a restriction that it will not fire if a custom control bit is set (meaning that the cron has already fired).

      Thus, my cron event (for Head to Earth -- the Head to Neilha version is almost precisely similar) is as follows:

      Name: Flagship of the Federation Invasion
      All First/Last Dates: -1
      Random: 100
      Duration: 0
      Pre-Holdoff: 1
      Post-Holdoff: 0
      EnableOn: b315 & !(b7314 | b334)
      OnStart: K207
      OnEnd: b7314

      However, despite having a Pre-Holdoff set*, the cron still doesn't happen. I double, triple, quadruple, and quintuple-checked my pilotlog, and I can say with absolute certainty that only b315 is set. EnableOn should evaluate to true: (b7314 | b334) == 0, b315 & !0 == 1.

      This leads me to believe that there is a bug, or something is documented way too little... =/

      • After lengthy searches, I read a post on the boards which said crons don't work if Duration, Pre-Holdoff, and Post-Holdoff are all zero. I deliberately set Pre-Holdoff to 1 for that reason. However, the cron still isn't working.

      ------------------

      (This message has been edited by Spuzzum (edited 08-13-2004).)

    • The crön will simply evaluate OnEnd twice if all three are zero (though in some cases, this may be useful; for instance, if you have a weirdly branching string, you could make On End "R(^b1 ^b2)" so that it would randomly toggle one of the two twice—thus, you can have 3 options—b1 & b2, !b1 & b2, or b1 & !b2). I don't know if it's supposed to be a feature or not, but it can be used to your advantage. I don't know how it would handle two R(^b1 ^b2) statements.

      Have you checked your debuglog to make sure it isn't still active? Also, you may try puting an Sxxx in there and then checking the MI dialog. Finally, it may sound obvious, but even I have fallen prey to this simple mistake due to carelessness: make sure you set all the resources to the correct ID#.

      Oh, and welcome to the boards! It's nice to see someone who actually did some research before going on the Nova board and saying "how do u mak plugs cuz i wan 2 chang da gam". 🙂

      And you used the search feature , too! 🙂

      ------------------
      The programmer's code of entomology: there's always another bug.
      There are 10 types of people in the world: those who understand binary and those who have friends.
      Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
      (url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url) | (url="http://"http://www.evula.org/infernostudios/search.html")Add-ons Search Engine(/url)

      (This message has been edited by orcaloverbri9 (edited 08-13-2004).)

    • I agree with orca: make sure the bits mentioned in this post are the same as those you put in your cron resource. What I would also check is that the "require" fields are all blank. Otherwise, I see no reason as to why it wouldn't work. Though if you still have problems after checking the ID, the bits and the require fields, try changing the duration for example. Maybe you have a bug for the "pre-holdoff" field

      ------------------
      Pace
      (haldora)
      -- Cartman: I hate hippies! I mean, the way they always talk about "protectin' the earth" and then drive around in cars that get poor gas mileage and wear those stupid bracelets - I hate 'em! I wanna kick 'em in the nuts!

    • You might want to try giving it a duration of one, it may not like doing onStart and onEnd at once. Otherise, I can't see a problem.

      ------------------
      (url="http://"http://www.evula.org/aftermath")Aftermath(/url)

    • Normally, the "duration: 0" doesn't change anything.
      In Mission Computer, it says:

      Quote

      ( ) if this is set to zero, the event will start and end on the same day, i.e. its OnStart and OnEnd scripts will be run at the same time

      ------------------
      Pace
      (haldora)
      -- Cartman: I hate hippies! I mean, the way they always talk about "protectin' the earth" and then drive around in cars that get poor gas mileage and wear those stupid bracelets - I hate 'em! I wanna kick 'em in the nuts!

      (This message has been edited by Pace (haldora) (edited 08-13-2004).)

    • Why put them in OnStart and On End? You could join them together into just OnStart or just OnEnd.

      ------------------
      The programmer's code of entomology: there's always another bug.
      There are 10 types of people in the world: those who understand binary and those who have friends.
      Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
      (url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url) | (url="http://"http://www.evula.org/infernostudios/search.html")Add-ons Search Engine(/url)

    • I ultimately decided to merge the two crons and two ranks into one cron and one rank, in case the architecture was the problem. I also changed the pre-holdoff to zero, set the post holdoff to 1, and changed the duration to 1 as well. Still no dice.

      Here's the complete plugin:

      cron 707 (new cron)
      Name: Flagship of the Invasion
      All Days/Months/Years: 0
      Random: 100
      Duration: 1
      Pre-Holdoff: 0
      Post-Holdoff: 1
      EnableOn: (b314 | b315) & !(b7314 | b334)
      OnStart: K207 b7314
      OnEnd: (blank)
      Contribute: (all bits off)
      Require: (all bits off)
      All Government and News fields: -1

      (Intended Logic:
      IF player has taken Head to Neilha Memorial Station OR player has taken Head to Port Kane THEN
      ....IF cron has fired before OR player has completed Return to Ar'Za Iusia THEN
      ........DO NOT ACTIVATE
      ....ACTIVATE)

      misn 887 (patching over)
      (data is all equivalent to out-of-the-box Nova, except:)
      OnSuccess: b148 b332 b333 b334 b613 b9995 b9500 M472 Q25048 L207 (added L207)

      rank 207 (new rank)
      Name: Flagship of the Invasion
      Weight: 2
      Government: 147 (Nil'kemorya)
      Salary: 0
      Salary Cap: 0
      Price Mod: 5 (a 500,000 Manta would cost 25,000)
      Conversation Name: Strike Leader
      Short Name: Strike Leader
      Contribute: (all bits off)
      Flags: 0x0008 (rank is permanent), 0x0100 (won't attack player), 0x0200 (always land), 0x0400 (battle assist), 0x0800 (free refuelling)

      (Explanation of Nova control bits used:
      b314 is set by vanilla Nova if player accepts Head to Neilha Memorial Station;
      b315 is set by vanilla Nova if player accepts Head to Port Kane;
      b334 is set by vanilla Nova if player has completed Return to Ar'Za Iusia;
      b7314 is a do-once flag set by the plugin if cron event has fired.)

      It's almost as if the plugin isn't even being included at all. Which is really weird, because debuglog.txt reports that it is being loaded, and my other plugin (which sets the mission from Koria to only take 8 tons of cargo instead of 10) works just fine.

      ------------------

      (This message has been edited by Spuzzum (edited 08-14-2004).)

      (This message has been edited by Spuzzum (edited 08-14-2004).)

      (This message has been edited by Spuzzum (edited 08-14-2004).)

    • I can't spot a single thing that could cause a malfunction
      Try maybe making pre-holdoff 1 also and putting the K207 and B7314 OnEnd instead of OnStart maybe that will change it.
      Can't see anything else (maybe check if the "evaluate continuously" field is on or not )

      Edit: did you try with a pilot who hasn't yet accepted the mission?

      ------------------
      Pace (haldora)
      Triton Yards CEO ~ (url="http://"http://speculation_plug.home.insightbb.com/")Speculation(/url)
      -- Cartman: I hate hippies! I mean, the way they always talk about "protectin' the earth" and then drive around in cars that get poor gas mileage and wear those stupid bracelets - I hate 'em! I wanna kick 'em in the nuts!

      (This message has been edited by Pace (haldora) (edited 08-14-2004).)

    • Try not using a crön,but instead use overwriting mïsns that execute the Kxxx.

      ------------------
      The programmer's code of entomology: there's always another bug.
      There are 10 types of people in the world: those who understand binary and those who have friends.
      Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
      (url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url) | (url="http://"http://www.evula.org/infernostudios/search.html")Add-ons Search Engine(/url)

    • Quote

      Originally posted by Spuzzum:
      cron 707 (new cron)

      This may be the problem, I think Nova only allows for 512 cron events, which puts your RID out of range.

      But, I think orcaloverbri9 is on the right track, sounds like you don't really need a cron. Editing the mission might be the more reliable means of granting the rank.

      ------------------

    • Well, a cron is the only way for me to go; I've already accepted the mission, and the point of the plugin was to make it possible to complete it. I didn't want to start the whole Polaris storyline over because I had too little cash to make my Raven strong enough to have a good chance of success. 😃

      Here's what I wrote in the readme:
      _"This is a simple plugin which has no very visible impact on the game. It is
      designed to provide a decisive advantage to being the spearhead of the invasion
      forces of the Polaris. I had recently purchased a Raven class vessel before
      taking on the final string of missions for the Polaris, and my cash reserves
      had been depleted. Much to my chagrin, I discovered that my Raven simply was
      too outclassed to complete the invasion mission. In order to counteract that
      disorder, I made a plugin designed to alleviate that problem.

      The plugin is simple: it adds a CRON event which will check to see if the
      mission is in progress, and, if so, give the player a RANK: Flagship of the
      Invasion. What the rank does is reduce the costs of purchasing technology from
      the Nil'kemorya by 95% until you have completed the conflict. The rank is
      removed once you return to Ar'Za Iusia -- meaning that you can improve your
      ship for the battle, and then repair it afterwards, but can't really exploit the
      cost advantage. You can stroll into the battlefield with a (mostly) complete
      warship for the mission, but the costs of the technology will return to normal
      thereafter. For instance, a replacement Manta for a carrier costs 500,000
      credits: with the plugin installed, a replacement Manta will only cost you
      25,000 credits for the duration of the mission and the return.

      This means that if you have next to no money, you'll still have to earn a bit
      of money first. This simply reduces the time required to build up your fi-
      nances, because the mission does have an extreme sense of urgency; it makes
      sense that, if you couldn't afford it, your elevated title among all Polaris
      would mean that the Nil'kemorya would devote much of their resources to ensuring
      that the flagship is at the highest combat readiness for the mission. If you
      have tons of money to burn, after all, the fact that they're charging pennies
      wouldn't matter anyway. You might consider this a cheat, but I consider it
      rescuing a savegame which has reached an impasse."_

      Anyway, the 512 limit is probably it. I'll tweak it to 607, which is within the index range (607 - 128 = 479).

      ------------------

      (This message has been edited by Spuzzum (edited 08-15-2004).)

    • Indeed, that's what it was. I am now the Flagship of the Invasion. Whee. 😃

      Now I just need to figure out while Nil'ar Peset isn't reducing their prices... (was Price Mod actually implemented...?).

      ------------------

    • For some strange, obscure, very specific reason that nobody understands (either that or a bug ;)), PriceMod only affects ships—much to my (and others') chagrin.

      ------------------
      The programmer's code of entomology: there's always another bug.
      There are 10 types of people in the world: those who understand binary and those who have friends.
      Windows users: stop asking for plugins. (url="http://"http://www.aznt.com/EVN/EVNEW/")Make one yourself.(/url)
      (url="http://"http://www.cwssoftware.com")Sephil Saga Website(/url) | (url="http://"http://www.evula.org/infernostudios/search.html")Add-ons Search Engine(/url)

    • Given the two days' of hair pulling I put into it, chagrin isn't quite the word I'd use to describe it. 😉

      ------------------