hello everyone =) It's been a while since I last played - I'm loving the winter unstable update, been playing with a couple friends for 3 days! But one thing I've noticed is my lag has been humongous... and so far, the only way to tell this was guessing at the time chat messages take to show up. So I tried searching for this and found nothing about... decided to try on my own, designing a Lag Metter mod. It'd stay right under pixel count, besides the inventory button, and it'd check lag with remote server when playing multiplayer. I have some noob knowledge on programming with javascript/java/XML, and I'm already reading the materials you guys made available on http://community.playstarbound.com/index.php?threads/modding-guides.34001/ and http://community.playstarbound.com/index.php?threads/lua-part-1-terms-and-strings.84833/ Any tips I could use? =) I'll try to keep this thread updated on my progress! -#1 bump: can't insert button on /inventoryBar
Okay, found my first road bump and I couldn't get any help from ##starbound-modding (and they tried, but none of them ever tried modding the on-screen interface) - I thought: okay, this is my first time trying my hand at modding, so what do I need to do first? Getting the placeholder where I want the lag metter to show up - which right now, for testing, is above beam icon, moving the beam icon down. So, for testing and learning, I made 2 PNGs: "lagGreen.png" and "lagRed.png" - green as base, red as hover. I learned how to use .patch file to move the beam icon down, but I can't get the lagMetter to show up... Here's code: Code: [ { "op" : "add", "path" : "/inventoryBar/lagMetter", "value": { "base" : "/interface/lagGreen.png", "hover" : "/interface/lagRed.png", "pos" : [57, -100], "poly" : [ [57, -100], [74, -100], [74, -77], [57, -77] ] } }, { "op" : "replace", "path" : "/inventoryBar/beam", "value": { "base" : [ "/interface/beamup.png", "/interface/beamdown.png" ], "hover" : [ "/interface/beamuphover.png", "/interface/beamdownhover.png" ], "disabled" : "/interface/beamno.png", "pos": [57, -120], "poly" : [ [57, -120], [74, -120], [74, -103], [57, -103] ] } } ] lagMetter.modinfo and interface.config.patch files are in place, beam icon got moved down.... but lagMetter button don't show up =(
AS far as I know, the patching system doesn't work like that; you can't inject entire nested code segments with one operation. You have to do each depth/entry in its own operation. See the Patching Guide for more info: http://community.playstarbound.com/index.php?threads/basic-patching.84496/
Dunto, I had read that thread, and I don't see why it wouldn't work. Anyway, no matter, if I remove the op:replace and adjust the op:add to include it below the beam button, still won't show up
Have you validated your patch code yet? There should be a link to an online validator in that patching guide.
yes, Dunto, I've validated on http://json-schema-validator.herokuapp.com/jsonpatch.jsp using interface.config on the lower panel and the patch code on the upper panel. The code is valid - hence the beam button getting moved down... but the lagMetter won't show no matter what I try =/ edit: here, the result from the validator: https://drive.google.com/file/d/0BxkGG6wBmlZDZ25hU2p1MkViUzQ/view
Well then, time to ping some people who know more about it than me: @severedskullz @xxswatelitexx @Whale Cancer
As far as I am aware you can't currently add elements to the ingame GUI, only move them around. The only elements you can add are to the Intro Screen + Main game screen + character selection screen.
no idea how I'd make it with an object or tech... I'll have to think a little while more on that, or drop it altogether until GUI becomes moddable...
That is pretty much my stance for my own problem. I want to add a button to the general interface or even the AI system, but I've been forced to fallback to the canvas system conceptually. I haven't the time right now (hopefully I can start over the weekend) to actually work on it, but it isn't what I want to do; it is what I'm forced to do. At least what I want to do doesn't requite a need to be constantly available.