CAG, EST, CLS port/remake?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Ship to ship transporter

Poll ended at Mon, 11. Feb 19, 16:03

Lump cost in with CLS software
3
25%
Create a new "Transporter" ware
3
25%
Use transporter research (no additional cost)
6
50%
Other (described in comments)
0
No votes
 
Total votes: 12

Requiemfang
Posts: 3197
Joined: Thu, 16. Jul 09, 12:24
x4

Re: CAG, EST, CLS port/remake?

Post by Requiemfang » Fri, 25. Jan 19, 04:29

morbideth wrote:
Fri, 25. Jan 19, 01:00
Digging into this, I am unsure what to do about resupplying ammunition and drones. Can anyone who played X:Rebirth tell me how it was handled in that game vs X3?
I can't recall really, although if you had ships that had jumpdrives, they would automatically refuel themselves to get the cells required to refill. I can vaguely recall that there was a replenish setting for drones, missiles I am not sure about but I will say that back in X3 they had this setting for missiles, drones and jump fuel.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Fri, 25. Jan 19, 09:52

Requiemfang wrote:
Fri, 25. Jan 19, 04:29
I can't recall really, although if you had ships that had jumpdrives, they would automatically refuel themselves to get the cells required to refill. I can vaguely recall that there was a replenish setting for drones, missiles I am not sure about
This was in X:Rebirth? I have X3 installed so I have a reference for that. Sounds like you are saying X:Rebirth was very similar to X3. If so I have to wonder why they changed something that worked fairly well to... well nothing atm.

Requiemfang
Posts: 3197
Joined: Thu, 16. Jul 09, 12:24
x4

Re: CAG, EST, CLS port/remake?

Post by Requiemfang » Fri, 25. Jan 19, 16:26

morbideth wrote:
Fri, 25. Jan 19, 09:52
Requiemfang wrote:
Fri, 25. Jan 19, 04:29
I can't recall really, although if you had ships that had jumpdrives, they would automatically refuel themselves to get the cells required to refill. I can vaguely recall that there was a replenish setting for drones, missiles I am not sure about
This was in X:Rebirth? I have X3 installed so I have a reference for that. Sounds like you are saying X:Rebirth was very similar to X3. If so I have to wonder why they changed something that worked fairly well to... well nothing atm.
Can't remember exactly I haven't played XR in a while :lol:

User avatar
BugMeister
Posts: 4429
Joined: Thu, 15. Jul 04, 04:41
x4

Re: CAG, EST, CLS port/remake?

Post by BugMeister » Fri, 25. Jan 19, 21:36

hey, nice one..!! 8)
- the whole universe is running in BETA mode - we're working on it.. beep..!! :D :thumb_up:

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Mon, 4. Feb 19, 16:37

Time for another update. CLS MK1 phase one is complete. Not a lot of flashy stuff to show of, so no image this time. I added coloring and "separators", various punctuation ~.|[]{}()_-:\/ that you can use instead of spaces, if you want, when renaming. Most of the upgrades in this version are in terms of library scripts. I wrote a Lua script to make it easier to choose objects from the map, the current method works ok for sectors, but not so much for everything else. Some movement commands to handle delivering goods to TLs, large freighters in X4. That was a lot of work, and brings me to the poll I have added at the top. When moving goods between ships I did not use the vanilla method of dumping the cargo in space as I feel that is a horrible way to do things. Ships that are docked at the same place just transfer wares between themselves same as they can with a station. However, for ships that are not docked, and can't dock with each other, things are a little trickier. X3 had a transporter upgrade that you could buy to handle this, which allowed you to teleport goods between ships if they were within 10km of one another. It was expensive, ~800k iirc. As there is no such upgrade in X4, I am simply requiring teleportation to be researched before allowing you to transfer goods between ships in space. I'm not really happy with this though, as it seems a bit powerful, and research is way too easy. So, my question to you, what should I do about it? I could make a teleporter ware for X4, it wouldn't be hard, but it would only work with CLS. As you already require a software upgrade to be able to run CLS I could just bundle the cost of the transporter in with the cost of the CLS software, increasing its cost by ~800k. That would be pretty easy from my end. The third option is just to leave it like it is, requiring only the research.

I'm off to work on CLS MK2 now. I have decided to do both. It turns out that are fairly different with how they work. I still have not figured out what to do about resupplying ammo and such. Might wait till after the initial release. It depends on how close v2.0 is when I reach that point.

I spent a lot of time trying to add my own commands but could not figure out how to do so. If anyone knows how to do that, please let me know. I assumed it would be like adding a faction, but there is no file for commands. I mean things like command.move for use with <set_command>.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Sat, 9. Feb 19, 23:01

Been working on the menu for CLS MK2, here are some preview images:
Image
Image
Image

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Mon, 11. Feb 19, 08:02

As a bit of a personal challenge, I'm going to try to update this with my progress every day. Let's see if I can keep it up for a week or two.

I added saving and loading to the waypoints, which took a long time due to a couple of hard to find bugs related to variables not being capitalized correctly. Saving allowed me to actually start testing the script. I did some initial testing with some of the simpler tasks. Fly to, stay, unload everything, and load everything works fine with stations, not tested with ships. Also tested load/buy and sell/unload a bit on player stations, founds some bugs and fixed them. Then found an issue with adding ship waypoint wares. Since there were so many wares for ships, everything the ship can carry, I decided to group them into categories shown in the image below. Then add some code to make sure the list stays centered with the top of the menu regardless of which groups you have open. I also moved the check for transporter technology to a MD script that only checks every 10 mins, and added some stuff the MD script to support 'Data storage' planned for phase 2. Finally, I started on the last part of the menu MK 2 needs for phase one, which is the automatic waypoint generation menu. All in all, a lot done.
Image

NoelSt
Posts: 47
Joined: Tue, 4. Dec 18, 13:42
x4

Re: CAG, EST, CLS port/remake?

Post by NoelSt » Mon, 11. Feb 19, 10:33

Fantastic work! Can't wait for this one :P

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Tue, 12. Feb 19, 05:45

Challenge Day 2: Added a check in paste task and edit waypoint code to ensure that the transfer amount doesn't exceed the maximum cargo space of the new waypoint destination. Continued work on the automatic waypoint generation menu, most of the options are finished now, just have to do the code to actually generate the waypoints. Found a bug which choosing sectors, just some code I had forgotten to finish. Did some preliminary work to allow you to choose build storages as a waypoint destination while I was looking at the choose object code, just adding a button for it so far. Made a new test save with a bunch of stations in different states of construction to test the former. Think that's everything.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Wed, 13. Feb 19, 09:11

Challenge Day 3: Finished adding build storage waypoints, and did a bunch of testing. Continued work on automatic waypoint generation, which was frustrating. There isn't a function in Lua to search for sectors in a given range like there is in aiscripts, so I had to make one. The only way I could see to get the neighboring sectors was to look at the gates, but the getgates function doesn't return highway gates between sectors in the same cluster. After coming up with a workaround for that I found out that the jump distance to sectors in the same cluster is inconsistent. Sometimes it says they are the same, sometimes they are different, even with the same sectors. For instance, if you check the jump distance of Nopileos' Fortune II and VI from Pious Mist II, they are both 1 jump away, according to the FindJumpRoute function. But move 1 jump to Pious Mist XI and now one is 2 jumps and the other is 3 jumps away. It is incredibly frustrating.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Thu, 14. Feb 19, 09:11

Challenge Day 4: Improved the renaming code, just found some better ways to do things that will make it easier to port to the other version. Redid all of the right click menus for CLS, added a CLS section, and reorganized everything to make it more user friendly. Added request signal option to the right click menu, and tested it with CLS mk 1. Found some bugs with the changes I make to the research check earlier, some things that did not work as I expected. And some other bugs with the md scripts that had to be cleared up.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Fri, 15. Feb 19, 07:03

Challenge Day 5: Continued testing the request signal with mk 2, and ship to ship trading in general. Found lots of bugs and squished them. More bugs with the map menu. A major bug with the execute_custom_trade script function, it doesn't exchange credits when trading with wharfs, etc. Finished the auto waypoint generation code.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Sat, 16. Feb 19, 10:16

Update Day 6: Added tooltips to the waypoint, generate waypoints, and right click menus. Added cancel button for "Quit working at station" option. Updated the MD files of CAG and EST to be consistent with CLS. Updated CAG renaming to include the features introduced in CLS. Added renaming to EST. Removed CAG and CLS from default orders menu.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Sun, 17. Feb 19, 06:48

Update Day 7: Began integrating the libraries into the previous two mods: CAG right click menu: reorganized in the same manner as CLS's menu, added tooltips, added section; EST right click menu, ditto, added start option for right clicking on a sector. Integrated choose object library into CAG and EST menus. Added quit working at station option for EST. Added warning for illegal wares in EST. Added trade with illegal wares option to EST. Added group wares by type option to EST.

morbideth
Posts: 389
Joined: Sun, 9. Nov 08, 04:07
x3tc

Re: CAG, EST, CLS port/remake?

Post by morbideth » Mon, 18. Feb 19, 13:10

Update Day 8: Updated EST and CAG to use move libraries, began updating CAG and EST's trade code. Ran into some elusive bugs which ate most of my time and I still haven't found the cause.

Post Reply

Return to “X4: Foundations - Scripts and Modding”