• 2

    posted a message on [Surv] Skyblock
    Having loads of fun, though spent the 1st night stuffing myself up in various ways, had to restart about 20 times before I got the hang of always stashing my valuables. So here's what I got so far, bare in mind I've avoided reading any spoilers or the temptation to watch anyone elses progress on youtube. This is 2.0 so I've got limited dirt but haven't lost a single block as yet. I've fallen off a couple times and died by accident, but aside from that no cheating. Picture is taken from the platform I built to the sand island. I haven't figured out the cobblestone generator yet, so resorted to making massive lavafalls and introducing them to mr waterfall which I got quite good at, though it's probably a pretty inefficient way compared to a properly working cobblestone generator from what I've heard. Still yet to get my portal lit too, that's probably the next most pressing challenge to figure out.

    Posted in: Maps
  • 0

    posted a message on ComputerCraft Program Library
    Quote from Mort96

    This mod is just really awesome, but I got a problem:
    I've made a program that's an infinite loop. It's something like this:
    while true do
       print("password: ")
       pass = read()
       if (password matches then door opens, if not dispensers shoot etc.)
       end
    end


    Now to the problem: I want to edit my code. How can I do that? The program is never terminating itself as it's an infinite loop, and I cannot find any other way to exit the program than destroying the machine, which will delete my program :/

    This mod is really really awesome, and it'll be really good if anyone could help me fix my problem :sad.gif:


    You should always be careful with while loops, before your program is finished do something like this to give yourself a way to kill the loop...

    while redstone.getInput( "left" ) ~= true do


    Don't worry though, you can edit the programs on any computer by closing Minecraft then finding the save directory. It'll be in a sub directory under computer or something. This is obviously also a better way to use a real code editor to build complex programs too.
    Posted in: Mods Discussion
  • 0

    posted a message on ComputerCraft Program Library
    My first play with this, a morse code S.O.S. Beacon. I assembled this code after checking out the other programs supplied in the mod.


    Just type "edit startup" and put in this code...
    os.run( {}, "rom/programs/clear" )
    print ( "Running SOS Beacon..." )
    
    -- Put a sticky piston with something bright on top
    local sSide = "top"
    local nCount = 3
    local nPeriod = 1
    
    -- Redstone from the left will halt execution
    while redstone.getInput( "left" ) ~= true do
      -- S:
      os.run( {}, "rom/programs/redpulse",
              "top", nCount, nPeriod )
              
      -- O: not a pulse as such
      for n=1,nCount do
        redstone.setOutput( sSide, true )
        sleep( nPeriod*2 )
        redstone.setOutput( sSide, false )
        sleep( nPeriod )
      end
      
      -- S:
      os.run( {}, "rom/programs/redpulse",
              "top", nCount, nPeriod )
    end
    
    print ( "Redstone execution halt signal detected." )
    Posted in: Mods Discussion
  • 0

    posted a message on mce: Command-Line Degriefer and Editor
    Ahhh cool, makes sense now.
    Posted in: Alpha - Survival Multiplayer Discussion
  • 0

    posted a message on mce: Command-Line Degriefer and Editor
    Quote from codewarrior »
    Sorry about that, deleteChunk wasn't updating the loaded chunks dict because I had just done a bit of reorganization. The latest github revision should have a working deleteChunk.


    I'll update... and no way am I knocking what you've done there. You made the unimaginable, entirely possible for me. The only other feedback I have for you is the examples in the comment of mclevel.py about chunk "Data" was incredibly misleading...

    # Set all BlockData from height 64 up to 0.
    # Take note that the array is indexed x, z, y. The last index corresponds to height or altitude.
    # Also take note that the Data, BlockLight, and SkyLight arrays have been unpacked from 4-bit arrays to numpy uint8 arrays,
    # by the call to getChunk. This makes them much easier to work with.
    aChunk.Data[:,:,64:] = 0;


    I couldn't get such a command to work, but using Block instead of Data here worked fine. Took me a good hour or so of trial and error to figure out I wasn't insane and that I shouldn't be using Data for what I wanted to do (among the other challenges of learning a new programming language). To this day I'm still not sure what Data is for.
    Posted in: Alpha - Survival Multiplayer Discussion
  • 0

    posted a message on mce: Command-Line Degriefer and Editor
    Well I'm not going to write the radius for loop stuff for you, but here's some of the 1st code that I wrote to remove chunks and create empty chunks.... http://pastebin.com/Jqu4yh51

    There is a native remove chunk method that totally didn't work for me, I'm not sure why. I had a look at the code and copy-pasted os.remove(aChunk.filename) into my removeChunk and it worked, then I noticed though I had to reload the world to pick up the fact it was gone. Notice at the end of createNullChunk it also reloads the world a couple of times in there. You may or may not need to do that depending on what you do.

    You can easily change createNullChunk into a function that generates a big bedrock chunk by looking at the two lines starting with aChunk.Blocks and making them just fill the chunk with bedrock (aka Adminium).
    Posted in: Alpha - Survival Multiplayer Discussion
  • 0

    posted a message on mce: Command-Line Degriefer and Editor
    Thanks heaps! This is a great development resource. I spent one night about a month ago pasting all my maps together using MCEdit. Then I needed some way to join them together so it doesn't all look so butt ugly along the seams. With this tool I was sort of able to make my map looks a little better, but it's still a little ugly. I want to post here my concept for a utility I'm working on now. Python's new to me and I don't have a lot of spare time. Hopefully someone can see where I can cut some corners, or I can sew some seeds and someone will beat me too a finished product :wink.gif:. I think this function would be very well suited to the exiting MapDeleter / Pine Tree Generator app.

    Minemeld - Procedural map joining utility (based on pymclevel)

    User specifies chunks along the edge of two maps. Steps in the melding process for these chunks as so...
    1. Randomly generate the bedrock layers, fairly easy to bluff this with something that looks about right
    2. Fill the rest of the chunk with bedrock (bedrock will be our null block to ignore during the melding process, air is not a good thing to ignore)
    3. Come up with an algorithm to extrapolate 2x2x2 area of blocks from possibly any number of surrounding blocks, include some noise (steps using this denoted with "*")
    4. Fill in chunk sides 2 blocks thick based on the surrounding chunks*, ignoring 4x4 corners (occational random 1 block staggering). Only lay basic natural blocks (no ores)
    Now I'm not sure how this will actually work with adjacent chunks that are part of the melding process yet. It's fair to make a rule that minemeld will only allow 2 adjacent melding chunks that must be well separated from one another. By the end of step 4 these sides should be filled and contain no bedrock.
    5. Fill in corner blocks*, based on the sides we've just filled in and the surrounding chunks (L shaped 4x4 with innermost 2x2 left out).
    6. Generate a column in the middle 4x4 blocks based on generated sides*
    7. Fill in the 4 adjacent 4x4 columns
    8. Fill in the 4 remaining 4x4 diagonal columns
    9. Generate random ore deposits, lava & water springs, etc (make some guestimates of frequency and area they natually occur)

    Here's the order I've described above to generate columns of a chunk, order of generation from darkest to lightest...


    It's been slow going and the actual code I have doesn't match this process at all yet, it still generates fairly ugly chunks. The algorithm I mention in step 3 doesn't exist either yet. It's been a good excuse to learn Python though and reading up on concepts like 3D noise generation.
    Posted in: Alpha - Survival Multiplayer Discussion
  • To post a comment, please .