vitsum / evertech-proposals

1 stars 0 forks source link

предложения по луа функциям от chanhungvn #34

Open vitsum opened 7 months ago

vitsum commented 7 months ago

==evertech sandbox==

dear vitsum. i want to add some new features for evertech sandbox.

account

there will be account for each players, with their unique id. the way to login is to use Google Play account. each account can be have economy. save your progress (worlds, blueprints, mods, custom maps) on cloud storage. and lastly, Google Play achievement.

economy

there will be golden block as economy currently.

it is possible to obtain golden blocks by collecting the big gold coins around the map.

golden blocks can be used to unlock every blocks (EXCEPT for the expensive blocks such as: scifi cab, beacon, etc. these are REQUIRED to use the real money)

once you unlocked everything, you can use golden blocks to build it out, or steal it if it is existing on the ground

evertech sandbox mods lua new commands's library

es.display es.sound es.network

evertech sandbox mods lua new commands

==>>button: it is possible to add multiple buttons on the screen, use it's id to execute one of them

es.display.add.button(id) add a button with the given id.

es.display.edit.button(id, label, icon, size x, size y, position x, position y)

es.display.remove.button(id) delete the button with given id

es.display.clear.button() clear all buttons on the screen

==>>slider: it is possible to add multiple sliders on the screen, use it's id to execute one of them

es.display.add.slider(id) add a slider with given id

es.display.edit.slider(id, label, max value, min value, divider value, bool grid, size x, size y, position x, position y)

es.display.remove.slider(id) delete the slider with given id

es.display.clear.slider() clear all sliders on the screen

es.display.clear() clear all buttons and sliders on the screen, it is just a combination command to do both two actions instead of triggering two commands

==>>hide/show: this library will hide or show the built-in buttons, it works like a hide ui button

es.display.hide() hide all built-in buttons

es.display.show() show all built-in buttons

==>>effect: the dynamic commands to make the interesting effect for players screen.

es.display.effect(brightness, highlight, bool black&white, rgb) ►brightness (float value): setup the screen brightness. -1 is black, 0 is default, 1 is white ►highlight (float value): setup the screen highlight. -1 is grey, 0 is default, 1 is... entirely burning your eye ►black&white (boolean): setup the screen black&white. False is default, True is... back to 1945 ►rgb (the array of three float values): setup the screen color. it is just similar to multiblock paint. each array's element values must be between 0 and 1 the special case: nil means default.

es.display.brightness return the brightness value of the screen. read and write

es.display.highlight return the highlight value of the screen. read and write

es.display.blackAndWhite return the black&white boolean of the screen. read and write

es.display.rgb return the array of three values of the screen color. read and write

==>>sound: it is possible to play multiple sounds, use it's id to execute one of them

es.sound.play(id, path) play sound with given path and given id, the id must be unique for each trigger to be able to execute a sound, the path will execute where to find the sound file, the sound file must be wav

es.sound.volume(id, value) set sound volume with given value and given id. the value is between 0 and 1, multiply with the orginal volume

es.sound.loop(id, bool) set sound loop with given bool and given id

es.sound.stop(id) stop the sound with given id

es.sound.mute() stop all sounds

==>>network: you will need to connect to the network (Wifi or 4G) to be able to use this library, otherwise, every network commands will not working

==>>network variable: share the variables through the network server

es.network.variable.get(id, orginal value) return the value get from the network variable using the given id. if this id doesn't match with any variable in the network server, it will add a new variable to the network server, save and return the orginal value

es.network.variable.set(id, new value) update the value from the network variable with the new value, using the given id

es.network.variable.remove(id) delete the network variable using the given id

es.network.variable.clear() delete all network variables (only developer can be have permission to use this command, to prevent from the chaos of missing memory)

==>>network multiplayer: this command will create a playable popup of multiplayer. you can move around, open inventory, build things, chat, player list, kick player, like a real multiplayer screen. you can temporarily hide the popup and do things in single play. if you want to leave the multiplayer, just use lua or use the x button

es.network.multiplayer.host(season id, nickname) create and start a multiplayer using the given nickname and given season id, and use the existing buildings around the map. if there are existing multiplayer which are using that id, it will return nil

es.network.multiplayer.join(season id, nickname) join the multiplayer using the given nickname and given season id. if this id doesn't exist, it will return nil

es.network.multiplayer.chat(season id, nickname, message) chat each other using the given nickname and given id. if this id doesn't exist, it will return nil

es.network.multiplayer.kick(season id, nickname) kick player with given nickname and given season id. if you don't call their name, it will kick the last player. if there are no more players to kick, it will return nil. it is impossible to kick myself, so it will return nil. if this id doesn't exist, it will return nil. on the another vision, their popup is closed

es.network.multiplayer.leave() leave the multiplayer, and close the popup

==>>spawn: create blocks with the new root

es.spawnMultiBlock(string itemType, vector3 position, quaternion rotation, string mods uuid)

==>>multiblock effect: make the interesting dynamic effect for the targeted blocks

es.multiblock.effect(keyword)

keyword list:

shield flame water shiny

evertech sandbox mods lua new functions

function onButtonClick(id) end

if you click a button, this function will be triggered. you may need to use the operation commands to find out what button are you clicking, with it's id

function onButtonDown(id) end

if you hold a button, this function will be triggered as a repeat loop. you may need to use the operation commands to find out what button are you holding, with it's id

function onButtonUp(id) end

if you unpress a button, this function will be triggered as a repeat loop. you may need to use the operation commands to find out what button are you unpressing, with it's id

function onSliderClick(id, value) end

if you drag a slider, this function will be triggered. you may need to use the operation commands to find out what slider are you using, and return the value of the slider, with it's id

that was everything i wanted to add. i hope you to accept that feature. you are the genius developer of evertech sandbox.

i'm chanhungvn ∭