Jump to content

Rinart73

Members
  • Posts

    416
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Rinart73

  1. I don't know about mods, but vanilla fighter UI doesn't allow you to select yourself as a target for fighters. So, you can't use Repair Fighters on yourself. They just fly around you, that's all.
  2. Example: We have an enemy faction or entity. We register it as friend: ShipAI():registerFriendFaction(faction.index) ShipAI():registerFriendEntity(other.index) Then we want to check if this faction/entity was registered as a friend. And.. we can't. We can only check if there are enemies in the sector or try to get nearest enemy. So, please add a way to check this for both enemy and friend registration. local bool = ShipAI():registeredFriendFaction(factionIndex) local bool = ShipAI():registeredEnemyFaction(factionIndex) local bool = ShipAI():registeredFriendEntity(entityIndex) local bool = ShipAI():registeredEnemyEntity(entityIndex)
  3. Sandworm, both suggestions can be only implemented by developers. Current API just doesn't allow to do such things. 1. No way to highlight multiple sectors 2. Player/Alliance Ship Tab created on C++ side, not Lua. Can't change anything No, I ment to select and center on that sector
  4. Energy Suppressor Satellites allow to get Ogonite even when you're outside of the barrier. You can also get Xanion even if you're just started the game on the edge of Galaxy. When you use them they spawn a mini-station that uses a function that generates a station plan. The thing is that it uses "Faction Home Sector" to calculate plan materials. You know what home coordinates Alliance-faction has? (0, 0). Each station has 700-2000 (~1200) resource units. And from what I can see, it's usually 3 Xanion : 1 Ogonite. So.. it's ~83 credits per unit which is not that bad.
  5. [*]It would be cool to add toggleable option that shows all Alliance Ships on the map (similar to how you can see your player ships) [*]Also it's kinda annoying to open Alliance Ships tab each time to look where certain ship is, then close it and open map. Maybe to add a feature when you double click a ship in Alliance/Player Ships tab, it would open a Galaxy Map and select a sector where that ship is.
  6. Currently when Energy Suppressor Satellites 'burn out', they just stay clogging the sector while still being in my faction. Maybe they should instead turn into wrecks?
  7. Today I noticed that ships count claimed asteroids of enemy faction as any other enemy. Which results in them standing near and attacking it even when I started to fire at them. Eventually I killed them with no resistance from their side, because claimed asteroid was more interesting target than me (or maybe they tried to insult me in such way? ;D ) So I have 2 suggestions: [*]Add priority to targets so ships in AI attack mode will first attack ships, then stations, then claimed asteroids [*]Add some chance for Attack AI to change target. For example enemy ship attacks my miner. I warp in and start firing at the enemy. Enemy with a certain chance (or after reaching some damage threshold) will switch targets from defenceless miner to me.
  8. Sandworm, This is possible to implement, I'll look at this. Thank you for an idea :)
  9. Sandworm, if you're playing singleplayer you're both. So if you'll install this mod, you'll be able to use both client and server features.
  10. TinchoX, thank you :) I'm already working on the next version.
  11. 0.18.2 How to reproduce: 1. Install some auto-turrets on your ship (anti-torpedo turrets for example). Change their mode to "Defend" or "Auto" 2. Buy a captain 3. Find an enemy ship 4. Exit the ship 5. Look at how these turrets fire at the enemy. Even in Idle/Passive mode. 6. Try to turn Passive Shooting off. Watch as it has no effect. ShipAI():setPassiveShooting(false) 7. Try to mark this entity as your friend. Watch as it has no effect. ShipAI():registerFriendEntity(entity.index) I understand that turrets in defend mode should always protect ships from torpedos. But why are they keep firing on befriended entities? Or when passive fire is clearly off? Please fix. Update: Apparently turrets in the "Auto" mode don't care either
  12. Decided to add some server-side features as well, since it's all in the same file :) You still can install this mod on client-side only if you want. 1.3.0 Added: A way to change max transfer distance for crew, cargo and fighters via config (if mod is installed server-side) Added: If you transfer goods to/from station you should now be docked instead of being really close. You can toggle default behaviour on in config (if mod is installed server-side) Added: Partial Deutsch and French translation Fixed: Minor fixes
  13. Sandworm, thank you too for using this mod and leaving a review :)
  14. @plablo, thank you. Sorry, I'm not very good at tutorials. Next version will have tutorials and tooltips for the most elements and commands.
  15. I need to rotate one ship so it would face another. I need to do this gradually and fairly (so it would not exceed ship's yaw and pitch). I thought that "Velocity():addRotation(vec3 axis, float angle)" or "Velocity():setAngularVelocity(vec3 axis, float angle)" could help me with this. Currently my code looks like this. function MyMod.doServer(self, other) -- finding where we need to look to look directly at other ship local lookOther = normalize(other.translationf - self.translationf) -- vector that is perpendicular to the both should be an axis local axis = cross(lookOther, self.look) -- angle in radians local angle = -atan2(length(axis), dot(lookOther, self.look)) Velocity():addRotation(axis, angle) broadcastInvokeClientFunction("rotateOnClient", axis, angle) end function MyMod.rotateOnClient(axis, angle) Velocity():addRotation(axis, angle) end I have no problems with axis, I think. Ship rotates in the correct direction. But it's either rotates too much or not enough. Apparently there is something wrong with the "addRotation" function. Because if we'll multiply axis vector by 50 for example ship will spin like crazy. Why? It's an axis, it affects direction of rotation, not the rotation 'power'. We have an angle argument for that. I really need help with this guys :(
  16. When mining/salvaging AI ship can't find an asteroid/wreckage it does this: ShipAI(ship.index):setPassive() ship:invokeFunction("craftorders.lua", "setAIAction") But CraftOrders.setAIAction calls checkEntityInteractionPermissions function: local owner, _, player = checkEntityInteractionPermissions(Entity(), AlliancePrivilege.ManageShips) this functions uses callingPlayer and since it's nil in this case, this check will not be passed and icon will not be changed. Two ways to fix this: 1. To fake 'callingPlayer': if ship.playerOwned then callingPlayer = ship.factionIndex elseif ship.allianceOwned then callingPlayer = Alliance(ship.factionIndex).leader end ship:invokeFunction("craftorders.lua", "setAIAction") callingPlayer = nil 2. To change checkEntityInteractionPermissions code so if callingPlayer is nil, the result of check is true
  17. It's more an AI problem than shields problem I think. Current AI can't perform maneuvers, can't accelerate by "pressing space" so you can easily fly away a bit, recharge your shield and return to the battle. And in attack/patrol mode AI ships speed drops to ~120m/s at max.
  18. 0.18.2 - r12552, Windows 10 x64 I'm in the singleplayer game. I add some code to the "data/scripts/server/server.lua" file, at the end of "update" function: local players = {Server():getPlayers()} print("#players = ", #players) local playersOnline = {Server():getOnlinePlayers()} print("#playersOnline = ", #playersOnline) In the first case I get 0, in the second - 1. So I guess something is wrong with the "Server():getPlayers()" function?
  19. I don't personally use this mechanics to get money, but I don't see a problem with turrets that cost more that their components. That's basically how any factory should work. It's not like we're getting money from nothing - we need to find all these components first. But if this happens, I think that the difference between final cost and cost of ingredients shouldn't be too high. So if all these Servos and Steel could be sent to a different factories the final profit would be slightly more than making them into a turret and then selling it. Build time - fine, that sounds okay. I agree that there should be a balance between Research and Crafting. But it's important to do this gently so it will not kill turret factories near the center. Plus then we need to rework Research mechanics - not just "place any - get random", but "place the best stuff to get even better stuff". Why do you think that this is a good idea? Currently I think it's the only thing that prevents current mechanics from being exploited even more. If devs will remove component price you can just forget about commodities completely, get some cash, ai miners and drown in turrets.
  20. 0.18.2 - r12552 Steps to reproduce: [*]Be in a drone near your ship [*]Enter the ship - callback fires successfully [*]Exit from ship into a drone [*]Try to enter the ship again - no callback I get that drone is not 'fully' a ship, but still - how to track this then?
  21. 0.18.2 - r12552 Wanted to rely on "onAIStateChanged", but it seems that after some time, it just stops firing it. I checked, there are no errors in my scrip: -- namespace MyTest MyTest = {} function MyTest.initialize() Entity():registerCallback("onAIStateChanged", "onAIStateChanged") end function MyTest.onAIStateChanged(entityId, state) print("onAIStateChanged", entityId.string, state) end
  22. 0.18.2 - r12552 Sometimes when you add turrets or expand your ship, there is no "not enough gunners/engineers e.t.c" displayed in the top of the screen. And when you have enough crew for the task old icon "not enough x" stays for some time.
  23. It's a common scenario in Avorion - to delete traders, passing ships e.t.c with the use of "Sector():deleteEntityJumped(entity)". The problem is there is no way to track when certain entity was deleted. "onEntityJump" nor "onDestroyed" callbacks don't work in this situation. UPD: Tried Entity Callbacks "onJump" and "onDestroyed". They don't work too.
  24. If generators were sold by NPC, player doesn't pay anything.
  25. 0.1.1 Fixed: 'basic' module - Now can remove custom ai scrips that were added by other mods (as longs as they're placed in "mods/ModName/scripts/entity/ai" folder) Fixed: 'basic' module - No more reapplying already executed commands (this caused problems with Mining) Fixed: 'basic' module - Temporal fix to distinguish escort/follow actions Improved: 'basic' module - Now you can use space, ", " or ";" to separate coordinates for "At Coordinates" condition and "Jump To" action
×
×
  • Create New...