Ambrosia Garden Archive
    • If you wanted to have timed evolution, why not just use a (url="http://"http://www.ambrosiasw.com/webboard/Forum9/HTML/002708.html")counter(/url) and have each evolvable ship set the correct binary value in the bits. When the counter reaches zero, another cron would trigger, changing your ship.

      Would require:
      n+s crons where n is the number of bits and s is the number of ships to be upgraded.
      n+s bits (1 toggle bit for each ship). Cron setup is slightly less cluttered if you use n+s+1 bits.

      I've also got a (url="http://"http://www.ambrosiasw.com/webboard/Forum9/HTML/004987.html")counter(/url) setup using outfits instead which requires:
      5+s crons
      4 outfits
      1+s bits

      For anything over 31 days, its would appear to be a better method.

      E.g. for 3 ships which evolve after 20, 50 and 90 days respectively into a different 3 ships, we would require 8 crons, 4 outfits and 4 bits with my method, compared with 10 crons and 10 bits using the old ncb counter method - at the expense of 4 outfits we save 2 crons and 6 bits.

      Code is as follows for my method:

      Crons:
      Enable On ......... On Start ...... On End ... CIC Entry
      O2 & !b0 ........... D2 G3 G4 .................... Yes ........ Moves total into outfits 3 and 4
      O1 & O3 ............ D1 D3 ........ b0 ........... Yes ........ Compares counter, total in 3 by decrementing until 1 is zero
      !O3 & b0 & b1 ... C4 !b1 ......................... No ........ If counter>=total then 1 evolves into 4
      !O3 & b0 & b2 ... C5 !b2 ......................... No ........ If counter>=total then 2 evolves into 5
      !O3 & b0 & b3 ... C6 !b3 ......................... No ........ If counter>=total then 3 evolves into 6
      !O3 & O4 ........... G2 D4 ......................... Yes ........ Rezeroes 4 and restores the total in 2
      O3 & O4 ............ G1 G2 D4 ... !b0 .......... Yes ........ If counter<total then total is moved back to outfit 2
      O1 & O3 ............ D1 D3 ......................... Yes ........ Sets counter back to pre-calc status

      Ships:
      RID ... On Purchase ... On Capture ... On Retire
      1 ...... b1 G2 * 30 ...... b1 G2 * 30 .... !b1 !b0 D2 * 30
      2 ...... b2 G2 * 50 ...... b2 G2 * 50 .... !b2 !b0 D2 * 50
      3 ...... b3 G2 * 90 ...... b3 G2 * 90 .... !b3 !b0 D2 * 90
      4 ......................................................................
      5 ......................................................................
      6 ......................................................................

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Or you could just have the new evolved ship be a keycarried and have the "fighter" explode. So when you get the evolution a cron gives you the outfit (as in a hangar) called "Metamorphasis" or something like that and your ship would split (both graphically and physically) when the weapon is fired- the split off ship would explode automatically or be invisible or whatever it takes so that it would ~never~ return to the hangar or be picked up- then, assuming the engine works as I think it does- your graphic would remain the new "split" ship, though graphically it would look evolved. Then, for good measure whenever you eventually land a cronny gives you the upgrades for your new ship and the "metamorphasis" is complete. This is all assuming the keycarried works as it says it does- not switching the graphic back to the original earlier evolved ship when the split one explodes. I'll have to run some tests.

      _bomb biggity

      ------------------
      "that'll be 15 cents hippie!"

    • Quote

      Originally posted by Croikle:
      **Actually, this just makes you buy a partially grown ship 1 (like before) if you:
      Buy ship 1. b0001 set. Cron 1 starts ticking. Day 0.
      Buy ship 2. b0001 unset. b9999 set. Cron 1 still ticking. Day 50.
      Buy ship 1. b0001 set. b9999 still set. Cron 1 can't fire since it's still ticking. Day 75.
      Cron 1 fires and sets b0002, but cron 2 can't activate because of b9999. b0001, b0002, b9999 are all currently set. Day 100
      Cron 1 starts and unsets b9999. Cron 2 fires and grows your 25 day old ship. See?

      All this would be incredibly easy if we just had an ncb set string Rxxxx (say) to kill cron xxxx. Just put that in ship 1's onSell, and you're practically done. Any way we can get that in 1.0.8, when the beam bug is fixed?

      **

      Ooooooooooooookay...

      Here we go:

      Ship 1: On buy = b0001 b8888 / on sell = !b0001

      Crön 1: Enable on = b0001 b8888 / duration = 100 / on start = !b9999 / on end = b0002 !b8888

      Crön 2: Enable on = b0001 b0002 !b9999 / duration = 0 / on start = E ship 2 / on end = !b0002 !b0001

      ((Extension to Crön 2: on end = S Mission 1) (Mission 1: Messagebox = You`ve made modifications))

      Ship 2: On buy = b0003 / on sell = !b0003

      Ship 3 - ... : On buy = b9999

      Thats it. Unfortunately the ship cant evolve anymore if the situation you explained would happen.
      I think we need something that unset all required mission bits.

      Crön 3: Enable on = b0001 b0002 !b8888 b9999 / on start = !b0002 b8888

      I hope that was the last bug fix 😉

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-08-2004).)

      (This message has been edited by Terek E`Ban (edited 01-09-2004).)

    • Quote

      Originally posted by Jonathan Boyd:
      **Ships:
      RID ... On Purchase ... On Capture ... On Retire
      1 ...... b1 G2 * 30 ...... b1 G2 * 30 .... !b1 !b0 D2 * 30
      2 ...... b2 G2 * 50 ...... b2 G2 * 50 .... !b2 !b0 D2 * 50
      3 ...... b3 G2 * 90 ...... b3 G2 * 90 .... !b3 !b0 D2 * 90

      **

      That wont work since you cant tell Nova to do something if you have X pieces of item Y.
      So your counter is a nice idea but unfortunately nothing what can be done.

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

    • Quote

      Originally posted by Terek EBan: **That wont work since you can`t tell Nova to do something if you have X pieces of item Y.**

      Which is why it compares the quantity of the item to another item of known quantity. The code works fine.

      Quote

      So your counter is a nice idea but unfortunately nothing what can be done.

      If it's the Gxxx *y type things that you're concerned about, that's just an abbreviation that really means stic in y instances of Gxxx.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Sounds interesting. So you made a working version of it already? I would be very interested in a test plug using this - can you send me one?

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

    • Quote

      Originally posted by Terek E`Ban:
      Sounds interesting. So you made a working version of it already? I would be very interested in a test plug using this - can you send me one?

      Well, I have a test plug with the original BORC coded in that seems to work okay. In theory, the rest should work okay, possibly requiring a few bits to be used to get them to run in the right order, but that's about it. I'll upload the test in a while and post a link.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Quote

      Originally posted by Jonathan Boyd:
      **Well, I have a test plug with the original BORC coded in that seems to work okay. In theory, the rest should work okay, possibly requiring a few bits to be used to get them to run in the right order, but that's about it. I'll upload the test in a while and post a link.

      **

      Cool. I`ll be the first who get it 😉
      If this is working I have one or two good ideas where this could be very helpful.

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

    • Quote

      Originally posted by Terek EBan: **Cool. Ill be the first who get it;)
      If this is working I have one or two good ideas where this could be very helpful.**

      The original BORC counter can be downloaded (url="http://"http://homepage.mac.com/jonathanboyd/evn/BORC_test.sit.hqx")here(/url) now for testing. And If you look elsewhere in the Developer's Corner, you'll see that I've found a way of easily adding large quantities of outfits.

      Incidentally, if anyone is interested in how quickly crons run, the BORC counter takes around to a second to iterate about 5000.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Now lets complete this topic... Here is the final result to let ships evolve into different versions 😉

      BEVOC (Buchholz EVOlution Code):

      Cröns:

      RID...Enable..............................on start.............on end.............duration

      1......b1 + b8 + O 1 + !b7............!b9...................b2 + !b8...........100

      2......b1 + b2 + !b9....................E 2..................!b1 + !b2...........0

      3......b1 + b2 + !b8 + b9.............!b2 + b8..................................0

      4......b1 + b8 + O 2 + !b7............!b9...................b2 + !b8...........100

      5......b1 + b2 + !b9....................E 3..................!b1 + !b2...........0

      6......b1 + b2 + !b8 + b9.............!b2 + b8..................................0

      7......!O3.........................................................!b7...................100

      8......O3......................................b7......................................0

      Ships:

      RID...........on buy...............................on retire...............................info

      1..............b1 + b8.............................!b1

      2..............b3....................................!b3......................................can`t be bought

      3..............b4....................................!b4......................................can`t be bought

      4-768........b9 + G3..........................D3

      Outfits:

      RID...name..........info

      1......Good..........Will be given via mission

      2......Bad............Will be given via mission

      3......Test...........Will be given via ship

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-10-2004).)

      (This message has been edited by Terek E`Ban (edited 01-10-2004).)

    • Quote

      Originally posted by Terek E`Ban:
      **Now lets complete this topic... Here is the final result to let ships evolve into different versions;)

      <snip>**

      Are all of the first few ships supposed to be able to evolve? There are a few fundamnetal flaws here - if you buy ship 1, then switch to ship 2 the next day, buy ship again after 90 days, then it will evolve after fewer than 10 days ownership, instead of 100. You can't simply use crons and durations - you have to use counters.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Quote

      Originally posted by Jonathan Boyd:
      **Are all of the first few ships supposed to be able to evolve? There are a few fundamnetal flaws here - if you buy ship 1, then switch to ship 2 the next day, buy ship again after 90 days, then it will evolve after fewer than 10 days ownership, instead of 100. You can't simply use crons and durations - you have to use counters.

      **

      Youre wrong... Ship 2 and 4 arent available... wouldnt be very clever if they were available since Ship 1 evolves to Ship 2 and 3 to 4. You see, its working 😄

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-09-2004).)

    • Quote

      Originally posted by Terek E`Ban:
      **

      Quote

      Originally posted by Jonathan Boyd:
      **Are all of the first few ships supposed to be able to evolve? There are a few fundamnetal flaws here - if you buy ship 1, then switch to ship 2 the next day, buy ship again after 90 days, then it will evolve after fewer than 10 days ownership, instead of 100. You can't simply use crons and durations - you have to use counters.

      **

      Youre wrong... Ship 2 and 4 arent available... wouldnt be very clever if they were available since Ship 1 evolves to Ship 2 and 3 to 4. You see, its working :D**

      Doh. So much for my reading skills. The problem still exists, however if you buy ship 1 and switch to 3. When are the outifts available? Where do they fit into things? A couple of crons enable on their presence, but yo haven't said if you buy them, is they come with the ships or what.

      If you start with outfit 1, but ship 1, trade it for ship 3 after 50 days, then trade back to 1 after 40 days then 10 days later 1 will evolve. I repeat, you cannot use durations because you need to be able to stop the counting, but can't abort a cron.

      Actually, a better way might be to start a misn with a destination that cannot be reached and a time limit of 100 days. When you sell your ship, have the misn abort. If you keep it for the duration of the misn, however, then it will eventually fail. Stick the evolution code into the OnAbort field. Simple. All you need is one misn per ship. Can't believe I didn't think of that before. Much more efficient than using a counter.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Quote

      Originally posted by Jonathan Boyd:
      **Doh. So much for my reading skills. The problem still exists, however if you buy ship 1 and switch to 3. When are the outifts available? Where do they fit into things? A couple of crons enable on their presence, but yo haven't said if you buy them, is they come with the ships or what.

      If you start with outfit 1, but ship 1, trade it for ship 3 after 50 days, then trade back to 1 after 40 days then 10 days later 1 will evolve. I repeat, you cannot use durations because you need to be able to stop the counting, but can't abort a cron.

      Actually, a better way might be to start a misn with a destination that cannot be reached and a time limit of 100 days. When you sell your ship, have the misn abort. If you keep it for the duration of the misn, however, then it will eventually fail. Stick the evolution code into the OnAbort field. Simple. All you need is one misn per ship. Can't believe I didn't think of that before. Much more efficient than using a counter.

      **

      Thank god you read this twice... I made a HUGE mistake. I had two ships with different evolvings but it has to be a single ship that can evolve into one of two possibilitys. I fixed that above - now it should be what it has to be 😉

      Anyway - it is easy to make it so there are X ships with different evolving strings. And you can also let them evolve up to Y times - in each string (good or bad). I think it wouldn`t be that hard to let one ship evolve to a third string too.

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-09-2004).)

    • Quote

      Originally posted by Terek E`Ban:
      **Thank god you read this twice... I made a HUGE mistake. I had two ships with different evolvings but it has to be a single ship that can evolve into one of two possibilitys. I fixed that above - now it should be what it has to be;)

      Anyway - it is easy to make it so there are X ships with different evolving strings. And you can also let them evolve up to Y times - in each string (good or bad). I think it wouldn`t be that hard to let one ship evolve to a third string too.**

      Still doesn't work. By the very nature of crons, once they start running, they will not stop even if they should. You cannot use them for something like this.

      Take this scenario:
      You buy ship 1. Cron 1 starts. The next day you buy ship 4. 98 days later you buy ship 1 again. Cron 1 finishes the enxt day, firing off cron 2 and evolving the ship instantly, instead of you waiting 100 days.

      You have to use a method that doesn't rely on cron durations because crons can't be cancelled. Misns can be which is why they should be used.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Quote

      Originally posted by Jonathan Boyd:
      **Still doesn't work. By the very nature of crons, once they start running, they will not stop even if they should. You cannot use them for something like this.

      Take this scenario:
      You buy ship 1. Cron 1 starts. The next day you buy ship 4. 98 days later you buy ship 1 again. Cron 1 finishes the enxt day, firing off cron 2 and evolving the ship instantly, instead of you waiting 100 days.

      You have to use a method that doesn't rely on cron durations because crons can't be cancelled. Misns can be which is why they should be used.

      **

      Crön 2 can`t fire. You bought ship 4 so b9 is set... crön 2 can only start if !b9 is set. And crön 1 sets !b9 only on start so everything should working 😉

      BTW: This has been posted before so I had enough time to fix it some posts ago 😄

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-09-2004).)

    • Quote

      Originally posted by Terek EBan: **Crön 2 cant fire. You bought ship 4 so b9 is set... crön 2 can only start if !b9 is set. And crön 1 sets !b9 only on start so everything should working;)

      BTW: This has been posted before so I had enough time to fix it some posts ago :D**

      Whoops, thought there was another !b9 in there. In that case, If you buy ship 1, buy ship 4 the next day, then buy ship 1 again the following day, you'll have to wait 198 days for evolution instead of 100.

      No matter what you do, there will always be a problem when you rely on crons. While the particular falw I've pointed out hasn't necessarily been right each time, the flaw in the system is. Because you rely on durations and crons can not be stopped, situations can arise whereby the wrong time is taken because a cron is already running when it shouldn't be, either leading to a delay or accelerating the process.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Quote

      Originally posted by Jonathan Boyd:
      **Whoops, thought there was another !b9 in there. In that case, If you buy ship 1, buy ship 4 the next day, then buy ship 1 again the following day, you'll have to wait 198 days for evolution instead of 100.

      No matter what you do, there will always be a problem when you rely on crons. While the particular falw I've pointed out hasn't necessarily been right each time, the flaw in the system is. Because you rely on durations and crons can not be stopped, situations can arise whereby the wrong time is taken because a cron is already running when it shouldn't be, either leading to a delay or accelerating the process.

      **

      Yeah thats right... but why is this a "flaw"? So its a sort of "random event". I think its a feature to make this special BEVOC (Nice name, eh? ;) Buchholz EVOlution Code - I thought it would be fun to give it a good name like you have done it with your counter code. :D ) more interesting. And there is another point: The player will get an evolved ship (if he dont switch it) a lot faster - some sort of reward. On the other hand it`s a punishment for switching - the player have to wait longer until the ship evolves.

      Ok there are good reasons for a specific time of evolving but this can be handled by missions too. In this case there would be no need for this sort of coding. Or is there something I forgot to think about?

      BTW: Why would you buy ship 1, buy ship 4 the next day, then buy ship 1 again the following day again??? Is there any good reason for it? - Just a question cause I`am 😕 about it.

      BTW2: Take away the "B" of the codes name and read it again = little funny creatures from StarWars 😉

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-09-2004).)

    • Quote

      Originally posted by Terek EBan: **Yeah thats right... but why is this a "flaw"? So it`s a sort of "random event".**

      I thought that evolution was supposed to occur after a definite period of time. If you wanted a purely random process, there are better ways of doing it using the random operator.

      Quote

      I think its a feature to make this special BEVOC (Nice name, eh?;) Buchholz EVOlution Code - I thought it would be fun to give it a good name like you have done it with your counter code. :D ) more interesting. And there is another point: The player will get an evolved ship (if he dont switch it) a lot faster - some sort of reward. On the other hand it`s a punishment for switching - the player have to wait longer until the ship evolves.

      But the longer he stays away, the lower the penalty will be. If he only switches briefly, he'll have a big penalty. If he stays away for the better part of 100 days, there will only be a small penalty. If he stays away 100 days or more, then there will be no penalty.

      Quote

      Ok there are good reasons for a specific time of evolving but this can be handled by missions too. In this case there would be no need for this sort of coding. Or is there something I forgot to think about?

      If you want a fixed evolution time, you need to use a misn. If you want something random then you're better off using a misn and the R operator to save on resources. If you want a penalty for switching then there are more consistent methods of doing.

      Quote

      BTW: Why would you buy ship 1, buy ship 4 the next day, then buy ship 1 again the following day again??? Is there any good reason for it? - Just a question cause I`am😕 about it.

      The depends very much on the ships involved, the player and the circumstances. It's not inconceivable, so it's a situation that should be allowed for.

      Quote

      BTW2: Take away the "B" of the codes name and read it again = little funny creatures from StarWars;)

      IIRC, they were E w oks, but close.

      ------------------
      (url="http://"http://homepage.mac.com/jonathanboyd/evn/index.html")Classic4Nova plug-in(/url)

    • Thats why I used "" to mark the word ;) Its not a real random factor and it`s not a specifi time.

      If he buy ship 1 and wait 100 days to evolve tha there is no penalty. If he switch his ship from ship 1 to ship 4 and than back he have to wait a long time until it evolves again. If he stays a long time on ship 4 than there is no penalty again that`s right ... Hmmm, I think another crön that lets you wait another 100 days after you switched the ships again (from ship 4 to ship 1) can fix that. - I think there is no need for a misn but I have to test this first... give me some time to check this out, ok?

      Edited: !!! Ok, fixed that! Now the penalty stays the same - it doesn`t matter when you will switch the ship. Just check it out above. 😉 !!!

      R..., eh? Than can be easily implemented into a rön to randomly evolve your ship in one of the two possibilities above. Just another idea 😄

      You`re right. Every possible situation is important to think about.

      I know, I know. But it sounds like that 😉 😄

      ------------------
      Hey, check out the new version of my plug-in. It`s called PlugPackV16.
      You can download it (url="http://"http://www.ambrosiasw.com/cgi-bin/vftp/dl-redirect.pl/PlugPackV16.sit?path=evn/plugins&file;=PlugPackV16.sit")here(/url)

      (This message has been edited by Terek E`Ban (edited 01-10-2004).)