|
|
HCU: HoverCAD Unlimited Because regular HoverCAD just plain sucks. { Location :: Console Tutorial } |
|
hcudownload - download page - source 0.5.2.2 [zip] - hcu 0.5.2.2 [exe] - hcucpe 1.0.0.0 [zip] - hcucpe 1.0.0.0 [exe] hcuinfo - main - about - timeline - goals - documentation - screenshots - console info - 404 error hcubug - report a bug hcunews - current news - old news hculinks - hoverrace webring - hoverrace main site - hoverrace forums - tracks - timesheets hcucontact - contact - contact igglybob |
Console Coding Tutorial One of the features in HCU is a console, where you can enter commands. This is there because it lets users use something else than the GUI and it also allows for plugins that can be written in plain text and easily implemented. The console syntax is as simple as possible while still allowing for complicated functionality. This guide will detail all of the commands and their syntax. Square brackets ( these -> [] ) indicate optional parameters, and a $ after a parameter (possibly with an identifier attached to it) indicates that a value is required. add room [floor $] [fldll $] [fltex $] [ceiling $] [ceildll $] [ceiltex $] add feature [floor $] [fldll $] [fltex $] [ceiling $] [ceildll $] [ceiltex $] [parent $] add element [x $] [y $] [z $] [a $] [dll $] [type $] [parent $] add conn [rooma $] [walla $] [roomb $] [wallb $] add wall [x $] [y $] [dll $] [tex $] edit room $id [floor $] [fldll $] [fltex $] [ceiling $] [ceildll $] [ceiltex $] edit feature $id [floor $] [fldll $] [fltex $] [ceiling $] [ceildll $] [ceiltex $] [parent $] edit element $id [x $] [y $] [z $] [a $] [dll $] [type $] [parent $] edit conn $id [rooma $] [walla $] [roomb $] [wallb $] edit wall $id [x $] [y $] [dll $] [tex $] edit description $ edit background $ end room end feature end for - the loop itself will execute after you enter this command set $(variable name) $(value) [+ - * ^ /] $(value) for $(variable name) from $(starting value) to $(end value) More documentation on these will come later. By later I mean pretty soon. Keep your eyes on this page if you want to learn the simple console language. There are, however, a few concepts you need to know: BLOCKS: In C++ and Java you use { } to denote a block; in Python it's spacing, and in Visual Basic it's If...End If and For...Loop or some similar construct. In the console language, there are four commands that put you into a block: add room, add feature, edit room, edit feature. The reason you need to be in a block is to edit walls. Elements, initial positions, and connections don't have any walls or objects inside of them. For this reason, you can only do the 'add wall' and 'edit wall' inside a block. Those commands can't be done outside the block - it will give you an error message. DLLS: This is a feature not present in normal HoverCAD, but it's a parameter that appears in .tmp files. Basically, when you're referencing a texture or element type, the compiler needs to know what DLL to look at. I [Igglybob] did some messing around with it and discovered that when you give the compiler a DLL value of 2, it will look for the object in ObjFac2.dll or ObjFac2.dat (don't remember which, it was more than a year ago). This is something I'd really like to look into, but it's a complicated issue and I don't want to dive into it right now. If you want to, be my guest - you might find some really cool stuff. If you don't know what value to put for a parameter here, use 1. |