Forums » Community Projects

Barebones custom interface

Feb 13, 2017 draugath link
I've put together a bare bones interface for those that want to try their hands at writing something completely new. The code is not pretty and certainly not written to be optimal. It has a very basic login screen, a crosshairs, and very basic chat window. It assumes you have a character in the first character slot and uses that one automatically. There is no station interface, so it is best if you are in space before you try using this. Touch devices are not supported.

I've made an attempt to ensure it will work with DevKit. To this end, it does pull in a minimal number of elements from the Vanilla interface. I've also set certain variables according to defaults, and attempted to recreate certain functions as necessary.

customif_barebones.zip

Extract the .zip into the vendetta directory.

Edit config.ini
[Vendetta]
if=customif/customif.lua
Feb 14, 2017 Darth Nihilus link
Should we use this thread as a debugging thread as well?
Feb 14, 2017 draugath link
This isn't a project, it's just a base to start a project. There are some things that will need additional explanations, which I'm going to slowly work on documentation for, such as navmap controls and ship viewers.
Feb 14, 2017 Darth Nihilus link
Yea, I can't even use NavRoute.addbyid() from the console.

But dude this is some cool shit nonetheless. I will definitely be toying with this so thanks a bunch.
Feb 14, 2017 draugath link
I'm not sure what you were doing, but that works for me. Make sure you have events turned on.

/lua NavRoute.addbyid(1)

Event: NAVROUTE_ADD - Data:
     1: (number) 1 (Sol II A-1)
Feb 15, 2017 Darth Nihilus link
It doesn't give me any errors when I do it.

/lua NavRoute.addbyid(4978)

But then I can't actually jump out of the sector. Almost like my activate button didn't work. Does it actually let you jump out of the sector?

I also had to comment out a few lines for it to work at all.
--dofile(IF_DIR..'if_fontsize.lua')
--dofile(IF_DIR..'if_templates.lua')
And it freaked out anywhere there was a iup.stationbutton, not sure why.
Feb 15, 2017 draugath link
I looked into the NavRoute thing a little more, and it appears to be working just fine. The "NavRoute" is being adjusted properly.

Apparently there's a little function hiding over in the Game table... Game.SetJumpDest()

Like I said, this is bare bones. There are a lot of things that we take for granted, because we've only really had/wanted to deal with basic UI customization or the addition of new logic.

iup.stationbutton is defined in if_templates.lua

As for you needing to comment those lines out, while I don't intend for this thread to be in support of any specific ongoing project, I will try to help you make it work in it's released state.
Feb 17, 2017 Darth Nihilus link
I noticed that from those lines, IF_DIR is set to if/. I don't have this folder in my main VO folder.

Where should if_fontsize.lua and if_templates.lua be located?
Feb 17, 2017 draugath link
They're default VO files that are extracted from the asset blob. The specified directory is relative to the vendetta directory. Try reading the IF_DIR variable with the vanilla interface and setting the variable accordingly in the file. It works for me as its set, so I'm confused about why it doesn't work for you.
Feb 17, 2017 Darth Nihilus link
The IF_DIR for me was vo/. Works fine now.

Could you tell me how to access or see what's inside of that folder? I'd like to be able to see whats inside of if_templates.lua specifically.

If those files are not directly accessible, how did you know that those were needed? I'm sorry for bugging you so much. I'm just trying to get my feet planted before I sink too much time into dead ends.
Feb 17, 2017 draugath link
if_templates.lua creates all of the VO-specific IUP interface control wrappers. The functions created therein can all be found in the iup table, along with the IUP originals.