AI Galaxy Trade v0.1 (9th June 2014)

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

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

User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

AI Galaxy Trade v0.1 (9th June 2014)

Post by YorrickVander »

AI Galaxy Trade
===========

What is it?
-----------

Following a forum thread covering 2 possible approaches to breaking the cluster bound economic stalemates some help is given with a set of new ai jobs allowing a few L sized trade ships to wander the systems in search of profits. It may just be possible to let a CV in Devries find it's own supplies if you don't mind the wait.

Not all wares are covered in v0.1, noteably drones and ammo. After all we don't want life in DeVries too easy now...

All feedback and suggestions greatly appreciated.

Testing prior to release
---------------------------

Tested with new game start in 2.1 rc4 and an established plot game started in 1.25.

Install
-------

Same as always, copy the mod directory into the /extensions folder in the game directory. Feel free to create /extensions if you do not already have it. For example :

C:\Program Files (x86)\Steam\SteamApps\common\X Rebirth\extensions

Uninstall
----------

Delete the mod, run XR without it, save and restart game. I do not however know what effect this will have on outstanding trades using these ships. Hopefully no more than a timeout on failed trade.

Known Issues
----------------

In a plot game when traversing gates you might see small traffic jams as the ai is forced to park in the center of the gate aperture. This is only a concern while in zone so, if at a certain point of the plot you need to jump fast, take the skunk through and allow the other ships to follow. Otherwise none that are not part of the vanilla game, this mod simply defines new jobs and lets Egosoft's code do the rest.

Download
-----------

http://www.nexusmods.com/xrebirth/mods/391/?
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Post by Misunderstood Wookie »

Woo First!

Thanks been waiting a couple days to see this and trial it.

Question: what did you do to resolve the que at jumpgate issues you were having during development? I have a theory for this fix where instead of going to the actual jumpgate the traders will make way towards one but if the que is too big they will use the jumpdrive instead...
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image
Privata
Posts: 719
Joined: Mon, 19. Dec 11, 22:59
x4

Post by Privata »

Well I am happy to see this , and it compatible with my more enemies mod ! awsome.

I have been trying to do somthing like this for ages
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

ledhead900 wrote:Woo First!

Thanks been waiting a couple days to see this and trial it.

Question: what did you do to resolve the que at jumpgate issues you were having during development? I have a theory for this fix where instead of going to the actual jumpgate the traders will make way towards one but if the que is too big they will use the jumpdrive instead...
I used a totally different method :P The queue issue was from modding the trade.ship.xml to allow all l + xl ships to galaxy trade. This mod uses jobs.xml for a controlled, defined and more relaxed attitude to flying :)
Privata wrote:Well I am happy to see this , and it compatible with my more enemies mod ! awsome.

I have been trying to do somthing like this for ages
Glad to hear it :) It should also be compatible with Observe's new sector & game start as I gave the ships plenty of potential range.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Talca
Posts: 37
Joined: Fri, 12. May 06, 19:59
x4

Post by Talca »

So my goal is to make DeVries my home base for stations and infrastructure, and I am well on my way to doing that. My question is very simple and I think I know the answer.

Do you have to select galaxy trading or do ships automatically begin searching for trades outside their home system?

I've been following your development and it seems like they will eventually begin finding other trades but I want to be sure.

Also, are you able to elaborate on what products are traded cross system? My plan is to use DeVries' VAST...I mean gigantic...huge...crazy...amount of ore and silicon to flood the market with wafers and refined metals. Along with materials like ice and even some crystals and navidium, you could corner the market on raw goods from DeVries if its able to be traded across the galaxy.

Thoughts?

As for ships outside their home system when the mod is removed: I have built several ships in Albion and assigned them to stations in DeVries. They often find a trade in Albion that sells in DeVries and then they stay there. I imagine that something similar would happen. Example: I had a container rehannas assigned to my food stuffs station. On its way home it picked up some (scanners?) and sold them to the shipyard in DeVries.....

P.s. thank you for your hard work!
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

It's automatic. the galaxy enabled ships judge trades like any other and travel wherever needed.

No drones or missiles in the current list, and probably missing some secondary resources. No raw materials are traded at all. There are not huge numbers of ships either, but you do have an alternative to manual trading if you are willing to trade for time taken to get things delivered :)

And no they don't stay put. Range is a factor in the profit calculation but they simply go where the profit is.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Guesses that this and the autotrader mod will collide with each other :D
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
SupraRZ
Posts: 319
Joined: Fri, 11. Oct 13, 12:02
x4

Post by SupraRZ »

Having fun with this devries is full of trade ships...have you worked out anything for the in sector jump gate traffic?...I'm loving this mod keep at it this could be a huge game changer :D
Misunderstood Wookie
Posts: 377
Joined: Mon, 15. Mar 04, 08:07
x4

Post by Misunderstood Wookie »

He said he worked around that in post 3, when I asked him what he did to fix the gate pile ups he never told me exactly what.

I reckon tho if this works well it should be extended to include every trading ship and even small cargo.
*modified*
*X3 LiteCube User*
MOD GemFX Real Space Shaders
MOD Variety and Rebalance Overhaul Icon Pack
I lost my Hans and should not be flying Solo.
Image
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

NZ-Wanderer wrote:Guesses that this and the autotrader mod will collide with each other :D
For some wares yes, but we survived the competition in X3 and as mentioned some of the more profitable wares are not touched at all by this mod. I am a trader player myself and didn't want to kill my own playstyle :D

The gate pile up - can happen on a small scale but nothing to be worried about. By small scale maybe 3-4 at the same time.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
StormMagi
Posts: 1335
Joined: Sat, 17. Mar 07, 03:53
x4

Post by StormMagi »

How do the ships check for trade values? Is it linked to the Skunk's trading computer?
MOD XR Show Skills

Flying spaceships since 1993.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

AI ships never use the trade computer on skunk. They can read all prices at all times in any zone. This mod adds no actual ai to the game, it just defines ship setups, range to trade + wares to be traded. The actual ai for making profit and selecting what cv or station to trade with, movement code etc is all vanilla so will remain usuable with bug fixes from ES in the future.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Moncada
Posts: 111
Joined: Fri, 4. May 12, 14:49
xrvr

Post by Moncada »

One request if it's possible about the drone trading , is it possible to allow it to trade cargo lifters only? There seems to be alot of them missing and some URV factories in OL have a full load but the sy in darned hot air and gemstone manufacture is out. It's a bit of a hassle to manually trade them every time you want a new ship.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

I'll give it some thought, but I don't want the mod to become a total player trader replacement. Perhaps some medium ship traffic to cover essential drones?
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Moncada
Posts: 111
Joined: Fri, 4. May 12, 14:49
xrvr

Post by Moncada »

Yeah, making the player trading useless is a risk with that.

Maybe traders with a very small amount of drones?
Only 10-15 or so once in a while? So there's a chance for the player to get atleast 10 or so drones on their ship. That way the drones trickle in very slowly on the SY.

I dont know how fast the SY consumes drones though. That might be a problem. Overall I suspect that the pace of consumption is too slow in OL since URV factories are all filled up. Might just be my game though :)
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

SYs are the games primary resource sink. The ai will build capitals and send them off to oblivion to keep the need for factories to produce. This is why the drones run out in DeVries. A better solution would be to build an actual drone forge there (not the plot one :D) but the money can take a while to build up if you dont like running into Albion to cap freighters and sell em at devries or gemstone.
Spoiler
Show
You don't actually have to fly the ship anywhere, just cap it, retrieve the marine officer and run the skunk alone to a SY to sell ;)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Moncada
Posts: 111
Joined: Fri, 4. May 12, 14:49
xrvr

Post by Moncada »

Last time I built a URV forge in devries the drones just sat there and didnt get bought.

To be forced to steal/build a specific station seems a bit excessive to solve the issue of getting 10 cargolifters.
especially since you have to steal ships every time you need to build a ship. I did that for a long while to work around it. Stealing ship loses it's charm after the 15th ship when you have to do it to build the URV forge to begin with.
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Heh yeah true enough. Off for a job interview in a bit so will look at solutions later mate :)
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
Moncada
Posts: 111
Joined: Fri, 4. May 12, 14:49
xrvr

Post by Moncada »

Good luck on the interview!

I'll think about the problem in the meanwhile
Stonehouse
Posts: 320
Joined: Sat, 7. Feb 04, 18:47
x4

Post by Stonehouse »

May the AI ships should only trade if the sy really need it, dont know if these ships could know if the sy want to build a ship...then wait 30 min if the player dont trade, they start

If you let them trade everything normal...like you guys write...the player couldnt make money, cause Ab and OL get totally balanced after a while with these AI ships


(Oh Yorrick did ES called? ;) )

Return to “X Rebirth - Scripts and Modding”