Shrooblord Posted January 27, 2018 Share Posted January 27, 2018 Rename Ships Have you ever made a mistake during ship creation and given it the wrong name? Has a kooky name grown old? Have you given a ship a name for a specific purpose, only to discover you wanted to reassign it a different purpose, but now the name is all wrong? In other words: do you want to rename your ships? Then look no further! This mod is for you. Usage This mod adds a Holy Grail icon to the UI. Use this icon to modify the name of the ship you are currently piloting. To modify the name of another ship you own, which you are currently not piloting, bring up the Interaction Window with F and choose "Rename Ship". This can also be done on the ship you're currently piloting yourself, of course. Either way, a dialog comes up within which you can type your new ship's name. The name is limited to 35 characters, as all ship names in Avorion are. Press OK and the new name is applied. Press the X button to close the dialog afterwards. See the following video for an explanation: Prerequisites This mod requires an external resource: ShipScriptLoader Please follow the installation instructions of ShipScriptLoader before you install Rename Ships. Installation Instructions - Download the mod ShipScriptLoader by Dirtyredz and follow its installation instructions. This is required to load Rename Ships. If you are already using it you may skip this step. Note There is an issue in the installation instructions of ShipScriptLoader. These are the lines you should add to Avorion/data/scripts/server/server.lua: local s, b = pcall(require, 'Avorion/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 - Open the file Avorion/mods/ShipScriptLoader/config/ShipScriptLoader.lua - Before the last line containing return Config add this: Config.Add("mods/RenameShips/scripts/entity/shipRename.lua") Config.Add("mods/RenameShips/scripts/player/shipRenameMigrator.lua") - Copy the directory mods contained in the RenameShips .zip file directly into the Steam installation directory folder for Avorion. NOTE: This mod needs to be installed both client-side and server-side in order to work. Client-side integration is important for the UI to work, while server-side integration ensures the change is registered and saved to the galaxy's data. Changelog ==MOST RECENT VERSION: 1.1.3== NOTE: A new file, mods/RenameShips/scripts/player/shipRenameMigrator.lua was added in this version, which needs to be added to the config of ShipScriptLoader.lua. See the updated installation instructions in this forum post or README file included in the download. 1.1.3 BUGFIX: shipRenameMigrator now prints the correct amount of ships into Console when entering a new Sector. 1.1.2 BUGFIX: You can now rename ships at long range. If you own the craft or have the appropriate Alliance permissions to modify a ship, you can now Interact with any ship in the Sector and use the item Rename Ship. ==OLDER VERSIONS== 1.1.1BUGFIX: The UI window now closes when you press OK. [*]1.1 Added Alliance recognition: players in Alliance craft will now have the ability to rename those craft if they have the appropriate Alliance permissions to fly ships. Added a README.txt to the modpack for bundled installation instructions. [*]1.0 Initial Release Credits - Dirtyredz for the ShipScriptLoader. - Laserzwei's post for CarrierCommander, whose structure (and, partly, words) I shamelessly copy-pasta'd because it is very effective at getting the point across succinctly. RenameShips-1.1.3.zip Link to comment Share on other sites More sharing options...
Ravien Posted January 27, 2018 Share Posted January 27, 2018 Oh that's amazing. Thank you! I hope they make that baseline soon so we don't need a mod for it. Link to comment Share on other sites More sharing options...
Shrooblord Posted January 28, 2018 Author Share Posted January 28, 2018 Update 1.1 Added Alliance recognition: players are now able to rename Alliance ships, as long as they have the proper Alliance permissions to fly ships. Added a README.txt to the modpack for bundled installation instructions. Link to comment Share on other sites More sharing options...
Shrooblord Posted January 30, 2018 Author Share Posted January 30, 2018 Update 1.1.1 BUGFIX: The UI window now closes when you press OK. Link to comment Share on other sites More sharing options...
Shrooblord Posted February 2, 2018 Author Share Posted February 2, 2018 BUG REPORT Noticed unexpected behaviour due to the implementation of Ship Script Loader as the only hook for entities into using this mod: you cannot long-distance rename ships you own. This is confusing since once you've piloted these ships, the script has been added to them, and then, you can long-distance rename them. This is intentional to how Ship Script Loader works, but an oversight on my end. I will work out a solution soon / today that incorporates the ease-of-use of using Ship Script Loader to install the mod, but allows long-distance renaming of ships you own / in your Alliance (given the proper privileges etc. etc.) without having to pilot them first. Stay tuned. Link to comment Share on other sites More sharing options...
Shrooblord Posted February 2, 2018 Author Share Posted February 2, 2018 Update 1.1.2 BUGFIX: You can now rename ships at long range. If you own the craft or have the appropriate Alliance permissions to modify a ship, you can now Interact with any ship in the Sector and use the item Rename Ship. /!\ NOTE: A new file, mods/RenameShips/scripts/player/shipRenameMigrator.lua was added in this version, which needs to be added to the config of ShipScriptLoader.lua. See the updated installation instructions in this forum thread or README file included in the download. EDIT: Immediately noticed a mistake I'd left in the code. Fixed. Update 1.1.3 BUGFIX: shipRenameMigrator now prints the correct amount of ships into Console when entering a new Sector. Link to comment Share on other sites More sharing options...
Ravien Posted February 3, 2018 Share Posted February 3, 2018 This will be a must have mod for me. Link to comment Share on other sites More sharing options...
T4Ken Posted February 23, 2018 Share Posted February 23, 2018 error constructing Player: no player found in script context at [C]:-1: in function Player mods/RenameShips/scripts/player/shipRenameMigrator.lua:32: in function ? could not execute function 'onSectorChanged' in '"mods/RenameShips/scripts/player/shipRenameMigrator.lua"': mods/RenameShips/scripts/player/shipRenameMigrator.lua:34: attempt to index global 'player' (a nil value) stack traceback: mods/RenameShips/scripts/player/shipRenameMigrator.lua:34: in function <mods/RenameShips/scripts/player/shipRenameMigrator.lua:26> maybe a Problem with Alliance ships ? but it´s still working Link to comment Share on other sites More sharing options...
T4Ken Posted February 26, 2018 Share Posted February 26, 2018 function onSectorChanged() if onServer() then local stations = {Sector():getEntitiesByType(EntityType.Station)} local ships = {Sector():getEntitiesByType(EntityType.Ship)} playerShip = Entity() player = Player() if playerShip.factionIndex == player.index then addRenameScriptToEntities(stations) addRenameScriptToEntities(ships) if touched then print("***================================***") if craftTouched == 1 then print("RenameShips Migrator: Added ShipRename to 1 craft in this Sector.\n") else print("RenameShips Migrator: Added ShipRename to "..tostring(craftTouched).." craft in this Sector.\n") local craftTouched = 0 end end end end end someone knows how to change this if playerShip.factionIndex == player.index then for Alliance ships ? if this is the matter ? Link to comment Share on other sites More sharing options...
Shrooblord Posted July 13, 2018 Author Share Posted July 13, 2018 Hey. Late reply, I know. I've looked into the error. Silly things were happening. Here's a hotfix; I'll look into how to properly solve it later. RenameShips_hotfixPlayerUndefined.zip Link to comment Share on other sites More sharing options...
Malkeus Posted August 12, 2018 Share Posted August 12, 2018 RenameShips does it's job perfectly, I can rename any ship in my fleet, no problem. However...I don't have a holy grail icon and my insurance icon now renames ships instead of lets me purchase insurance. It's even changed names. I'm running a good number of mods, but the only other one that affects that bar is moveUI. Or it could be any of them...Could someone give me a place to start poking around, maybe the location of the file that affects that bar? I'm guessing I've fudged up an install by overwriting something I should have handled in the text editor. Link to comment Share on other sites More sharing options...
TheCreepyGinger Posted October 14, 2018 Share Posted October 14, 2018 Hey so great mod, but uh... how do ya download the actual rename ship mod? I couldn't find a link. Link to comment Share on other sites More sharing options...
TheCreepyGinger Posted October 14, 2018 Share Posted October 14, 2018 Nevermind. Turns out one needs to be registered with the forum to actually see the link. Good thing I made an account. Link to comment Share on other sites More sharing options...
kirknay Posted February 13, 2019 Share Posted February 13, 2019 Mod has been broken by the latest patch. Please fix for 0.20.x update. Link to comment Share on other sites More sharing options...
unbekannt1984 Posted February 13, 2019 Share Posted February 13, 2019 Hi, I think there won't be a fix. Shrooblord put this Mod into the Deprected-Section of Topic: [Mod Info] Which Mods Are Supported This Patch?. Link to comment Share on other sites More sharing options...
BangL Posted February 16, 2019 Share Posted February 16, 2019 Mod has been broken by the latest patch. Please fix for 0.20.x update. you dont need this mod from 0.20.x on. renaming ships is already integrated in the game now, which made this mod obsolete. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now