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 - TheArmyGuy

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 19
76
HOW TO MAKE INTERACTIVE BRICKS

Seeing as how I had to ask four people things before I could get started, I thought it might be handy to make a tutorial on how to make interactive bricks, like the default doors and the skull.

Let us first get some things out of the way:
  • This is NOT a tutorial on how to make JVS bricks. You should not make JVS bricks because they slow the game to a crawl and are generally outdated and complicated. If you want to make them however, go ahead, I just cannot help you at all.
  • This tutorial will be focussing on Blender as modeling tool. Any modeling tool that exports .obj files will work, I'm just picking Blender because that's what I use and because it's free for everyone to use, unlike, say, Milkshape 3D.
  • Text in CAPS LOCK should be customized by the user. Don't be that guy who asks for help because his door shows up as 'DOORNAME HERE' in-game.
  • Please read all of the tutorial before asking stuff. Some of the information may be somewhere else in the tutorial.
  • Please don't kick my ass for preferring General's exporter, especially Badspot.

Requirements:


STEP 1:
Making the models


First, you will need to make your door models. Making a blb door requires you to have either 2, 3 or 4 models, depending on how interactive your brick is. 2 is the absolute minimum since you will need at least a model for the ClosedCW-state and the OpenCW-state. You can however add another model for OpenCCW and even a ClosedCCW1.

We will make these models in Blender, and we need to set up certain rules we must abide by so we're all on the same page. Since we will be using General's exporter2, and not Badspot's, we need to model in the plane, around the center. That means when our door is done, the topmost edge and bottommost edge are both an equal distance away from the center. We will go into further detail about what is required for using this specific exporter later on in this tutorial.

Most default doors use frames. It is however possible to make a frameless door, but that usually looks bad. Since making the frames to the exact size of the default doors can be a pain, I premade some. Below you will find the 4frame, 6frame and 8frame. All of these are just frames, no collision boxes or bounding boxes have been added. And just in case, no, you shouldn't put this in your add-ons folder and it will not show up in-game if you do.

4frame:

Download:
.blend: https://www.mediafire.com/?b39l4h15w1g3wcv
.obj: http://www.mediafire.com/view/awxcnzwxw2p2wck/4frame.obj

6frame:

Download:
.blend: https://www.mediafire.com/?agvti6nvj0vdcnh
.obj: http://www.mediafire.com/view/zdxbcmg2c6e1rtw/6frame.obj

8frame:

Download:
.blend: https://www.mediafire.com/?saqa7au56s0us3r
.obj: http://www.mediafire.com/view/wj8ry71562bgn82/8frame.obj

To get these frames into Blender, start a new session and click File > Import > Wavefront (.obj), navigate to where you downloaded the frame and import it. The frame will show up in Blender and already has the correct position and scale, so all you need to do is put a door in there. I won't go in to any detail about how to model in Blender, there are some really great tutorials out there for that.

First, we want to make our ClosedCW model. This will be the default stance of the door, in which it is closed. Make your model accordingly, and make sure you stay within the frame. Technically you don't have to, but else it'll look silly unless you increase the size of the frame as well. Now that you've got your ClosedCW model done, save it somewhere safe as a .blend file. Now we need to make our OpenCW model. This can be easily accomplished by selecting the door, selecting everything but the frame, pressing P and then 'selection'. Normally the non-frame part of your door should now be a different object. If you're not using Blender, do whatever your modeling program requires you do to do make an object out of a selection. Usually it will be enough to just rotate this new object 90 degrees and sliding it into position, making it look like an opened door. Be sure to make it open clockwise, as this is our OpenCW-model. If your door is more complex, like for example a sliding door, just make the model look like how you want it to look in the opened state.

Now that we have our 2 required models, it's up to you if you want to make an OpenCCW version. I really reccomend this, as it's super-userfriendly and handy, but it's not really technically required. A sliding door has no clockwise or counterclockwise opening for example. It's also good to note that the OpenCCW does not have to be a mirrored version of the OpenCW one atall, it can be a completely different model, as I did with my Left4Dead door.


The leftmost one is ClosedCW, the middle one OpenCW and the rightmost one is OpenCCW. This does however require extra eventing, as noted in my add-on thread.

As for ClosedCCW, same story, but for another closed version. This is really rare though, and the only door I know of that uses it is the default 'Glassiest' door.

STEP 2:
The technical bit of the models


We need to add some things to our models to make them game-compatible. They need 2 things: A bounding box and one or more collision boxes. The bounding box is the cube (it doesn't have to be a single cube, but for our purposes we'll use a cube) that defines the area the brick 'needs'. Other bricks cannot be planted in the bounding box of our door. The bounding box is the wireframe of the brick you see if you uncheck 'rendering' in-game, and equip a wrench.


Here we see a 2x2 brick and it's bounding box.

Some very important things we need to remember:
  • Models do not have any collision. They do not posess any colliding properties. Players walk right through them if no collision is added (although the converter automatically adds a cuboid one if none is specified).
  • The bounding box is seperate from the collision box. They do not interact, apart from the fact that collision boxes must be inside of the bounding box. The model however does not have to be entirely inside of the bounding box.
  • The collision box can be one cube, two cubes, or 10 cubes. Best is that you use 4 cubes to form a 'doughnut' with a hole in the middle the player fits through.
  • Every single collision box must be a seperate object. You cannot have 2 cubes in the same collision box object. Each cube must be a seperate object. This is due to the converter.

We should start with our ClosedCW model. Add a cube that encompasses our entire door (make sure it's a different object than our door!), and make sure it's the exact size of the frame. That means it's centered, and has a long side of 7.2 Blender units and a short side (the bottom and top) of x Blender units, x being the width of your frame in Blockland studs (so 4, 6 or 8 if you are using one of my templates). To show the length of a face in Blender, scroll down in your N-key menu to 'Mesh Display' and check the box in front of 'Length' at the bottom of said section.

Now select your bounding box object. In the top right of your Blender-window there should be a tree of objects, the root being 'Scene'. Your selected object should be highlighted in white. Right click it, and choose 'rename'. Rename your bounding box to 'BOUNDS', without the apostrophes. That's the bounding box of our ClosedCW model taken care of. We still need one for our OpenCW and OpenCCW models. This is actually very easy. Open your OpenCW or OpenCCW (doesn't matter which one you do first)-model. Repeat the exact same steps we used for the ClosedCW door. You should now have a box around your frame with a part of your door sticking out, because it's opened.


Part of the door is sticking out.

Select the face on that side, and drag the blue arrow until the bounding box more or less encompasses your entire door. Now you need to make it so the length of the bounding box extending away from the frame is exactly one of the following values: 1, 2, 3, 4, 5, 6, 7, 8. This is to make sure your bounding box lines up with the brick grid. You can make exact sizes in blender using the Transform - Median tool in your N-key toolbar. Repeat this process for the OpenCCW version if you have one.


The bounding box now more or less encompasss our brick. In this case it's 4x4 bricks, so part of the door sticks out, but that's not a problem.


You can see the collision box clearly behind the opened door. For the rest of the collision box I duplicated the frame and separated it into 4 different objects. So basically there's 2 frames on top of eachother, one for the model and one for the collision.


The collision box and the model separated. (You should have a bounding box by now, but I removed it so you can actually see something.)

Now we have to add the collision boxes. Seeing as we're using General's exporter, we don't need to add one for the ClosedCW door. The exporter makes a collision box the exact size of the bounding box if none is specified. That's perfect for our closed door. Our open door will need some attention however. Make several cubes, each cube being a different object. Use however many you require, but try to keep it under 8 for simplicity's sake. Also, note that your collision boxes need to be within your BOUNDS-box. If you go outside of it, the collision box will only collide for the part of it that is inside of the BOUNDS-box. Once you have boxes covering up areas of your open door you would like the player to collide with, we need to name them. Name each object youd like to have as a collision box COL1, COL2, COL3... And so forth. Be sure to give each one a different name! Also, make sure the player actually fits through your opened door. The player needs slightly less than 3 bricks width and just under 5 bricks of height to be able to walk through.

That about wraps it up for our modeling section of the doors, off to the finishing touches.

STEP 3:
Coloring your door


Coloring the door is pretty straight forward. You select the areas you'd like to have a color, and put them in a different object (press P and then 'selection' in Blender, like we did before). Now name the object in the top right corner to something like this:

C .5 .5 .5 1

The C is there to tell the converter it needs to color something. The following values are percentage-RGB values. To pick one, get the RGB value of the color you want (perhaps use a website for this, http://www.colorpicker.com/ works great. Remember, you only need the R, G and B values!) and divide the red, green and blue value each by 100. Enter those instead of the .5 .5 .5 I did. The 1 at the end is the opacity-percentage. If I enter 0 the part would be invisible. .5 is half transparant. Coloring is all done now, we're almost there.

STEP 4:
Exporting your door


To export the door, we will need to use General's obj2blb. You can also use Badspot's but this entire tutorial has been made with General's in mind. You can get General's Obj2Blb here:
http://forum.blockland.us/index.php?topic=237477.0

First off, we need to turn our .blend door model into an .obj. To do this, we need to export it. Go to File > Export > Wavefront (.obj), and export each of your models (OpenCW, ClosedCW etc.) to a folder. Drag them into the converter, and a file with the same name but with the .blb extenstion instead of the .obj one should show up. If it didn't, scroll down the the help area of this tutorial below.

STEP 5:
The script


I'm just going to put the script up here, it's the exact same as the default doors. To make things easy, we need to set a naming standard. Name your ClosedCW door [DOORNAME]Closed.blb, your OpenCW [DOORNAME]OpenCW.blb and your OpenCCW [DOORNAME]OpenCCW.blb. So, for example, for my Left4Dead door I would have 'L4DdoorClosed.blb', 'L4DdoorOpenCW.blb' and 'L4DdoorOpenCCW.blb', because my door name is 'L4Ddoor'.

Copy and paste the following script into notepad (preferrably download Notepad ++, it's free and really good; it's to ordinary Notepad what Paint.NET is to MS paint). Press Control H. In the 'Find what'-field, put 'DOORNAME'. In the 'Replace with' field, put the name of your door. That should be the same name you used in [DOORNAME] above. Press 'Replace All'. If all went well, it should say 13 occurences were replaced. We still need to rename the uiName manually. On line 4 you will see uiName = "THIS IS THE UI NAME";. Remove 'THIS IS THE UI NAME' and put the name you'd like players to see in-game there. Now go down to line 31 and change the path behind iconName. It should be "Add-Ons/Brick_NAME_OF_YOUR_DOOR_PACK/DOORNAME.png" where DOORNAME.png is the icon for the door we'll make in the final step. Change NAME_OF_YOUR_DOOR_PACK to the name of your door pack. This has to be the same name your .zip folder has in the end.

The script:
Code: [Select]
datablock fxDTSBrickData ( brickDOORNAMEOpenCWData )
{
brickFile = "./DOORNAMEOpenCW.blb";
uiName = "THIS IS THE UI NAME";

isDoor = 1;
isOpen = 1;

closedCW = "brickDOORNAMECWData";
openCW = "brickDOORNAMEOpenCWData";

closedCCW = "brickDOORNAMECWData";
openCCW = "brickDOORNAMEOpenCCWData";

orientationFix = 1;
};

datablock fxDTSBrickData ( brickDOORNAMEOpenCCWData : brickDOORNAMEOpenCWData )
{
brickFile = "./DOORNAMEOpenCCW.blb";

isOpen = 1;
};

datablock fxDTSBrickData ( brickDOORNAMECWData : brickDOORNAMEOpenCWData )
{
brickFile = "./DOORNAMEClosed.blb";
category = "special";
subCategory = "Doors 2";

iconName = "Add-Ons/Brick_NAME_OF_YOUR_DOOR_PACK/DOORNAME";

isOpen = 0;
};

STEP 6:
Getting it in-game


We must now properly package the doors. Make a folder named Brick_NAME_OF_YOUR_DOOR_PACK. Change the name to whatever the name of your door pack is, obviously. The script you edited should be saved as DOORNAME.cs, (again, replace DOORNAME with whatever that specific door's name is) and put in this folder. You should also copy and paste the following script into a different notepad instance:

Code: [Select]
%error = ForceRequiredAddOn( "Support_Doors" );

if( %error == $Error::AddOn_NotFound )
{
error("Brick Doors: Support_Doors is missing somehow, what did you do?");
}
else
{
exec( "./DOORNAME.cs" );
}
If your door pack contains multiple doors, add another exec("./DOORNAME2.cs" ); , exec("./DOORNAME3.cs" ); and so on just underneath the one already there.
Save this text file as server.cs, and put it in your Brick_NAME_OF_YOUR_DOOR_PACK folder.

Now it's time to add a description. Make another text file. Inside of it, put Title: TITLE OF YOUR ADD-ON on the first line, and Author: YOUR NAME on the second. Name this text file description.txt. You may want to add a namecheck.txt. Make a new text file, and inside of it, put Brick_NAME_OF_YOUR_DOOR_PACK on the first line. Save it as namecheck.txt in your folder. That's all of that taken care of.

Now, you might want a temporary template image, because you may have noticed our doors have no icons yet although the script specifies one. Fear not, we will arrive there soon! First, save this image and put it in your Brick_NAME_OF_YOUR_DOOR_PACK folder. Rename it to the name of your door. This will be your temporary brick icon. Now add your folder contents to a .zip archive. Be careful to not add the folder to it, the .zip file should directly contain all of the files, not the folder with the files in it. Also, make sure it's a .zip, many compression programs default to .rar. Now drag this into your add-ons folder, and start Blockland. Enable default add-ons only, and then enable Brick_NAME_OF_YOUR_DOOR_PACK. Start a singleplayer game, and place your door brick. It should be under the 'Special' tab, under 'Doors 2'. Plant the brick. Admire your creation. If some of the faces seem inside out, scroll down to the help section of this topic. If it's dark and not affected by light if your shaders are on, do the same. Click your door brick. It should open. Change the event to open CCW, and see if that works. If all works nicely, it's time to make some icons.

STEP 7:
Icons


This tutorial thread does a really great job at explaining how to make icons:
http://forum.blockland.us/index.php?topic=227263.0
When your icons are done, overwrite the temporary image I provided with your newly made icon. It must however stay 96x96 pixels. Hooray! Your add-on is now totally completely finished. Zip it up again and overwrite the one currently in your add-ons folder to add the icons you just made in-game.

Congratulations on making your first door brick!

77
Add-Ons / [V2.1] BLB Door/switch pack - The garage door is here!
« on: July 23, 2014, 03:43:42 PM »
Hi there.
After nearly 6 years of playing this game and doing pretty much nothing to contribute to the community apart from hosting some servers now and then I though it was time to get in to add-on making. Because I've always wanted some oddly specific doors, I decided to start there. LeetZero, jes00, General and ZSNO have been a huge help, and I can now present to you, my first set of 4 BLB doors! I'll add to this pack if I get any more unique door ideas (which you may supply in this thread if you have any), but for now we've got these 4 doors:


This is a simple 6-wide sliding space/vault door. I loved the one in the old JVS pack, but that was 5 bricks tall and had no frame.




A double glass door that looks a lot like the default 'glassiest' door, but without a frame in the middle. This door is 8 bricks wide. Great for shops. Do note the open version in this frame looks somewhat ridiculous due to my high FOV of 100, it's exactly the same size as the closed doors.




Castle gate door. Basically the same as in the old JVS content pack, but as a BLB this time. Do note that this was made from scratch and not crappily ported or something. The closed version has the spikes you see on the open version sitting just underground, so if you suspend the brick you'll be able to see them. Tiles perfectly horizontally, and semi-perfectly vertically, but you can't really open it while looking good if you stack 2 on top of eachother anyways.




One of those double doors, as requested by The Brighter Dark. Named floppy door because they go flop flop flop when you open them and let them fall shut. Also, blue reminds me of floppy disks. I really couldn't come up with a better name. The black is permanent, the blue area is recolorable.




A light switch. Incredibly satisfying to use for some reason. I guess it's that clicky sound. This resembles the JVS one almost exactly, but is a completely handmade model that I made from scratch and therefor is not a crappy port of the JVS model.




Button. A really basic button that also resembles the JVS one a lot. I'm enjoying this modeling thing and am sort of considering remaking all of JVS in 6-height blb doors/switches. Again, made from scratch, not a port, blah blah blah.




Garage door. As requested. This door is 7 bricks high instead of the usual 6 to allow for easier passage of vehicles. Also note that this door has no frame, so it's tileable (you can put them side by side to make a bigger garage door).





Personal favorite, the Left 4 Dead door. This door has a Closed stage, the first one you see here, an openCW stage, on which the bar is removed, and an openCCW stage in which the door is fully opened. To event this door so that on the first click you remove the bar, and on the second click you open the door, use this:

Only able to open it, not close it afterwards:


Able to close the door again:


Obviously the use of the CCW door as the fully opened stage makes it so this door can't be opened counterclockwise, but it's really silly for a barricaded door to be able to do so anyways.



Download
Version 2.0: Click this, mediafire link

Comes fully equipped with icons etcetera.

Version 2.1:
Added garage door

Version 2.0:
Added floppy door
Added light switch
Added button
Optimized L4DdoorClosed
Optimized L4DdoorOpenCW
Optimized CastleGateClosed
Optimized CastleGateOpen

Version 1.1:
Fixed the L4D door opening in an illogical direction

Version 1:
First release

Have fun with it, and any constructive criticism is very welcome. Also, remember to suggest door ideas if you've got any.
Again, massive thanks to LeetZero, jes00, General and ZSNO.

78
Help / R/G/B/A color scheme from -1 to 1 instead of 0 to 255?
« on: July 23, 2014, 01:00:33 PM »
So I noticed that some exporters and most of blockland's models seem to use a weird RGBA scale I've never heard about nor can find anything about on the internet. Apparantly instead of ranging from 0 to 255 on red, green, blue and alpha they range from -1 to 1. How can I convert the normal 0 to 255 one to the -1 to 1 version? Thanks in advance.

79
Modification Help / Door brick turning into 1x6x18 solid brick
« on: July 22, 2014, 08:54:51 PM »
Spo I'm trying to make this 3-stage left 4 dead door, in which stage 1 (L4DdoorClosed) is just the closed door, stage 2 (L4DdoorOpenCW) is the closed door, but with the barricade removed and stage 3 (L4DdoorOpenCWW) is the opened door with the barricade removed. Now, the door displays perfectly, and the toggle between stage 1 and 2 works. But as soon as I make it go to stage 3, the brick just becomes a 1x6x18 solid brick. The DTS is correct, and was exported the exact same way the other bricks were. Are there specific restrictions for CW and CCW bricks? If so, what are they?

Any help would be much appreciated.

EDIT: Here's the .blend file I'm using:
https://www.mediafire.com/?28riv1f4k1ccrtz

80
Modification Help / Some faces seem 'inside-out' after blender export
« on: July 22, 2014, 08:05:25 AM »
So I've tried pretty much everything, and after I got the UV mapping on a door brick I'm trying to make to work I was pretty happy, but now it turns out some of the cubes are inside out. As in, the interior faces are rendered but the exterior ones arent.


I'm using General's OBJ2BLB exporter by the way.
Any help would be very much appreciated.


Nevermind, although a search didn't yield anything, plain reading this board did (Demian's thread).

81
Suggestions & Requests / WW2 landing craft
« on: July 20, 2014, 08:44:01 PM »


So this would be great to have. The same basic funtionality as the default boat, but perhaps with more seats. Now I know there is already an existing landing craft out there, but I can't for the life of me find it. Any help would be very much appreciated.

82
Suggestions & Requests / Underwater explosion
« on: July 18, 2014, 05:21:03 PM »
Basically, one of those high water plumes that are created when something is detonated underwater, for cinematic/atmospheric purposes.
If you don't know what I mean, this is a video of such an explosion. Maybe not quite that high though.

Any help would be very much appreciated.

EDIT: Hell, I'd be happy even if it did no damage and was just a 2d sprite.

83
Off Topic / The only way to browse the Blockland forums
« on: July 12, 2014, 06:19:43 PM »

Forumfriendry to rival that of Night Fox in his prime.
So yeah I got a thrid monitor.
General supreme multimonitor masterrace discussion thread.

84
Gallery / A Tumblr of my Blockland memories
« on: June 27, 2014, 05:15:33 PM »
Realizing how old blockland really is now, and for how long I've played it, I decided to make a Tumblr blog about my memories and experiences during my almost 6 years playing this game. Please scroll all the way down first, and then start scrolling up, because Tumblr is stupid like that.

You can find the blog here

Also, inspired by this post.

85
Suggestions & Requests / Attack on Titan - 3D maneuver gear
« on: June 08, 2014, 03:41:45 PM »
Basically this, but blocky. It's waist-mounted.


It would function a lot like the old grappling hook.
If you do this I'll be forever in your debt.

86
Gallery / TheArmyGuy's Train Request Thread
« on: June 02, 2014, 12:43:25 PM »
So I'm making this huge train thing, and decided some input would be nice. Specifically what trains should be in the build. I've built a few already (see images below), and I need as many as possible to give the build a diverse feel. Seeing as how I'm only really well known with the most well-known of trains and some dutch ones, I'm asking for your requests on what trains to build. I guess at least some of you have to have a 'favorite train'. Save files will be released once the build is finished.

Stuff I've made so far:

SNCF TGV Atlantique





Amtrak





DB 101 001





Canadian Pacific











TF2 train





Maglev




Please don't request any silly stuff like a space train or a tunnel bore, as it's a realistic train build.

88
Suggestions & Requests / RTB's save checking system
« on: April 17, 2014, 12:09:21 PM »
So RTB, which is now gone, used to have a save checker feature I used all the time. With it no longer around, the save checker won't work either. It used to be located at http://returntoblockland.com/saveCheck.php.

You used it by uploading a blockland save file, and the program would then tell you which add-ons the save required. If anyone could find it located elsewhere or even make a new one (I have no idea if this is a complex program) that'd be absolutely amazing.
Thanks in advance.

89
Help / Can't change blockland's resolution aboe 640x480
« on: December 30, 2013, 07:16:28 AM »
So this has always worked fine, but it's broken all of the sudden for no reason.
I cannot change blockland's resolution to anything but 640x480, while I have three 1920x1080 monitors.


When I try to resize the window with with setres(1080,1920); in the console it tells me I cannot change the resolution larger than desktop in windowed mode

90
Help / Main menu screenshot background bug
« on: December 14, 2013, 09:55:12 AM »
In the main menu, no matter how many or what size of screenshots I put in my folder, it always displays <random screenshot> Ice palace <another random screenshot> Ice palace <yet another random screenshot> Ice palace

Only mildly annoying, but I don't get what I'm missing here.

Pages: 1 2 3 4 5 [6] 7 8 9 10 11 ... 19