Jump to content

Sathaerz

Members
  • Content Count

    26
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Sathaerz

  1. Sorry, I know I'm tossing in a lot of these but it would be awesome if we could have a way to bypass or remove the pauseTime in the event scheduler on a per-event basis. I added some events that have a % chance to simply terminate immediately and it causes a massive lack of events to happen due to incrementing the pauseTime. I implemented my own event scheduler, but I don't want to have to maintain it every time you guys end up changing the event scheduler as well. Ended up figuring out a better way to do this than completely reimplementing the event scheduler. Would still be a nice feature, though!
  2. Oh yeah, it would be nice if we could get a way to flag a ship as not counting for a warzone (other than setting is_pirate / is_xsotan / is_persecutor) without having to mess with the warzone script ourselves. I'm not too stressed about this one, though.
  3. --Custom AI script. package.path = package.path .. ";data/scripts/lib/?.lua" include ("stringutility") include ("randomext") local targetEntity local minDist = -1 --namespace PursuitAIScript PursuitAIScript = {} if onServer() then function PursuitAIScript.getUpdateInterval() --Per Koonschi, this needs to be run every single frame. return 0 end function PursuitAIScript.initialize(...) --Immediately set the AI idle. PursuitAIScript will tell it how to behave instead of the default ship AI. local ship = Entity() local ai = ShipAI() local ctlUnit = ControlUnit() --print("PursuitAIScript AI successfully attached to " .. ship.name) ai:stop() ai:setIdle() for _, t in pairs({ship:getTurrets()}) do local xt = Turret(t) xt.group = 8 local xw = Weapons(t) if xw.damageType ~= DamageType.Fragments and (xw.reach < minDist or minDist == -1) then minDist = xw.reach end end if minDist <= ship:getBoundingSphere().radius then --Make sure it is at least the bounding radius minDist = ship:getBoundingSphere().radius else --Make it a bit smaller than the minimum range to make sure we're always inside of it. minDist = math.max(ship:getBoundingSphere().radius, minDist - 200) end --print("minimum range is " .. minDist) end function PursuitAIScript.updateServer(timeStep) local ship = Entity() local ai = ShipAI() local ctlUnit = ControlUnit() local eng = Engine() for _, t in pairs({ship:getTurrets()}) do local xt = Turret(t) print("xt group is " .. tostring(xt.group)) end if not targetEntity then local ships = {Sector():getEntitiesByType(EntityType.Ship)} local possibleTargets = {} for _,p in pairs(ships) do if ai:isEnemy(p) then table.insert(possibleTargets, p) end end --print("PursuitAIScript AI picked " .. targetEntity.name .. " as a pursuit target.") targetEntity = possibleTargets[math.random(1, #possibleTargets)] end if targetEntity and valid(targetEntity) then --Set the aimed position of all the weapons in group 1. ctlUnit:setAimedPosition(targetEntity.translationf, 0) ctlUnit:setControlActions(ControlActionBit.Fire1, 0) ctlUnit:setKeyDownMask(ControlActionBit.Fire1, 0) --Use the AI to fly. local distanceToTarget = distance(targetEntity.translationf, ship.translationf) if distanceToTarget > minDist then --print("Distance to target is ... " .. distanceToTarget .. " desired is " .. minDist) ctlUnit:flyToLocation(targetEntity.translationf, eng.maxVelocity) --ai:setFlyLinear(targetEntity.translationf, minDist * 2, false) end else --print("PursuitAIScript AI lost track of its current target, and will pick a new one on its next update.") targetEntity = nil end end end So a while back, I was working on this custom AI script. The issue that I ran into was that it would only shoot at the exact position of the target ship, which would obviously only work for hitscan weapons like lightning guns, railguns, etc. I had the idea to reassign weapons into different groups and control the position that the weapons were aiming based on that. However, when the first section of the script executes (that ostensibly sets all turret groups to group 8 ) there are no errors BUT executing the code immediately afterwards shows that the AI has reassigned all of the turrets to group 1 (or group 2 - I can't remember) which makes it impossible to group up turrets by a metric like projectile velocity. It would be awesome if there was a way to hard stop the AI from attempting to reassign turret groups, especially while idle. Be careful attaching this to a ship btw - it will spam messages like no tomorrow.
  4. EDIT: Original post was so that we could make it so the "accept" button can be disabled in a mission bulletin. That would still be nice but I realized you can achieve something very similar with checkAccept.
  5. Let us add an explicit resistance to hulls. This is already possible by adding a negative weakness. Also it would be neat if we could edit shield colors independently of resistances, but that's not that big of a deal.
  6. This is pretty easily solvable via script. All the devs would have to do is something like this: local hpFactor = 10 --Or another appropriate number. if math.random() < 0.5 then traderShip = ShipGenerator.createTradingShip(traderFaction, MatrixLookUpPosition(-dir, vec3(0, 1, 0), traderPos)) else traderShip = ShipGenerator.createFreighterShip(traderFaction, MatrixLookUpPosition(-dir, vec3(0, 1, 0), traderPos)) end local traderDurability = Durability(traderShip) if traderDurability then traderDurability.maxDurabilityFactor = (traderDurability.maxDurabilityFactor or 0) + hpFactor end traderShip:addScript("deleteonplayersleft.lua") ShipAI(traderShip.index):setPassiveShooting(true) traderShip:registerCallback("onDestroyed", "onTraderShipDestroyed")
  7. The API for torpedoes could use some work. I have a ship with two torpedo tubes that each have 6 available slots. The following code: local _Player = Player(callingPlayer) local _Craft = _Player.craft local _Launcher = TorpedoLauncher(_Craft.index) local _Shafts = {_Launcher:getShafts()} for _, _Shaft in pairs(_Shafts) do print("K : " .. tostring(_) .. " - V : " .. tostring(_Shaft)) end print("numShafts : " .. tostring(_Launcher.numShafts) .. " - maxShafts : " .. tostring(_Launcher.maxShafts)) returns 10 shafts in _Shafts, and both numShafts and maxShafts returns 10. _Launcher:getFreeSlots(_Shaft) will also return 15 if the shaft is unavailable for use. Trying to dynamically load the launchers based on the number of available slots will KILL the game and corrupt a save to the point where it needs to be restored from a backup.
  8. Please report this. This is a months-old bug that I have repeatedly reported that nothing has been done about. Several other players have brought it up in the discord as well.
  9. I'm not sure if there's already a way to do this in structured mission, but a way to differentiate between client-only triggers and server-only triggers would be awesome. I guess I could always wrap the declarations in onServer / onClient but that feels kind of gross.
  10. Seconding this. I don't think I've ever seen anyone who actually likes the camo texture. Every opinion I have seen ranges from neutral to dislike. I actually end up coloring all of my ships dark grey specifically to hide the camo pattern.
  11. I warned them that the legendary turrets were too weak and they told me to try them first.
  12. Try going in creative mode and hitting "guns guns guns" about 10 times. Guarantee you that you will end up with more PDC / PDL / Anti-Fighter turrets than any other gun type.
  13. Is there an example of how to color dialogs or change the name in the upper left corner somewhere? I can't find any examples in the script or the documentation. EDIT / UPDATE: I actually managed to figure this out through pure guesswork / conjecture based on some of the mission utility functions / names, but I still think it would be a good idea to add a resource for others somewhere in the documentation. EDIT / UPDATE2: I just saw the updated documentation! Looks great!
  14. Thank you! I'll take a note of that.
  15. Yet Another Requestâ„¢ Add this code (or something similar) to AsyncPirateGenerator: function AsyncPirateGenerator:setPirateFactionByLevel(_PirateLevel) self.pirateLevel = _PirateLevel end Or at least make it so I can modify the pirate level of the generator somehow. I already have this set up myself, but I think it would be a nice addition to anyone who wanted to feature the same pirate faction in a mission that spanned two sectors over a large distance.
  16. Another request: I'd like a way to get the random names the game generates internally for ships / factions, for scripting purposes. EDIT: I looked through the documentation and I found this. I can't believe I missed that on the first pass.
  17. A similar menu for the consumer stations would also be amazing. I'd like to see how much my consumer stations have spent / made over time.
  18. Maybe a ledger or something. It would be nice to be able to track how much money you spent / made in a single game over a course of a few hours or something. This would be especially good with alliances. When I was doing an alliance-only playthrough with a friend we'd frequently lose a bunch of money and have no idea why we lost it.
  19. Also, while I'm at it - less frequent IDWS drops would be great too.
  20. Currently, the game sprays you with a firehose of point defense chainguns and point defense lasers. You don't need nearly as many as it gives you. It also gives you a TON of anti-fighter turrets, which you need even less than PDCs / PDLs. I looked through the script for weapon probabilities, and p for point defense chainguns / lasers is 1. It is 2 for anti-fighter turrets. I'd suggest reducing it to 0.25 for each. I think you could even go as low as 0.12 for anti-fighter turrets. Also, would it be possible to make it so that legendary PDCs / PDLs / Anti-Fighter turrets don't drop from enemies? There's nothing quite as annoying as getting excited about a legendary weapon dropping, only for it to be an Anti-Fighter turret. I made a mod that does all of this, but Tengu commented that it would be nice to see this in the base game, so I figured I'd toss it on here.
  21. In addition to the question I edited into the last post, would a readable UIElement text be possible? If not, I'd settle for a "return text" on the last line of Diplomacy:updateTraits(faction) - around line 1949.
  22. Oh, interesting. That... significantly changes how I'm going to have to write this. Thanks for the quick reply. Appreciate it, as always. EDIT: Is there a way to make sure it waits for the update to run before continuing the function? I still have to double-click before it shows the data, which is strange.
  23. I'd like a way to sync faction traits between server and client. I've noticed that you can set faction traits server-side, but when you click on the diplomacy window the values have not been set client-side. If there's a way to do this already, it's not clear based on the documentation / scripts. I'm trying to add some custom traits that get updated on the fly, and currently they are not getting set in the diplomacy window until the game is unloaded / reloaded which isn't ideal.
  24. I was looking back through some of the older suggestions and I found this. One great way to differentiate between factions would be how they phrase the mission briefings. If you want to see an idea of how this is done, you can check out one of my mods: https://steamcommunity.com/sharedfiles/filedetails/?id=2133506910 The "Destroy Prototype Battleship" mission has three different possible dialogues, based on the "aggressive" trait of the faction that you're accepting it from. You could definitely do more with this, too. Like maybe honorable factions talk about honor instead of money, etc. I've attached a screenshot of a couple of the different mission briefings. It's not a big thing - it is just stitching text together according to different values, but it will make a faction feel much more polished and distinct than just having generic messages about transferring ships or something. It's also just fun! I had a ton of fun trying to think about different turns of phrases that the various factions could use depending on how aggressive they were.
×
×
  • Create New...