VTF – Quoteboard Fun

Initial plan was to make signs using Krita, a free graphics program, and import them into my favorite voxel editor to make them into voxel signs. Problem is, I really needed the resolution, so the voxel characters were too blocky and it really detracted from the legibility.

I ended up making a dynamic sign that reads from a tag on itself, then grabs the right image and displays it in-game, crisp and neat.

An early view of the initial prototype in the Teardown editor.
In-game view. Yes, the prices have nothing to do with the sign right now. Dynamic sign code works!

As I was working with the signs, I made a mistake in one area – see if you can spot it:

Yep, I didn’t pay proper attention to the font sizes when fitting them to the width of the sign. That will have to be changed! So, I reworked things. At least the dynamic part is working.
--- Contract Signs

local imagePath = "MOD/images/contract/"
local contractName = "Nil"
local screenHandle = 0

function tick()
    if contractName == "Nil" then -- Only firing once to not waste cycles
        screenHandle = UiGetScreen()
        contractName = GetTagValue(screenHandle, "name") -- picks up name=<contract name> in "tags" for the screen entity
    end
end

function draw() -- UI Stack
    UiTranslate(UiCenter(), UiMiddle())
    UiAlign("center middle")
    UiImage(imagePath .. contractName .. ".png")
end

The above is a snippet in lua of how I got that to work – trust me, I wouldn’t have used tick() if I had any other way — but it seems to work fine without performance hits.

Before balancing out the visual weight of the signs, it was time for more destruction testing. The signs I used were different than sprites, so I had to make another type of damage-detection to deal with them.

Fire tornado! That wasn’t made by me, its “BattleBob72” – If you have steam, here’s a link. Note how the signs deactivate and get removed. Exactly what I wanted.
Here’s a test I did with a pistol. Its fun destroying your own creation, so I don’t mind making things destructible/flammable.

That is it for now, more to come…