Jump to content

[Mod] Alpha! Carrier commands


Nexus

Recommended Posts

Ok forgive me if Im totally out of touch with this bc I am not a programmer....

 

 

Koonschi just implemented a new "salvage" order for ship menu.

 

Can it be possible to "assign" each fighter the command?

 

So (again forgive me for not using the terms correctly)

 

Make a table that sets each fighter as its own entity/ship and then the command (defend/attack etc) salvage/mine.

Then wrap that up nice so when you issue the order it randomly orders the fighters in that squad to act as if they are little ships in your fleet!

 

BOOM!

 

Link to comment
Share on other sites

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

Ok forgive me if Im totally out of touch with this bc I am not a programmer....

 

 

Koonschi just implemented a new "salvage" order for ship menu.

 

Can it be possible to "assign" each fighter the command?

 

So (again forgive me for not using the terms correctly)

 

Make a table that sets each fighter as its own entity/ship and then the command (defend/attack etc) salvage/mine.

Then wrap that up nice so when you issue the order it randomly orders the fighters in that squad to act as if they are little ships in your fleet!

 

BOOM!

 

No, as that's not how it works. A ship is controlled using a ShipAI() component while a fighter has no direct component for control. What I'm relying on for fighters is the fact that in defensive mode I can set their selectedObject (aka their target) to the wreck entity I want them to go after.

 

The problem is that the targeting system seems to be not individual, (Aka each fighter manages its own target) but linked as a whole to the whole squad. So if one fighter has a differing target to another and its in the same squad, it causes them to loose their targets.

 

Link to comment
Share on other sites

"The problem is that the targeting system seems to be not individual, (Aka each fighter manages its own target) but linked as a whole to the whole squad. So if one fighter has a differing target to another and its in the same squad, it causes them to loose their targets."

 

read this nexus and can you do this...... can you order each squad a target instead of each fighter?

 

Link to comment
Share on other sites

"The problem is that the targeting system seems to be not individual, (Aka each fighter manages its own target) but linked as a whole to the whole squad. So if one fighter has a differing target to another and its in the same squad, it causes them to loose their targets."

 

read this nexus and can you do this...... can you order each squad a target instead of each fighter?

I have thought about it, and while possible it requires ALOT more work to function. Since I cant get the squad the fighters are apart of when launched I'll need to store the information before hand while they are in the hanger...then somehow find something comparable between the docked fighter and the launched entity.

 

That being said, I did find out on accident awhile ago that docked fighters do have a entity ID attached...but i don't know if that ID remains the same when they are launched.

Link to comment
Share on other sites

Doesn't the dev. said even turrets got entity IDs ? That why he want expand them to 128bit uuid.

So i am 100% sure even launched fighter got IDs.

 

The issue is the docked fighters, since they are stored differently I need something to compare the two that is stable across both launched and docked.

Link to comment
Share on other sites

1.8 Status Update:

ETA is around 1-3 weeks currently.

 

Many issues where encountered with this update and it's slowing it greatly.

 

Per squad targeting was almost scrapped, but an idea from Laserzwei, may save it. The idea was initially intended to help link the FighterTemplate (which is how hangers store fighters) be linked to the launched entity by adding a hidden block to it with a custom ID. This could also be used to indicate what squad a fighter is in making it easier to assign targets. It also has the possibility to help with indicating what fighter is a salvage fighter vs mining fighter.

 

That being said his idea is not tested and my fail..if it does expect per squad/fighter targeting to be scrapped for the time being.

 

That being said I'm currently rebuilding/cleaning up the pilot return system as well as balancing costs of the fighter replacement system.

 

Currently aiming for around a 2 minute re-construction time with a resource/credit cost of (RC)200/(CC)1,000 for a common fighter while a top of the line will be around (RC)1,000/(CC)10,000.

 

While the mod mainly influences non-combat fighters, the fighter replacement system will replace lost combat fighters as well

 

1.8 Progress:

- *65% Done* Code improvements: Still the same as before, mostly due to the fact that adding a few options forced me to rewrite quite a bit..so now I need to re-improve what I rewrote =P

- *85% Done* User Notifications: This *was* done then I found a few more notifications I can add

 

- *DONE* Attempting to add a wreck volume limiter

- *TESTING* Option to limit the number of fighters per wreck Changed to limiting the number of fighter squads per wreck...may still be removed

- *DONE* Additional logging for admins, now the player/sector is logged when someone uses the command...you know...like in a scrapyard.

- *10% Done* Material Priority system, it required the fighter limiting system in place as it needed to be built off of it.

- *10% Done* Material amount priority system, it's auto built into the priority system..it will always go after the largest resource containing ship first. This can be toggled.

*I haven't touched the material system much lately...been working on other issues that I have found*

- *DONE* Fighter pilot ejection system, Still needs more testing but barring any major problems it should be good to go.

- *Testing* Auto fighter replacement, Its klunky and somethings aren't working as well as they should, currently working on this

- *5%* UI additions to support the above options...I HATE UI work....*Update* yup...I still hate UI work!

 

- *Nope* I may have a way of making fighters go after loot, not certain.

- *Nope* add a fighter option to make your non combat fighters invulnerable for a constant power cost

- *Nope* Armed fighters will get a option to increase survivability for a constant power cost.

Link to comment
Share on other sites

Ok, time for a Wednesday update on progress.

 

Both bad and good have happened over the last week, But sadly most of it was bad.

 

Laserzwei method of identifying fighters already launched fighters failed, as the blockplans of fighters aren't available when they are transformed from a FighterTemplate to an entity. This prevents many of the optimizations and other said features from working correctly. So now ill need to find other solutions.

 

Thankfully Koonschi has given me hope. I managed to get sometime with him, along with everyone else in the #modding channel of discord, and he did manage to answer a few questions of mine. He mentioned why fighters cant be assigned individual targets. As well as touched on a few other issues I was having.

 

That being said he did mention that adding the ability to issue targets to whole squads directly would be fairly simple. I'm hoping this means ill see said functionality added soon . Sadly though making it easier to replace lost fighters by linking the launched fighter with the docked FighterTemplate is further out as he stated that would be a far more difficult thing to do at this time.

 

That being said I spent...probably 12 hours total working on a new way to store and determine what fighters where lost in combat yesterday. How the new system will work is you will have a button that will take a 'snapshot' of your hangar then there will be another button that will allow you to tell your carrier crews to check the squads for losses and replace them. Sadly the command to start fighter replacement will require all your fighters to be docked first before it will begin. It's not a perfect solution, there are some minor exploits where if you move a fighter to another squad it will think it was destroyed...but you still have to pay the replacement cost. But it's a far better one than what we had...which is nothing. You will also need to use this snapshot button each time you add new fighters to your hanger.

 

There are also a few bugs which I'm currently waiting on a fix for, like FighterTemplates not returning their material or rarity but just an empty string.

 

Mostly everything else..but the UI work... is done and is being tested

Link to comment
Share on other sites

I keep getting an error with the scriptloader.lua file, although the "Carrier orders" icon appears in my interface. Checked that Devious brought this up some time ago in the thread, but i think the conversation died out.

 

attempt to call global 'Server' (a nil value)

 

 

I was trying it out in the single player. I am running the game in Ubuntu 14.04, on the beta branch with version 0.11 r7857. Did an uninstall, removed folder and reinstall before installing the mod. That did'nt seem to fix it.

 

Any ideas on what maybe causing it?

 

Link to comment
Share on other sites

You have the following comment in line 135 of carriercraftorders.lua.

 

--window.icon = "data/textures/icons/fighter.png" --Sad, does not work =( I want to change it from the puzzle piece icon to something else

 

incase you havent already figured it out the fix is calling the following function near the start of script (i think it needs to come before initui).

 

function getIcon()
    return "data/textures/icons/freedom-dove.png"
end

 

FYI: thanks for your mod; based the frame of my mod on yours. especially the UI.

Link to comment
Share on other sites

You have the following comment in line 135 of carriercraftorders.lua.

 

--window.icon = "data/textures/icons/fighter.png" --Sad, does not work =( I want to change it from the puzzle piece icon to something else

 

incase you havent already figured it out the fix is calling the following function near the start of script (i think it needs to come before initui).

 

function getIcon()
    return "data/textures/icons/freedom-dove.png"
end

 

FYI: thanks for your mod; based the frame of my mod on yours. especially the UI.

 

Yes, someone pointed me in that direction a few pages back =P It's in the 1.75 beta i have on my end atm. I'm currently trying to cleanup/optimize/tweak how the fighter reconstruction works. I'm also adding in fighter template saving and construction. Find a fighter you like? Good, now you can save it and build numerous copies for around 1-5k of the material and about 20k credits, replacing a fighter lost in combat follows the same rules.

 

On a side note, I have decided that the Fighter Reconstruction system, and the fighter saving and building system (which are almost literally the same in how they work) will be released as 1.75 while 1.8 will be released after alliances in the hope koonschi managed to put in some of the squad control capabilities which would greatly simplify things.

 

In short, 1.8 will include additional fighter configuration options(AKA, limiting material type, per squad targeting, volume targeting limits, etc.). While 1.75 will allow you to replace lost fighters and recover your lost pilots. As well as allow you to save blueprints of fighters you like so you can build whole squads of them.

 

1.75 will also include the server configuration that allows admins to limit certain things.

 

I keep getting an error with the scriptloader.lua file, although the "Carrier orders" icon appears in my interface. Checked that Devious brought this up some time ago in the thread, but i think the conversation died out.

 

attempt to call global 'Server' (a nil value)

 

 

I was trying it out in the single player. I am running the game in Ubuntu 14.04, on the beta branch with version 0.11 r7857. Did an uninstall, removed folder and reinstall before installing the mod. That did'nt seem to fix it.

 

Any ideas on what maybe causing it?

 

Nope, that one I have never been able to reproduce, ill ask Devious about it.

 

Link to comment
Share on other sites

  • 1 month later...

Oh look, I'm not dead. With the Alliances beta patch dropping soon expect things to be broken in the beta branch. Ill work on it when I get home tomorrow. (It should be noted that in the last couple of months i have been busy with a few different jobs, thankfully Im pretty settled in my current one.)

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

 

 

I keep getting an error with the scriptloader.lua file, although the "Carrier orders" icon appears in my interface. Checked that Devious brought this up some time ago in the thread, but i think the conversation died out.

 

attempt to call global 'Server' (a nil value)

 

 

I was trying it out in the single player. I am running the game in Ubuntu 14.04, on the beta branch with version 0.11 r7857. Did an uninstall, removed folder and reinstall before installing the mod. That did'nt seem to fix it.

 

Any ideas on what maybe causing it?

 

Nope, that one I have never been able to reproduce, ill ask Devious about it.

 

I am also getting this error when trying to use the mod. I installed it on both the server and client. It worked one time after I used the script command and manually called it and jumped to a new sector as suggested on the first page of posts. Once I closed and reopened the game I could no longer get it to work. I tried fully uninstalling it running the game/server, then reinstalling it and nothing.

clientlog_2017-07-28_22-46-16.txt

Link to comment
Share on other sites

  • 2 weeks later...

So I was poking around and looking at the differences between the original craftorders.lua and the new one and I noticed a few discrepancies through the entire document. I don't know if this is why it is not working as I am not very good with lua.

 

  • The default craftorders.lua has a namespace in it, which is something I believe the recently added to scripts, that is missing from the craftorder.lua supplied by the mod. The new namespace reads as follows:

 

-- Don't remove or alter the following comment, it tells the game the namespace this script lives in. If you remove it, the script will break.

-- namespace CraftOrders

CraftOrders = {}

 

  • Through a large majority of the rest of the document there seems to be a call to the new namespace before each variable and function. For instance the next section reads:

 

-- variables for strategy state

CraftOrders.targetAction = nil

CraftOrders.targetIndex = nil

CraftOrders.targetPosition = nil

 

-- variables for finding the entity index after a sector change

CraftOrders.targetFaction = nil

CraftOrders.targetName = nil

 

function CraftOrders.setAIAction(action, index, position)

    CraftOrders.targetAction = action

    CraftOrders.targetIndex = index

    CraftOrders.targetPosition = position

 

VS the craftorders.lua provided by the mod:

 

-- variables for strategy state

targetAction = nil

targetIndex = nil

targetPosition = nil

 

-- variables for finding the entity index after a sector change

targetFaction = nil

targetName = nil

 

function setAIAction(action, index, position)

    targetAction = action

    targetIndex = index

    targetPosition = position

 

While I'm no lua expert, this could be the reason why the script is no longer loading, the icon isn't working, and the new script causes a large amount of lag in both single player and multiplayer when it is installed and not working.

Link to comment
Share on other sites

  • The default craftorders.lua has a namespace in it, which is something I believe the recently added to scripts, that is missing from the craftorder.lua supplied by the mod. The new namespace reads as follows:

 

This mod has no craftorders.lua. The only file it overrides is server.lua. It seems that "server" was a global variable in version 0.11 (but I dont know, didnt mod before 0.12) but is replaced now, also the server.lua has changed. So there are 2 things that are at least wrong (if my thoughts about server variable are correct):

 

[*]Mod content (its only one line) in server.lua needs to be merged into current server.lua

[*]Replace "server" globals in mod by "Server()" or set the server variable

 

You should not use the original mods server.lua file as long as the mod is not fixed, cause it could also cause lot of other issues.

Link to comment
Share on other sites

  • The default craftorders.lua has a namespace in it, which is something I believe the recently added to scripts, that is missing from the craftorder.lua supplied by the mod. The new namespace reads as follows:

 

This mod has no craftorders.lua. The only file it overrides is server.lua. It seems that "server" was a global variable in version 0.11 (but I dont know, didnt mod before 0.12) but is replaced now, also the server.lua has changed. So there are 2 things that are at least wrong (if my thoughts about server variable are correct):

 

[*]Mod content (its only one line) in server.lua needs to be merged into current server.lua

[*]Replace "server" globals in mod by "Server()" or set the server variable

 

You should not use the original mods server.lua file as long as the mod is not fixed, cause it could also cause lot of other issues.

 

Yes you are correct, I was pretty tired when I wrote that and it sounded a lot clearer in my head at the time. What I meant to point out was the differences between the original craftorders.lua and the new file in the mod carriercraftorders.lua. Specifically that the carriercraftorders.lua had no namespace and didn't use it throughout the document as the craftorders.lua did.

 

Besides that I did also notice that the server.lua caused a lot of problems when it was loaded, most notably was the error I mentioned previously and tremendous server lag when fighters were launched.

 

Link to comment
Share on other sites

Yes you are correct, I was pretty tired when I wrote that and it sounded a lot clearer in my head at the time.

 

For some reason... I don't know why... but I know those situations  ;D

It could be that namespaces in the carriercraftorders.lua file are not needed, cause the mod is not using namespaces too. Did not try to figure this out yet. But cause you need this mod and Nexus does not seem to be active anymore.... maybe I will try to get this working, but cant promise.

Link to comment
Share on other sites

Yes you are correct, I was pretty tired when I wrote that and it sounded a lot clearer in my head at the time.

 

For some reason... I don't know why... but I know those situations  ;D

It could be that namespaces in the carriercraftorders.lua file are not needed, cause the mod is not using namespaces too. Did not try to figure this out yet. But cause you need this mod and Nexus does not seem to be active anymore.... maybe I will try to get this working, but cant promise.

 

The one time I got the mod to work, the very first time I ran it, it worked very well but felt a little cheesy in how simple it made resource gathering. What I'm the most interested in is finding a way to control all fighters squads with a single command (Recall All, Attack All, Defend All). I don't mind having to multitask, but sending 10 squads of fighters after a wreck that falls apart repeatedly is tedious. I'm sure they intend to add this function in the future, but as it's QoL I doubt it will be anytime soon. I'll poke around with this mod but I'm terrible with lua so I don't know how far I'll get with it.

Link to comment
Share on other sites

  • 1 month later...

Hallo,

 

wollte nachfragen ob der extrem gute MOD weiter bearbeitet wird?

Durch die letzen UpDate´s funktioniert er leider nicht mehr.

 

lg

ein Bewunderer

 

Google  :o

Hello,

 

wanted to ask whether the extremely good MOD is further processed?

Due to the latest UpDates, he does not work any more.

 

lg

an admirer

Link to comment
Share on other sites

I did some compatibility changes to make it work in Avorion 0.14.

 

Warning:

Do not use Nexus' uninstall script, it is NOT compatible with Avorion >=0.12. I did not test uninstallation of this mod, so only use it if you know what you are doing.

 

Works like a charm. Thank you for this! Missed this mod more than anything with the new fighter update :)

 

Hopefully Koonschi is thinking about adding defensive stance for mining and salvage wing.

Like salvage within 5km or something like that, with maybe system upgrades to possibly increase the radius

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...