Jump to content

Dirtyredz

Members
  • Posts

    225
  • Joined

  • Last visited

Everything posted by Dirtyredz

  1. what do you mean by GUI? And yes to get an icon on the top right you need to attach to an entity, i suggest using my shipScriptLoader mod to keep the icon(script) with the player
  2. You'll want to modify the server files, looking for file eventscheduler.lua
  3. The most you can do is hook into a vanilla client function and initiate your code from there. You'll be limited in capability if you do it this way. An example of what you want would help me understand.
  4. 1.4.0 --Added Clock UI, Thxs DNightmare --Added FactionNotifier UI --Added ability to delete scrapyard licenses data from the UI --Removed Vanilla files from zip, follow installation instructions please I am currently working on version 2.0.0 which i hope will have far better performance on the client, aswell as a some more UIs
  5. and to help clarify why your method doesnt work, your "Loading" your file into the original server.lua at which point the c engine has already parsed server.lua and did not detect any namespace, since the "Loading" of your mod is done after the fact. The namespaeing isnt true namespacing as other programming languages would have it. Whats happening is the game engine is parsing the files before their even loaded detecting the namespace, and launching the scripts in its own isolated lua engine.
  6. the best method ive found to having your own server.lua for your mod and changing as little as possible in the original file is to do this: local s, b = pcall(require, 'mods/MoveUI/scripts/server/server') if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function(c) a(c); b.onPlayerLogIn(c); end end else print(b); end As you can see this is designed to attach itself to the onPlayerLogin event, but this can be adjusted to any of the other functions. see my mod here: http://www.avorion.net/forum/index.php/topic,3834.0.html This mod uses this example. Here is what the mods server.lua looks like local MoveUI = {} function MoveUI.onPlayerLogIn(playerIndex) -- Adding script to player when they log in local player = Player(playerIndex) player:addScriptOnce("mods/MoveUI/scripts/player/MoveUI.lua") end return MoveUI as you can see I have my own onPlayerLogin event in my own server.lua file, here i can do ALOT more then just add a script without worrying about messing up the original server.lua not to mention its easy for installation, with instructions saying "Drop these two lines at the bottom of server.lua" thats it you dont need to worry about explaining where to put a specific line or any of that nonesense. I hope this helps.
  7. system (modules) are attached to the entity not the player, so you want to use: local craft = Entity() there are a few places inside an entity where you can call Player() particularly on client side functions like onPreRender and onInstalled to name a few In which case if you want the players craft you need to do this local craftIndex = Player().craftIndex local ship = Entity() local player = Player() if not player.craftIndex == ship.index then return end
  8. Join us on the rusty servers we've got this mod working ;)
  9. I suggest contacting me via discord, i can help solve any of your issue easier there. https://discord.gg/52YZMPt It looks as if your having several issues related to your network, I can best help you via discord. Im available almost all day on discord, so feel free tocontact me thier and we can work together to fix your issue.
  10. Are you on beta? some of these mods on the list are not beta compatabile.
  11. Feel free to contact me via my discord https://discord.gg/52YZMPt I would like to see your client logs, you shoulent be having any major issue with this mod on beta. The version im working on now for beta has minor changes/bugfixs plus a new UI Anyways Ill hopefully be releasing this new version tonight maybe tomorrow.
  12. I'll be releasing a beta version soon, although it should for the most part still work.
  13. 1.1.0 --Added Failsafe loading, in the event a script doesnt exsist. https://github.com/dirtyredz/ShipScriptLoader/releases/download/1.1.0/ShipScriptLoader.v1.1.0.zip
  14. Dirtyredz

    News: Dev Progress

    I didnt realize you guys were spending so much time on the test/public server. I hope your using Dirty Server Manager to handle your auto restart needs. My manager has handles thousands of server crashes flawlessly restarting when a server hangs or crashes.
  15. Yes, use the moderator group as an example. Only include commands in the new group you want them to have.
  16. Editing admin.xml needs to be done when the server is offline. The server hold the file in memory and saves on shutdown. So changing three file while online has no effect.
  17. Ive developed an autocomplete for the avorion scripting api Features Autocomplete on all objects, and thier members/properties Autocomplete on all enums Autocomplete on all callbacks Snippets for commenly used Avorion functions. ie: initialize Descriptions, Server/Client usage (Copied from documentation, will expand on my own experience later) you can see more here: https://atom.io/packages/autocomplete-avorion wanna help maintain this do a PR here: https://github.com/dirtyredz/autocomplete-avorion DONATE Wanna show your appreciation? http://dirtyredz.com/donate Become a patron: https://www.patreon.com/Dirtyredz
  18. The idea isnt bad, but would mean lot of work for admins to move topics when mods stable version gets released. So it would be better not to do this imo... it would not work. Creating a new topic when mod gets stable makes all older discussions from beta version abandoned... not the nice way too i think. I agree, sticking to Mods Modders resources Modding questions would be best
  19. The idea sounds intriging, but I dont understand how that would work. A sub forum for each mod?
  20. This mod works, but i was thinking of remaking a similiar mod to work slightly different in how it decides to initiate events, as well as an easyer config
  21. I dont think something like this is possible yet. Much of the game is still protected, so we dont have access to everything yet.
  22. Exactly what those mod is best at, any mod that has a menu/interface has to be attsched to the players ship. For example carrier commands, sector overview to name a few. That is why this mod is primarily a modders resource.
  23. ShipScriptLoader A small mod designed to automatically load a script onto the players ship, regardless of if they change ships or not. The script will always be loaded. This mod will be extremly usefull to other modders and server owners. INSTALLATION Step 1. Unzip the zip file and drag/drop the contents into the avorion directory. Step 2. Navigate to: and place these 2 lines of code at the bottom of the file: local s, b = pcall(require, 'mods/ShipScriptLoader/scripts/server/server') if s then if b.onPlayerLogIn then local a = onPlayerLogIn; onPlayerLogIn = function(c) a(c); b.onPlayerLogIn(c); end end end Step 3. Navigate to: and add the script path of the script you want to autoload using the Config.Add() function DOWNLOAD ShipScriptLoader v1.1.0 ShipScriptLoader v1.0.0 GITHUB https://github.com/dirtyredz/ShipScriptLoader DONATE Wanna show your appreciation? http://dirtyredz.com/donate Become a patron: https://www.patreon.com/Dirtyredz MY OTHER MODS
  24. yeah the project still has a long way to go, but im working on it. Trying to get more features into it. About your mod loader tbh im not that excited about it, Could you give me some kind of preview? Alot of the modders for avorion talk here on my discord: https://discord.gg/fbW2kB We have put alot of work into molding the modding community here to a set of standards, and even still its still evolving. We all would be curious to learn more and help mold the project.
×
×
  • Create New...