[X3LU] Mayhem 3.21b

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

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

Post by TestUnknown » Sat, 13. May 17, 22:37

Joubarbe wrote: And frankly, I don't give a shit about the ships you capture, because that feature is lame and should be banned. Marines, capture, boarding pod... I never use that because it's so boring, so yeah, there's probably some problems with it.
Maybe you are right. Marine training is expensive. I had about 18 marines at the time and I think I lost 10 because my marines are not yet fully trained yet. I had to do it because I was getting invaded by multiple Yaki M2's and M1's and my defensive fleet consisted of 5 M6s. Not enough to fight back so I had to capture a Yaki's M2 and use it to fight the rest. I don't know if it is realist to fix up a M2 and deploy it so fast in real life. But we are Sohnens and we do whatever it takes to survive.

I kind of like marines and the ideas of marines fixing, capturing and defending ships and stations. It adds a personal touch even when your Empire gets big. Although if you are so against it. I may not use it in the future since I am planning to restart the game. Come to think of it, I never see NPC does it. Still, are you sure you don't want me to just figure out where the fixes are?

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Sat, 13. May 17, 23:23

Mayhem.Monitor.Shipyard.NPC: line 252 "* we add a safety to check for non active ships..."

I think that's where the problem is.

Code: Select all

if not $ship-> is task 0 in use
  START $ship-> call script 'Mayhem.Task.Defend' : sector=[SECTOR] leader=null ally=null

if get global variable: name='mayhem_debug'
  $t = $ship + ' in ' + $shipSector + ' was inactive and has been recalled by ' + [THIS]
  display info box: text= $t, icon= 0, timeout= 20000, fadeout= 2000
  write to player logbook $t
  end
end
Have fun.

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

Post by TestUnknown » Sun, 14. May 17, 03:10

Joubarbe wrote:Mayhem.Monitor.Shipyard.NPC: line 252 "* we add a safety to check for non active ships..."

I think that's where the problem is.

Code: Select all

if not $ship-> is task 0 in use
  START $ship-> call script 'Mayhem.Task.Defend' : sector=[SECTOR] leader=null ally=null

if get global variable: name='mayhem_debug'
  $t = $ship + ' in ' + $shipSector + ' was inactive and has been recalled by ' + [THIS]
  display info box: text= $t, icon= 0, timeout= 20000, fadeout= 2000
  write to player logbook $t
  end
end
Have fun.
Thank you very much. I changed Mayhem.GetAssignedShips.xml which is what returned $assignedShips to remove ships that no longer belongs to the station. Also added another line to save the updated ship list so it does not have to remove ships repeatedly.

Mayhem.GetAssignedShips.xml
-----------------------------------
Replace all:

Code: Select all

$allShips = [THIS]-> get local variable: name='mayhem_assignedShips'
$allShips.owner = [THIS]->get owner race

for each $ship in array $allShips using counter $index

if $ship-> exists
$ship.owner = $ship->get owner race
skip if $allShips.owner ==$ship.owner
remove element from array $allShips at index $index
else
remove element from array $allShips at index $index
end
end

[THIS]-> set local variable: name='mayhem_assignedShips' value=$allShips

return $allShips


ravennn
Posts: 13
Joined: Sat, 30. Nov 13, 10:14

Post by ravennn » Wed, 17. May 17, 20:43

Just a question about performance... are you ok with this mod even when occurs a battle where both sides deploy large forces?

I've just jumped in the middle of sector where were fighting about 50-100 fighters and maybe 10 M1-M7?... just raw guess... and I barely could do anything as it was just too laggy... also with few M7 lauching volleys of missiles it was a hell for performance.
I've also noticed, that even in a sector without fight my SETA is just dropping down... (using distance to object / station as a meter). When I run SETA 10x it is ok for first few sec and then starts to slow down to about a 30-50%. (which isn't that big problem as the first example).

I don't really know how game works exactly, but is it possible, it might be worse because of satellites? ... so even if I'm not in the sector it's still bigger burden?

I'm running with proc: i5-3450, 8GB RAM and NVidia GeForce 560...
And actually I haven't notice such big lags until recently (or forget them). Don't even have such huge 'empire' (about 10 stations, 6 trade ships maybe?), the only bigger difference that I know about is a large amount of satellites across the universe.

Oh and btw OCV seems little unstoppable right now... already took second sector with the first wave and I've never even saw any commonwealth force that could at least hope to be strong enough to stop them.
Their capitals and fighters numbers are almost the same as both attacker and defender at the begging of an ordinary commonwealth assault. :)

And OCV didn't care about my satellites, so it still scans that sector so if it does have such impact on the performance, I'll have to go to erase them myself. :(

Sirrobert
Posts: 1213
Joined: Wed, 21. Aug 13, 13:55
x3ap

Post by Sirrobert » Thu, 18. May 17, 00:10

Does OCV build ships after they take a sector?
In my game they just spread out so thin that local forces crushed all but the destroyers (that did stick together a little).

I mopped the destroyers one by one with a Shark
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Thu, 18. May 17, 00:18

Unless the OCV behavior was drastically changed in Mayhem they should work like in LUV: the central station generates a constant stream of resources that are "spent" by the OCV to get ships. That means that once they start branching outside of the Omicron Channel, their ship growth rate in the newly conquered sectors should diminish by the number of sectors they are actively growing fleets in. Combined with the still unsolved (unless I misremember) issue of NPC traffic passing through OCV sectors resulting in more and more constant losses to the OCV (as their owned sector space increases) results in a "spread too thin" effect.

This is by design in LUV I believe. The idea being that they produce ships overall at constant rate, no matter how many sectors they have acquired giving the player a good chance to beat them even if they have occupied most of the universe (it just takes longer time as you will need to take back so many OCV sectors). If instead you were to more realistically model the OCV resource rate by increasing it proportional to the number of sectors they own then there will be a point where they become unbeatable and it's game over.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

VincentTH
Posts: 6626
Joined: Wed, 6. Nov 02, 20:31
x4

Post by VincentTH » Thu, 18. May 17, 00:42

memeics wrote:Unless the OCV behavior was drastically changed in Mayhem they should work like in LUV: the central station generates a constant stream of resources that are "spent" by the OCV to get ships. That means that once they start branching outside of the Omicron Channel, their ship growth rate in the newly conquered sectors should diminish by the number of sectors they are actively growing fleets in. Combined with the still unsolved (unless I misremember) issue of NPC traffic passing through OCV sectors resulting in more and more constant losses to the OCV (as their owned sector space increases) results in a "spread too thin" effect.

This is by design in LUV I believe. The idea being that they produce ships overall at constant rate, no matter how many sectors they have acquired giving the player a good chance to beat them even if they have occupied most of the universe (it just takes longer time as you will need to take back so many OCV sectors). If instead you were to more realistically model the OCV resource rate by increasing it proportional to the number of sectors they own then there will be a point where they become unbeatable and it's game over.
IMHO, OCV are different in MayHem. They don't gather resources, they are just a giant wrecking ball going after the strongest faction at the time of their spawn, sector after sector until they are all eliminated, only to resurface after 2 days.

ravennn
Posts: 13
Joined: Sat, 30. Nov 13, 10:14

Post by ravennn » Thu, 18. May 17, 07:47

VincentTH wrote:IMHO, OCV are different in MayHem. They don't gather resources, they are just a giant wrecking ball going after the strongest faction at the time of their spawn, sector after sector until they are all eliminated, only to resurface after 2 days.
Ye, I think the same... also they didn't even capture that first sector, they just spawned, destroyed everything in it and moved to another one.
Those rates and numbers can be tweaked in a file, MayHem is well commented in that way (thankfully), so when I'll have time to playagain I'll see if commonwealth will be able to do at least something or if OCV will take dozens of sectors... for now they are all packed together so if later happens than I can't image it every 2 or 3 days all over again... I play at very slow pace. :)

What about that performance? Am I only one who gets laggy after few hours?

Sirrobert
Posts: 1213
Joined: Wed, 21. Aug 13, 13:55
x3ap

Post by Sirrobert » Thu, 18. May 17, 09:12

memeics wrote:Unless the OCV behavior was drastically changed in Mayhem they should work like in LUV: the central station generates a constant stream of resources that are "spent" by the OCV to get ships. That means that once they start branching outside of the Omicron Channel, their ship growth rate in the newly conquered sectors should diminish by the number of sectors they are actively growing fleets in. Combined with the still unsolved (unless I misremember) issue of NPC traffic passing through OCV sectors resulting in more and more constant losses to the OCV (as their owned sector space increases) results in a "spread too thin" effect.

This is by design in LUV I believe. The idea being that they produce ships overall at constant rate, no matter how many sectors they have acquired giving the player a good chance to beat them even if they have occupied most of the universe (it just takes longer time as you will need to take back so many OCV sectors). If instead you were to more realistically model the OCV resource rate by increasing it proportional to the number of sectors they own then there will be a point where they become unbeatable and it's game over.
No, OCV works different in Mayhem. They don't start in Unknown Omega any more (that's where the player starts).

Instead, they spawn a fleet in a random sector every few days. And that fleets goes on a rampage in different directions, thus spreading out over the network.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

VincentTH
Posts: 6626
Joined: Wed, 6. Nov 02, 20:31
x4

Post by VincentTH » Thu, 18. May 17, 09:23

ravennn wrote:
VincentTH wrote:IMHO, OCV are different in MayHem. They don't gather resources, they are just a giant wrecking ball going after the strongest faction at the time of their spawn, sector after sector until they are all eliminated, only to resurface after 2 days.
Ye, I think the same... also they didn't even capture that first sector, they just spawned, destroyed everything in it and moved to another one.
Those rates and numbers can be tweaked in a file, MayHem is well commented in that way (thankfully), so when I'll have time to playagain I'll see if commonwealth will be able to do at least something or if OCV will take dozens of sectors... for now they are all packed together so if later happens than I can't image it every 2 or 3 days all over again... I play at very slow pace. :)

What about that performance? Am I only one who gets laggy after few hours?
I don't have performance problem at all. I have some random crash/hung, probably related to the memory leak in X3 (that has been fixed in the latest patch, but, unfortunately does not work with LU/MayHem). When I see some slow down, I just do an emergency save, quit and reload, to fix it.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 18. May 17, 13:53

@ravennn: if you have lags during big battles, there's no magic, you should decrease the number of ships Mayhem generate. That can be done by modifying t/9971-L044.xml. This file defines all templates used by the AI. "Difficulty" is your threat level, ie. how many sectors you conquered.

Beware of M1s, they come with a lot of fighters and that's why Mayhem battle fleet only use 1 of them maximum.

ravennn
Posts: 13
Joined: Sat, 30. Nov 13, 10:14

Post by ravennn » Thu, 18. May 17, 14:07

Joubarbe wrote:@ravennn: if you have lags during big battles, there's no magic, you should decrease the number of ships Mayhem generate. That can be done by modifying t/9971-L044.xml. This file defines all templates used by the AI. "Difficulty" is your threat level, ie. how many sectors you conquered.

Beware of M1s, they come with a lot of fighters and that's why Mayhem battle fleet only use 1 of them maximum.
Thx, I'll onto those settings...
still do you know if visibility of a sector also impacts performance? So if such battle is in unrevealed sector vs in one where I have satellite...?

EDIT: Ok, main problem is with GPU, not CPU ... and there is about 30 M1 to M7 ships in battle... around 20 of them is M7 class so with all those missiles and fighters all around... it's little too much. I'll just mess a little bit with numbers. :) Thx.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Post by Joubarbe » Thu, 18. May 17, 21:48

No, problem is with CPU. GPU means shit in X3. Visibility means shit. Everything means shit. Even our new president do so.

ravennn
Posts: 13
Joined: Sat, 30. Nov 13, 10:14

Post by ravennn » Thu, 18. May 17, 21:54

Joubarbe wrote:No, problem is with CPU. GPU means shit in X3. Visibility means shit. Everything means shit. Even our new president do so.
Yet turning off AA and lowering textures sped things up... still little laggy, but far less then it used to be.
I'd lowered numbers anyway, but that single battle is less laggy with lower graphics and same numbers.

btw, ye, sad thing is, that Macron is bad not only for France, but for whole EU... and our poor Visegrad 4. :(

User avatar
dizzy
Posts: 1019
Joined: Sun, 26. Sep 10, 06:00
x4

Post by dizzy » Thu, 18. May 17, 22:45

Use something like HWMonitor and determine if your are GPU bottlenecked or CPU bottlenecked in a laggy fight (you watch for >=99% GPU or >=99% CPU usage on one core). On modern systems (assuming you have v-sync on and don't render X3 at >500FPS for no good reason) you will are very likely to see GPU usage at around 30% or less and one CPU core at 99%.

That's what Joubarbe meant, in large fights the CPU is the bottleneck (likely from the collision calculation code) and unless you can overclock your CPU to run at 10Ghz or more per clock, then reducing graphics settings, getting better/faster GPU, getting CPUs with more cores won't help.
X3LU 1.5.2/1.7.0 Youtube series with: IEX 1.5b + LUVi, SIaF r7 (previously also used Phanon Plus 4.02, Revelation Plus 1.04, Diverse Game Starts - LU Edition)
[ external image ]

Mr.YaR
Posts: 19
Joined: Wed, 24. May 17, 19:59
x3ap

Post by Mr.YaR » Fri, 26. May 17, 08:05

Hey))

I've reinstalled X3AP for Mayhem 2 and am trying to figure out what to do and how.

Never played X3 seriously (played mostly X2). Played it always as a wanderer/sort of random sell sword, never liked campains so did not try to get into either. Got some cash from combat, gathered some small fleets = got into troubles. The End.

So pardon if my questions may seem obvious, but i didn't find the answers by myself.



The situation:

Mayhem = meatsteak delivery simulator?
Spent maybe 2 hours delivering food to my Sanctuary without seeing it doing anything except diminushing the food i bring...

Spent some time on exploration: reached Kea Epsilon (scouting prices)

Spent some time scouting the(all i could reach) menus, reading stuff, configuring some...

And... voila...


The questions:

Where do get the information about how things work?? Did read descriptions, went to the encyclopedia - still no clue how the Sanctuary works/ how to produce crystals, food, somethingelseuseful

Do i need to supply a certain amount of resources for the Sanctuary and Research center to start working?? or are they stuck due to some sort of cooldown?

How do i know what to supply to where?
Did search the interface to know how to build a trade ship to speed up meatsteak delivery and found nothing helpful.

Should i go Ore mining? But seems hard with the meatsteak problem.
Never mined things in X3, no idea the time it takes.

Is selling the main guns of the starting squirrel ship a good idea?
May it help activating the Sancturay faster?

Is it possible to rename your faction in peace?


Thanks for your attention!
Getting to back to my meatsteaks...

Sirrobert
Posts: 1213
Joined: Wed, 21. Aug 13, 13:55
x3ap

Post by Sirrobert » Fri, 26. May 17, 09:42

You produce goods with factories. Exactly as in vanilla.
Finish exploring the Omicron Channel, that will unlock all functions.

The sanctuary has a place to build ships, and one to build stations. You can scan ships, then research them at the research station, then build them.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

Mr.YaR
Posts: 19
Joined: Wed, 24. May 17, 19:59
x3ap

Post by Mr.YaR » Fri, 26. May 17, 11:33

Oh, that confirms a guess i had: it has something to do with exploration!

Seems not very intuitive to me for a sandbox oriented gameplay =)

Just reached the sector giving you the scanning tips.


EDIT: Things got definitely clearer when finished the tutorial flight.

Mr.YaR
Posts: 19
Joined: Wed, 24. May 17, 19:59
x3ap

[Mayhem] AI combat questions

Post by Mr.YaR » Sat, 27. May 17, 19:58

Benn watching some AI vs AI fleets combat in mayhem.
Some moments looked very flat. (Unability of AI to minimaly understand the tactical situation = suicides, suicides and suicides)

Questions:

- Is there anything to do about the AI threat estimation?
To make the AIs estimate the force of the ennemies they want to engage.

(mods? already existing mechanics that could be tweaked?)

- SOme sort of flee/retreat mechanics?
Would avoid endless suicidal situations a bit


Not directly linked: do the AI "reclaim" ships ever? Think not.
If augmenting the bailing out %, to work with retreat/threat estimation together, would help avoiding lots of left around ships that the player could take =)

Ty for your attention!


Edit: Merged with Mayhem thread, as per S&M posting rules. X2-Illuminatus

Sirrobert
Posts: 1213
Joined: Wed, 21. Aug 13, 13:55
x3ap

Post by Sirrobert » Sat, 27. May 17, 22:39

Not directly linked: do the AI "reclaim" ships ever? Think not.
You mean salvage? Yes, there are AI salvage ships.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

Post Reply

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