Jump to content

Rinart73

Members
  • Posts

    416
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Rinart73

  1. I got problem with the "Co" too. I also found it's source: 2018-08-09 16-06-00| could not execute function 'FleetControlUi.updateClient' in '"data/scripts/entity/fleetcontrol/controlui.lua"': 2018-08-09 16-06-00| 2018-08-09 16-06-00| data/scripts/lib/fleetcontrol\common.lua:404: attempt to index global 'Co' (a nil value) 2018-08-09 16-06-00| stack traceback: 2018-08-09 16-06-00| data/scripts/lib/fleetcontrol\common.lua:404: in function 'getPlayerCrafts' 2018-08-09 16-06-00| data/scripts/entity/fleetcontrol/controlui.lua:2117: in function <data/scripts/entity/fleetcontrol/controlui.lua:2103> It's in the "FleetControlCommon.getPlayerCrafts" function ("data\scripts\lib\fleetcontrol\common.lua"): Replace "Co." with "FleetControlCommon." in the line 404: if e.isShip and Co.checkShipAllianceFlyCraftPrivileges(e, player.index) then Stumbled upon few more bugs: 1. I have player ships and stations in the sector, alliance ships/stations and some ships/stations that belong to a disbanded alliance. I got this error whle playing (on a server side): 2018-08-09 18-35-20| #0: FleetControlUi.syncServerConfig data/scripts/entity/fleetcontrol/controlui.lua 2018-08-09 18-35-20| 2018-08-09 18-35-20| could not execute function 'FleetControlUi.syncServerConfig' in '"data/scripts/entity/fleetcontrol/controlui.lua"' 2018-08-09 18-35-20| invalid argument 'nil' at stack position 1, expected 'Player' 2018-08-09 18-35-20| stack traceback: 2018-08-09 18-35-20| [C]:-1: in function invokeClientFunction 2018-08-09 18-35-20| data/scripts/entity/fleetcontrol/controlui.lua:238: in function ? This happens because FleetControl treats Alliance ships like Player ships so it tries to send settings to a 'player' and fails. 2. A bunch of these lines: An error occurred during remote call to 'updateShipStates' in script "data/scripts/entity/fleetcontrol/controlui.lua". Function doesn't exist. 3. When you turn ship into station, FleetControl script stays attached to it. I suppose it should be removed? Can you please change your `removeSpecialOrders` function a bit? So it would look like this: local function removeSpecialOrders() local entity = Entity() for index, name in pairs(entity:getScripts()) do if string.match(name, "/scripts/entity/ai/") then entity:removeScript(index) end end end It would allow your commands to remove custom ai scripts that are stored in mods folder (for example "mods/MyAwesomeMod/scripts/entity/ai/dothething.lua") thus eliminating possible conflicts.
  2. It seems that we still have a problem when NPC sells Antigrav Generators to a player station for it to consume. Then Player gets these out and resells them to NPC station, getting free money.
  3. Nevermind, it got fixed. I don't know when, since changelogs don't say anything about it. It actually works as I suggested: for non-AI trading there is an actual transaction.
  4. I looked at the code, otherwise I wouldn't post this. Energy Signature Suppressors protect you ONLY from persecutors.
  5. 1.2.1 - hotfix Fixed: Ships that belong to disbanded Alliance triggered an error Fixed: Minor 'callingPlayer' check error You will want to update Mod Helper - Craft Orders too, because it got an important hotfix as well.
  6. 1.0.1 - hotfix Fixed: removeSpecialOrders now also removes custom orders if they're placed in your mod's "/scripts/entity/ai" folder Changed: Had to overwrite most of the default button functions because of new 'removeSpecialOrders'
  7. Yes. Yesterday rushed to the Exodus. When I tried to return I realised that more than a half of blue dots that marked my path are gone.
  8. I don't understand why we shouldn't have an this ability as well as an ability to execute ShipAI commands while player is inside. I mean, from technical point of view this should be possible - docks already can successfully drag ship while player is inside as was demonstrated in this mod.
  9. data\scripts\entity\craftorders.lua: "CraftOrders.interactionPossible" and "checkCaptain" functions have an "AlliancePrivilege" check: if not checkEntityInteractionPermissions(Entity(), AlliancePrivilege.FlyCrafts) then But function "CraftOrders.setAIAction" makes check for different "AlliancePrivilege": checkEntityInteractionPermissions(Entity(), AlliancePrivilege.ManageShips) I doubt that changing entity order icon should require different permission than actually making that order.
  10. 1. It's very confusing to see how "Никотин" ("Nicotine") transforms into "Наркотик Акрон" ("Acron Drug") when you have it more than one. I don't understand where people got "Никотин", since in the sorce it's "Acron Drug". I suggested correct translation, but Russian translation community is usually very stubborn. 2. "Craft Orders" window title was translated as "Строительные приказы". First of all, it's completely incorrect. "Строительные" is used when talking about building process. Like "Строительные материалы" will be "Construction Materials". You see, we don't have a word similar to "Craft" that can be used for both station and ship. One more thing: vanilla Craft Orders window is really narrow so even current translation "Строительные приказы" doesn't fit in it. So I suggest to just leave "Приказы" (Orders). 3. "Build" was translated as "Собрать". You can "Собрать шкаф" (Assemble the cabinet), but without a context "Собрать" means "Collect". So it's either should be "Строить" (which is the basic translation of "Build") or just "Изменить" ("Edit"). We could even use "Изменить корабль" ("Edit ship") but then we have problems when we have this menu item on a station. UPD: Nevermind, I contacted the guy who approves Russian translation and we fixed it.
  11. ApolloMk2, I just checked and they seem to run fine. Basic module of Complex Craft Orders doesn't affect fighters.
  12. It seems that items that are being sent to the chat are localized on sender side or server side. So if on multilanguage server I'm playing in Russian and someone in German, my items in chat they'll see in Russian.
  13. 1.2.0 Added: Localization support - you'll need to install i18n - Internationalization (optional) Added: API - function "CraftOrders.noCivilFire_setCivilianShooting" and variable "CraftOrders.noCivilFire_civilianShooting" Changed: Instead of overriding 'initUI' function mod now uses ModHelper_CraftOrders, which will allow other mods that use it to work together. Fixed: Added permission check when toggling civilian fire on/off Fixed: Mod now works when ship is in patrol mode too There is now also a module for Complex Craft Orders that will allow settings from this mod to affect 'basic' module enemy Target functions!
  14. 0.17.1-0.18.3 GitHub Modders community progressed a lot in the last few years. From making direct changes in files to a structured mod folders that inject their code into vanilla files with just one line. But even this way can't save us from mods being incompatible with each other just because they touch the same file. I remember that a long time ago someone tried to make a global API for modding. I'm aiming for the smaller goal and just want to present you this mod. "Mod Helper - Craft Orders" allows you to add and remove Orders in the UI without overriding the "initUI" function. It also allows you to add AIActions, their icons and brings some useful vanilla local functions like "checkCaptain" and "removeSpecialOrders". As of version 1.1.0 it also clears CraftOrders.AIAction and order icon when a player enters the ship and before ship jumps out of the sector, thus solving some coding problems. But it needs to be on server side too now. Installation Unpack mod archive into "Avorion" folder Add following line in the end of the file "data\scripts\entity\craftorders.lua". All other mods lines should be added after this one if not pcall(require, "mods.ModHelper_CraftOrders.scripts.entity.craftorders") then print("[ModHelper_CraftOrders][ERROR]: failed to extend craftorders.lua!") end Changelog Tips and Notes Mod changes how elements in the Orders Window are positioned. Now we have 3 columns and 12 rows (maximum). Since there will be other mods in 'craftorders', I advice to add prefixes to your non-local functions It's also advised you to not replace other predefined functions like 'initialize' completely. So instead of doing this: function CraftOrders.initialize() -- your code end do this: local old_initialize = CraftOrders.initialize function CraftOrders.initialize() if old_initialize then old_initialize() end -- your code end API Mod example -- Init UI local repairButton = CraftOrders.addElement("Repair", "testmod_onRepairButtonPressed") local someCheckBox = CraftOrders.addElement("Some Checkbox", "testmod_onSomeCheckBoxChanged", CraftOrders.ElementType.CheckBox) -- and in case you need some other ui elements, you can just ask mod to reserve the space local customUIElement = CraftOrders.addElement("", "", CraftOrders.ElementType.Empty, 2, 2) CraftOrders.addAIAction("Repair", "data/textures/icons/pixel/repair.png") local function beforeInitUI() CraftOrders.removeElement("Idle") end CraftOrders.registerInitUICallback(beforeInitUI, true) local function afterInitUI() if not CraftOrders.Elements[repairButton] or not CraftOrders.Elements[someCheckBox] or not CraftOrders.Elements[customUIElement] then print("Your elements were either removed by other mod or didn't fit in the window") else repairButton = CraftOrders.Elements[repairButton].element someCheckBox = CraftOrders.Elements[someCheckBox].element -- now we can create custom ui local rect = CraftOrders.Elements[customUIElement].rect customUIElement = CraftOrders.window:createFrame(rect) end end CraftOrders.registerInitUICallback(afterInitUI) -- Callbacks function CraftOrders.testmod_onRepairButtonPressed() print("'Repair' button") if onClient() then invokeServerFunction("testmod_onRepairButtonPressed") ScriptUI():stopInteraction() return end if CraftOrders.checkCaptain() then CraftOrders.removeSpecialOrders() -- some stuff CraftOrders.setAIAction(CraftOrders.AIAction.Repair) end end function CraftOrders.testmod_onSomeCheckBoxChanged() print("Some checkbox value: " .. tostring(someCheckBox.checked)) end ModHelper_CraftOrders-1.0.0_0.17.1-0.18.2.zip ModHelper_CraftOrders-1.0.1_0.17.1-0.18.2.zip ModHelper_CraftOrders-1.1.0_0.17.1-0.18.2.zip
  15. Rinart73

    Rinart73's mods

    Since I'm going to make more mods and they don't fit in my signature, I decided to keep full list here. Mods for users Transfer Cargo Tweaks — 0.21.x+ / 0.17.1 - 0.18.3 / 0.15.x+ [independent Clientside / Serverside] Provides several Quality of Life changes to the Transfer Crew/Cargo Window, such as sorting, search and favorites system. Provides additional features if installed on server. Sector Overview — 0.21.x+ [both sides] Continuation of the "Sector Overview and Players on Galaxy map" mod, originally developed by shulrak. Shows stations and gates in sector and allows to track players coordinates. Complex Craft Orders — 0.17.1 - 0.18.3 [both sides] Allows to specify various conditions and outcomes that your captains will follow, thus making your AI ships much more responsive and useful. Energy Suppressor Detector [MoveUI module] — 0.17.1 - 0.18.3 [both sides] Detects Energy Signature Suppressors in the current sector and shows the max time before they will burn out. Founding Fixes — 0.18.3 - 0.19 [both sides] Fixes bugs that created wrong type mines / factories and gave them titles that weren't translated. Improved Energy Suppressor — 0.17.1 - 0.18.3 [both sides] Turns energy suppressor satellites into wreckages when they burn out. Allows to notify players via mail when this happens. Fixes Ogonite/Xanion satellite bug. No Civil Fire — 0.17.1 - 0.18.3 [serverside] [Optionally clientside] Prevents player/alliance AI ships from attacking civilians. Can be toggled on/off. PVP Relations — 0.18.3 - 0.19 [serverside] [Optionally clientside] Provides relation changes between players and alliances in response to PVP actions. You can get vanilla-like behaviour or use a threshold system where players will become enemies after reaching certain damage in sector. Currently only available for Rusty's Galaxy servers. Server Guard — 0.18.3 - 0.19 [serverside] Toggles PVP/PVE mode based on the distance to core; protects NPC stations; protects player/alliance ships and stations when they logoff; allows to disable netural zones inside of PVP area. Inspired by Dirtyredz's DirtySecure mod. Currently only available for Rusty's Galaxy servers. Turret Factory Amount Fix — 0.15x - ? [Clientside] Fixes old vanilla bug that resets textbox values on Turret Factory. Also implements some QoL changes. Currently outdated, I don't know if I'll update it. Turret Selling Fix — 0.17.1 - 0.18.3 [both sides] Provides local fix of an economy exploit that allows to build super-profitable turrets. Mods for modders i18n - Internationalization — 0.16.5 - 0.21.x [Clientside] Allows to add localization for your mods and use it seamlessly (you can use vanilla '"YourPhrase"%_t' mechanics) Mod Helper - Craft Orders — 0.17.1 - 0.18.3 [both sides] Allows to create mods that modify Craft Orders UI and don't conflict with each other, allows to add AIActions and ther icons. Additionally makes few Craft Orders local functions accessible.
  16. 1.2.0 Added: Localization support. You'll need to install 'i18n' mod for it to work (optional) Added: An option to transfer 5/10/50 goods at once by clicking transfer button while you hold Ctrl/Shift/Alt Added: Favorites/trash system. Hover on row and you'll see two small icons (star and trasbin). Right-click them and you'll mark that good as favorites/trash. Self/Other ship favorites are independent from each other. You can also turn on/off favorites sorting by clicking big button with a star. All your preferences are saved on your(client) side in AppData(or other folder on Linux) Added: Overlay crew names with their profession levels Added: A way to show how much crew workforce you currently have and need Improved: A bit more utf8 performance Fixed: Minor errors in utf8 library
  17. You know the drill. Player gets cargo from their station (or Alliance station), then sells that cargo to station again. Free money from nowhere. On a first thought I wanted to just suggest "tie player/Alliance money account to all station transactions". But then we'll need to rebalance stations starting prices, since we'll have to pay for each good that it buys from NPC and it will be insanely harder to make profit. My final suggestion is: tie owner's wallet to buy/sell operations ONLY if station is trading with a ship that belongs to a Player or Alliance. This way NPC trading will remain untouched. And economy vulnerability with Player to Player trading will be eliminated. If Player/Alliance sells goods to a non-NPC station, owner of the station (Player or Alliance) pays the money. One small but important thing: add a checkbox to allow/deny station to buy from players. Otherwise someone might use new mechanics to ruin station owner wallet by providing a lot of goods. Update: I somehow missed when that was fixed. Can't find in which version (no entry in changelogs). Thread can be deleted.
  18. Actually I wasn't going to add toggle initially as I wanted to it simplier. But "Ismael" on Discord immediately asked me to :)
  19. [0.17.1-0.18.3] [mod in beta] GitHub First of all, I want to ask devs to give us Turrets API. Let us turn them on/off, give and set their targets. That API with this mod (and other possible mods too) could open endless possibilities: mining ships that switch to battle turrets to protect themselves, supporter-type ships that heal allies with repair turrets while attacking enemies at the same time etc. Has ever thought "I pay my captains too much for such simple tasks" crossed your mind? Do you want them to be smarter and to act to the situation accordingly? Now you can get what you want - with this mod you can specify various conditions and outcomes that your captains will follow. And if you're a modder you can write a module for this mod, expanding it's possibilities. Installation Install Ship Script Loader Unpack mod archive into "Avorion" folder Open "mods\ShipScriptLoader\config\ShipScriptLoader.lua" and add following line before "return config": Config.Add("mods/ComplexCraftOrders/scripts/entity/complexcraftorders.lua") Uninstallation Remove line that you previously added from file "mods\ShipScriptLoader\config\ShipScriptLoader.lua" Replace contents of the file "mods\ComplexCraftOrders\scripts\entity\complexcraftorders.lua" with "terminate()". Don't delete file itself Changelog Compatibility Should be perfectly compatible with any other mod, unless that mod completely messes up "data\scripts\entity\craftorders.lua" Bugs Scrolling dropdown lists is not possible when they're in a scrollable container (game bug (1)). This doesn't cause problems when you only have basic module installed, because all lists currently have less than 16 entries. I'm waiting for the fix, otherwise will find a workaround. Notes Extra-space that causes scroll to appear even with small amount of rows is a workaround to treat other game bug (2) To server owners I tried to optimize this mod as much as possible. If player uses "Nearest Enemy, Ship" few times, first result is cached for current server update. The same happens with Conditions. In the config file ("mods\ComplexCraftOrders\config\Config.lua") you can play with "updateInterval" variable (default 10 seconds). You can also set "logLevel" to 3 and mod will write in logs how much time every update takes. How to use For modders - ready This mod is currently in Beta as I'm trying to find and fix possible errors. While it won't corrupt your sectors, it may stop working at any time. Current version 0.1.1 works for Avorion 0.17.1 - 0.18.2 ComplexCraftOrders-0.1.0.zip ComplexCraftOrders-0.1.1_0.17.1-0.18.2.zip
  20. Last few days I used ComboBox-es a lot and I noticed few annoying bugs. Although I'm not sure it these are bugs or is it intended behaviour. [*]You can't scroll ComboBox entries if it's placed into ScrollFrame [*]Entries of a ComboBox that are displayed outside of the window borders cannot be selected. Image under the spoiler:
  21. We need an API to turn turrets on and off and to make them attack different targets (or to not attack anything). This would be useful for AI ships. For example you could have a mining ship with a "setPassiveShooting(true)" so it could mine with mining turrets and defend itself with battle turrets at the same time.
  22. Update - 1.1.0 Added: If installed on clientside too (optional) mod adds a checkbox which allows to toggle aggression towards civilian ships on and off (off by default) Removed: Mod no longer overrides 'CraftOrders.onAttackEnemiesButtonPressed()' function
  23. [serverside] [Optionally clientside] [0.17.1 - 0.18.3] GitHub Many people find it annoying that player/alliance AI ships in aggressive mode will attack enemy civil ships thus lowering your reputation. Well it seems that I found a way to deal with this problem through use of not very known part of the API and some workarounds. My solution also seems to be performance friendly. As of version 1.1.0 you can also toggle aggression back on if you have this mod installed on both sides. Starting from version 1.2.0 you need to install Mod Helper - Craft Orders in order for this mod to work. Note: I assume that on a low-spec servers there is a tiny chance that AI ship will attack civil ships that were created in current sector (not warped into it) for a split second. This is due to the fact that there is no way to check if new ship is civil immediately after it was created. Although I tested the mod on low-spec notebook and everything was fine. Installation [*]Optionally install i18n - Internationalization if you want to have this mod translated in your language (version 1.2.0+) [*]Install Mod Helper - Craft Orders (version 1.2.0+) [*]Unpack mod archive into "Avorion" folder (next to the "data" folder) [*]Add following line in the end of "Avorion\data\scripts\entity\craftorders.lua" file (after Mod Helper line): if not pcall(require, "mods.NoCivilFire.scripts.entity.craftorders") then print("[NoCivilFire][ERROR]: failed to extend craftorders.lua!") end Uninstallation
  24. Build enough torpedo cargo blocks to contain 1 torpedo with a size 1. Then try to buy some torpedos with size 1. There is a chance that game will tell you that you don't have enough space. But they're some torpedos that will fit so you will buy them. Its like torpedos have a float type size, so some will fit and some don't.
  25. I'm currently playing on Insane difficulty on Rusty's server. Persecutors and torpedos mechanics were new to me, because I haven't played in a while. So here is my feedback and suggestions: Torpedos Torpedos completely broke the balance. They deal INSANE damage. In the past battles were slow. You tried to make them dynamic and that's not an easy task. Currently battles in early to midgame are oneshot and that's not great. In early to mid game you don't have a way to deal with torpedos. You don't have the money and slots to equip anti-torpedo turrets. Also I haven't seen NPCs that can dodge or counter torpedos. Which made battles insanely easy because I can just keep a distance and oneshot enemy ships that would easilly kill me in fair combat. Persecutors Persecutors is a great idea except that you can back-forth from one sector to another until they will give up. Of couse, warp has a cooldown, but this cooldown depends on your ship size. So.. make a small ship and rush to the center, persecutors will be annoying but that's it. Just warp again and again until they give up. Also, generally NPC ships are slow. So you can just warp, fly as far as you can in sector, warp again.. Energy Signature Suppressors They hide you from persecutors but not from pirates? Why they even hide you from persecutors, it's just nullifies the whole point of them. Maybe instead they could hide you from pirates or xsotan, so you could pay and focus on farming if your ship is strong.
×
×
  • Create New...