Author Topic: Scripting API requests  (Read 1617 times)

Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    301
  • Discord: Rinart73#7304
    • View Profile
on: September 30, 2018, 09:56:19 PM
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.



Laserzwei

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    391
    • View Profile
on: October 24, 2018, 11:29:10 PM
I've got a relatively small request:

add something like
function Entity, ... getEnemies(var relationThreshold)
to shipAI.
The Intention is to have quick access to all Enemy Entities, in cases where "getNearestEnemy()" does not return the most reasonable target. (E.g. it selects a fighter close by, but the Big Mainship might be a better target...)
My Mod Collection
My Discord     screw google captcha
My Github
Questions?
> PM me here on the forums!



Laserzwei

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    391
    • View Profile
on: October 28, 2018, 03:23:37 PM
A function to get the started fighters of a specific squad of an specific Entity.
It would best reside in FighterController, because it already controls them.
Something like this:

function Entity... getStartedFightersOfSquad(unsigned int squadIndex)

That should be much better than (my) current workaround:
Code: [Select]
local fighters = {Sector():getEntitiesByType(EntityType.Fighter)}
for _,fighter in pairs(fighters) do
    local fAI = FighterAI(fighter)
    if fAI.mothershipId.number == Entity().index.number and fAI.squad == searchedSquadIndex then
        --do something
    end
end
My Mod Collection
My Discord     screw google captcha
My Github
Questions?
> PM me here on the forums!



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    301
  • Discord: Rinart73#7304
    • View Profile
on: October 30, 2018, 03:57:35 AM
There is no way to know if the chat is open. So for example I want to track when presses "T" key. And it will fire even when player types in the chat.
I'm not saying it shouldn't fire, just add the way to know when player types in the chat and when they just press a key during the game.



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    578
    • View Profile
on: January 16, 2019, 03:55:59 PM
Expose some Sector() variables that are currently read-only to have write-access, such as the Sector name. Being able to rename your claimed Sectors would help considerably in immersing yourself in the "Galactic Civilisation Sim" that is such a large part of what Avorion is about.

I'm not asking for the renaming functionality. I could mod in the renaming functionality. I'm only asking for write-access to the Sector() values that are currently locked behind a C++ wall that I can't do anything about.

Thank you for your consideration.
Shrooblord



Shrooblord

  • Hero Member
  • *****
  • Status:
    Offline
    Posts:
    578
    • View Profile
on: February 11, 2019, 07:25:51 PM
Expose Custom Turret Designs to scripts by creating a loadTurretPlanFromFile(path) function that works the same as LoadPlanFromFile(path), except it specifically works for Turret Designs so we can stick them onto our Turret Blocks in-script. This would be excellent for designing custom turrets to be used by custom ships spawned in by scripts. For example: custom-designed coaxial guns for a giant boss battle with a ship designed specifically for that mod.
Shrooblord



Sandworm

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    24
    • View Profile
on: March 15, 2019, 09:13:12 PM
Method to get the users current UI color scheme (Settings->Graphics->UI Color)



Sandworm

  • Newbie
  • *
  • Status:
    Offline
    Posts:
    24
    • View Profile
on: March 19, 2019, 02:56:58 AM
It would be really nice to get a few options in regards to the debug console:

1) Option to set number of lines shown / use more than half the screen

2) Scrolling up - some mistakes output more then you can fit on a screen

3) Fontsize would be nice - the eyestrain can get pretty bad



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    301
  • Discord: Rinart73#7304
    • View Profile
on: April 23, 2019, 03:34:03 AM
It would be nice to be able to check if faction/entity is registered as enemy/friendly in the ShipAI.
So, for example when you provoke Xsotan, they register your faction as enemy. And you can't effectively check if you provoked them.
Something like:
Code: [Select]
ShipAI(entity):isFriendlyFaction(factionIndex)



Rinart73

  • Sr. Member
  • ****
  • Status:
    Offline
    Posts:
    301
  • Discord: Rinart73#7304
    • View Profile
on: April 29, 2019, 03:48:54 AM
Add a way to highlight multiple sectors on Galaxy Map like when player types something in the search bar.
Modders could use it to show where event is happenning or make a custom search etc.
« Last Edit: April 29, 2019, 03:51:20 AM by Rinart73 »