"Nuclear" lua string.

  • ALEXANDERMW
    8th Oct 2014 Member 0 Permalink

    I'm creating a new element, which will run a nuclear chain reaction by bombarding it with neutrons. But I do not know what it looks like a string that is responsible for a nuclear chain reaction. Please, if anyone knows, give it to me.(In lua format, not cpp!).

  • boxmein
    8th Oct 2014 Former Staff 2 Permalink
    Okay, so the reaction between NEUT and PLUT, say, is controlled with code in two places. For the first part, check out PLUT.cpp.
    Here, you can see that if
    (1) a random number from 0 to 100 is 0 (1/100 chance!), and
    (2) the pressure at (this particle's location) is bigger than (another random number from 0 to 1000),
    then create a NEUT particle onto the PLUT.

    For the second part, look in NEUT.cpp, which defines the rest of PLUT's behavior.
    So, let's dissect it too!

    If:
      (A random number from 1 to 1000) is greater than (pressure at the location + 3)
    Then:
      If the 1/3 chance was true:
        If another 1/3 chance is true:
          Create URAN
        Otherwise:
          Create LAVA
      Otherwise:
        Create more NEUT.
        Move PLUT in the direction of this NEUT particle
      Create 10 * CFDS pressure
      Shinies

    So, just replicate something that does the same!
  • ALEXANDERMW
    9th Oct 2014 Member 0 Permalink

    @boxmein (View Post)

     How to record it all in a script in lua format?

  • boxmein
    9th Oct 2014 Former Staff 0 Permalink
    Well, Lua is a programming language, you could have a try learning it.
  • ALEXANDERMW
    9th Oct 2014 Member 0 Permalink

    @boxmein (View Post)

     How to convert what you said in lua?

  • boxmein
    9th Oct 2014 Former Staff 0 Permalink
    By writing code!
  • ALEXANDERMW
    9th Oct 2014 Member 0 Permalink

    Please write this string!

  • iamdumb
    9th Oct 2014 Member 0 Permalink

    Are you kidding me? Learn lua, write your own code.

  • QuentinADay
    9th Oct 2014 Member 0 Permalink

    It really doesn't take too long to learn Lua, it took like a month at most for me.

  • cat
    9th Oct 2014 Member 0 Permalink

    Honestly, it wouldnt kill anyone to write a script for him, I think this whole topic was asking for a custom element.