[Mod] UT CaC v0.20 ( Old Name: Not Another Trader ) - Architect integrated

The place to discuss scripting and game modifications for X Rebirth.

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

dark7np
Posts: 86
Joined: Mon, 16. Mar 15, 11:09
x4

Post by dark7np »

To be sure I understand this correctly: This Mod is something like YAT for the subordinate ships of a converted Station Manager? Something like a Trade Station?

Can I use any station? Do I need two Managers, one for this, one for the station? Any other changes besides fuel? Any known incompatibilities?

I was looking for something like this, the trading part. One could also use the PMC Headquarter station for this, maybe. Having all those Auto Traders in the Trade Menu is rather annoying... It sounds good! ;)
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Nope, not yet, i just liked the Pun and was in need of a temporary Name until its ready to be named for its really planned purpose of Fleet/ Empire Control. (the Trading Part is just the first Step upon which i am planning to build/expand everything)
Its currently more like an slighly improved Manager which got a bit more brains (differeces to vanilla behavior: sends his Ships to get the needed Wares first*, uses Mining Ships for Trading if necesary, can do Station-based Gas mining himself), no Trade Station functionality and no Independent Trading yet (or Trading not done for a Station) - but its somewhere on the Road Map.
And yes, any Station could be used, but as i said Trade Stations are not supported so far (my Manager doesnt know what to do with Tradewares yet)

*depends on ratio of wanted amount to amount currently in Storage and currently being delivered

Also it completely replaces the Vanilla Manager, so still one Manager per Station who runs completely diffrent Scripts than the Vanilla one (both do basically the same though). And there should be no incompatibilities with other mods because i am basically runnning my own set of Scripts only, on the other hand this means that i may not use functionality someone added, but thats imo ok.

regarding the Fuel: thats the only drastic change to Vanilla and will be reverted when you remove the Manager. (also i am planning to change this behavior because the default wanted amount is far too high)

=====
Also because i am posting here some Progress Report on my Movement Scripts which will be used/added in the next Version:
>Jumping is finished at this Point, all changes listed in the previous Post
>Gate Passage is also Coded now, a List what my Script does diffrently from Vanilla:
=> Gates will always be entered from behind to keep the Front clear for Incoming Ships (was previously the more convinient Side which sometimes led to collisions)
=> When the Gate was passed the Ships will move ~10km forward to clear the Entry Area asap (and boost if possible)
>Also Boost Flight is Coded, Differences to Vanilla behavior:
=> may skip Alignment if we are already aligned enough
=> Can do InZone-Boosts (usage of this not tested yet)
=> if Boosters cannt be activated right now or are interrupted/time out the Captain will fly a Minute normally and then try boosting again (should make Boosting between Sectors possible, but tried it - takes a looonnng time so i didnt test the part where the Ship switches Sector context in the end)

have only to add Group Coordination for Gate Passage and Boosting (for jumping it is already implemented, but so far untested) and write the Snail Movement Script and the next Version is ready - which may improve Movement of controlled Ships a bit, but does nothing new for now :lol: but its necesary to properly implement Escort Ships so they dont jump/boost after the Escortee but actually move with him
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Good stuff :)
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Sounds good.

Quick question, I'm wondering if this could ultimately automate something I'm currently doing manually:

Due to CWIR and hostile Zones, a couple of my stations cannot mine the resources they need. To work around this, I'm having to manually send mining ships to a Zone in OL (the station is in DV) ask them to mine what they need, manually ordering them to sell the collected resources, before repeating the entire process.

Now, if I could for example do the following:

i) Comm the Station manager
ii) Select a Ware / Raw resource (confined to the NEEDS list of the station)
iii) Tell the Manager explicit Stations from which they should buy this ware
iv) Tell the Manager explicit Zones from which they should Mine a natural resource.
v) Possibly maintain a LIST so multiple source stations / Zones can be specified, so, several station supplying Fusion Reactor for example, or several Zones where Ions are available.

This would give the fine control I need to automate my mining ships in safe Zones, as well as have my Freighters buy from stations which would currently be outside the SYSTEM range. It would also allow the manager to utilise ships as he/she sees fit, rather than having rules per ship.

What do you think?

Scoob.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

well, if you are concerned about the Range i think my new Range Model suits your purpose (see earlier posts - basically its multiple range Spaces instead of just one centered on the Station and these spaces must connect directly to each other to make sure Ships dont leave them) - its not as manual as you said, but you can keep your Ships out of enemy Space with that. (in your Example you would have to define the home Sector, the Path Zones/Sectors from/to OL and the OL Cluster as Range) - note: exists currently only in my head, but will work on it asap (first want to finish my movement Scripts though, currently in the last phase of debugging and testing)

PS question for Users of galaxy-range Trading: how much Traffic goes through a Gate on average? i changed the Gate Passage behavior in such a way that all controlled Ships* enter the Gates from the back which basically eliminates head-on collisions by traffic in diffrent directions through a gate and added some group coordination that Ships* in the same Group (leader and their followers) could pass the Gate one after another - but i wondered if it would make more sense to handle Gate passage globally

*Big Ships only - took me long enough to rewrite their movement Scripts and cannt see a benefit of re-doing the movement scripts for small ships too atm
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Scoob
Posts: 11180
Joined: Thu, 27. Feb 03, 22:28
x4

Post by Scoob »

Cool, thanks :)

Tell me, your movement scripts aren't going to clash with the combat movement scripts in w.evans MICT and MOCT are they?

Scoob.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

they wont since i am not replacing any EGO scripts or changing them, but for now controlled Ships also wont use MICT/MOCT functionality because they dont know anything about it. (the whole thing will be pretty much self-contained because ego scripts dont do things the way i need it, for example every script must end at some point and exactly serve its purpose, not combine multiple purposes into one)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

OK, finished the movement Scripts so far that they can be used (will not clash with any other Scripts because its used by the Ships managed by my Manager only, not changing any Vanilla files, which makes them very compatible, on the other hand they wont be affected by changed vanilla scripts and wont recognize changes there):
(standalone Version also available; may clash with other Scripts because it refers the vanilla scripts to mine - testing needed)

Changes compared to Vanilla (not exactly a changelog since its a rewrite from scratch):
= Group Coordination for Boosting and Jumping implemended (unused and untested so far)
= InZone Boost added if Destination is farther than about 20km away
= Added jump slow charge animation (unused in Vanilla)
= more intelligent Behavior for Gate Passage:
Global Queue for Gate Passage Added (only one Ship per direction will enter the Gate simultaneously)
Ships always enter Gates from the back to leave front clear for incoming Traffic
Ships immediately boost away after Gate passage to clear it asap
= Changed/Improved Jump Beacon behavior
implemented Jump to random Object in target Sector instead of JB (in standalone used by Pirates, in main its a Setting for Captains)
uses really closest JB if there are multiple
if there are none the aforementoined random jump will be used instead
will jumpout in random direction, but never looking towards the Beacon

==> Important note: Autorefuel not implemented in move script. will solve it diffrently in my Project as it would have clashed with coordinated group jumps - Group will wait until everyone without fuel has finished the slow charge

I also found a remaining bug: if the Destination is on the Gate Exit Sector the Ships will still jump first. will change this in the next Version, but wanted to release it today.

for everyone who wants to test these movement Scripts only there is also a Standalone Version
some notes if you want to test the standalone Version:
=> can be safely added and removed from a Savegame (will output a few errors per Ship on removal though, but nothing critical)
=> to be on the safe side the vanilla move.generic will also still be executed after my scripts, but should do nothing because my scripts already did all the movement
=> IZ-Boost wont work for Trading Ships docking at a Station in their current Zone because the movement Script is not called at all in this case (it will work to get close to a Gate though, especially noticeable in Twilight Sentinel)
=> Ships of Pirate Factions will always use the random Jump, everyone else uses Beacon Jump

of course it is possible to use these movement Scripts with both Manager and Standalone - just extract the files move.generic and ut.cac.move.generic.wrapper from the Standalone 7z-Archive into the aiscripts folder ;)

Also before i forget it: Thanks to the EGO guys who wrote the Vanilla movement Scripts - although i said everything is written from Scratch i have copied some chunks of the Vanilla code and modified them for my purpose, or read through them extensively, which helped me to understand how to do some things properly.


Plans for the Next Step: got enough of the movement logic for now, so i will implement the Range Stuff and also change the behavior of the Trade Search to account for the ranges and to take Trade Stations into account properly - and maybe also fix the Fuel Cell behavior (currently buying too much)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
XenonSurf
Posts: 597
Joined: Fri, 18. Jan 08, 21:00
x2

Post by XenonSurf »

Two thumbs up for this one, as it will hopefully change the whole game, making movements more intelligent - and faster for the player when commanding ships.

Will load it straight tonight and give my first impressions tomorow.

Nice work 8)

XenonS
Patholos
Posts: 821
Joined: Fri, 16. Apr 10, 11:24
x4

Post by Patholos »

Hiya, tested it out. This mod looks very intriguing, especially the dialouge trees.

I've got some issues though:

Station used, Plot URV Station

1. Assigned a Fedhelm to mine, it mines everything except ore halting production. It's mostly just waiting to mine silicon and nividium....
2. No dialouge option to reassign ships after giving them to the manager through the custom dialouges you made ( Nitpicking, as you probably got this fixed soon enough :))

I fiddled around with the jump behaviour on the fedhelm and move to command, haven't really paid attention. So I'll doublecheck to see if there's some issues there as well.

I got a Rahanas assigned as well, and that ship is performing good, not halting.
Sure glad I didn't purchase a new computer this release.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

for 2 there is a workaround: remove the Actor via the Debug Menu ( 6 - 5 ) and assign a new one - then you can use the Ship for other purposes again ;) (all my Stuff is bound to the Actors only and when they are removed everything should be reverted) - sorry for the loss of maybe a good Captain, but as long as you can cheat the Crew to 8*5Stars i will leave it this way.

regarding the not mining for Ore: could you activate the Debugging to Log for the Manager shortly before the Ship fulfills its last Order ( 6 - 3 / Debug - Toggle debugging to Log: 0 (if there is a 1 it already is logging) and paste the related Logfile when the Manager searches for Orders please? also dont forget to deactivate it when done because my Log output is very verbose and may make the Logfile unuseable for other stuff ;)
Information how to activate the Logfile and where to find it here

regarding the Move To Command: it was mostly for (my) testing, but i thought i leave it in for now cause i thought it may be useful ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

just wanted to write a small progress update because i finally got the UI to do what i wanted it to do :)

Next Update will make Range Managment available to the Manager, this will work as following:

=> there is a list of up to 6 Spaces (Cluster, Sector or Zone) which are basically a whitelist for the Stations Ships (it is ok to pass through them) (amount will later depend on the Experience of the Manager, i thought about a max of 1 Cluster, 3 Sectors, 6 Zones and 6 total Entries and a Min of 1 Sector, 1 Zone and 1 Entry)

=> for each of these Spaces you can set if Big Ships (Jumpdrive Range) and/or Small Ships (Highway Range) may Trade/Mine there or if only passage is allowed (default is trade/mine allowed for both range types if possible, see next point)

=> note that the Jump and Mine Range Spaces must have a continonous Path from/to their Home Base (Jump or Highway) - if one Point on the way from/to a Range is outside of this Whitelist the Setting will not be accepted (for Highway Paths the Zones in normal Flight are counted only and for Jump Path it is enough to include the JB Zones in the Range if you want to Skip one or two Sectors on the Range)

=> Radar is also accounted for, although a bit diffrent from Vanilla:
- it enables the Cluster Range ( additional requirement to the Manager Skill ) - not limited to the Station cluster though, it can also be a diffrent one
- before the Radar is built you can only set Ranges in the Current Sector and its direct Neighbour Sectors (even in other Clusters), after you have it there is no more restriction what is on your whitelist (it should still be continonous though)

Also the Order on the List is important - first entries are preffered for search over later ones (so you can prefer Offers far away but also consider nearby ones)


also thinking about Sharing and Cloning Range Lists to make managment easier (Sharing: Range is shared between multiple Stations/Managers and Changes will apply to all of them; Cloning: Range Setting will be copied, but can be changed independently after that) - will probably simply use the first Range setting as Range for sharing the Range, and Cloning will require selecting a Source Station or a Target Station/Space
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Sounds great :thumb_up:

You may have thought about the following but not written about it yet.

Do the restrictions on settings (e.g. like how must have a clear path) take into consideration uni-direction routes? It may be possible for ships to get stuck.

- Most highway connections between Zones are uni-directional.
- Not all neighbouring Sectors have two-way Super Highways.
- Some neighbouring Sectors have two-way Super Highways via different Zones (e.g. Wrecksville).

How is Jumpdrive refuelling handled if Zones containing friendly Cell Recharge Fabs (and the related Jump Beacon Zone) are not white-listed? If not considered yet, could Energy Traders (or if possible instead, any ships buying jump fuel for their station) have an additional white-list quota to allow saving the 6 other slots for other needs?

There are some Jump Beacons in Zones that also have Super Highways connections (Wrecksville, Fervid Corona, Leap of Faith, Blurred Reflection, Shattered Singularity*) or Gates (Twilight Sentinel, Wavy Haze). I've not thought of a complication created by either circumstance yet but mentioning in case it triggers ideas.

http://www.seizewell.de/rebirth/map/Map-Rebirth.jpg


Edit 1: Minor clarifications.
Edit 2: *This new Jump Beacon is in 3.61 RC1 beta (none in that Sector previously).
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Highway Path is verified in both directions (if Range Setting is a Cluster or Sector it will be checked against a random Zone inside there, shouldnt make a difference though), but Ships wont get stuck because the Range Setting is practically only for where the Manager searches for Offers / Ressources - but when its restricted to the right Spaces the Ships should not path through non-allowed Spaces ;) i should add some Debug Messages in case a Ship attempts to fly into non-allowed Space though, but i doubt it will happen.
(and in case the path is not clear it will not be accepted as Highway Range - as simple as that ;) )
For Clarification: i am only checking wheter the shortest Path lies completely in the Range or not - not doing any magic which allows bypassing certain Areas to trade with other areas behind them via longer routes (would be an interesting idea though)

Jump Path is only checked in one direction, but i doubt this has any influence because its the same path both ways, just reversed. (one problem though: i am only checking wheter the given Zone in the Waypoint Sector has a JB, which is enough for the Vanilla Universe but not if there are multiple JBs in the same Sector where another beacon could be selected by the Nav Script - i will change this, but not for the first Version because i dont have a test scenario for it)

Regarding Refuelling:
>>> currently:
=> Manager uses "some" of his Energy Storage for Fuel so his assigned Ships can refill quickly (optional feature, have created a Branch without this)
=> Fuel is not automatically bought by Station Freighters, but will be delivered almost instantly by other Factions (this happens from vanilla code when adding fuel as tradeware, didnt implement handling of tradewares yet; Storage was full in about 15 minutes)
=> when docked at the Homebase Station Freighters will check if they have enough Fuel and if not get it from one of the following Sources/look for it in the following Spaces in that order: Currently docked Station, Commander Object, current Sector, current Cluster
>>> planned (changes):
=> Manager actually manages the Amount of Fuel sored in the Station instead of relying on Tradeware mechanics (as Tradeware the Amount stored is too much) OR the Tradeware mechanics will be used and Fuel will be traded as regular Tradeware (have to find a way to adjust the wanted amount though)
=> Energy Freighters will grab enough Fuel for everyone to refuel completely and store it at their Homebase (other factions wont be involved in this except maybe buying from fuelstations)
=> will also add honoring the Manager Range for refilling in case the Home Base doesnt store Fuel Cells
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp »

Thanks for the detailed additional info. It's really well thought out :)
UniTrader wrote:Highway Path is verified in both directions (if Range Setting is a Cluster or Sector it will be checked against a random Zone inside there, shouldnt make a difference though)
I may be taking "highway path" too literally but just to check, how about if a randomly selected zone lacked a highway (e.g. FoO Zones or, perhaps, Scorched Aura)*.

Edit: *Also some Maelstrom Zones, and most of Radiant Haven Sector as it is mostly a 1-way system between the two Zones that house the in and out Super Highways.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

IMPORTANT NOTE:

Thanks to Marvin i found a Bug where the Manager may get "stuck" for a few Hours when executing a Zone Trade and during this time wont give new Orders to its subordinates - fixed it for the moment by deactivating the Zone Trade functionality (but it will return ;) after a major overhaul which prevents halting everything)

Also i noticed the Debug - Script Restart function does not clear the Managers Orderlist so he will immediately attempt a second Zonetrade when resetted - this is also fixed.


Both Iussues are Fixed in the Master Branch on Github (no other Changes compared to the previous Release) - you can get the Update i will call 0.03.1 for now here:
https://github.com/UniTrader/UTCommandA ... master.zip
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
normntaz
Posts: 52
Joined: Mon, 21. Nov 05, 00:04
x4

Post by normntaz »

Hi Uni,

I"m loving the script, but I I'm seeing some weird behavior that I'm not sure is intended.

Whenever I get the vanilla "I've made some extra credits..." message from a manager, then the manager dialog options pop up, and I have to dismiss
them.

This can be a bit jarring if I am in the middle of combat.

Before the mod, was installed, I would get the message immediately followed by "it's done, sir" so no dialog would pop up. Is this a setting I can change anywhere?

Even better, can I turn off the auto-transfer?
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

really weird.. thought i already received several payments from my Manager during testing without this behavior.. will be Fixed soon.
Wanted to remove the (still Vanilla) Money Transfer to replace it with my own method anyway at some point (i prefer if nice, round Numbers are transferred to me :D but the Vanilla Behavior interferred with that and i have only recently found out where it is), so this has been moved to the next update for now, too.. or maybe i make a hotfix which removes the Vanilla Money Transfer when my Script is active, depending on how fast i progress with the Range Update (currently testing if i didnt break anything and if the Ranges are honored)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)
normntaz
Posts: 52
Joined: Mon, 21. Nov 05, 00:04
x4

Post by normntaz »

Wow, fast reply!

I did notice that when I have the map up, or the property window up, this behavior does not occur. I don't know if that is helpful to you or not.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

ok, thanks for the Report - Convo popping up in some Situations should now be fixed. DL-Links see previous update Post or first Post (will always point to the latest Version)

fixed it without removing the Money Notification (the popping up was an oversight), but its still in my plans to change the automated Money Transfer :)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Return to “X Rebirth - Scripts and Modding”