Avorion Forum

General => Mods => Topic started by: Salminar on February 14, 2017, 06:14:33 AM

Title: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on February 14, 2017, 06:14:33 AM
UI upgrade for transfer of goods.

This mod aim at improving the UI for transfers of goods in ship to ship and ship to station configuration.

Upon reading a bit the files of the game and the forum, i tend to put my version to upgrade the UI and specially the transfer part that was a bit tedious to use. And as i was working on it, i wanted too a way to transfer fighters as well as crew and cargo.
As i wasn't alone to look around this features we decided then to unify the projects as only one so it would be easier to maintain and let Lazerswei focus on his other project OOSP, ending in two slightly different branchs for how to transfer the goods.


Compatibility read first

When you use this mod on multiplayer, the UI part will work just fine, but the new features like the transfer of fighters will only work on servers that have BetterTransfer v1.10 or superior installed.
It don't matter which branch is used, as vanilla and convenient are fully compatible with each other.


transfer vanilla version :
transfer crew and cargo by one or by 10 by a single clic.
data\scripts\entity\transfercrewgoods (https://raw.githubusercontent.com/Salminar/Avorion/master/scripts/entity/transfercrewgoods.lua)

(https://github.com/Salminar/Avorion/blob/master/scripts/entity/transferpreview.jpg?raw=true)


transfer convenient version :
crew and cargo will be transfered by the number set in the textfield after clicking the attached button.
data\scripts\entity\transfercrewgoods (https://raw.githubusercontent.com/Salminar/Avorion/modified/scripts/entity/transfercrewgoods.lua)

(https://github.com/Salminar/Avorion/blob/modified/scripts/entity/transferpreview.jpg?raw=true)


The fighter transfer tab :
Clic the icon of the fighter you want to transfer.
/!\ You need to have the script installed on the server too for the fighter transfer to work. What version (vanilla or convenient) don't make difference as long as the server have one.
(https://github.com/Salminar/Avorion/blob/master/scripts/entity/fighterpreview.jpg?raw=true)


What is next :
A rework of the double scrollframe used on all tabs into a single one
Drag & drop for fighters
Fighter squads management


Known issues :
The transfer fighter tab don't manage more than 7 squads, having more than that will lead to a bug preventing you from any transfer.
The UI always display 7 squads even if there are none.


Thank you to HellkerN for his original post that made me look in this file for something i was looking for some time now (https://github.com/Salminar/Avorion/raw/master/scripts/entity/transfercrewgoods.lua)
Thank you to Laserswei for the merging of our two projects in a single one. His original mod (http://www.avorion.net/forum/index.php/topic,1880.0.html)
And thank you for the HTML documentation, even incomplete, it helped a lot!


Changelogs :

V 1.0
cargo display raised from 9 to 20
added buttons to transfert cargo and crew by 10
added the fighters tab, still not fuctionnal.


V 1.01
cargo display raised to 30 to unify it with the convenient branch
Laserzwei transfer project added as the convenient branch (or modified on github)
original project become the vanilla branch (or master on github)
added the lv of crew while overing the quantity bars

V 1.02
added icons for crews and cargos for both versions
optimized some code, a few elements were repainted twice in a row

V 1.10
Fighter transfer is now working for both convenient and vanilla
Transfer range for fighters set to 0.5 instead of 0.2 for other goods
Upgraded maintainability of the code

V 1.11
Added freespace to the global bar for crew cargo and fighters
Code reworked and unified between the two branches
New tooltip for fighters
Added a function to get server version of BetterTransfer
Code improved in efficiency

V 1.12
Bug fix from convenient version 1.11, transfers being impossible sometime
Freespace for fighters have been rounded
Cargo that are illegal, dangerous or with a special status are displayed and highlighted
Fighter tab don't use anymore the scroll bar.
Fighters squads are displayed on a single line and not 2 anymore.
Cargo on vanilla are now transfered by 25 and not by 10 with the fast transfer button


Get all the releases in archive files from Github here (https://github.com/Salminar/Avorion/releases)
Title: Re: UI upgrade : Transfer cargo/crew/fighters
Post by: HellkerN on February 14, 2017, 11:48:14 AM
Awesome <3 Though Laserzwei kinda already nailed it here http://www.avorion.net/forum/index.php/topic,1880.0.html (http://www.avorion.net/forum/index.php/topic,1880.0.html)
But if you can add extra features like the fighter transfer and such, it'll still be great.

And thanks for pointing out there is a documentation, I hadn't noticed that, been sorta stabbing blindly until now, and that doesn't always work out well since I have about 0 knowledge in Lua, just experience in C#.
Title: Re: UI upgrade : Transfer cargo/crew/fighters
Post by: Salminar on February 14, 2017, 05:41:05 PM
Well i'm currently working on merging the two project as Lazerzwei ask me if i wanted to maintain his version.
So i don't post my newest changes right now cause i want to come with 2 versions at once and try to make them compatible and maintainable as easily as possible. One version Vanilla which would be mine, and a Convenient which would be more inspired by his.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.01 (14 feb 2017)
Post by: Kane Hart on February 14, 2017, 07:48:44 PM
Very Nice!
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.01 (14 feb 2017)
Post by: Devious on February 14, 2017, 08:16:51 PM
Could you add icons like NexusNull did on his version so it's easier to see what is what?

I'd like to see a combination of the mods where it's possible to transfer one or an amount input by user like on Laser's version but also with the option to move all the goods like on your version.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.01 (14 feb 2017)
Post by: DougJunior on February 14, 2017, 08:50:31 PM
Nice think. Had current Not time to Test it.
Is it possible with this Mod to Transfer a specific Level of crew. That i can Take my Tier 3 Crew in a Transport frighter and Go and Level only the low Tier Crew.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.01 (14 feb 2017)
Post by: Salminar on February 14, 2017, 10:24:37 PM
Could you add icons like NexusNull did on his version so it's easier to see what is what?

I'd like to see a combination of the mods where it's possible to transfer one or an amount input by user like on Laser's version but also with the option to move all the goods like on your version.

Icons have been added in 1.02, but for the more options to move goods and crew i don't think i will do it right now, cause it would be confusing and overcharging the UI. If i find a way to make it intuitive and nice maybe i'll merge both in one.

Nice think. Had current Not time to Test it.
Is it possible with this Mod to Transfer a specific Level of crew. That i can Take my Tier 3 Crew in a Transport frighter and Go and Level only the low Tier Crew.

Yes you can, when you point at the crewbar the level is displayed, so you can just choose to move your lv 3 mechanics or your lv 1 gunners with no troubles.

Updated to 1.02. Working on the fighter transfer but have many testing to do as it's undocumented.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.02 (14 feb 2017)
Post by: Fank on February 15, 2017, 11:19:25 AM
Improvement:
- Add a the level number to the crew icon to easily identify the right crew to transfer.
- Didn't checked out the other tabs yet, but same should be on cargo and fighter to easily identify them. (Add screnshots of the other tabs  ;) )

+1 For a git repo and +1 to improve this, its really needed.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.02 (14 feb 2017)
Post by: DougJunior on February 15, 2017, 07:15:55 PM
Looked somethink in the Mod section and found this Mod
http://www.avorion.net/forum/index.php/topic,1917.0.html
This Trading System Look to 90℅ Like yours with only a grafic Update to identifi the Crew and stuff netter.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.02 (14 feb 2017)
Post by: NexusNull on February 15, 2017, 07:45:33 PM
Yes our mods are very similar, though they have been developed independent.
I guess that is what happens when there is little communication between modders.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.02 (14 feb 2017)
Post by: Salminar on February 16, 2017, 12:57:04 AM
Posting a preview of what will look like the tab for transfering fighters.

(https://github.com/Salminar/Avorion/blob/master/scripts/entity/fighterpreview.jpg?raw=true)

It was much harder than expected as you can't use the drag & drop feature used to manage quads or inventory, the items can't pass from one side of the window to the other. (With many other issues linked to the drag & drop)

So i workaround with a combo of buttons and pictures to get this result. It won't be possible to manage the squad from this window until another patch from the game, but should make the whole thing work tomorrow.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.10 (16 feb 2017)
Post by: Salminar on February 16, 2017, 07:10:32 PM
New version is out, with fighter transfer working.
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.10 (16 feb 2017)
Post by: GrimJahk on February 16, 2017, 07:32:07 PM
I like what I see but not sure what the differences are, they are not explained...

Vanilla looks like two icons, one to move one and one to move all
the other one looks like a move one option?
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.10 (16 feb 2017)
Post by: eastwood6510 on February 16, 2017, 07:32:48 PM
This mod looks great!  I'll definitely be trying it out  :)
Title: Re: UI upgrade : Transfer cargo/crew/fighters - v1.10 (16 feb 2017)
Post by: Salminar on February 16, 2017, 07:37:46 PM
I like what I see but not sure what the differences are, they are not explained...

Vanilla looks like two icons, one to move one and one to move all
the other one looks like a move one option?

Vanilla, the > is to move one, the >> is to move 10.
Convenient, you set the number you want to move in the text box. Maybe i'll have to edit that somewhere in the main post.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on February 21, 2017, 08:35:52 PM
Small update to improve the UI and prepare for a futur rework.

Added a little text for the compatibility in multiplayer on the main post.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: blakemueller1243 on March 05, 2017, 10:32:30 PM
so having a bit of an issue. the fighter transfer doesent work at all. and when i try to use the menu for crew/fighter swap i can use it once then once i close it its gone i cant open it for ANY ships until i restart my game
.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 06, 2017, 07:00:47 AM
Again what version are you using?

And it really looks to me like it's not installed on the server. If not you can't transfer fighters.

Anyway there is a new version almost finished and i had a bug on the convenient (that had been hotfixed on the repository) and it should be solved in next version.

So that's why i ask a little more info about what you are using, to be sure remeaining bugs are removed before the next version that should be out tomorrow or this evening, depending how much time i have.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: n0etics on March 06, 2017, 07:08:20 AM
Again what version are you using?

And it really looks to me like it's not installed on the server. If not you can't transfer fighters.

Anyway there is a new version almost finished and i had a bug on the convenient (that had been hotfixed on the repository) and it should be solved in next version.

So that's why i ask a little more info about what you are using, to be sure remeaining bugs are removed before the next version that should be out tomorrow or this evening, depending how much time i have.

since you're putting out a bug fix, just to verify if this one was addressed... I'm using convenient and sometimes I am unable to transfer FROM ships, only TO. I have the gamefiles installed on both the server and my client.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 06, 2017, 07:40:52 AM
Alright, can you try this one?

https://github.com/Salminar/Avorion/blob/modified/scripts/entity/transfercrewgoods.lua

It's a preversion of convenient and all bugs should be solved on this one.
Title: !
Post by: Devious on March 06, 2017, 11:57:43 AM
With the convenient version an error concerning the transfer of fighters came up.
If needed I can go through the logs to find it, just let me know!
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 06, 2017, 01:36:36 PM
Yep it would help a lot to have the log.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Devious on March 06, 2017, 03:10:15 PM
The game overwrote the server logs but luckily a player on our server was able to provide it after I switched to the other UI in the modpack.
The screen would work for a few moments, then crash with this error:
Code: [Select]
Wed Mar 01 23:32:47 2017| could not execute function 'onShowWindow' in '"data/scripts/entity/transfercrewgoods.lua"':
Wed Mar 01 23:32:47 2017| data/scripts/entity/transfercrewgoods.lua:546: attempt to index field '?' (a nil value)
Wed Mar 01 23:32:47 2017| stack traceback:
Wed Mar 01 23:32:47 2017|     data/scripts/entity/transfercrewgoods.lua:546: in function 'updateData'
Wed Mar 01 23:32:47 2017|     data/scripts/entity/transfercrewgoods.lua:910: in function <data/scripts/entity/transfercrewgoods.lua:909>
Wed Mar 01 23:32:47 2017|
Wed Mar 01 23:32:47 2017| Setting script "data/scripts/entity/transfercrewgoods.lua" to invalid.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 06, 2017, 04:23:19 PM
Thank you, yeah it seem like the error before the hotfix, but apparently Github haven't handle it correctly or it's me that still have some troubles using this platform.

I didn't renamed correctly on of the table that hold the UI objects. Should it will be solved in next version anyway, i put a warning on the convenient release. I'll post the new one this evening with the few new features and reworks. Was aiming to make a bigger update at once but need to solve this correctly.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: blakemueller1243 on March 06, 2017, 07:44:24 PM
i have vanilla v1.11 and what do you mean install it to the server too. dont have installation instructions lol data file ik where to go but idk where to install for the server.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 06, 2017, 08:07:38 PM
If you play in singleplayer, only need to be installed on your computer.

If you play multi player and use join to reach a distant server, it needs to be installed on this server too.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: blakemueller1243 on March 06, 2017, 09:50:11 PM
then idk cause i have it installed properly i can guarantee. installing mods for this game isint hard :P but apparently im wrong lol
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.11 (21 feb 2017)
Post by: Salminar on March 07, 2017, 07:12:41 AM
1.12 is out.

As i had to rush a little bit for the bugs from the last version, the fighter tab isn't completely finished.
Know issue, the UI always display 7 squads even if none are created on the ship. This will be adressed in next version.


I will only make fixes for a few days, and finsh dilsplay issues with fighters squads. So please submit all bug or remaining bug so that i can fix them before working on something else.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Ryan477 on March 07, 2017, 03:44:25 PM
it dosnt work for me and my friends. we have install v1.12 on client and server (server version  0.10.5.7633). by first conntact to the ship i can open the transfer menu but by the second conntact the button for your menu dosnt exist. but by the first conntact i cant transfer anything too
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 13, 2017, 07:50:47 PM
current beta: transfer not working

Could be that the ships need to be basically touching....

I reverted to vanilla and that was the case so mod may work but I was not close enough. (I was under .20km)
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 13, 2017, 10:04:22 PM
Can you give me a bit more informations?

Cause i tried both versions and both are working just fine on my computer. I'm waiting for a tester to look at this too when he have time, but is a bit busy.

Since the bug don't happen on my computer i need more details. Can you please asign the console to a key in your keybindings and look what the console says when you have the error?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 14, 2017, 01:54:15 AM
ok so this is the error im getting...

Code: [Select]
could not execute function 'onShowWindow' in "data/scripts/entity/transfercrewgoods.lua":data/scripts/entity/transfercrewgoods.lua:475: attempt to index field '?' (a nil value)
stack traceback:
          data/scripts/entity/transfercrewgoods.lua:475: in function 'updateData'
          data/scripts/entity/transfercrewgoods.lua:802  in function <data/scripts/entity/transfercrewgoods.lua:801>

Setting script "data/scripts/entity/transfercrewgoods.lua to invalid.

Hope that helps...

I am using several mods but none that touch any of these files as far as i can tell. The UI come up and everything seems to work but when I click on the UI it just wont work. Then the error and file set to invalid
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 14, 2017, 09:00:52 AM
Ok, look like there is an issue when you don't have fighter hangar on your ship.

I'll work on that and fix it.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 14, 2017, 06:04:20 PM
I found an abandoned ship, turned it into a miner and put a hanger on it. Went to transfer the mining fighters over to it.

same error....
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 14, 2017, 07:20:21 PM
Really strange line 475 is for fighters display. Are you using vanilla or convenient? I assumed it was vanilla version.

And are you using the beta or normal branch of the game?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 15, 2017, 02:47:18 AM
Im using beta branch 7633 /vanillatransfer
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: SirTiller on March 16, 2017, 03:13:20 PM
Hi,
unfortunatly i did something wrong.  :(
I copied the code, opened my transfergoodcrew.lua, mark all, deleted all, paste the new. Save. Started Avorion. Entered my Galaxie.
Drove to a station. UI is looks nice, but nothing happens. Neither if i tried to move cargo with the arrows nor with numbers.

Any hints?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 16, 2017, 07:24:46 PM
Well maybe someone will be able to send you the original file. Always do a backup for any mode and drag and drop my file in the good folder.

As if you have a bug, i really don't know, there are reports that it don't work, while on my computer all run absolutly perfectly.

The other tester seem to be busy and haven't tested anything so far. So i'm a bit looking for a needle in my garden.

I want to find what is the problem, but so far i can't with what i know. This and don't have much time to make many tests.

And i have many downloads but not much reports, don't know if it works only for me, for many people but a few. I really don't have much clues so far to figure what is wrong. I'd love to know if it works at all on someone else than me.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 16, 2017, 10:43:31 PM
I appreciate your work and if there is anything I can do to help provide a better report or understanding of this issue please let me know.

The mod looks wonderful and I would really really love to be able to transfer fighters.

Anyone have any clues?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 17, 2017, 12:29:54 AM
I did some testing with my friend.
So it works on his computer, on both normal and beta version. So it don't really help for your issue.
But looking for what was wrong, we came to another bug i'll have to investigate.

Anyway, with issues i had with him installing the mod, i'll ask a few more things.
If you are on windows 7 and what is the size of the file?
And maybe try to download it again and install it.

And lastly if the reinstalle didn't solved anything, could you open the file installed on your directory with an editor like notepad++ and tell me what is written on the line 475.

I know it's a bit boring but need to go step by step.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 17, 2017, 02:53:49 PM
Sure thing!

Size of file is 30,282

I have re-downloaded the file for yet a 3rd time and compared them just to be sure

They are Identical... I am using Beyond Compare utility to make it absolutely certain. 

Line 475
Code: [Select]
findex = i*12+j+1
I have re-installed the file and run it again from github.

Now getting....

Code: [Select]
could not execute function 'onShowWindow' in "data/scripts/entity/transfercrewgoods.lua":data/scripts/entity/transfercrewgoods.lua:500: attempt to index field '?' (a nil value)
stack traceback:
          data/scripts/entity/transfercrewgoods.lua:500: in function 'updateData'
          data/scripts/entity/transfercrewgoods.lua:802  in function <data/scripts/entity/transfercrewgoods.lua:801>
Setting script "data/scripts/entity/transfercrewgoods.lua to invalid.

Line 500
Code: [Select]
   selfFighters[findex].pict.visible = false

Again the ships I am trying to transfer between one has a hanger one does not.

I have decided to upload the ships for you to try.

Autosave207 is my main ship. "Feck"

Fabulator is a Super maneuverable fighter/support ship

sQIbbLeS is my utility ship and has Hangers on her.   

They are zipped bc "Feck" is over 192kb (shes a wee beastie)
and I figured I would just zip them all for consistencies sake.

I have also included a dropbox link to my Scripts (https://www.dropbox.com/s/83a44vmt5f997ea/scripts.zip?dl=0) folder which includes the mods I am using.


Transport Permit (http://www.avorion.net/forum/index.php/topic,2559.0.html)
Detailed Turret Tooltips (http://www.avorion.net/forum/index.php/topic,1635.0.html)
Pirate Warlord, Dockbuilding, Better Shipyards (http://www.avorion.net/forum/index.php/topic,1103.0.html)
Avorion Commands package (http://www.avorion.net/forum/index.php/topic,830.0.html)
Clean sector (http://www.avorion.net/forum/index.php/topic,1034.0.html)
Turret Fatory Seed Entry (http://www.avorion.net/forum/index.php/topic,1776.0.html)
Findstation (http://www.avorion.net/forum/index.php/topic,2665.0.html)
Salvage Command (http://www.avorion.net/forum/index.php/topic,840.0.html)




Enjoy


I hope this is helpful
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 17, 2017, 04:32:15 PM
Alright this helped me a lot this time.

That's trange the error is not on the same line anymore. Really seem like there is a wrong use of the index. I'll check for this later tonight.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 17, 2017, 04:40:01 PM
:)

Im glad I can help!

 ;)

 8)
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: infal on March 17, 2017, 10:40:40 PM
Again the ships I am trying to transfer between one has a hanger one does not.

Is that even possible?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 18, 2017, 04:32:02 AM
Is that even possible?

 just trying to transfer crew mate :)
 or cargo...

Both fail.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: infal on March 18, 2017, 05:15:34 AM
Interesting. So could be an error in the ui initialisation assuming both ships have a cargo bay?

Does it work if you try to transfer crew or cargo between two ships with hangar bays?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 18, 2017, 05:44:11 PM
Unfortunately this mod does not work at all under any circumstances for me.

When I get motivated in a few I will do some testing and see if I can run it vanilla with basic ships in a controlled environment.

It really looks amazing though... Im pretty dead set on using this mod. In the meantime I have made macros for my mouse to transfer large quantities of goods/crew.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 18, 2017, 07:54:35 PM
Ok, it's a test but can you try this one, i removed the variable partially handle by my script that design the size of fighter's squads.
I think she might be altered one way or another on your version, leading to index overflow in the table of UI components.

And since the error shows only on the ships that have a hangar, i'm pretty sure it's something like that.

*Cross his fingers*

https://raw.githubusercontent.com/Salminar/Avorion/test/transfercrewgoods.lua (https://raw.githubusercontent.com/Salminar/Avorion/test/transfercrewgoods.lua) (Make download link)


@infal > I think it would work with two ships that don't have any hangar at all, the line reported as error is on the fighter UI part.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 18, 2017, 11:24:44 PM
Got an error on line 467...

Switched ships and reloaded the file and got an error on line 500

I launched all the fighters I had in "feck" tried again. No dice. 

There is something specifically about "feck" that is creating the error.

Switched ships, reloaded file.

I traded crew between two ships.

One ship had hangers but no fighters

One ship had no hangers.

Worked.

Its specifically the main ship.

I will load the main ship in creative... try and trade crew.

No problem there

It must be one of the fighters that I have or something to do with the squads I have in single player. 

Next move is to kill off all the fighters and remove the squads and start from scratch.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 18, 2017, 11:40:10 PM
I deleted all the squads and remade them.

I didnt have to kill my fighters I just made new squads and deleted the old ones.

Mod works.

So the mod is borked by some weird connection to the squads.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on March 19, 2017, 12:03:05 AM
Yeah i'm pleased it works fine for you now, but i want definatly to keep track of this issue.

Actually there is not much you can manage on squads, i can't even have their name in my scripts, having to call them squad 1 ... I hope it will be possible later.

So how the script works, it initialize a window with the 6 squads i actually handle (I'll make a dynamic version later) and paint their names and then the 12 small icons for each fighter in each squad.

When the script is called then to show the window, it hide or show each element, based on if they represent something or not. And most UI mods works like this so far. So to keep track of each of them they are stored in tables, one for the player ship part, one for the other ship.

The error seem to tell there is an index error on this table in your case, and that's really what i don't understand at all, cause the numer of element is fixed. You have 6x12 icons for each side tab and the script handle only 6 squads of 12 fighters.
So it's pretty easy to know what index is for what fighter and that's exactly what i make.
index = squad number*12 + fighter number + 1

So i wonder why this happen, even if it was an overflow, the only possible error would be the +1 in the end and would happen only if you have all 6 squads full, what is not the case. And even if you have a squad not being the 6th with more than 12 fighters, it would simply overlap with the following squad, making a bug that wouldn't even be noticeable.

So 'im really clueless here.


PS: Ok i just wanted to check it, cause when i was writting ... I said "Hey and what if there are too many squads" and i got the bug. So you had probaly more than 7 squads created and that's what make the thing bug as it can't handle more than that actually.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Wilponderoci on March 19, 2017, 01:26:01 AM
I believe I had 8 squads... maybe that was why?
 and some of them were empty
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: brownbay44 on April 01, 2017, 03:06:03 PM
I must be missing something simple.  I placed the .lua file in the indicated directory.  This file is present for both server (running under linux) and my windows client.  This was working on a friends server, so I think my client is set up correctly. When I connect to my dedicated LAN server I get only the default transfer UI options in game.  I have tried both versions of the script. 

The only other mod installed is MineCorp 1.4

What have I missed?
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Splutty on April 01, 2017, 07:01:32 PM
It needs to replace the 'transfercrewgoods.lua' file, so you can check if it did.

On the server side, either just restart the server, or otherwise make sure that the ships you're testing it with have been reloaded.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on April 01, 2017, 08:49:55 PM
Well like said, check if the file have been replaced. Lot of updates lately that may have changed the said file and i don't know what exactly minecorp change or not in the game.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Splutty on April 01, 2017, 09:26:18 PM
There's another bug where if you click the 'transfer 25' button and you have less than 25 it'll just start transfering whatever's next.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on April 01, 2017, 09:57:08 PM
Yup i know this one, will be solved in the next patch i'm working on.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: WARGAMES on April 01, 2017, 10:55:52 PM
this is amazing
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: brownbay44 on April 02, 2017, 01:29:56 PM
Thanks for your help guys.  The issue turned out to be with my client.  I guess I had NOT reinstalled the modified .lua file after the update.  It appears to be working fine again.  Thanks for a great mod!
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Rinart73 on April 09, 2017, 10:20:51 PM
Thank you for the great mod.
I found an issue (I suppose). Its non-critical but messes with the interface. This happens when you try to give more crew than the ship can take.
Spoiler: show
(https://image.ibb.co/eo9xo5/limit_line_length_bug.jpg)


Also, can you make an inputs a bit wider please (convenient version)? For now it can show only one digit, which is a bit confusing sometimes.
Spoiler: show
(https://image.ibb.co/exdCMQ/expand_input_request.jpg)
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Salminar on April 10, 2017, 02:50:07 AM
Lol if you can give more details on the first bug.

I'll tweak the convenient to allow 2 digits if possible in the next version.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: Rinart73 on April 10, 2017, 04:38:14 AM
Lol if you can give more details on the first bug.
Sure, make a ship that need 40 mechanics for example. Fill it with crew. Then make a small ship that need 5 mechanics. And give it more than a 5 mechanics. Yes, this is a very small bug, I have a natural talent of finding those XD

I'll tweak the convenient to allow 2 digits if possible in the next version.
In the previous version of the mod (by Laserzwei) I see that we can input up to 3 digits. I understand, that icons of crew members took some place and line shouldn't be too short.
Title: Re: BetterTransfer : UI upgrade & Transfer cargo/crew/fighters - v1.12 (07 mar 2017)
Post by: saith70 on December 02, 2017, 04:09:44 PM
Does this work for alliances?

If not can it be changed to do so?