Jump to content

NQ-Wanderer

Staff
  • Posts

    13
  • Joined

Profile Information

  • backer_title
    Contributor
  • Alpha
    Yes

Recent Profile Visitors

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

NQ-Wanderer's Achievements

  1. Hello Noveans, We would like to hear your feedback on Panacea Lua changes!
  2. As announced last week, the Panacea update is now in development. Today, we’re going to tell you more about the camera Lua API that’s among the many new features and improvements. This addition has been a longtime request from the community. The time for it seemed ripe since the removal of quaternions and the standardization of orientation methods to have a coherent and consistent whole. THE BIG PICTURE This API will allow you to get much more information about the game's camera and the status of the player linked to it. You will be able to get the position and orientation of the camera in the world coordinate system, but it'll also be expressed in the construct local coordinate system. You will find at the end of the devblog the example corresponding to the image. For these changes, we have added under unit: [int] unit.isMasterPlayerSeated(): Checks if the player currently running the control unit is seated. [int] unit.getMasterPlayerSeatId(): Returns the UID of the seat on which the player currently running the control unit is sitting. And so under system: [event] system.cameraChanged([int] mode): Emitted when the player changes the camera mode. [number] system.getCameraHorizontalFov(): Return the current value of the player's horizontal field of view [number] system.getCameraVerticalFov(): Return the current value of the player's vertical field of view [int] system.getCameraMode(): Returns the active camera mode. [int] system.isFirstPerson(): Checks if the active camera is in first person view. [vec3] system.getCameraPos(): Returns the position of the camera in the construct’s local coordinates. [vec3] system.getCameraWorldPos(): Returns the position of the camera in world coordinates. [vec3] system.getCameraWorldForward(): Returns the forward direction vector of the active camera in world coordinates. [vec3] system.getCameraWorldRight(): Returns the right direction vector of the active camera in world coordinates. [vec3] system.getCameraWorldUp(): Returns the up direction vector of the active camera in world coordinates. [vec3] system.getCameraForward(): Returns the forward direction vector of the active camera in the construct’s local coordinates. [vec3] system.getCameraRight(): Returns the right direction vector of the active camera in the construct’s local coordinates. [vec3] system.getCameraUp(): Returns the up direction vector of the active camera in the construct’s local coordinates. We took advantage of these changes to fix an inconsistency between the positions returned by unit.getMasterPlayerWorldPosition and system.getPlayerWorldPosition. These two functions were not returning the same position; they will now return the position of the player's feet. Note: As you may have guessed, the system.getFov function will be deprecated in favor of the consistency of getCameraHorizontalFov. REMOVAL OF WRITING TO THE CLIENT LOG, BUT …. We have decided to remove the ability to write lines directly to the clients log files using Lua. Following a long review, the decision has been made with security concerns in mind as it allowed some nefarious players, for example, to automate mechanics that are not intended to be automated, allowed the creation of bots, and left a door open for players to maliciously inflate the players log files. The following functions are now completely removed: system.logInfo() system.logWarning() system.logError() This feature was never really supported (and notably absent in the codex); however, it is unfortunate that it also impacts less malicious creations. I'm thinking in particular of the audio framework created by the player ZarTaen, used in the popular Arch Orbital HUD flight system, created by the players Dimencia and Archaegeo. For that reason and as a first iteration, we are integrating an API that will allow you to play sounds from Lua. It’s got a very basic functionality now that allows for growth in the future. system.playSound([string] filePath) : Play a sound file from inside the audio folder in your user folder. Only one sound at the same time. system.stopSound(): Stop the playing sound. For obvious reasons, the playing of sounds is restricted to control units that are run explicitly by pressing F on them. You will find the user folder in the same folder where you will find the holograms or screenshots folder. Said folder can be found by navigating to “My Documents/NQ/DualUniverse/audio”, and sub folders can be used to organize and bundle audio files. CONCLUSION As always, we hope you like these new features. Please feel free to come and share your thoughts and ideas, and let us know what Lua-related improvements you would like to see in the future. NQ-Ligo looks forward to chatting with you in this forum thread! THE CAMERA API EXAMPLE Below is an example of Lua code using the new API for the camera. This example allows you to parse the element you are looking at and get Lua information such as the element name, class, methods and fields. To use this example, you will need to link to a controller (e.g. a programming board) and name two slots ‘core’ (for the core unit) and ‘slotIndustry’ (for an industrial unit in this example). Under unit.start --Declaration of globals tooltip = {name="",class="", dist=0, methods={}, fields={}} target = nil slotIndustry.size = 1.25 --Setup the size of the linked industrie element, with the slot named slotIndustry --Custom function declaration function isLinked(id) for k,s in pairs(unit) do if type(s) == 'table' and s.getId and s.getId() == id then return true, s end end return false end --Initial setup system.showScreen(1) unit.hide() unit.setTimer('compute',0.02) Under unit.tick(‘compute’) --Declaration of local math functions local acos, tan, sqrt, deg = math.acos, math.tan, math.sqrt, math.deg --Get elements on the construct and useful positions local ids = core.getElementIdList() local ppos = vec3(unit.getMasterPlayerPosition()) local cpos = vec3(system.getCameraPos()) local cFwd = vec3(system.getCameraForward()) --Set tooltip info by defaults tooltip = {name="",class="", dist=0} target = nil --Iterate on all elements ids for k,id in pairs(ids) do local pos = vec3(core.getElementPositionById(id)) local dir = pos-cpos local dist = dir:len() local angle = dir:angle_between(cFwd) local r, el = isLinked(id) --Check if the player is looking at the element if el and angle < tan((el.size or 0)/dist) or angle < tan(1/dist) then --Register default data info tooltip.name = core.getElementNameById(id) tooltip.class = core.getElementTypeById(id) tooltip.dist = dist tooltip.methods = {} tooltip.fields = {} --If the element is linked scan the methods and fields of the element if r then local km, kf = 1,1 for key,p in pairs(el) do if type(p) == 'function' then tooltip.methods[km] = {name = key, value = ''} km = km+1 else tooltip.fields[kf] = {name = key, value = p} kf = kf+1 end end --Sort the methods and field by alphabetically table.sort(tooltip.methods, function(a,b) return a.name < b.name end) table.sort(tooltip.fields, function(a,b) return a.name < b.name end) end end end Under update: --If not looking at any element, do not draw on update if tooltip.name=="" then return end --Compute the tooltip frame height local height = 90+ (#tooltip.methods + #tooltip.fields)*14 --Build the interface in SVG local svg = { [[<style>* {border:1px solid red} #node{ transform: translate(50%, 50%);} svg {position: absolute; left:0px; top:0px;}]], [[text {font-size:1vh; text-anchor:start; fill:#ccc}]], [[text#eName {font-size:1.25vh; fill:#fff}]], [[text#eClass {fill:#ccc; }]], [[text.pName {fill:#fff; }]], [[text.pValue {text-anchor:end; fill:#ccc; }]], [[</style>]], [[<svg width=100% height=100% viewBox="0 0 1920 1080"> <g id="node">]], string.format([[<rect x=150 y=%.2f fill=rgba(0,0,0,0.5) width=300 height=%.2f />]], -height/2, height), string.format([[<text id="eName" x=160 y=%.2f >%s</text>]], -height/2 +20, tooltip.name), string.format([[<text id="eClass" font-style="italic" x=170 y=%.2f >%s</text>]], -height/2 + 40, tooltip.class), string.format([[<text id="eName" x=160 y=%.2f >Methods</text>]], -height/2 + 60) } --Compose the list of methods of the element local cSVG, yMethods = #svg, 0 if tooltip.methods then for k,m in pairs(tooltip.methods) do yMethods = -height/2 + 60 + k*14 svg[cSVG+k] = string.format('<text class="pName" x=170 y=%.2f >%s</text>', yMethods, m.name ) end end cSVG = #svg+1 yMethods = yMethods +20 svg[cSVG] = string.format([[<text id="eName" x=160 y=%.2f >Fields</text>]], yMethods) --Compose the list of fields of the element if tooltip.fields then for k,f in pairs(tooltip.fields) do local sValue = "" local yFields = yMethods + k*14 if type(f.value) == 'number' then sValue = string.format('%.4f', f.value) elseif type(f.value) == 'boolean' then sValue = string.format('%s', f.value and 'true' or 'false') elseif type(f.value) == 'string' then sValue = f.value else sValue = tostring(f.value) end svg[cSVG+k] = string.format('<text class="pName" x=170 y=%.2f >%s</text><text class="pValue" x=440 y=%.2f >%s</text>', yFields, f.name, yFields, sValue ) end end svg[#svg+1] = [[</g></svg>]] --Concat and display the SVG system.setScreen(table.concat(svg))
  3. Hello Noveans, We would like to hear your feedback on the addition of PANACEA to the roadmap!
  4. The Dual Universe roadmap has been expanded with the Panacea update, which is currently in production and brings with it a plethora of new features, tools, and improvements that will be particularly interesting for builders, scavengers, and Lua aficionados. WHAT’S IN IT A follow-up to the changes introduced in the Selene and Demeter updates, the Vertex Precision Tool will provide a powerful, intuitive way to fine-tune your builds. Particularly for those who are new to voxelmancy, this tool will be invaluable. Watch this video to get a taste of what it can do. The introduction of shipwrecks in space will open a variety of lucrative opportunities for players who seek them out. Sell them as-is, salvage them for parts, create missions for other players to bring you the ship or its parts, or simply fetch a handsome price by selling the location information. Other new features and improvements include: Camera Lua API: get access to information about the in-game camera Talents UI improvements: a more efficient way to view Talents RDMS UI polish: a cleaner interface for the management of RDMS To reduce clutter and keep Alioth beautiful, we are implementing inactive constructs requisitioning, an automated system for the abandonment of constructs owned by unsubscribed players and organizations to aid in keeping overcrowded public market areas clear. Organization construct ownership (construct slots): a new way of assigning available construct limits to organizations. Disabling element stacking or overlapping: the final step in preventing the element stacking exploit. WHAT’S IN A NAME Choosing the name for this update, Panacea, the goddess of remedy, is a reference to our renewed dedication to taking player feedback into greater consideration. In reflecting on the aftermath of the Demeter release, we recognized that we fell short in this area. We read your feedback but did not make the adjustments we could and should have. We pledge to be better about working hand-in-hand with the community by implementing a plan to increase two-way communication and making some important tweaks and balancing to the game that will address some of the pain points as much as we’re able. As a first step, beginning January 12th, we will postpone the next territory upkeep pay period for two weeks. This will allow the Design team time to revisit the tax rate, which many community members said was too steep. The purpose and functions of the upkeep system go beyond limiting “landgrabbing” and are more complex than they may appear on the surface. Many factors and interdependencies need to be taken into consideration. WHAT’S NEXT A series of devblogs will be published soon to reveal more information about the Panacea update. Additionally, we will be sharing a new roadmap soon. We hope that you’ll like what you see, and we encourage you to share your constructive feedback about our ideas as you read each article. Let’s chat!
  5. While many members of our team will be off to spend time with their families for the holidays, there will still be hamster wranglers and other key staff on-hand to keep the servers running smoothly. Customer Support will also be available, but please be patient as turn-around time for tickets may take a little longer than usual. Meanwhile, here’s a sneak peek at some of the things you can look forward to when the team returns in January: An updated roadmap A reveal of our next major update, including devblogs Some exciting new Lua stuff, which NQ-Ligo will tell you more about below. MORE LUA LOVE Bonjour, everyone. NQ-Ligo here. I focus a lot on everything related to Lua implementation, improvements, bugs, tests, and additions. You may remember me from the three-part devblog series Lua Changes and Improvements. We are continuing to introduce more changes and improvements to the Dual Universe Lua environment. There is so much we want to do, and we are doing our best to include Lua-related content into updates as often as possible along with major gameplay elements. Fellow Lua enthusiasts will probably be happy to hear that two areas I’m working on now are the Camera Lua API and the Lua API for the mining unit. These two major additions (and a few minors) are coming very soon! Watch for more information from me about these after the holidays. WARM WISHES FROM NQ From our universe to yours, the Novaquark team would like to extend our warmest seasons greetings and thanks to the Dual Universe community. Happy holidays!
  6. With assistance from his “Cosmic Buzard” organization, Antoine created this trio of ships: the Stratus, the Cumulus, and the Cumulonimbus. “My first priority,” Antoine explained, “was to make something beautiful.” As the names imply, clouds were one of the inspirations in the designs. Antoine was also inspired by steampunk aesthetics, making for some remarkably unique results. All were made by extensively using the Smooth tool. Spec-wise, the Cumulus zeppelin can travel 600 km/h without boosters. The Stratus air balloon can go 200 km/h, and the flying ship, Cumulonimbus, does 800 km/h. Share your voxel art masterpieces with us! Send screenshots to creators@dualuniverse.com or via https://forms.gle/MPDNjkxxF1tC8ntz6. Perhaps we’ll feature your creation in an upcoming video!
  7. Hello, Noveans! We would like to hear your feedback on the territory upkeep kicking off soon!
  8. Hello everyone, Thanks for your report, and sorry for the trouble. The web development team has fixed this issue. You can now switch the "I receive a message" trigger on and off at will. Thanks for your patience! Best regards, Wanderer.
×
×
  • Create New...