[Mayhem 3] Renegades 3.0

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

sendrock
Posts: 23
Joined: Tue, 23. Aug 16, 17:51
x3fl

Re: [Mayhem 3] Renegades 2.6

Post by sendrock » Fri, 22. Mar 24, 10:10

@hairless-ape

Thanks,

I have tried the fix today and without the colors the fleet setting is not laggy anymore I
(I can feel a bit of stutter when I open a fleet with 100+ ships but it's totally playable and way way way better than it was with the colors)

Also I stopped the self-destruct of ships and the logs is not corrupted anymore

TestUnknown
Posts: 56
Joined: Fri, 6. Apr 12, 01:40

Re: [Mayhem 3] Renegades 2.6

Post by TestUnknown » Thu, 28. Mar 24, 22:36

Potential bug in Mayhem.BuyOrLoad.xml: only $homebase.money is used to buy things, and not player $money (line 52). It's a potential bug because Mayhem.SellOrUnload.xml does use player money in addition to $homebase.money, so it's weird if Mayhem.BuyOrLoad.xml is not using player money. Of course, it could also be intentional; I haven't play for a long time.

Detail: in Mayhem.BuyOrLoad.xml line 52 calls "$money = get player money" but the variable $money is not used in the rest of the script. This results in error message even if the player has enough money to cover the trade: 'Your ship ' + [THIS] + ' cannot buy ' + $ware + ' at ' + [DOCKEDAT] + ' because you don`t have enough money. He will continue his job once he got enough cash from his homebase account.'

If the logic is to
1) buy the whole load with $homebase.money,
2) if not enough, buy the whole load with player money
3) if not enough, buy as much as possible with $homebase.money

Then add at line 56:
else if $money >= $ware.cost
add money to player: $ware.cost.neg
[THIS]-> send signal [SIGNAL_BUYWARE] : arg1=[DOCKEDAT], arg2=$ware, arg3=$amount.added, arg4=$ware.price

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 2.6

Post by Hairless-Ape » Fri, 29. Mar 24, 15:54

TestUnknown,

Thanks for the info. It's great that you gave actual code references. Here's my opinion on what I saw.

Mayhem.BuyOrLoad.xml
This is correct and working as intended, although as you point out, there is a useless extra call to get the player money. It may have been used in the long distant past and someone forgot to remove the line. I see that a lot in other areas. When a trader buys something, the money comes from that Trader's home-base only. There is no fall-over to use player money intentionally as you can setup traders for specific stations and govern how much they buy by funding the station (or not). Whether good or bad, that's how it has worked for as long as I can recall. So if the trader's home-base has insufficient funds, and you tell them to go buy something costing more than that home-base has, it will deny the request. If you have Trader agents set to acquire goods automatically and their home-base has no funds, they simply won't go buy it. While I can see some benefit to having it "fall over" to using Player money, I can also see a downside to that, so I'm very hesitant to alter that; especially since this script governs non-player trading as well. At present, the only "fall over" mechanism that I am aware of that covers both station money and player money is when your Maintenance bill must be paid. Prior to a recent enhancement I made, this would strictly look at player money and if you didn't have enough, it would just damage all your ships for payment. Now, it at least goes through and takes money from your stations if it can't find enough in the player's wallet.

Mayhem.SellOrUnload.xml
I'm not seeing anything here that worries me either. If you have a ship that you sell wares from and that ship has a home-base, the home-base will receive the funds. This is the normal for all automated traders. It also has code that allows for you to sell wares from a ship that has no home-base set, in which case the money goes to the player wallet, as expected.

Cheers.
Out of my mind. Back in 5 minutes.

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 2.6

Post by Hairless-Ape » Tue, 9. Apr 24, 15:22

Some questions have come up on the SWLU discord channel as to how to best setup Logistics Chains to be efficient and to avoid having excess agents.
I've seen several variations and certainly there are several good ways to do it, while others that seem to work but suffer under a load. I won't tell you my way is the best way, but it's something I've developed through experimentation and found it to be very efficient, so at least it will provide one perspective.
Here's what I try to do for Logistics Agents. Try to never have more than 10 jobs setup at an outpost. Long lists are laggy and cpu demands go way up. This is especially true now that the agent range has been extended to 8 jumps by default. That means that every time an agent is looking for some factory that may need a resource, it's looking at every factory within that jump range, which is a LOT of factories.. cpu demands go way up.
Never setup a central logistics 'hub' for everything. This 'can' and often does bottleneck your agents depending on conditions. Instead, setup your outposts as logistics hubs for 1 or 2 items max, with the exception of your dedicated ship-building outpost(s) which obviously will require import of the required ship components.

Here's the catch for all Logistics: How you set up your network of agents will change based on how you have your factories Distributed.
The other extremely important goal is to Maximize your Loads.

So the answer is not cut and dry. It depends on whether you concentrate factories of a certain type in a single system or if you just throw them anywhere. While maybe safer from an empire invasion perspective, there is a disadvantage to randomly sprinkling your factories in various sectors.
For me, I attempt to create dedicated systems for a given resource rather than scatter stations randomly in different sectors.
Let's say I try to make a system end up being 80%+ dedicated to one resource - Teladianium:
I will fill up the system with Teladanium factories if I can.
I will setup a single 2-3 agent import job that retrieves Teladanium from all stations in Local, attempting to keep these agents in-system and avoiding traveling long distance. Sometimes exceptions are made here, but this is the goal.
I will then setup a 2-3 agent Export job at this outpost for Chemicals, exported only to the local Teladanium factories. Note, this assumes I have some other outpost dedicated to get those chemicals to this outpost. Again, this job attempts to ensure that these agents work primarily in Local and are not traveling multiple jumps.
Now, the next part depends on where my Teladanium is needed.
1. If I have a dedicated outpost for building Factories, then I setup a dedicated 1-agent job to export only the amount of Teladanium needed there for station building.
2. If I have a different outpost that I've dedicated for Hull Plating, then I setup a 1-2 agent job to export Teladianium to that outpost (note, I export to that dedicated outpost, NOT the Hull Plating factories it services.)

The idea here, is simply this: If you are forced to use agents to move materials for several jumps, MAXIMIZE their cargo space usage. Take FULL Loads from one outpost to another outpost across large gaps, and let that destination outpost service it's own Local factories. Servicing factories often means PARTIAL loads, so attempt to keep as much factory servicing jobs as humanly possible isolated to agents dedicated to that Sector only. If you ever find yourself having a ton of partial loads being hauled by your agents over many jumps then that's where you focus your attention. With restrictions to the amount of Jump Beacons or Jump Stations you can have, this approach becomes even more critical.
Out of my mind. Back in 5 minutes.

naisha
Posts: 260
Joined: Sat, 11. Oct 08, 11:21
x4

Re: [Mayhem 3] Renegades 2.6

Post by naisha » Wed, 10. Apr 24, 06:31

This was actually pretty helpful thank you for posting this!

I never thought of doing one resource per system. Always went with the random factory placements allover the place

As for agent jobs i always left the default set of jobs that the outposts come with. I then modify it by adding, removing, pausing some jobs as needed. Its been working ... fine ... not efficient but generally stuff does get to where it needs to in time, most of the time.
i will try the way you suggested, that looks way more efficient and way better for performance. Considering i end up having 2-6 agents per outpost, each of those agents going through each default job looking for factories all the time ... yeah that might make the game run a bit slower haha
Known as "Test90" on discord

User avatar
Hector0x
Posts: 998
Joined: Mon, 18. Nov 13, 18:03
x3tc

Re: [Mayhem 3] Renegades 2.6

Post by Hector0x » Wed, 10. Apr 24, 17:54

the downside is that your defense must be flawless. Hubs and focussed production methods are easy to manage but very vulnerable. If a sector gets overrun you already have a major problem because an entire resource chain shuts down. I would avoid putting all my eggs in one basket like that.

Your empire will be extremely resilient if you use a system of many isolated islands of sectors where each sector cluster has all types of resources nearby. During war time the game can become quite stressful and you don't want to worry about your logistics getting messed up.

The downside of decentralized logistics is that they cannot work as a fully self sufficient player economy. You need to set up Outpost trade thresholds and need to buy from the NPC economy as a buffer to fill your local shortages for each independent island of like 5 sectors.

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 2.6

Post by Hairless-Ape » Thu, 11. Apr 24, 16:07

Only thing I would mention here, is that with jump beacon restrictions now in place, using Traders to gather large quantities of resources in NPC space is far more dangerous, and far slower:
Currently, you can't put a jump beacon in any space other than your own if playing on hard difficulty. With the upcoming release I'm working on, I've relaxed that a bit and the player will be able to put a jump beacon down in "friendly" NPC space, provided their notoriety is high enough. Having a jump beacon in another race's territory is a privilege that only friendly nations should allow. Total jump beacons a player may own is still restricted regardless of difficulty level, but is configurable in the 9973 file.

Combine this with the fact that you can't buy Hull Parts, Computer Components, or Crystals from NPC's, it becomes even more difficult to rely on Traders for supply.

I totally agree that the "isolated islands" is a much safer approach, but it would depend on whether you can actually get the materials you need. Between the changes made in ZH and the changes made in Renegades, that's now much more difficult. Much will depend on where your systems are and how you manage NPC relations, and how much you trust your neighbors. I think it can be done, but not as easily as when ZH first came out.
Out of my mind. Back in 5 minutes.

User avatar
Hector0x
Posts: 998
Joined: Mon, 18. Nov 13, 18:03
x3tc

Re: [Mayhem 3] Renegades 2.6

Post by Hector0x » Fri, 12. Apr 24, 07:21

Most imports can be handled without Traders just relying on your Outposts who are passively buying. Neutral Traders can even buy resources from your enemy and then sell to you.
Yes this doesn't work for the high level parts and it also makes you dependent on what the others have on stock, but usually there is a local overproduction of certain basic stuff like Chemicals, Microchips or Teladianium.
Lets say 3 nearby NPC Outposts each have 100k chemicals on stock. Then you can easily skip building player Chem labs in that general area and produce more Teladianium and Hull Part instead.
In certain areas you can often get away with just ship or station part production which passively buys all required resources.

Oftentimes its a bit risky because not sustaineable forever. But it can be optimal usage of limited station slots until you can conquer more sectors to build the basic factories later.

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 2.6

Post by Hairless-Ape » Sat, 13. Apr 24, 04:44

You make an excellent point and one which I've not typically taken advantage of. I'm going to make a point of doing that more and seeing just how much resources can be gained this way compared to using my own dedicated traders. My gut feel is that the neutral traders simply won't be able to keep up with the kind of demand I'll be asking of them, but I guess we'll see. At the very least, this seems like something I should be doing far more of to supplement my supply and especially later in the game when I have more money than I know what to do with and not enough resources. I've just been sort of paranoid about opening up trading in my outposts, in fear that some sort of bug will allow a trader to haul away my hull parts :) but I guess that can't happen if it's not in my trade list, so I'm going to adjust my thinking. If it does happen.. I'm going to blame you and then rewrite all that code!

Thanks buddy.
Out of my mind. Back in 5 minutes.

NakedFury
Posts: 2
Joined: Wed, 20. May 09, 03:21
x4

Re: [Mayhem 3] Renegades 2.6

Post by NakedFury » Sun, 14. Apr 24, 02:23

New guy here to the mod and community.

After carefully following the instructions I cant seem to play the game using the no steam exe file. At first it showed me a missing dll error, after fixing that now its application unable to start correctly.
Is there a forum thread where this is mentioned that I cant find?

Edit 1: Dammit I may have found my mistake. I thought X3 included all the files from Terra and Albion. They are individual downloads instead of all in as I thought.
Edit 2: Embarrassing to admit but my mistake was not actually checking that X3 Reborn is a separate game to Terran Conflict and Albion Prelude. Mistake fixed after an hour or more of system checking.

naisha
Posts: 260
Joined: Sat, 11. Oct 08, 11:21
x4

Re: [Mayhem 3] Renegades 2.6

Post by naisha » Tue, 16. Apr 24, 19:12

So, ive made a clean install of the mod and updated it to latest version

I started my game, claimed my first sector and after setting all up i went and scanned a few ships i needed.

I then set the outpost to build workers for the things i need but it wont build anything and i cant figure out why.
I have the blueprints, i have the population, i have the resources needed for ship construction but it still wont build anything.

I've played this mod quite a bit in the past 2 months and this is the first time im encountering this issue.

What could it be?

Edit: So ive spent some more time on this and still cant figure out why its not building new worker ships. It builds ships for fleets no problem but for workers it wont.
Here is my save and galaxy if needed
Save - https://drive.google.com/file/d/1fpuqxg ... sp=sharing
Galaxy - https://drive.google.com/drive/folders/ ... sp=sharing

Maybe im doing something wrong or missing something obvious but i cant figure it out
Known as "Test90" on discord

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 2.6

Post by Hairless-Ape » Wed, 17. Apr 24, 17:18

naisha wrote:
Tue, 16. Apr 24, 19:12
What could it be?
Sorry Naisha, it seems to be working fine when I load up your stuff.
I loaded up the very latest published release code (2.6) and the latest patch, then applied your Map files and your saved game. Then I loaded your saved game.
I did notice the only TS class ships you have are "MINER" class ships, but that's ok. They can still haul stuff.
I went to your main outpost and built one. It built fine.
I went to the admin section of the Outpost and set it up to Automatically build 3 Agents, and I selected "ship type" and chose one of your TS Miners.
It happily went about making 3 miners and assigned them as Agents to the outpost. Worked great.
As far as I can tell, I've duplicated everything perfectly that you should be running, and it works fine here.

I have only a couple suggestions/questions.

1. Did you run "cleanup.bat" after the install? If you don't run this, it can leave some old .pck files that will interfere with your game.
2. Did you start with a Fresh Albion Prelude install, when you started or did you just copy over an old install. Again, it makes a difference because just the presence of some old files alters the game.
That's all I can think of.
Out of my mind. Back in 5 minutes.

naisha
Posts: 260
Joined: Sat, 11. Oct 08, 11:21
x4

Re: [Mayhem 3] Renegades 2.6

Post by naisha » Wed, 17. Apr 24, 18:12

Yes to both.

I will try reinstalling
Known as "Test90" on discord

8Lamaton
Posts: 2
Joined: Fri, 9. Feb 24, 11:30

Re: [Mayhem 3] Renegades 2.6

Post by 8Lamaton » Thu, 18. Apr 24, 14:59

I made the configuration of weapons and ships for myself to emphasize the peculiarities of each race. For example, all M2L warships are accelerated but have worse shield generators and armor than regular M2s. ATF ships have a bonus to maximum speed and shield capacity but are inferior in strength and shield generator power to regular Earth ships. Teladi ships have shields comparable to other races, but their generator is seriously weakened while the hull strength is above average. Xenon and Paranid ships have above-average characteristics. Split ships have been sped up and shield generators have been improved, but hull strength and shield capacity have been reduced. All TM ships are faster than M3 ships of their race. M8 ships have increased speed, stronger shield generators and their capacity, as well as armor, but worse maneuverability. Improved blueprints have both bonuses and penalties.

https://drive.google.com/file/d/1oH-k7n ... drive_link

User avatar
Hairless-Ape
Posts: 322
Joined: Wed, 6. Nov 02, 20:31
xr

Re: [Mayhem 3] Renegades 3.0

Post by Hairless-Ape » Sat, 20. Apr 24, 23:13

3.0 is out !

A New game is required, and I strongly recommend you generate a new map as well. Many changes. Hope you enjoy it.
Please be kind if you find a bug, and send me a private PM. I will get on it quickly.

Cheers.
Out of my mind. Back in 5 minutes.

naisha
Posts: 260
Joined: Sat, 11. Oct 08, 11:21
x4

Re: [Mayhem 3] Renegades 3.0

Post by naisha » Sun, 21. Apr 24, 16:16

Oh I like the changes. Good work, can't wait to try them
Known as "Test90" on discord

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”