Jump to content

Rinart73

Members
  • Posts

    416
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Rinart73

  1. Currently relations with an Equipment Dock faction doesn't matter. I suggest to give the ability to remove permanent upgrades only if relations between ship owner faction and station owner faction are positive ( > 0 ). This is logical, because most of the other station services aren't available for enemies. This will motivate players to have good relations with NPC factions. This will give the owners of the station and their allies an advantage in defending it in PVP. Because defenders will have the ability to swap permanent upgrades and attackers will not.
  2. 0.19.1 Petty/Common/Uncommon Shield Boosters tooltips show that they also have Emergency Recharge feature, but they in fact don't. How to fix File "data\scripts\systems\shieldbooster.lua": Replace Line 156: if bonusEmergencyRecharge then with if bonusEmergencyRecharge ~= 0 then
  3. Devious, Thank you. I think we could try to add the new version to the Rusty's Galaxy modpack, if you want. 1.1.0 Improved: Now updates when Energy Signature Suppressor is created or destroyed in the sector
  4. [both sides] [0.18.3 - 0.19] Features Detects Energy Signature Suppressors in the current sector and shows the max time before they will burn out. The data is updated when player enters the sector and every 29 seconds. You can adjust the value in the "mods\MoveUI\scripts\player\EnergySuppressorDetector.lua" file. Installation 1. Install the MoveUI mod 2. Unpack the module in the "Avorion" folder 3. Add following line in the file "mods\MoveUI\config\MoveUIConfig.lua" before the line "return MoveUIConfig": MoveUIConfig.AddUI("EnergySuppressorDetector", false) 4. Toggle the module on in the MoveUI interface. Changelog MoveUI-EnergySuppressorDetector-1.0.0_0.18.3-0.19.zip MoveUI-EnergySuppressorDetector-1.1.0_0.18.3-0.19.zip
  5. 1.1.0 Improved: Mine founding fix Added: Factory founding fix, because it has the same bug
  6. Bump, because I updated fixes and found out that the same "wrong station" bug happens in the "data\scripts\entity\stationfounder.lua" file when founding factories.
  7. Well yeah, it seems that these checkboxes also have no effect on player-trading. This is a problem.
  8. @unbekannt1984, From what I can see, Goods Hauler mod just doesn't care about "Sell goods to others/Buy goods from others" settings. Someone should add an optional check for them. It's certanly not a vanilla game problem.
  9. 1.0.1 - Big and important fixes. Fixed: Energy suppressors time didn't decrease. At all. Fixed: A bug that erased suppressor time after installing the mod. Ouch.
  10. I'm soo negative! Those devs are actually working to fix bugs and improve the game ;D Yeah, you're right. If serious, I think that previous years brought more quality updates, but maybe it's just my perspective. Anyway thanks for the explanation.
  11. Public bugtracker would help both sides. You (devs) will know which bugs are not fixed and will also get an abilty to categorize them and we, players, will know which bugs were already reported and being worked on. Because some (even small but annoying) bugs were reported a long time ago and still aren't fixed.
  12. Not all components are open to the Lua API. For example we don't have access to a TurretLoot component. From what I can see there is no way to get turret loot data atm.
  13. [both sides] [0.18.3 - 0.19] Features Fixes clientside bugs that sometimes caused wrong mine or factory types to be selected and created ("Silver & Gold" instead of "Silver & Platinum" for example) Fixes serverside bug that prevented mine title from being translated Both of these bugs were reported here. Installation [*]Make a backup of the files "data\scripts\entity\minefounder.lua" and "data\scripts\entity\stationfounder.lua" [*]Unpack the mod in the "Avorion" folder Uninstallation [*]Restore the files "data\scripts\entity\minefounder.lua" and "data\scripts\entity\stationfounder.lua" from backup Changelog MineFoundingFixes-1.0.0_0.18.3-0.19.zip FoundingFixes-1.1.0_0.18.3-0.19.zip
  14. DrMasik, Hi. I disagree. There a plenty of examples when Entity scripts registered Sector callbacks. So why registering Server callbacks from Sector script is incorrect? No, I specifically need to react when player logins/logoffs. I already found the solution: Server callbacks can be successfully registered in the first update tick.
  15. Also, currently there is no cheat-proof way for server-side to know when sector is loaded on client-side. Callbacks like "onPlayerEntered" and other fire when player changes sector on server-side. Maybe you could prevent any actions from player until they will confirm that sector is loaded on their side and make a callback out of it? It would be useful, for example modders could use it to protect ships after jump while player is loading.
  16. Starting from verison 0.18.3 Alliance:getMembers() returns a set of player indexes. But in the API docs I see the old description: function table<int, Member> getMembers() So basically instead of doing this: for pIndex, _ in pairs(Alliance(allianceIndex):getMembers()) do -- something end Now modders need to do this: for _, pIndex in pairs({Alliance(allianceIndex):getMembers()}) do -- something end I guess you just forgot to update API docs. But it still was a very frustrating experience :)
  17. I have a script that is attached to sector. And I need to do stuff immediately after player login/logoff. if onClient() then return end -- namespace SectorTest SectorTest = {} function SectorTest.initialize() local server = Server() server:registerCallback("onPlayerLogIn", "onPlayerLogIn") server:registerCallback("onPlayerLogOff", "onPlayerLogOff") end function SectorTest.onPlayerLogIn(playerIndex) print("onPlayerLogIn", playerIndex) end function SectorTest.onPlayerLogOff(playerIndex) print("onPlayerLogOff", playerIndex) end But when I'm trying to register these callbacks nothing happens when player enters/leaves the game. And if server is launched from bat file, following message appears in server logs: Why it's not allowed? We can call other Server functions like "isOnline(playerIndex)" from Sector scripts just fine. Of course, I can just check if each player is online/offline every 10 seconds. But it will not produce immediate reponce and will not be performance-friendly. UPD: Apparently it works if you'll register callbacks after "initialize" function (in first update for example). But why? It's implied that Sector initialize function is called after everything is loaded. if onClient() then return end local callbacksRegistered = false -- namespace SectorTest SectorTest = {} function SectorTest.updateServer() if callbacksRegistered then return end local server = Server() server:registerCallback("onPlayerLogIn", "onPlayerLogIn") server:registerCallback("onPlayerLogOff", "onPlayerLogOff") callbacksRegistered = true end function SectorTest.onPlayerLogIn(playerIndex) print("onPlayerLogIn", playerIndex) end function SectorTest.onPlayerLogOff(playerIndex) print("onPlayerLogOff", playerIndex) end
  18. Помню, уже отвечали на этот вопрос - нет, не будет. I think I remember devs answering that question - the answer was no.
  19. Thanks, your code worked ;) I wish one day we will have access to all components..
  20. Sector callbacks "onShotFired", "onStartFiring" and "onStopFiring" work just fine. But when I'm trying to register the same entity callbacks, nothing happens. They never execute. But they're in the API docs.
  21. I need to know which ship fired the shot. So, I register a callback: function MyMod.initialize() Sector():registerCallback("onStartFiring", "onSomeoneFired") end function MyMod.onSomeoneFired(turretId) local turret = Entity(turretId) end And now what? There is no way to get "parent entity" of other entity.
  22. Found two bugs in the "data\scripts\entity\minefounder.lua" and one in the "data\scripts\entity\stationfounder.lua". 1. Sometimes when you want to create "Silver & Platinum" mine, "Silver & Gold" will be created instead. This happens because of typical "Lua doesn't care about the order in 'for in pairs'". Also because factories is categorized by goods but there is no check if current good is the first output. How to fix: Line 123-125, replace: for _, productions in pairs(productionsByGood) do for index, production in pairs(productions) do with local production for _, productions in pairs(productionsByGood) do for index = 1, #productions do production = productions[index] Line 138-142, replace: if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end with if _ == production.results[1].name then if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end end 2. When you found a mine, it will have untranslated title. How to fix: Line 290, replace: station:invokeFunction("factory", "setProduction", production, 1) with station:invokeFunction("factory", "setProduction", production, 1) station:invokeFunction("factory", "updateTitle") And remove lines 281-285: if goodName == "Raw Oil" then station.title = "Oil Rig"%_t else station.title = "${good} Mine"%_t % {good = goodName} end -------- 3. Also, the same bug (wrong factory) can happen when founding stations. Just do the same in the "data\scripts\entity\stationfounder.lua" file: Line 335-338, replace: for _, productions in pairs(productionsByGood) do for index, production in pairs(productions) do with local production for _, productions in pairs(productionsByGood) do for index = 1, #productions do production = productions[index] And Line 342-336, replace: if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end with if _ == production.results[1].name then if levels[result.level] ~= nil and not usedProductions[production.index] then usedProductions[production.index] = true table.insert(possibleProductions, {production=production, index=index}) end end
  23. If you'll move inventory, systems, alliance windows from C++ to the Lua it will help to improve the game, because modders will be able to customize the main UI. From what I see, all these windows use the same UI elements that are accessible in the Lua API. Examples: 1. I'd like to add one more Alliance-storage into Alliance window and make it a Recruit-storage. So basically in the vanilla storage we'll have high-value items and in the new storage we'll have a basic set of things that will help Recruits while they gain out Alliance trust. It's a more-less common practice that I saw in few games and I like it: clan-storage and clan-safe. Of course, I can make a mod right now, but this new Alliance-storage will be separated from the Alliance window and this will look stupid. 2. Several modders (myself included) always wanted to customize inventory window, to make it more user-friendly: Highlighting suspicious/illegal goods, moving multiple items between Alliance-storage and player-storage at once e.t.c 3. Modify system upgrades UI to add quickly interchangeable presets. This was already done as a mod, but it's better to keep related things in one place instead of clogging right upper corner of the screen with icons.
  24. Well, if you want to disable some type of damage in certain sectors (collision for example), I think you can use this code. But keep in mind that it's a dark magic and anything could happen :) Few important moments: You will still see as your health decreases. I guess it's a visual bug because in reality you take no damage. Health bar will return to the normal state in few seconds. While "invincible = true", you take no damage from any weapon. In theory, if you press against an asteroid while enemies shoot at you, you will receive less damage. -- namespace TestMod TestMod = {} local collisionCounter = 0 function TestMod.initialize() Entity():registerCallback("onDamaged", "onDamaged") end function TestMod.onDamaged(objectIndex, amount, inflictor, damageType) if damageType == DamageType.Collision then Entity().invincible = true collisionCounter = collisionCounter + 1 -- each time collision happens we increase counter deferredCallback(0, "undoInvincibility") -- and plan to call function that will undo invincibility end end function TestMod.undoInvincibility() -- we need counter to ensure that we undo invincibility after all collisions happened collisionCounter = collisionCounter - 1 if collisionCounter == 0 then Entity().invincible = false end end
  25. No, it's not overwriting. There is a difference between predefined functions (such as initialize, update, secure..) and callbacks. You just need to add predefined function and it will be detected and called by the game. But when it comes to callbacks, you need to register them item via: Entity():registerCallback(string callbackName, string functionName) And actually you can use any function name, for example: function MyModNamespace.initialize() Entity():registerCallback("onBlockDamaged", "onSomeBlockSuddenlyDamaged") end function MyModNamespace.onSomeBlockSuddenlyDamaged(objectIndex, blockIndex, inflictorId, damage, damageType) local entity = Entity(objectIndex) entity:heal(damage, blockIndex, vec3(), entity.factionIndex) end
×
×
  • Create New...