Jump to content

Aesir

Alpha Tester
  • Content Count

    140
  • Joined

  • Last visited

About Aesir

  • Rank
    Novark Citizen

Profile Information

  • Gender
    Male
  • Location:
    France
  • backer_title
    Gold Founder
  • Alpha
    Yes

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. i removed the file and put a pastebin
  2. I have been working on a script to construct HTML for those who want a simple tool yet quite powerfull I hope. The Idea is to have the script as a file in your Lua environement and just use the require() function, then start building your HTML. There is a demo at the end of the script (put the commented lines in your unit.start then uncomment them) HTMLhandler = require(HTMLhandler) HUD = HTMLhandler:Create(system) Features: The tool accept multiple monitors at once, like several screens or HUD (system). myHTMLhandler:Create(system,screen1) Simple usage: To get a simple window inside a left grid in your cockpit you can do: local myHTMLhandler = require("HTMLhandler") normalScreen = myHTMLhandler:Create(system) local baseGrid = myHTMLhandler:addDiv("", "left grid") local myWindow, myWindowContent = myHTMLhandler:addWindow(baseGrid, "MyWindow", "Inside the window") ---- change the content inside the window ---- local changeInside = "change the inside of the window" myHTMLhandler:updateContent(myWindowContent, changeInside) You can create a div with a string or a variable like that myHTMLhandler:createDiv(myVar) and it will display on the selected screen as long as the variable accept the tostring() conversion. You can pass in parameter custom style or/and class. There is also function to create a window and a table. At any time you can change the content as the "addx" functions returns a contentId. For the table, when created you get a table of contentId to modify the column's header and when adding a line you get a table of contentId to modify what's in the line. You can also delete a line or push a new line at the top of the table. indexSimpleDiv = myHTMLhandler:addDiv("simpleDiv") myHTMLhandler:addDiv(indexSimpleDiv, "anotherDiv in SimpleDiv") myHTMLhandler:deleteElement(indexSimpleDiv) -- the anotherDiv will be anchor into the simple Div, but once you delete the simpleDiv it will also delete its child, being "anotherDiv" mainDiv, contentIdMainDiv = myHTMLhandler:addDiv("MainDiv", "left grid") -- this will create a div with the content "MainDiv" and class "left" and "grid" local tableDiv = myHTMLhandler:addDiv(mainDiv, "", "window") -- create a div with the class window as NQ style (works only with HUD) local columnHeaders = {"Name", "Quantity", "Container", "Container size"} --define the title of the column's header for the table local simpleTable = myHTMLhandler:addSimpleTable(tableDiv, columnHeaders) -- create a table with headers local firstLine = {"Gold", "153kL", "Treasure", "L"} local firstLineId, firstLineContentId = myHTMLhandler:addSimpleLine(simpleTable, firstLine) -- add a first line local secondLine = {"Silver", "20kL", "Chest"} local secondLineId = myHTMLhandler:addSimpleLine(simpleTable, secondLine) --add a second line but without data in the last column local pushToFirstLine = {"Plastic", "FULL", "line pushed #1", "M"} myHTMLhandler:addSimpleLine(simpleTable, pushToFirstLine, 2) -- add a third line but at the top position in the table (1 being the headers) myHTMLhandler:updateContent(firstLineContentId[2], "20kL") -- change the amount of gold of "firstLine" Advanced usage: You can change the position of element, attach it to any other element, pass the class and the style in parameters, you can delete it and you can update the content. But it is also possible to do more advanced stuff like creating any HTML element template and use them by referencing them. It should also be possible to do svg tags like that : myHTMLhandler:defineElement("svg", '<svg height="100%" width="100%">', '</svg>') then use myHTMLhandler:addElement("svg",myContentInsideTheTag) The defineElement and the addElement accept variadic parameters so there is in theory no limit Another example, to make this '<line x1="939" y1="537" x2="957" y2="519" style="stroke:rgb(1, 165, 177);opacity:0.7;stroke-width:3"/>' being encapsulated as an element you can do: myHTMLhandler:defineElement("svgLine", '<line ', '" style="stroke:rgb(1, 165, 177);opacity:', ';stroke-width:', '"/> ') local content = 'x1="939" y1="537" x2="957" y2="519"' local svgLineId, svgLineContent = myHTMLhandler:addElement("svgLine", content, 0, '0.7', '3') 0 being a default postion value, if you want to change the position in a list of element (see above for the table). '0.7' the opacity and '3' the strokewidth. now you can change the content by using (by default it will rebuild the HTML and display it as soon as the function ends) : myHTMLhandler:updateContent(svgLineContent, 'x1="0" y1="12" x2="37" y2="24"') Note that multi-content is only availible for table for the moment. others functions: addWindow(Anchor, Title, Content, TitleClass, TitleStyle, ContentClass, ContentStyle, Pos) -- to build a window with the NQ style setAutoDisplay(boolean) setAutoCompute(boolean) -- for big HTML structure you might want to turn them off as every time you add element or edit content the HTML is rebuild and displayed compute() --build the HTML display() --display HTML on all the "monitors" computeAndDisplay() --straightforward getElementHTML(Index) -- to get just a chunk of HTML could be used to display just a part of the structure somewhere else I am aware that there is other tool to build HTML. If you find a bug please report it. If you need help, ask me (same name on discord and IGN) or in the #lua-scripting discord channel If you make your own design using the tool, consider sharing Special thanks to @hdparm ps: I'll put images when the server works pastebin instead of file: https://pastebin.com/KuMRGFFp create a file "HTMLhandler.lua" and save it at the root of lua folder as below
  3. While i'm very glad that coders are making insane things here, its also normal to play the game with the same rules as anyone else. Indeed their is still needed features for the game, but its BETA and their is a lot of more needed features for the majority of people. Coders are not second hand, they're just not on top of other players. I can really understand the frustration of seing lot of things you made and invested yourself in being not allowed anymore.
  4. Now, yes, later hopefully not. I agree, it is not a priority for sure, but when I see what people does already in the game I'm pretty sure adding the possibilities of moving part of ship from other like that would be a huge things. But yeah, don't expect it before 2 or 3 years x)
  5. That's something I don't get, there is already moving voxel in any direction with dynamic core, what is the difference between 2 ships and 2 blocs of voxel moving from each other in one ship ? It may indeed cause performance issue if everyone has a couple of moving voxels inside their ship, but that would be great to find a solution as having this functionality would greatly improve the game experience.
  6. I am hopping for a camera as well, would be nice to have a window-less fighter ingame
  7. discordauth:KBGdR1jafmzBHHI08Dg0O5oSiuSQbklPNL0yhj_rCdc=
  8. Well this is not much breaking NDA. Just a bit x)
  9. Agree. So in previous post I was talking only about docking. You're both right indeed That's exactly what I tried to explain earlier, I guess i explain it wrong
  10. You have a main ship, you can dock things to it, it must be pre-defined -> 1 attach = 1 exact construct design to be docked on. You want to dock 10 ships ? fair enough, you can, but you have to pre-define the behavior of your main ship for any combinaisons. EDIT: also this, because one attach must have a limit of weight. EDIT2: It wouldn't be very convenient if you want to do a mother ship or something like "automatic fuel swap" or any "small" module swap. It may have some rules like : if the attached DCU is 3/4 times smaller than the main ship then just set the attach to weight a certain amount, wether or not something is docked to it, in the scenario it wouldn't be very realistic as a mother ship would have the same weight with or without its drones, but that simplify the process a lot.
  11. Actually I thought about this kind of things also, rails would be nice but before I wish to have 3d movement with : translation, rotation and ... patella ? not sure of this one in english, in french it's "rotule" this is just the basic Linkage : https://en.wikipedia.org/wiki/Linkage_(mechanical) this is what you want for doing such a thing: but they probably already planned it as in the E3 demo they featured a cargo door opening from the giant aircraft.
  12. this, plus i hate temporary effect by nature in every games I just hate when someone basically have less skills than you, have the same character/ship than you, but took hundread of pills and go to god mode. I also hate when games start to rely on this kind of consommable. And i'm not a big fan of narcos, side undiserable effects are not worth :x But, if it doesn't provide huge boost and is not called "heroin", i can certainly deal with it.
  13. Aesir

    Raming ship

    Hooo but hasn't DU the right to be cool as well ? It still adds another gameplay mechanic, whatever if the other games has it or not, I think it should be cool in DU Anyway, i'm pretty sure a simple (technically speaking) ram weapon would be nice, not sure how to make it works, their is plenty of options, it could also be activated only when you reach a certain speed and therefore get rid of the dash mechanic, etc ...
  14. Aesir

    Raming ship

    I do agree We can get rid of the dynamic damage and just do it as other weapons does. But wouldn't be so cool to ram into a ship and split it in two pieces
  15. Aesir

    Raming ship

    you do not have a local point of impact when considering the weapon, either you hit or not. you may have a local point of impact when doing the physics of bouncing, but this is not related to the weapon itself, its about collision in general. Hum, i don't see the point, maybe i was not clear, but this is basically a "normal" melee weapon with instant damage which have also the effect of dashing forward on a little range. I don't think their is anything different from a normal melee weapon despite the dash part. In another hand, melee weapons are always a nightmare to balance properly, so I don't expect them too soon.
×
×
  • Create New...