Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Toupie

Pages: 1 [2]
16
Suggestions / Cost of manufacturing
« on: October 14, 2013, 02:45:55 pm »
XR-1 vs XR-2
The difference in the amount of resources needed to manufacture the XR-2 Robot versus the XR-1 robot is so huge that it's
much more economically to make several XR-1 robots instead of the XR-2 robots, considering the rather small improvement in performance of the XR-2 over the XR-1. The XR-1 Robot is probably overpowered based on the cost to make it. Maybe the amount of components for the XR-2 robot is a bit high, does it really need 6 x Disintegrators, 20 x Compact Storage Storage Cells and 8 x M12 Electric Motors. I calculated the resource costs for the XR-2 to 201 x Copper Bars, 141 x Iron Bars, 170 x Stainless Steel Bars and 35 x Glass Bluegraton compared to the XR-1's 1 x Grey Cast Iron Bar, 4 x Copper Bars, 2 x Bronze Bars, 2 x Stainless Steel Bars and 4 Iron Bars. Just wondering how much will the higher level robots need to be made?

Voxel Materialize/Dematerializers.
These two are also require very large amounts of resources to make. Maybe lower the number of Disintegrators/Atomic Materializers needed.

Atomic Compressor.
Considering the amount of stuff it can store it's way to cheat to make. Maybe make a simpler version that has a very limited amount of slots.

Sequencer.
Also way to cheap to make considering how powerful it is. (This is probably the most powerful item in game.) It can store huge amounts of resources, and since you can manually put stuff into it's "Input" area, you can very easily automate production by putting all the needed parts in the Input except the last BlackRock Blue and then just feed it BlackRock Blues to make it sequence out all the needed resources.

M11 / M12 Electrical Motor
The amount of Copper Wire needed to manufacture is a bit high. Maybe change the amount of Copper Wire you get for every Copper Bar when you make Copper Wire to compensate for that.

Jet Engine.
Seriously?? 1 x Axel and 16 Iron Bars? This should probably be one of the most expensive items to make in the game.

17
Gallery / Pictures of my work area
« on: October 11, 2013, 10:26:24 pm »
Some pictures of my Ore Smelter and Blue Glass manufacturing facilities, my multi purpose manufacturing area and a stairway to heaven.

And yes, I have 'customized' the BlackRock bitmaps since the world was a bit to dark and depressing for me, and added the descriptions on all the ores so I can tell them apart. I mixed up Chrome and Nickel to often.

18
Programming with Blackvoxel / Stair building script
« on: October 11, 2013, 09:44:35 pm »
A script for the programmable computer that will dig/build stairs for you. The shape of the stairs are stored as arrays in the script. Each array represents what the computer will have to do to build 1/4 of a revolution of the spiral staircase.

With some work you can add your own stair shapes. Only your imagination is the limit :P

The script will NOT save it's state on a save/load since it uses variables to store it's state, and I don't know how to save them.

Configuration
MineNearOre: Change if the computer should mine blocks outside of it's programmed path when it finds them. 0 = No, 1 = All none BlackRock block, 2 = Usefull minerals, +4 = Also 'follow' the ore. (it will walk back the same way and continoue it's build where it left off)
MaxMineFollow: How far it will walk of while mining ore.
RefillOre: If it should fill those empty slots created from mining ore outside the programmed path. 0=No, 1=Only Floor, 2=All.
Rares: What blocs are considered useful ores.
VoxelOrder: The order it should use BlackRock blocks to refill holes with. Based on the order of which the block appear on the central blue plains.
Path: Defines the shapes of the stairs created. It's a table that contains arrays, where each array is one shape. (Example. One builds the floor of an stair up into empty space.) Here you can add your own shapes.
PathNo: What variant to use from the Path table. Here you specify the index of the array in the path table.

When you want to start building the stairs you place the computer at the bottom one off the corners of what will be the central pillar of the spiral stair. If you need to restart/continue building a stair you can place the computer at the bottom of any corner of the central pillar and it will automatically calculate what rotation to start from based on the level (GetY) it is placed on.

Example of a 3 wide 7x7 spiral staircase seen from above where X represent the different possible starting locations.
Code: [Select]
2223444
2223444
22X3X44
111 555
00X7X66
0007666
0007666

Script:
Code: [Select]
// Build Stair

MineNearOre <- 6;    // 0=Do not mine near ores, 1=Mine all near none Black Rock, 2=Only Mine usefull near ores. +4=Follow
MaxMineFollow <- 16; // How far to follow ore
RefillOre <- 2;      // 0=Do not refill after mining ore, 1=Only refill on floor (does not work well with follow), 2=Refill all
Rares <- {[26]="Au",[44]="X",[60]="C",[74]="Fe",[109]="Diamond",[111]="U",[112]="Cu",[122]="Ti",[150]="Pb",[197]="Al"};
VoxelOrder <- [ 1, 3, 2, 5, 6, 4, 8 ,9, 7, 10, 10, 10, 10 ]; // The order that Black Rock Voxels should be used (The order they appear in on the central blue plains
PathNo <- 4;         // What variant to Build

// Path:
//  first value=Level change from one execution of the path
//  the rest:
//  0,1,2,3,4,5 mine voxel in that direction (See Blackvoxel manual for what different directions the numbers represent.)
//  +8 also move in that direction
//  +16 Place voxel in that direction if there is not already a solid voxel there. Usefull for making stairs in empty space.
Path <- {
// Dig 3 Wide 4 High Down (7x7)
  [0] = [ 2,
          9, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 18,
9, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
11, 11 ],

// Dig 3 Wide 6 High, Down (7x7)
  [1] = [ 2,
          9, 12, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 18,
9, 12, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
11, 11 ],

// Dig 3 Wide Up
  [2] = [ 2,
          12, 9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 18,
12, 9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
9, 12, 12, 12, 8, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21,
11, 11 ],

// Build 3 wide stairs Up with railings. For use in empty space (7x7)
  [3] = [ 2,
          10, 17, 8, 12, 9, 21, 18, 8, 21, 8, 21, 16
          12, 9, 21, 16, 10, 21, 9, 21, 8, 21, 16, 9, 21, 16, 17, 10, 21, 17, 10, 21, 17, 11, 21 , 11, 21 ],

// Dig 4 wide 10 high Down. (11x11)
  [4] = [ 4,
          9, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21, 18,
          9, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21, 18,
          9, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21, 18,
          9, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21,
9, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21,
9, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21,
9, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 12, 10, 12, 8, 8, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 10, 13, 8, 13, 21, 10, 21, 10, 21, 10, 21,
11, 11, 11 ]
};


Time <- 0;
Step <- 0;       // Current step in the path
Direction <- 0;  // Current rotation adjustment
MinePath <- []; // Dynamic path created while following ore.


/*
Levels
  -1 Black Rock Blue
 -65 Black Rock Green
-129 Black Rock Orange
-193 Black Rock Cyan
-257 Black Rock Yellow
-321 Black Rock Red
-385 Black Rock Purple
-449 Black Rock Grey
-513 Black Rock Pink
-577 Black Rock White
-621 Nothing
-631 Water+Black Rock White
-636 Black Rock White
*/

function Voxel_Step()
{
local i,j,v,done;

  // Init
  if (Time == 0) {
      Time = GetGameTime();
      // Calculate start direction based on Level.
i = GetY();
if (i<0) i = -i;
  Direction = (i/Path[PathNo][0])%4;
  }

  if ( (GetGameTime() - Time) > 1 )
  {
    Time = GetGameTime();
  } else {
    return;
  }

  done = 0;
do {
// Check for end of path
if (Step >= Path[PathNo].len())
{
Step = 1;
Direction = (Direction+1)%4; // Next execution of path will be rotated one step clockwise.
}
i = Path[PathNo][Step];

// Get direction part of path
j = (i%8);
if (j<4) // Don't rotate up/down
{
// Modify move/dig value with direction
j = (j+Direction)%4;
}

v = Look(j);
if ((i & 16)==16) { // Bit 8 set = Place Voxel
if (GetVoxelProp(v,0)) { // If it is not a solid, place one.
v = GetBlackRockForLevel(j);
if (v>0)
PlaceVoxel(j,v);
}
} else {
if (MinePath.len()==0) {
if (!GetVoxelProp(v,0)) // If it is a solid, mine it.
PickVoxel(j);
}
if (MineNearOre > 0) {
if (MineFollow())
return; // We have moved, so need a new Step before we can do anymore
}
}

if ((i & 8)==8) { // Bit 3 set = Move also
if (!Move(j)) {
log_err("Could not move! "+j);
}
done = 1;
}
Step++;
  } while (done==0)
}

function MineFollow()
{
local i,j,v;
local reverse=[2, 3, 0, 1, 5, 4];
i = 0;
j = MinePath.len();
if (j>0) {
if ((MinePath[j-1] & 8) == 8) {
i = MinePath.pop() & 7;
v = GetBlackRockForLevel(i);
if (v>0)
PlaceVoxel(i,v);
}
}
while (i < 6) {
v = Look(i);
if ( ((MineNearOre & 1) && (!GetVoxelProp(v,0))) || // All none Black Rock Solids
   ((MineNearOre & 2) && (v in Rares)) ) {  // Rare Ores
if (PickVoxel(i)) {
if (MineNearOre & 4) {  // Follow
if (MinePath.len() < MaxMineFollow) {
MinePath.push(i);
Move(i);
return true; // We have moved, so need a new Step before we can do anymore
}
}
}
}
i++;
}
if (MinePath.len()>0) {
i = MinePath.pop();
Move(reverse[i]);
if ((RefillOre == 1 && i == 5) || RefillOre == 2)
MinePath.push(i+8); // Push direction + 8 to indicate that we need to refill the voxel
return true; // We have moved, so need a new Step before we can do anymore
}
return false;
}

// Returns the VoxelType of Black Rock Voxel that is most approriate for the level in the robots inventory. 0 if none present.
function GetBlackRockForLevel(dir)
{
local adds=[0,0,0,0,1,-1];
  local a,level;
  level = GetY() + adds[dir];
  if (level<0) level = -level -1;
  level = level / 64
  if (level>=VoxelOrder.len()) level = VoxelOrder.len()-1;
  for (a=level; a>=0; a--) {
      if(GetQuantity(VoxelOrder[a])>0) {
          return VoxelOrder[a];
      }
  }
  for (a=level; a<VoxelOrder.len(); a++) {
      if(GetQuantity(VoxelOrder[a])>0) {
          return VoxelOrder[a];
      }
  }
  return 0;
}

function log_info(msg)
{
Display( "Robot at " + GetX() + "," + GetY() + "," + GetZ() + " Info: " + msg, 1000, 4, 500);
}

function log_err(msg)
{
Display( "ROBOT AT " + GetX() + "," + GetY() + "," + GetZ() + " Err: " + msg, 1000, 4, 1000);
Time = Time + 1500;
}

19
Programming with Blackvoxel / Voxel_Load Voxel_Unload
« on: October 11, 2013, 08:23:12 pm »
Is there a way yo use then Voxel_Load and Voxel_Unload to store the state of variables when the game is saved and loaded?

When I place a computer it automatically starts executing script 0.nut and also seems to execute the Voxel_Load function. But if I change script in the computer dialog and hits "Load / Compile" the Voxel_Load function does not get called for that script. That doesn't look correct to me.

Pages: 1 [2]