[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
Fureimuu
Posts: 398
Joined: Sun, 2. Feb 14, 09:27
x3ap

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Fureimuu » Mon, 23. Mar 20, 19:08

Interesting stuff, can't wait to test it out. So ships will no longer be protected by X amount of marines?

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Mon, 23. Mar 20, 19:40

No enemy marines inside. You take risks. Two injuries, you die. If you don't want to take risks, you don't die :)

User avatar
Edna
Posts: 195
Joined: Mon, 14. Oct 13, 21:18
x4

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Edna » Tue, 24. Mar 20, 01:00

Joubarbe, just between you and me, have you recently been exposed to Stargate? Because your marines concept describes one third of the show's episodes. The other two thirds are walking through suspiciously similar looking forests. :D
Image

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Tue, 24. Mar 20, 02:18

I've seen the movie... in 1994. But that's about it :)

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Hector0x » Tue, 24. Mar 20, 07:06

Joubarbe wrote:
Mon, 23. Mar 20, 18:45
every ship requires 1 population.
Like it very much (+your new marine concept ofc).
With this and the new scan mechanic i'm hopeful to cure my fighter-addiction. :D

Also gives you another balancing handle.
Which makes me recommend adding an inverse exponential function to population growth. Slow it down more and more before it reaches the maximum.

This makes those last 20 people more valuable without nerfing early game production speed.

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Tue, 24. Mar 20, 09:29

Image

I was going to continue working on my marines, but thanks to Hector0x, I have now implemented this feature. Plus, people are now growing slower when you reach 50% of max. people, then even slower at 75%. Now the game is harder, and I'm not responsible for it!

(events triggering in low-people Outposts was silly anyway)

User avatar
Edna
Posts: 195
Joined: Mon, 14. Oct 13, 21:18
x4

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Edna » Tue, 24. Mar 20, 10:51

As SS13 player, I don't think people will have a happy life on those stations. :D
Image

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Tue, 24. Mar 20, 11:19

Yeah, being quarantined + threatened by OCV is probably not fun. I wouldn't like to see a V above my apartment.
I never played SS13, but I'm happy they're making a sequel to Startopia.
Last edited by Joubarbe on Wed, 25. Mar 20, 17:44, edited 1 time in total.

User avatar
Edna
Posts: 195
Joined: Mon, 14. Oct 13, 21:18
x4

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Edna » Tue, 24. Mar 20, 11:31

Yeah, I'm waiting for that one. Have the original in my Steam library, played it frequently as a child. What are the chances of a Arona Daal or Memaus having a cameo in Mayhem 3? :D
Image

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Wed, 25. Mar 20, 11:48

About Localization

While I'm currently using a lot of maps in my code, I feel the need to explain why I don't externalize all the strings that Mayhem contains, and therefore why it will be a difficult task to localize the mod.

In MSCI — the scripting language of X3 —, the syntax is very verbose. Let's take an example: if I want to pass a value from an array to a function in most languages, I do something like that:

Code: Select all

myFunction(array[index])
In MSCI, however, functions are written in plain English, so we could imagine that the following is possible:

Code: Select all

my function that does something: array[index]
But it's not. Instead you need an intermediate line (and a dollar sign as prefix for every variable):

Code: Select all

$value = $array[$index]
my function that does something: $value
And sometimes, you need three or four of these intermediate lines, because you cannot do more than one thing in one line. That's especially true when it comes to strings.

Code: Select all

$value = $array[$index]
$result = my function that does something: $value
$message = 'Basic message showing some data: ' + $result + '.'
$timeout = function to get a default timeout
display subtitle: message=$message timeout=$timeout
Again, in most languages, you'd have:

Code: Select all

displaySubtitle('Basic message showing some data: ' + function(array[index]) + '.', timeout())
When you want to properly make a project translatable, you need to call a function that will look inside an external file and make stuff like adding hardcoded values to the final string. If we take the previous example, that would give something like that:

Code: Select all

displaySubtitle(localize(textID, function(array[index]), timeout())
Where every value that needs to be passed to the localized string is added as parameters into the localize() function. Here, "textID" would be an ID stored in an external file, like JSON allows it (it wouldn't be a number).

Mayhem includes a modified version of the cheat package written by Cycrow a while ago. Because Cycrow was an official developer, he made things the right way and has a t-file in which every string is stored. His code looks like that:

Code: Select all

$text = read text: page=$Page.ID id=3
$text = sprintf: fmt='%s (%s)', $text, $target, null, null, null
add custom menu heading to array $menu: title=$text
add custom menu item to array $menu: page=$Page.ID id=200 returnvalue='wares'
add custom menu item to array $menu: page=$Page.ID id=216 returnvalue='remwares'
You see the sprintf, limited to 5 arguments? That's how you transform a string like "You have %s credits in your station %s in sector %s" into a proper message that will be displayed to the player, every %s being replaced by the value of the variables passed in the sprintf function (which is a commonly used function in several languages). And if you need more than 5 arguments, you need to add an extra line.

I see two problems: 1/ As you've probably understood now, writing multiple lines to localize a message is a nightmare. 2/ Readability: to be acceptable, the code would have to reference an internal string to an external ID, otherwise you never know what text is associated with what ID. Because the only way to get a data from an external file in MSCI is through a number, it would take another call (hence another line) each time I'd want to display a localized message. In other language, you don't do that, you don't use a number as textID, but something that speaks to the developer (for instance, "mission01.description", or "mission01.headline"). There are other ways, I could have a table of all text ids, and always refer to it, but 1/ It would lengthen the code even more. 2/ I don't want to do it, because this mod is not a professional project and I don't feel the need to do things in a way I don't want to do them.

That being said, it is still possible to localize Mayhem. Some long messages, such as incoming transmissions, are stored in addon\t\9972 (and other files for LU) and can be easily localizable. But for the rest, the localization would require the use of X-Studio and the courage to dig into every script and not messing everything up by translating some texts that shouldn't be because of technical reasons. It requires patience, but it's doable.

TLDR: Learn English :)
Last edited by Joubarbe on Wed, 25. Mar 20, 17:38, edited 1 time in total.

Fureimuu
Posts: 398
Joined: Sun, 2. Feb 14, 09:27
x3ap

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Fureimuu » Wed, 25. Mar 20, 12:45

Good incentive to learn english, come on its easy!

darkzaion
Posts: 44
Joined: Tue, 10. May 05, 21:04
x2

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by darkzaion » Wed, 25. Mar 20, 14:46

how do i repair sanctuary?

i order my marines to do it but they just fly around... :(

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Wed, 25. Mar 20, 17:42

darkzaion wrote:
Wed, 25. Mar 20, 14:46
how do i repair sanctuary?

i order my marines to do it but they just fly around... :(
Probably a collision bug. Sometimes they find the exact vertex to be close enough to the station to start lasering it. You can probably abandon the idea of repairing your Sanctuary. FYI, in Mayhem 3, stations repair themselves overtime. The whole marine repair thing is removed.

darkzaion
Posts: 44
Joined: Tue, 10. May 05, 21:04
x2

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by darkzaion » Wed, 25. Mar 20, 18:56

Joubarbe wrote:
Wed, 25. Mar 20, 17:42
darkzaion wrote:
Wed, 25. Mar 20, 14:46
how do i repair sanctuary?

i order my marines to do it but they just fly around... :(
Probably a collision bug. Sometimes they find the exact vertex to be close enough to the station to start lasering it. You can probably abandon the idea of repairing your Sanctuary. FYI, in Mayhem 3, stations repair themselves overtime. The whole marine repair thing is removed.
Thank you for the quick reply, really excited about Mayhem 3!

Thank you for developing these mods.

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Sat, 28. Mar 20, 12:01

Image

Start from scratch. You ask, I deliver.
It has a big red warning in the galaxy generator, because that's not how Mayhem is supposed to be played (of course it works fine, and I've made sure that Battle Groups can invade sectors from beginning, instead of waiting for player progress).

Fureimuu
Posts: 398
Joined: Sun, 2. Feb 14, 09:27
x3ap

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Fureimuu » Sat, 28. Mar 20, 12:10

We stellaris now boys!

mmorpgeek
Posts: 10
Joined: Fri, 2. Nov 12, 09:53
x4

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by mmorpgeek » Sat, 28. Mar 20, 14:13

I have two quick questions about satellite monitoring.

1 - What is
  • Send the reaper
  • Send the reaper at home after collecting option (which defaults to Yes).
When I choose Send the Reaper and click on a sector the error message Quickshuttle reaper: No Shuttle set . What does it means ?

2 - When i click on a sector, the map sector is opened but it is impossible to display the properties of the abandoned ship. If i click on the ship it brings me back to the previous menu with list of sectors. So If I want to know the name of the abandoned ship I have to leave the satellite menu and go to the default map sectors where I can display the properties of the abandoned ship ( Info ). Is there any way to see Info abandonned Ships starting satellite monitoring ?

ps :My English is not very good and if a French Guy could mp an explanation in French would be perfect :roll:
Last edited by mmorpgeek on Sat, 28. Mar 20, 15:14, edited 1 time in total.

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

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by Joubarbe » Sat, 28. Mar 20, 15:14

I am French, and because I'm nice, I'm going to answer in English.

1/ Quickshuttles.
2/ Not possible. Quick view only. Hardcoded limitations.

mmorpgeek
Posts: 10
Joined: Fri, 2. Nov 12, 09:53
x4

Re: [X3LU] Mayhem 3 "Playground" Alpha & Mayhem 2.9.13

Post by mmorpgeek » Sat, 28. Mar 20, 15:15

Thanks ;)


Post Reply

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