Author Topic: Minecraft: Blockland Edition  (Read 16538 times)

Sounds awesome.
I've got ore seeding in and clusters are going in once I work out the subtle syntax error in the following function:
Code: [Select]
function orecluster(%brick)
{
echo("Ore gem cluster made");
initContainerBoxSearch(%brick.getWorldBoxCenter(), 10, $typeMasks::fxDTSBrickObjectType);
while(isObject(%orebrick = containerSearchNext())){
if(%brick.colorID > 0 && %brick.getcolorID < 5 && getRandom(1,2) == 1){%orebrick.setColor(%brick.colorID); echo("Ore cluster made");}
if(%brick.colorID > 4 && %brick.getcolorID < 9 && getRandom(1,3) == 1){%orebrick.setColor(%brick.colorID); echo("Gem cluster made");}
}
}
I packaged killBrick to allow cave-ins to happen, this also resulted in bricks not being able to be killed without using the brick destruction tool I had to quickly slap together. I'll make a thread for it once it becomes at all playable.

More importantly, keep up the good work Truce.
« Last Edit: October 12, 2009, 11:11:56 AM by Deathwish »

I was going to PM you until I found I can't send PM's any more.

I can't either  :cookieMonster:

-code-

More importantly, keep up the good work Truce.

Code: [Select]
initContainerBoxSearch(%brick.getWorldBoxCenter(), 10, $typeMasks::fxDTSBrickObjectType);
Are you allowed to just put 10? I always used "10 10 10".

Code: [Select]
%brick.getcolorID
It's a method, not a field.

Code: [Select]
getRandom(1,2)
getRandom usually freaks out when put into a switch statement, so I'm not sure if it's the same with an if test. You might want to test that out a little.

Also, thanks.

Nix told me to replace %brick.colorID with %brick.getColorID ):
Blarg, this has all the core features I want in Dwarf Fortress Gamemode, such as collapsing sand, though I was more wanting to have trees collapse if they were unsupported and make explosions, killing all the miners in one freak accident.

Nix told me to replace %brick.colorID with %brick.getColorID ):

To clarify:

%brick.colorID is the field,
%brick.getColorID() is the method.

Blarg, it's not actually changing any bricks in the containersearch.

Nice job on this Truce.
I <3 this mod.

Added a list of the features I've put so far into v0.6; still going to put a couple more before I call that version finished.

Code: [Select]
class  fxDTSBrick : public SceneObject {
  public:
   virtual int getDestructionVolume() {}
   virtual bool canExplode(maxVolume, maxFloatingVolume) {}
   virtual int getAngleID() {}
   virtual int getColorID() {}
   virtual int getPrintID() {}
   virtual int getColorFxID() {}
   virtual int getShapeFxID() {}
   virtual bool isBasePlate() {}
   virtual bool isPlanted() {}
   virtual bool isDead() {}
   virtual bool isFakeDead() {}
   virtual int getFakeDeadTime() {}
   /*! Returns number of bricks in downlist. */
   virtual int getNumDownBricks() {}
   /*! Returns up brick at given index. */
   virtual int getDownBrick(int index) {}
   /*! Returns number of bricks in downlist. */
   virtual int getNumUpBricks() {}
   /*! Returns up brick at given index. */
   virtual int getUpBrick(int index) {}
   /*! sets isTrusted value */
   virtual void setTrusted(bool val) {}
   virtual bool setDatablock(datablock) {}
   virtual void setColor(int color) {}
   virtual void setColorFX(int colorFxID) {}
   virtual void setShapeFX(int shapeFxID) {}
   virtual void setPrint(int printID) {}
   virtual int plant() {}
   /*! Returns number of connections away from the ground */
   virtual int getDistanceFromGround() {}
   /*! Returns true if brick is attached to a baseplate. */
   virtual bool hasPathToGround() {}
   /*! Returns true if brick is attached to a baseplate (considers blown-up bricks to be dead). */
   virtual bool hasFakePathToGround() {}
   /*! Return the datablock this fxBrickDB is using. */
   virtual int getDataBlock() {}
   /*! Dumps the upbrick list. */
   virtual void dumpUpList() {}
   /*! Dumps the upbrick list. */
   virtual void dumpDownList() {}
   /*! exposed = no bricks attached to one end */
   virtual bool iloveposed() {}
   /*! removes brick and any floating children */
   virtual void killBrick() {}
   virtual void setColliding(bool val) {}
   virtual bool isColliding() {}
   virtual void setRendering(bool val) {}
   virtual bool isRendering() {}
   virtual void setRayCasting(bool val) {}
   virtual bool isRayCasting() {}
   virtual int getExposedAreaTop() {}
   virtual int getExposedAreaBottom() {}
   virtual int getExposedAreaNorth() {}
   virtual int getExposedAreaSouth() {}
   virtual int getExposedAreaEast() {}
   virtual int getExposedAreaWest() {}
   virtual int getLightId() {}
   /*!  returns true if killing this brick will cause others to fall */
   virtual bool willCauseChainKill() {}

   /*! @name Transform
   @{ */
   /*!
    */
   MatrixPosition position;
   /*!
    */
   MatrixRotation rotation;
   /*!
    */
   Point3F scale;
   /// @}


   /*! @name fxDTSBrick Stuff
   @{ */
   /*!
    */
   GameBaseDataPtr dataBlock;
   /*!
    */
   int angleID;
   /*!
    */
   int colorID;
   /*!
    */
   int printID;
   /*!
    */
   int colorFxID;
   /*!
    */
   int shapeFxID;
   /*!
    */
   bool isBasePlate;
   /*!
    */
   bool isPlanted;
   /// @}

};
Use it next time.
Or a dump() looks much prettier

yay troos. i should probably finish that map/build i was working on for this.

Just added lava in. It's pretty much the same thing as water, but aside from being red, there are a few technical differences:

- Lava flows 2x slower than water (1000 ms compared to 500 ms)
- When lava collides with water (or vice versa), they form stone
- Sponges can't stop lava, but lava is only found on bottom level

I also fixed a small little bug with flowing water that probably didn't affect gameplay currently but might in the long run.

Double post.

Small bugfixes:
- Fixed admins being able to place water bricks within a sponge radius in admin mode.
- Admins could still place lava when they turned admin mode off; this was a quick fix.
- Fixed water not flowing into sponges that're in the process of being killBrick'd.

Question for people who have played:
How do you think I should make the landscape generator work? Keep in mind that I can't use too may bricks, or it'll take awhile for people to ghost and even lag some of the lower-end computers. I'm just looking for your input on how big the caves should be, how much lava/water should be there by default, etc.

:oooo

For landscapes:

Emulate the "infinite mining" trick, set up an array with brick data.

$Mine_brick[%x,%y,%z]="sand";

etc.

When they mine, the bricks below are revealed, thus allowing for a large landscape with minimal initial brick usage.


:oooo

For landscapes:

Emulate the "infinite mining" trick, set up an array with brick data.

$Mine_brick[%x,%y,%z]="sand";

etc.

When they mine, the bricks below are revealed, thus allowing for a large landscape with minimal initial brick usage.

Hm, I never considered using that for this. It would be interesting though: there's a chance they'll find a "cave", which will just make a few of the newly-created bricks get mined instantly, and some of those mined instantly as well, creating a large air-pocket-esque space.

Also truce, how about that there project you were working on?

Talk to meh ):