Jump to content

EasternGamer

Alpha Tester
  • Posts

    86
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • backer_title
    Sponsor
  • Alpha
    Yes

Recent Profile Visitors

847 profile views

EasternGamer's Achievements

  1. Hmm, just a note that information is an uncountable noun, so it doesn't have a plural with an "s", so technically the getConstructInfos(...) is not really right, It should just be getConstructInfo(...).
  2. Extremely doubt it's anything more than what the JSON says. The update seems to bring function parity to the JSON data. This would be cool and useful... especially since we now can set and get tags.
  3. Intro With the recent dev-blogs, I feel like there's been a change in attitude with Lua. Before, we basically never got changes to it or the changes were very minimal/incomplete. (*cough* character orientation *cough*) But, now that we're adding a bunch of functions to Lua, so much so that it's starting to get cluttered with really long function names, I think a general structure change should occur. A perfect example is camera data. Structure Change The core unit, control unit and system basically are filled to the brim with functions that don't really related to them, especially system. So, here I go with what I believe should happen: The creation of a "Construct" default slot. (No links required) The creation of a "Player" default slot. (No links required) The creation of a "Database" default slot. (No links required) The creation of a "Elements" default slot. (No links required) Construct Slot (moved to) This slot will handle everything to do with the construct, and only the construct. As the first dev-blog has shown, a fair number of things are irrelevant of the core, thus it doesn't quite make sense that we should still access the core for them. For example, world orientation of the construct is irrelevant to the core, and even ordinary orientation is irrelevant to the core since it is based off the orientation unit, a gyro or core. However, data which is more core-related remains, like direct calculations/measurements that you would imagine the core making (velocity, acceleration etc.). Player Slot (moved to) This slot will handle everything to do with the master player, the player who has executed the control unit. As you can guess, a fair number of functions are placed on the unit because of this. But, it sort of makes little sense beyond the fact that the player activated, not to mention to access any player related info, they want to prefix every function with MasterPlayer, a perfect example of how absurdly long it is getting is unit.getMasterPlayerWorldForward(), now tack on camera to it... unit.getMasterPlayerCameraWorldForward(). You get the point. Database Slot (moved to) This will consolidate any thing that essentially accesses a database, static or otherwise, for instance getting the player name, position, etc. It will be similar to the Lua version in our files, but be entirely made of native code, instead of Lua. This should help with Database.lua's semi-redundancy and inefficiency, aside from code length contraction. Elements Slot (moved to) This will consolidate any general element function that is normally accessed by the core. This will remove the need to basically prefix stuff with getElementDATAById(uid) Instead, you will simple say getDATAById(uid) or getDATA(uid) Keys Bad Name* (Italics, suffixed by one or more light yellow asterisks, name requires a change for consistency reasons) πŸ†• Dev Blog Addition (Bold, prefixed by "New" emoji) moved to (Colour coded, moved to another slot) Suggested Addition (Bold, green) Core getData() getConstructMass() getConstructIMass() getConstructCrossSection() getMaxKinematicsParametersAlongAxis(taglist,crefaxis) getConstructWorldPos() getConstructId() πŸ†• getConstructName() πŸ†• getOrientationUnitId() getWorldAirFrictionAngularAcceleration() getWorldAirFrictionAcceleration() spawnNumberSticker(nb, x, y, z, orientation) spawnArrowSticker(x, y, z, orientation) deleteSticker(index) moveSticker(index, x, y, z) rotateSticker(index, angle_x, angle_y, angle_z) getElementIdList() getElementNameById(uid) getElementTypeById(uid) getElementHitPointsById(uid) getElementMaxHitPointsById(uid) getElementMassById(uid) getElementPositionById(uid) πŸ†• getElementForwardById(uid) πŸ†• getElementUpById(uid) πŸ†• getElementRightById(uid) getElementIndustryStatus(uid)* getElementTagsById(uid) getSchematicInfo(schematicId) getAltitude() πŸ†• getCurrentPlanetId() g()** getWorldGravity()*** getWorldVertical()**** getAngularVelocity() getWorldAngularVelocity() getAngularAcceleration() getWorldAngularAcceleraton() getVelocity() getWorldVelocity() πŸ†• getAbsoluteVelocity() πŸ†• getWorldAbsoluteVelocity()***** getWorldAcceleration() getConstructWorldOrientationForward() getConstructWorldOrientationRight() getConstructWorldOrientationUp() getConstructOrientationForward() getConstructOrientationRight() getConstructOrientationUp() getPvPTimer() getPlayersOnBoard()****** getDockedConstructs()******* isPlayerBoarded(pid) isConstructDocked(pid) forceDeboard(pid) forceUndock(cid) getBoardedPlayerMass(pid) getDockedConstructMass(cid) getParent() getCloseParents() getClosestParents() πŸ†• getParentPosition() πŸ†• getParentWorldPosition() πŸ†• getParentForward() πŸ†• getParentUp() πŸ†• getParentRight() πŸ†• getParentWorldForward() πŸ†• getParentWorldUp() πŸ†• getParentWorldRight() dock(pid) undock() setDockingMode(mode) getDockingMode() getCoreStress() getMaxCoreStress() getCoreStressRatio() All Events *getElementIndustryStatus() -> getElementIndustryStatusById() **g() -> getLocalConstructGravityIntensity() ***getWorldGravity() -> getConstructWorldGravity() ****getWorldVertical() -> getWorldGravity() *****getWorldAbsoluteVelocity() -> getAbsoluteWorldVelocity() (Swapping the Absolute Prefix with the World prefix sounds better and is probably more consistent) ******getBoardedPlayerIds() *******getDockedConstructIds() System getActionKeyName(actionName) showScreen(bool) setScreen(content) createWidgetPanel(label) destroyWidgetPanel(panelId) createWidget(panelId, type) destroyWidget(widgetId) createData(dataJson) destroyData(dataId) updateData(dataId, dataJson) addDataToWidget(dataId, widgetId) removeDataFromWidget(dataId, widgetId) getMouseWheel() getMouseDeltaX() getMouseDeltaY() getMousePosX() getMousePosY() getThrottleInputFromMouseWheel() getControlDeviceForwardInput()* getControlDeviceYawInput() getControlDeviceRightLeftInput()** lockView(state) isViewLocked() freeze(bool) isFrozen() getTime() getActionUpdateDeltaTime() getPlayerName(pid) getPlayerWorldPos(pid) πŸ†• getOrganizationName(oid) πŸ†• getOrganizationTag(oid) getWaypointFromPlayerPos() setWaypoint(waypointStr) getScreenHeight() getScreenWidth() getFov() print(msg) logInfo(msg) logWarning(msg) logError(msg) All Events *getControlDeviceForwardInput ->getControlDevicePitchInput **getControlDeviceRightLeftInput ->getControlDeviceRollInput ControlUnit exit() setTimer(timerTagId, period) stopTimer(timerTagId) getAtmosphereDensity() getClosestPlanetInfluence() πŸ†• getMasterPlayerPosition() πŸ†• getMasterPlayerWorldPosition() πŸ†• getMasterPlayerWorldForward() πŸ†• getMasterPlayerWorldUp() πŸ†• getMasterPlayerWorldRight() πŸ†• getMasterPlayerForward() πŸ†• getMasterPlayerUp() πŸ†• getMasterPlayerRight() getMasterPlayerId() getMasterPlayerMass() getMasterPlayerParent() πŸ†• getMasterPlayerOrgIds() setEngineCommand(...) setEngineThrust(taglist, thrust) setAxisCommandValue(axis, commandValue) getAxisCommandValue(axis) setupAxisCommandProperties(axis, commandType, targetSpeedRanges) setupControlMasterModeProperties(controlMasterModeId, displayName) getControlMasterModeId() cancelCurrentControlMasterMode() isAnyLandingGearExtended() extendLandingGears() retractLandingGears() isMouseControlActivated() isMouseDirectControlActivated() isMouseVirtualJoystickActivated() isAnyHeadlightSwitchedOn() switchOnHeadlights() switchOffHeadlights() isRemoteControlled() activateGroundEngineAltitudeStabilization(targetAltitude)* getSurfaceEngineAltitudeStabilization()* deactivateGroundEngineAltitudeStabilization()* computeGroundEngineAltitudeStabilizationCapabilities()* getThrottle() setSignalIn(plug, state) getSignalIn(plug) All Events *I got no idea what to replace those with, but the names are just weird, what's a surface engine, ground engine? Function name is super long. Construct getWorldOrientationForward() getWorldOrientationRight() getWorldOrientationUp() getOrientationForward() getOrientationRight() getOrientationUp() getWorldPos() getId() πŸ†• getName() πŸ†• getOrientationUnitId() getMass() getIMass() getCrossSection() getLocalGravityIntensity() Elements getIdList() getNameById(uid) getTypeById(uid) getHitPointsById(uid) getMaxHitPointsById(uid) getMassById(uid) getPositionById(uid) πŸ†• getForwardById(uid) πŸ†• getUpById(uid) πŸ†• getRightById(uid) getIndustryStatusById(uid) getTagsById(uid) getElementById(uid) Player getId() getMass() getParent() πŸ†• getOrgIds() lockView(state) isViewLocked() freeze(bool) isFrozen() getFov() getHorizontalFov(bool) getVerticalFov(bool) getHeadlampState() setHeadlampState(bool) isSeated() getSeatId() getCameraView() getCameraWorldForward() getCameraWorldUp() getCameraWorldRight() getCameraWorldPos() getCameraLocalForward() getCameraLocalUp() getCameraLocalRight() getCameraLocalPos() πŸ†• getBodyPosition() πŸ†• getBodyWorldPosition() πŸ†• getBodyWorldForward() πŸ†• getBodyWorldUp() πŸ†• getBodyWorldRight() πŸ†• getBodyForward() πŸ†• getBodyUp() πŸ†• getBodyRight() Database getPlayerName(pid) getPlayerWorldPos(pid) πŸ†• getOrganizationName(oid) πŸ†• getOrganizationTag(oid) getSchematicInfo(schematicId) getPlayerById(pid) getMasterPlayer() getOrganization(oid) getConstruct(cid) Camera Data Explanation The camera data is pretty straight forward. I made an code example and explanation before this mess, I'll just paste that here lol. local player = player --> A tab which virtually represents the "player", it holds player related events and functions. local isSeated = player.isSeated() --> Returns true or false if the player is seated or not. local seatId = player.getSeatId() --> Returns the player seat ID if seated, otherwise nil. local headlampState = player.getHeadlampState() --> Returns the boolean of the avatar headlamp, on or off. player.setHeadlampState(not headlampState) --> Inverts the headlamp state. local camView = player.getCameraView() --> Returns 0 for first-person, 1 for third-person and 2 for fixed third-person. -- Consideration to have is that you can get into third person while using the normal avatar using an emoji. -- Why it is useful is so you can change the HUD you intend on using depending on if you're in those seperate views and if you should listen to mouse input for UI, etc. local camWorldUp = player.getCameraWorldUp() --> Returns the camera up vector in world coodinates. local camWorldForward = player.getCameraWorldForward() --> Returns the camera forward vector in world coodinates. local camWorldRight = player.getCameraWorldRight() --> Returns the camera right vector in world coodinates. local camLocalUp = player.getCameraLocalUp() --> Returns the camera up vector in local coodinates, relative to the build grid. local camLocalForward = player.getCameraLocalForward() --> Returns the camera forward vector in local coodinates, relative to the build grid. local camLocalRight = player.getCameraLocalRight() --> Returns the camera right vector in local coodinates, relative to the build grid. local camLocalPos = player.getCameraLocalPos() --> Returns the camera position in local coordinates relative to the build-grid (construct) center. local camWorldPos = player.getCameraWorldPos() --> Returns the camera position in world coordiantes. --<! Optionally, you could add a relative world position function which is relative to the construct center, but in world coordinates. Though, I feel it would be very niche !>-- --- Lastly, local camHFov = player.getCameraHorizontalFov(true/false) --> Returns the horizontal fov with a boolean parameter to determine if it is returned as a radian or degree format. local camVFov = player.getCameraVerticalFov(true/false) --> Returns the vertical fov with a boolean parameter to determine if it is returned as a radian or degree format. Final Structure (No Formatting, mainly for glancing to see roughly the impact) Core getData() getMaxKinematicsParametersAlongAxis(taglist,crefaxis) getWorldAirFrictionAngularAcceleration() getWorldAirFrictionAcceleration() spawnNumberSticker(nb, x, y, z, orientation) spawnArrowSticker(x, y, z, orientation) deleteSticker(index) moveSticker(index, x, y, z) rotateSticker(index, angle_x, angle_y, angle_z) getAltitude() getCurrentPlanetId() getConstructWorldGravity() getWorldGravity() getAngularVelocity() getWorldAngularVelocity() getAngularAcceleration() getWorldAngularAcceleraton() getVelocity() getWorldVelocity() getAbsoluteVelocity() getAbsoluteWorldVelocity() getWorldAcceleration() getPvPTimer() getBoardedPlayerIds() getDockedConstructIds() isPlayerBoarded(pid) isConstructDocked(pid) forceDeboard(pid) forceUndock(cid) getBoardedPlayerMass(pid) getDockedConstructMass(cid) getParent() getCloseParents() getClosestParents() getParentPosition() getParentWorldPosition() getParentForward() getParentUp() getParentRight() getParentWorldForward() getParentWorldUp() getParentWorldRight() dock(pid) undock() setDockingMode(mode) getDockingMode() getCoreStress() getMaxCoreStress() getCoreStressRatio() All Events System getActionKeyName(actionName) showScreen(bool) setScreen(content) createWidgetPanel(label) destroyWidgetPanel(panelId) createWidget(panelId, type) destroyWidget(widgetId) createData(dataJson) destroyData(dataId) updateData(dataId, dataJson) addDataToWidget(dataId, widgetId) removeDataFromWidget(dataId, widgetId) getMouseWheel() getMouseDeltaX() getMouseDeltaY() getMousePosX() getMousePosY() getThrottleInputFromMouseWheel() getControlDevicePitchInput() getControlDeviceYawInput() getControlDeviceRollInput() getTime() getActionUpdateDeltaTime() getWaypointFromPlayerPos() setWaypoint(waypointStr) getScreenHeight() getScreenWidth() print(msg) logInfo(msg) logWarning(msg) logError(msg) All Events ControlUnit exit() setTimer(timerTagId, period) stopTimer(timerTagId) getAtmosphereDensity() getClosestPlanetInfluence() setEngineCommand(...) setEngineThrust(taglist, thrust) setAxisCommandValue(axis, commandValue) getAxisCommandValue(axis) setupAxisCommandProperties(axis, commandType, targetSpeedRanges) setupControlMasterModeProperties(controlMasterModeId, displayName) getControlMasterModeId() cancelCurrentControlMasterMode() isAnyLandingGearExtended() extendLandingGears() retractLandingGears() isMouseControlActivated() isMouseDirectControlActivated() isMouseVirtualJoystickActivated() isAnyHeadlightSwitchedOn() switchOnHeadlights() switchOffHeadlights() isRemoteControlled() activateGroundEngineAltitudeStabilization(targetAltitude) getSurfaceEngineAltitudeStabilization() deactivateGroundEngineAltitudeStabilization() computeGroundEngineAltitudeStabilizationCapabilities() getThrottle() setSignalIn(plug, state) getSignalIn(plug) All Events Construct getWorldOrientationForward() getWorldOrientationRight() getWorldOrientationUp() getOrientationForward() getOrientationRight() getOrientationUp() getWorldPos() getId() getName() getOrientationUnitId() getMass() getIMass() getCrossSection() getLocalGravityIntensity() Elements getIdList() getNameById(uid) getTypeById(uid) getHitPointsById(uid) getMaxHitPointsById(uid) getMassById(uid) getPositionById(uid) getForwardById(uid) getUpById(uid) getRightById(uid) getIndustryStatusById(uid) getTagsById(uid) getElementById(uid) Player getId() getMass() getParent() getOrgIds() lockView(state) isViewLocked() freeze(bool) isFrozen() getHorizontalFov(bool) getVerticalFov(bool) getHeadlampState() setHeadlampState(bool) isSeated() getSeatId() getCameraView() getCameraWorldForward() getCameraWorldUp() getCameraWorldRight() getCameraWorldPos() getCameraLocalForward() getCameraLocalUp() getCameraLocalRight() getCameraLocalPos() getBodyPosition() getBodyWorldPosition() getBodyWorldForward() getBodyWorldUp() getBodyWorldRight() getBodyForward() getBodyUp() getBodyRight() Database getPlayerName(pid) getPlayerWorldPos(pid) getOrganizationName(oid) getOrganizationTag(oid) getSchematicInfo(schematicId) getPlayerById(pid) getMasterPlayer() getOrganization(oid) getConstruct(cid) Ending Notes It has taken me literally the entire day doing this, and even then I feel like I've missed a lot because I was literally looking at the entirety of Lua. I was planning on explaining all the changes and stuff, but my head is about to explode from doing this the entire day so not gonna. Lol. Tbh, if they implemented even a single one of these slots, I would be happy. I don't expect most of it to change. I would also, personally, like if these changes came out gradually, if any. I think if camera angles are added though, we must at least get the player slot, or similar global variable because of how long the variable names will end up getting. Obligatory @NQ-Ligo and @NQ-Deckard, I wish you find this helpful, even if you don't add even 1% of it xD Oh, and oops. Kinda broke the "one idea" rule... it's kinda a super idea though. Hope whoever od
  4. I wonder about this... because I've asked for just getting the number of a particular type of voxel and they basically said an out right no because it's "not that simple". I don't think the voxel tech is something remotely manipulatable by the Lua side of things or even readable... unless they have a way they store each voxel with a unique identifier or something is somehow useable. It would be very nice, and really really powerful, but I have my doubts it's possible. I suggest you make a post on the Github page for Deckard to comment on, when he gets time.
  5. I second this. I wanted to make a Discord bot for skills and such but I gave up because it would be a massive pain to export skills and make them from the ground up with their given effects.
  6. Yes, but that is general game design and I decided to reference some already upvoted posts there. I'm not sure why they abandoned it, maybe something to do with JC leaving, but Lua is a little different. We have a Github to bring attention to Lua stuff. So far, some bugs we caught have been fixed and some of the things on the Github have been added. Now we're allowing NQ Lua team to see what people want the most, and probably by that and how difficult it is to do (or implications of doing it), they will go by it.
  7. Hello there. In case anyone missed it, I'm running a poll for basically what NQ should probably work on next. Of course, they probably won't go adding a major feature out of the blue, but it should help them know what to prioritize. Link: https://strawpoll.com/vk4u24pfd I also linked discussions on each item, so if you haven't already, vote. You might be able to shift some stuff. Currently 33 voters, I'm sure there are more of you out there.
  8. I wonder with all these changes, could we be seeing more getData() data becoming functions, like for example for weapons?
  9. The Atlas probably will have that data (I hope). Next dev blog will probably enlighten us more on it.
  10. I’d say yes since it’s more or less a generic element function, but @NQ-Ligo can probably confirm it for us. But I wouldn’t use it if I were you. I would localise the functions you intend on using and iterate over the construct list. radar.getData() causes a massive amount of lag in the game because it’s formatting the entire data set into JSON and then we decode that JSON, causing even more overhead. It’s significantly worse using it so I would definitely avoid it. I did a test for this btw. That single function caused 20ms of lag, this meant it actually caused the entire frame to wait for that to complete each time, meaning what should have been 30 FPS ended up being 15 FPS. This is in a 2000 core area, true, but it goes to show that it’s stupidly costly lag-wise.
  11. It is probably honestly not really worth it. Probably the entire calculation ends in 0.03-0.1ms. Absolutely minimal impact if done right.
  12. Probably some pushback with exploit concerns or it's not as clear and cut to expose. Either way, Lua changes are always welcome if they standardize and don't limit, but instead simplify the process or expand what you can do. If we complain too much, it will send the wrong message to NQ that "players don't want Lua changes", therefore no good Lua updates. We should only complain about things that limit us for no decent reason, like the nerf for transponders. That's my 2 cents. I look forward to the future of Lua here. And thanks @NQ-Ligo for the response. I see that the dev-blog updated to reflect what I spotted, nice. And thanks for clearing that up with the construct orientation.
  13. Hi there, resident Lua programmer here... I have some questions probably a few others also have as well. Questions First Question: This would imply that it would be a constant based off the image. Did you mistakenly say "direction vector of the construct in construct local coordinates" when it should've been "direction vector of the active orientation unit in construct local coordinates"? Second Question: Is there one that is irrelevant of the active orientation unit? Third Question: The master player data, is this still for body orientation and position, or are we getting the camera data? I suspect it's the former for now since this was depreciating the old functions. Forth Question: Was going to ask something else but didn't have anymore to ask lol. End Remarks I honestly wouldn't mind a full Lua refresh to make things less cluttered. Like, using three functions to get orientation and these long function names could be slimmed down a lot. For instance: <vec3,vec3,vec3> core.getConstructWorldOrientation() : Returns the forward, up and right direction vectors of the active orientation unit in world coordinates. local forward,up,right = core.getConstructWorldOrientation() --Wham! One function. Lastly, despite me using quaternions, I agree with the removal of them. There needs to be consistency and the three vector orientation system is much easier to understand and is also extremely easy to convert to a rotation matrix.
  14. Add some examples for that the UI should look like because it sounds a little vague to me. Some script UI's aren't that bad. I know from scripting it's just a limitation on time, implementation and probably performance. I think if you gave some inspiration of what something could look like it would help more. I find designing stuff is the most difficult part when you have to come up with something unique. You need inspiration from something.
×
×
  • Create New...