[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
VincentTH
Posts: 6627
Joined: Wed, 6. Nov 02, 20:31
x4

Post by VincentTH » Fri, 28. Apr 17, 16:37

Joubarbe wrote:Maybe pirates are cool guys after all.
OK, I'll take that. :-)

Joelnh
Posts: 429
Joined: Wed, 3. Mar 10, 00:12
x3tc

Post by Joelnh » Fri, 28. Apr 17, 23:45

Maybe that's a sneak peak into next Mayhem.... your on Pirate side.
Or all major races have only the Safe sectors to start and every other one is controlled by pirates, xenons etc.

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

Post by Joubarbe » Sun, 30. Apr 17, 09:01

Jokes aside, all bug reports are saved into my to-do list. But there's no guarantee I'll ever fix them. I'm currently on a website project, and I don't have time for X3.

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

Post by VincentTH » Sun, 30. Apr 17, 22:15

Joubarbe wrote:Jokes aside, all bug reports are saved into my to-do list. But there's no guarantee I'll ever fix them. I'm currently on a website project, and I don't have time for X3.
Thanks, we understand, and appreciate the work you have put into MayHem.

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

Post by TestUnknown » Thu, 4. May 17, 07:02

Hegbork wrote:I got tired of scrolling through an endless list of factories just to find my sanctuaries and research stations, so I made a thing.

Set up hotkey for "Mayhem PITA Reducer", push hotkey and you get a list of all sanctuaries and research stations. Click a sanctuary and you'll get the sanctuary manager. Click a research station and you'll get the research manager (I mean, the saturn complex hub installation menu, this misdirection took me over an hour to figure out).

I'm pretty sure it's pointless to publish this outside of this thread because it's quite rough around the edges and it's a script for a mod of a mod.

Oh, and at the top there's a line under "Factories" that says "Set defaults". Don't click that unless you want all your factories to brutally have import and export set up just the way I like them (or edit the script to set things up your way).

Preferably this should be just plugged into the player console, but then it would be a mod of a mod of a mod and we can't have that. Also, it would be nice to have the list display production progress in each sanctuary and there is commented out start of getting that done, but I ran out of effort. Also, I really don't understand this scripting language or the concepts everything works under, so this might all blow up your game and summon nasal demons. And I also fully expect everyone to tell me that this already exists under some menu I missed.
Thank you. I found your script useful and I updated so that it shows percentage as you originally intended it. Here it is

Code: Select all

* ************************************************
* SCRIPT NAME: MPR.Menu.xml
* DESCRIPTION: 
* 
* AUTHOR:           DATE: 24 April 2017
* ************************************************

$Title = 'Mayhem PITA Reductor'
$Description = ''

set global variable: name='Menu.MPR' value=[TRUE]

$timeDivider.Ship = get global variable: name='mayhem_timeDividerShip'
$timeDivider.Station = get global variable: name='mayhem_timeDividerStation'
$timeDivider.Missile = get global variable: name='mayhem_timeDividerMissile'
$timeDivider.Shield = get global variable: name='mayhem_timeDividerShield'
$timeDivider.Weapon = get global variable: name='mayhem_timeDividerWeapon'


while [TRUE]
$MainMenu = create custom menu array

add custom menu heading to array $MainMenu: title='Factories'

add custom menu item to array $MainMenu: text='Set defaults' returnvalue='FactoryDefaults'

* Too much PITA to get the percentages right. It`s possible but I hate writing code in a bad editor in a confusing language in an unknown environment.
dim $heading = 1, 'Sanctuary', 175, 'Ship', 200, 'Stat', 225, 'Wpn', 250, 'Misl', 275, 'Shld'

* Not sure why this need to be repeated twice for it to work
add custom menu heading to array $MainMenu: title='Sanctuaries'
add custom menu heading to array $MainMenu: title=$heading

$stations = get station array: of race [Player] class/type={*** UNDEFINED *** (SS_DOCK_SANCTUARY)}
$stations = sort array $stations
$stations = reverse array $stations
for each $station in array $stations using counter $l
$stationName = $station-> get name
$percentageProgress.s =''

* Ship
$buildingItem.Name='mayhem_buildingShip'
$buildingItem.parallelTasks='mayhem_parallelTasks'
$buildingItem.Progress='mayhem_buildingShipProgress'
$timeDivider=$timeDivider.Ship
gosub GetBuildingPercentage:
$prShip = $percentageProgress.s

*Station
$buildingItem.Name='mayhem_buildingStation'
$buildingItem.parallelTasks=null
$buildingItem.Progress='mayhem_buildingStationProgress'
$timeDivider=$timeDivider.Station
gosub GetBuildingPercentage:
$prStation = $percentageProgress.s

* Weapon
$buildingItem.Name='mayhem_buildingWeapon'
$buildingItem.parallelTasks='mayhem_parallelTasks.Weapon'
$buildingItem.Progress='mayhem_buildingWeaponProgress'
$timeDivider=$timeDivider.Weapon
gosub GetBuildingPercentage:
$prWeapon = $percentageProgress.s

* Missile
$buildingItem.Name='mayhem_buildingMissile'
$buildingItem.parallelTasks='mayhem_parallelTasks.Missile'
$buildingItem.Progress='mayhem_buildingMissileProgress'
$timeDivider=$timeDivider.Missile
gosub GetBuildingPercentage:
$prMissile = $percentageProgress.s

* Shield
$buildingItem.Name='mayhem_buildingShield'
$buildingItem.parallelTasks='mayhem_parallelTasks.Shield'
$buildingItem.Progress='mayhem_buildingShieldProgress'
$timeDivider=$timeDivider.Shield
gosub GetBuildingPercentage:
$prShield = $percentageProgress.s

dim $line = 1, $stationName, 175, $prShip, 200, $prStation, 225, $prWeapon, 250, $prMissile, 275, $prShield
add custom menu item to array $MainMenu: text=$line return value=$station

* add custom menu item to array $MainMenu: text=$stationName returnvalue=$station
end

add custom menu heading to array $MainMenu: title='Research'

$stations = get station array: of race [Player] class/type={Terran Research Station}
$stations = sort array $stations
$stations = reverse array $stations
for each $station in array $stations using counter $l
$stationName = $station-> get name
add custom menu item to array $MainMenu: text=$stationName returnvalue=$station
end

set menu option: $MainMenu, icon= 16
$Return = open custom menu: title=$Title description=$Description option array=$MainMenu

if $Return == -1
set global variable: name='Menu.MPR' value=[FALSE]
return null
end

if $Return == 'FactoryDefaults'
$stations = get station array: of race [Player] class/type=[Factory]
for each $station in array $stations using counter $l
$station-> set factory export threshold: threshold= 15
$station-> set factory import threshold: threshold= 40
$station-> set max trade jumps: 50
$station-> station is open for trading: [FALSE]
end
end

if is datatype[$Return] == [DATATYPE_STATION]
if $Return-> is of type {Terran Research Station}
* It took me an hour to figure this one out.
= $Return-> call script 'Menu.SaturnComplexHub.Install' :
else
= $Return-> call script 'Menu.DWM' :
end
end

end

return null

* Input: $buildingItem.Name, $buildingItem.parallelTasks, $buildingItem.Progress, $timeDivider
* Output: $percentageProgress.s
GetBuildingPercentage:
$buildingItem = $station-> get local variable: name=$buildingItem.Name
if $buildingItem
if $buildingItem.parallelTasks
$parallelTasks = $station-> get local variable: name=$buildingItem.parallelTasks
do if $parallelTasks == 101
$parallelTasks = 1
else
$parallelTasks = 1
end
$buildingItemProgress = $station-> get local variable: name=$buildingItem.Progress
$price = get average price of ware $buildingItem
$totalProgress = ($price / $timeDivider) * $parallelTasks
$percentageProgress = $buildingItemProgress * 100 / $totalProgress
do if $percentageProgress > 100
$percentageProgress = 100
else
$percentageProgress = 0
end
$percentageProgress.s = convert number $percentageProgress to string
endsub

return null

If you found any bugs, please let me know. The factory default settings sort of depends on what TS you plan to use for IDN. I use Vulture SFXL, so for example, 20% and 20% is good for Cattle Ranch and Cahoona Bakery but for other factories some other values would be better. I suggest maybe 1 setting for each factory type. Also maybe moving this menu item to the bottom of the menu.

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

OWP displacement

Post by VincentTH » Sun, 7. May 17, 22:47

In my game I place OWP within 8km of the gate - such that hostile ships exiting the gate would be within its firing range (PPC at 8km), for it to guard the entrance to my production stations. However, overtime, they got pushed farther away, (20km from gate), rendering the OWP ineffective.

Is there a way to move them back? They seem to be a ship when it should not be (got pushed away), and a station when it should not be (cannot move them back, cannot place them in sectors you don't own).

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

Post by Joubarbe » Sun, 7. May 17, 23:26

And if you put them farther from the gate, are they still being pushed away?

If you answer yes, you know what you need to do; if you answer no, I cannot help you, other than completely remove OWP from the game because they are badly implemented and not meant to be used by the player :) (and I won't do that, because they're cool nonetheless)

User avatar
Zaitsev
Posts: 2007
Joined: Tue, 2. Dec 08, 01:00
x4

Re: OWP displacement

Post by Zaitsev » Mon, 8. May 17, 01:18

VincentTH wrote:In my game I place OWP within 8km of the gate - such that hostile ships exiting the gate would be within its firing range (PPC at 8km), for it to guard the entrance to my production stations. However, overtime, they got pushed farther away, (20km from gate), rendering the OWP ineffective.

Is there a way to move them back? They seem to be a ship when it should not be (got pushed away), and a station when it should not be (cannot move them back, cannot place them in sectors you don't own).
Best guess is that collision avoidance kicks in every time you enter the sector, pushing them back just a little bit each time.

On a general basis the OWP is kind of weird, since it's classified as, and thus treated as a ship, but with a speed set to zero so it can't go anywhere. This makes for some interesting issues, since it can be moved by the collision avoidance system, but can't move on its own and in a worst case scenario gets bumped around the sector like a pinball. The tractor beam would probably be able to move it, but since that's not a thing in LU then no, there is no way to move them back. The only way to keep them where you put them is probably to never enter the sector again, so it depends on how much you love the view of your factories :p
I'm sorry, I can't hear you over the sound of how awesome I am :D

DiDs:
Eye of the storm Completed
Eye of the storm - book 2 Inactive
Black Sun - Completed
Endgame - Completed

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

Post by TestUnknown » Mon, 8. May 17, 05:46

I just captured a Yaki Akuma, my first M2, but it keeps on jumping to Salvage Spur, where it used to be based at. I set its command to NONE and cleared its homebase, but it still jumping to Salvage Spur if I left it alone for a few minutes. My base in Mist of Elysium is under attack by Yaki.

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

Post by VincentTH » Mon, 8. May 17, 19:48

Joubarbe wrote:And if you put them farther from the gate, are they still being pushed away?

If you answer yes, you know what you need to do; if you answer no, I cannot help you, other than completely remove OWP from the game because they are badly implemented and not meant to be used by the player :) (and I won't do that, because they're cool nonetheless)
I guess Zaitsev's diagnostics is correct. Every time I enter the sector, the OWP seems to be moving away further, (sideways also, not just pushed farther from the gate).

I originally put it at 4 o'clock , and 8km from the North gate of Dana Chance, but it is now 15km and 7 o'clock from the gate. I think it may also be pushed back by fire from Pirate cap ships, not just due to collision avoidance (but I could be wrong entirely).

Sorry if I sounds like complaining, I just want to point out what I think could be improved, but I am no MD programmer!!!

[EDIT] I would think the easiest way to resolve this issue is to allow the player to disassemble the OWP (after stripping it), so that a new one can be placed at the original location.

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

Post by ravennn » Tue, 9. May 17, 16:51

Hello, after few years back to X3... and I'm glad to found out this mod, looks great so far - great job... I couldn't decide if to give LU a try without races wars, not to mention needs to actually build and not buy an army. :)
(Well was lucky to find some chaf missiles to sell them at the beginning for 3m, otherwise I would probably spend a lot of time trading)

But just simple question, why make Terran/ATF as separate factions? Looks little weird to me... it's true that they both have plenty of own ships, but still aren't they more or less just the same? ... only that ATF is part of Terran's millitary with focus on Xennons? ... I guess, they both share same stations (I'm not that far yet).

Also if they break alliance:
" Terran/ATF alliance will break after a chain of events if one of them becomes too powerful. "
It would be little weird, as The Moon is safe sector and the only one to The Earth... another safe sector of the other faction.

It's nice that they can't ally with anyone else, ok, but this seems little too odd. Maybe keep ATF only as 'mini-faction', just helping Terrans and without own sectors... or maybe just The Moon itself and no more?

I know that you won't change it... just asking why have you done it in this way.

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

Post by Sirrobert » Tue, 9. May 17, 19:55

ravennn wrote:It would be little weird, as The Moon is safe sector and the only one to The Earth... another safe sector of the other faction.
That doesn't matter. The battlegroups jump to get wherever. So it doesn't matter if there's a hostile sector in the way.

Don't worry, it works fine in game as it is.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

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

Post by ravennn » Tue, 9. May 17, 21:03

Sirrobert wrote: Don't worry, it works fine in game as it is.
Well, I'm not even that much afraid of a technical issue... but... well it would still looks weird IMO... If you are in war with someone across galaxy, but you can't push him away from the moon of your own home planet... thats sad.

And a mere thought of a war between the Terrans and ATF tears my heart apart. :(
Only salvation is, that I'm suppose to build my own empire anyway and not join one of commonwealth's races, so at least I won't take a role in that fratricide. :-D

Ok, but one serious question. I've build my first two stations for food production and first TS... trying to get an agent so I can assign it to Internal Distribution Network. Do I get it right, that even with that IDN supplier, it won't go and buy E-Cells from NPC stations? ... so I need for example 1 TS to buy E-Cell for sanctuary and second one which will use IDN network to transfer those E-Cell from sanctuary to those two factories?

angrytigerp
Posts: 70
Joined: Mon, 27. Feb 12, 10:14
x4

Post by angrytigerp » Tue, 9. May 17, 21:22

So I'm confused about how to 'expand' my empire. Someone mentioned 'refugees' or something, but I'm not exactly sure how to find them...

Full disclosure, I am consistently scripting myself money -- but as Joubarbe points out in his OP, money isn't that important. Anyways.

As you all are probably aware, progression/construction is slow enough even with a huge amount of money, as the limiting factor is time. Right now, I have precisely two sectors under my control (Unknown Sector Gamma and US Alpha), with a Research Station in both, Sanctuary still in Gamma, and MLCC Dock in Alpha (did NOT realize it was one-or-the-other on Sanctuaries and Docks).

My problem is mainly that right now, I have a population of about 63 in my Sanctuary, the extras consisting solely of picking up stray astronauts and ferrying them home. I managed to irritate the Paranids (and have great rep with everybody else because of the bounties, funnily enough) mainly because my Sanctuary 'rolled' with a Paranid Ship bonus, so I figured might as well scan their stuff while I fight them.

But I don't know how to populate the Sanctuary any more, except to just keep saving astronauts, and without the personnel needed to build a fleet in a reasonable amount of time, my current MO is basically jumping into Paranid sectors, unloading Firestorm Torpedoes on a station until it explodes (or until their reaction has come dangerously close to wiping me), then jumping out. A Deimos I was sneaky (and lucky) enough to scan during the near-perpetual Teladi-Paranid war that's going on in my game is now my next research project, and as of right now I left my game last with... oh, 700-something out of 1100-something points? That's my next step up after it finishes researching. Eventually.

Someone said (or at least I found when searching for the question) something about there being 'refugee' shuttles or something that are supposed to appear? How do I find those -- wait for an invasion to be declared, then check the Ministry of War page for where the battle is? And what do I have to do, capture the ship? Blow it up?

What exactly am I missing here? Or is my little guerilla Firestorm campaign about normal?
Last edited by angrytigerp on Tue, 9. May 17, 22:03, edited 1 time in total.

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

Post by ravennn » Tue, 9. May 17, 21:52

angrytigerp wrote: What exactly am I missing here? Or is my little guerilla Firestorm campaign about normal?
I do believe that I've read, that those refugees are spawned in an attack and to get them you must have sector close by... as they will just look for near safe sector, so they are pretty rare (so you can't do anything for it...?) so you must rely more on slaves (not sure how exactly to get them, yet).
But it's really just my guess.

Pls don't forget on my prev post question, thanks. :)

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

Post by Sirrobert » Tue, 9. May 17, 22:43

ravennn wrote:Well, I'm not even that much afraid of a technical issue... but... well it would still looks weird IMO... If you are in war with someone across galaxy, but you can't push him away from the moon of your own home planet... thats sad.

And a mere thought of a war between the Terrans and ATF tears my heart apart. :(
Only salvation is, that I'm suppose to build my own empire anyway and not join one of commonwealth's races, so at least I won't take a role in that fratricide. :-D

Ok, but one serious question. I've build my first two stations for food production and first TS... trying to get an agent so I can assign it to Internal Distribution Network. Do I get it right, that even with that IDN supplier, it won't go and buy E-Cells from NPC stations? ... so I need for example 1 TS to buy E-Cell for sanctuary and second one which will use IDN network to transfer those E-Cell from sanctuary to those two factories?
I meant more in the sense that it makes sense when it happens.
The Moon is a little weird, but remember that this is not a full on total war. Economic ships are left alone

You are correct with the IDN. Personally I have a fully functional mini economy on it's own, with the exception of crystals (because you'd need a lot of crystal Fabs to keep up with power demand, and I don't have that many sectors yet). So I have dock agents buying crystals.
I also have them buying all raw materials if those fall to low, so that I don't have to wait for the stocks to refill before I can build something.

I do recommend you befriend at LEAST 1 empire though. I'd go for Argons, simply because they border the most unclaimed sectors at the start (along with Teladi). And since the AI can only attack bordering sectors, that keeps you safe even from your enemy.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

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

Post by VincentTH » Wed, 10. May 17, 05:21

If money is not a problem, and you are not patient enough for the refugees to come, you can buy slaves at Pirate bases, and free them in your Sanctuary.

I also have a TP with Special COmmand Software and Transporter, and I ask the ship to pick up any astronauts I run into.

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

Post by ravennn » Wed, 10. May 17, 13:58

Sirrobert wrote:I do recommend you befriend at LEAST 1 empire though. I'd go for Argons, simply because they border the most unclaimed sectors at the start (along with Teladi). And since the AI can only attack bordering sectors, that keeps you safe even from your enemy.
Ok, btw last questions (at least for now :-D) Is it normal, that I can't build Terran's stations? I have since start all food productions except for Terran MRE... and other Terran's factories are missing as well... or do I have to scan them like ships?

And I've setup both supplier and transporter for IDN, but little problem is, that they are both trying to transport BioGas into sanctuary, which is needed for BoFu meat in second factory (even though I didn't setup store for BioGas... only for BoFu), is there a way to tell them that this BioGast should be taken only by supplier and not transporter? -> or just setup two separate IDN where first will have Transporter with BoFu and sanctuary, and second will have all three stations with supplier only?

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

Post by Sirrobert » Wed, 10. May 17, 18:26

You don't need Terran food.
You build all weapons and missiles in your Sanctuary, with the foods you can make. The type is based on the type of missile, not the original manufacturing race.
9 out of 10 voices in my head say I'm crazy. The 10th is singing the music from Tetris

Angrybiscit
Posts: 44
Joined: Tue, 21. Jun 16, 17:23
x3ap

Post by Angrybiscit » Fri, 12. May 17, 17:24

I tried this mod out a while ago but it kept crashing on me and couldn't figure out what it was. Just got a new computer though, and I am very excited to reinstall this and give it another go!

The concepts and ideas in this are fantastic.

Thanks for all the work you have done on it!

Post Reply

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