[AP][MISSIONS]Mission briefing fix for stock missions, vanilla-friendly

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

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

[AP][MISSIONS]Mission briefing fix for stock missions, vanilla-friendly

Post by kurush » Tue, 1. May 12, 21:01

This is something I was looking for here and wasn't able to find. The image below should provide enough explanation:
Image
This change alters the text for several stock missions to provide more details about the mission objective.
  • Patrol mission - displays the enemy race (Xenon, Yaki, Pirates, and Terrans in war zone)
  • Return ship or return stolen ship - displays the ship type and sector
  • Station defense - displays the attacking race
  • Destroy convoy - displays the race of one of the convoy ships
  • Escort convoy - displays the race of attacking ships
  • Courier missions - displays the size of one ware in cargo units
  • Transport passengers - displays how much cargo is required to transport all passengers
  • Build station - displays the desired station coordinates in case the beacon has shifted
I was looking for a way to manage your reputation without constant reloads after taking a mission and came up with this fix.

Zip download that should be unzipped into X3 root folder for TC or "addon" folder for AP.
[ external image ]

I had to remove the SPK package link because for some reason Package Manager renames the text file to from 0003-L044.xml to 0003-L000.xml. If somebody knows how to fix that, please let me know.

If you find any meta tags or typos in descriptions for some missions, please let me know as well.

Updated strings are placed into 0003-L0044.xml. This file that is not present for TC and has just a couple of strings for AP. If you already have a mod installed that changes 0003 text file, it needs to be merged with the file provided in the package. Many thanks to cattafett for this idea.

Update 5/5
Added a change for destroy convoy missions to display the convoy race (or, rather, the race of the first ship from the convoy group).

Update 5/7
Added cargo size for courier missions and cargo requirement for transport passengers (thanks, dillpickle!). Also, added enemy race for Escort Convoy.

Update 5/11
Added ship sector for Return stolen/abandoned ship missions. This makes the image above slightly obsolete but I'm too lazy to replace it :)

Update 5/13
Return ship mission uses two different pages for some reason and I didn't change one of them to display the ship sector. Also, after reading another "How to build a station in Albion sectors" thread the universe forum I decided to add station coordinates for build station missions.
Last edited by kurush on Sat, 9. Jun 12, 08:42, edited 31 times in total.

User avatar
Litcube
Posts: 4254
Joined: Fri, 20. Oct 06, 19:02
xr

Post by Litcube » Wed, 2. May 12, 00:29

Dude, awesome!

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Wed, 2. May 12, 02:21

Wow, you just made Patrol and Defend Station missions worthwhile again.

Nice!

User avatar
Argonaught.
Posts: 1827
Joined: Wed, 6. Nov 02, 20:31
x4

Post by Argonaught. » Wed, 2. May 12, 03:52

Nicely fixed :)

Argo.
[MOD]X3TC No Fog / [MOD]X3AP No Fog / [MD]X3TC Menagerie Shipyard / [MD]X3AP Menagerie Shipyard
<==<<Argonaught>>==>

XBTF>XT>X2TT>X3R>X3TC>X3AP>X4F

I lurk alot for the most part now
:thumb_up:

palm911
Posts: 1130
Joined: Sun, 29. Jul 07, 22:52
x4

Post by palm911 » Wed, 2. May 12, 06:54

you rock kurush....

hey EGO!

Please Add this feature :)

devil is said to be in the details, and you kurush, made a pacifier for that devil.
X gamer , one at a time.

silenced
Posts: 4967
Joined: Tue, 20. Jun 06, 19:43
x4

Post by silenced » Wed, 2. May 12, 06:58

That's a nice one.
... what is a drop of rain, compared to the storm? ... what is a thought, compared to the mind? ... our unity is full of wonder which your tiny individualism cannot even conceive ... I've heard it all before ... you're saying nothing new ... I thought I saw a rainbow ... but I guess it wasn't true ... you cannot make me listen ... I cannot make you hear ... you find your way to heaven ... I'll meet you when you're there ...

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Wed, 2. May 12, 07:17

hey folks, thanks for kind words. You know what is the irony of this? We can say that Ego actually did include the feature, just forgot to include it in the translation files :lol:
Unfortunately, this fix will probably get broken with any patch that includes a new language file.

Vayde
Posts: 849
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde » Wed, 2. May 12, 15:19

Thanks for doing this kurush.
Still life in the old dog yet...

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Thu, 3. May 12, 02:39

kurush wrote:Unfortunately, this fix will probably get broken with any patch that includes a new language file.
Does that mean you made the changes directly to 0001 ?

If so, I suggest you check the documentation thread and select a new number, then copy your changes into a new test file using that number. Then all you need is a small setup script to load the text file into the game.

That way, updates to 0001 wont effect your changes, and it will be a very much smaller download file.

I'd suggest you include it in a cat/dat to be a false patch.

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Thu, 3. May 12, 04:12

apricotslice wrote:Does that mean you made the changes directly to 0001 ?

If so, I suggest you check the documentation thread and select a new number, then copy your changes into a new test file using that number. Then all you need is a small setup script to load the text file into the game.
How can I select a new number for stock missions? I thought they would use the same number regardless... Or can I load strings with the same numbers from a different file thus overriding what the 0001 file has?

Even if I can make it work through some scripting trickery, this will break vanilla-friendliness for sure, so two versions would be required. I'd rather write a script to extract the current version of the file and merge the changes really. Something I will probably do if another patch gets released or if somebody asks for TC support.

The main language file is actually the only file I changed and I only changed existing entries. I will likely need to spend some time in meld if Ego releases a new patch merging these changes.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 3. May 12, 04:54

kurush wrote:How can I select a new number for stock missions?
You use the same number; just in a different text file.

For example, create a new t file. Add page 353234. Add t id="1001", with your changes. Then add a small setup script to load the t file.

The game will then read your changed id="1001" (probably).

This is not "scripting trickery". It is how t files work. (However, a few things will not work this way, due to load order, so it requires testing to be certain that it will work for your mod).

Sorry, I do not know of a good tutorial -- the tutorials that I have seen all skip over something basic (and important). Even the MCSI Programmer's Handbook does not cover intentional conflicts. (See "XML Language Files", Section 5.2, bottom of page 27. Remember that the naming convention for t files has changed since the manual was written.).

You should be able to figure it out pretty quickly with the above and a look at a couple of examples. You already understand the basics, obviously.
this will break vanilla-friendliness for sure.


Haha! Well, sure, but you are the only guy on the planet who wants to modify his game without having it flagged as "modified". So you could think of the suggestion as a contribution to the community, even if you use the 0001 file for your personal game. :)

If the mod works with your own t file, then it would remove compatibility concerns.

(Note that you should register your t file and your intentional id conflicts on the Community Scripts Library page by making an entry in the Submission to the Community Library thread.)
Last edited by DrBullwinkle on Thu, 3. May 12, 04:58, edited 1 time in total.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Thu, 3. May 12, 04:57

kurush wrote:How can I select a new number for stock missions? I thought they would use the same number regardless... Or can I load strings with the same numbers from a different file thus overriding what the 0001 file has?
All text file numbers override 0001. As long as they are loaded into the game.
Even if I can make it work through some scripting trickery, this will break vanilla-friendliness for sure, so two versions would be required. I'd rather write a script to extract the current version of the file and merge the changes really. Something I will probably do if another patch gets released or if somebody asks for TC support.

The main language file is actually the only file I changed and I only changed existing entries. I will likely need to spend some time in meld if Ego releases a new patch merging these changes.
Ego changes 0001 in most patches. So the likelihood of the next AP patch changing 0001 is high. Even if the next one doesnt, the one after then probably would.

Changing 0001 is bad form. And unless you intend having a new version up hours after each patch is released, a practical nightmare to keep going. In any case, even if you release a new version after a patch, you will still get countless people asking why they lost all you did after the patch, because they didnt bother to redownload the new version. You can say stuff like that in huge red letters, and people will still either miss it or forget it. Thats why we use our own unique files. It avoids the "stupidity" of "some" people.

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Thu, 3. May 12, 04:58

DrBullwinkle wrote: Haha! Well, sure, but you are the only guy on the planet who wants to modify his game without having it flagged as "modified". So you could think of the suggestion as a contribution to the community, even if you use the 0001 file for your personal game. :)
That's what you (and some other people without medals :P ) think :) A lot of people use vanilla-friendly mods only, I used to be like this before as well. I'll think whether I create a patching script to repackage the file or may be add that initialization script. I think I understand the mechanics, just didn't think I can override the stock stuff.
Last edited by kurush on Thu, 3. May 12, 05:01, edited 1 time in total.

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Thu, 3. May 12, 05:00

DrBullwinkle wrote:For example, create a new t file. Add page 353234. Add t id="1001", with your changes. Then add a small setup script to load the t file.

The game will then read your changed id="1001" (probably).
Just dont use 1001.

The documentation sticky spells out the conventions, and the list shows the gaps where you can claim a number.

This is outlined in my Modding 101 guide.

User avatar
DrBullwinkle
Posts: 5715
Joined: Sat, 17. Dec 11, 01:44
x3tc

Post by DrBullwinkle » Thu, 3. May 12, 05:03

kurush wrote:A lot of people use vanilla-friendly mods only
True. However, until you came along, all vanilla-friendly mods made no change to the gameplay. You changed the formula. And, I submit, that you have only a few rare followers (who want to change the game without flagging it as "modified"). The majority of people with medals earned them without changing the way the game works.

That would include this awesome mod. It changes the way that the game works, so it *should* be flagged as "modified". That does not change the fact that the mod is awesome. :)

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Thu, 3. May 12, 05:25

DrBullwinkle wrote: True. However, until you came along, all vanilla-friendly mods made no change to the gameplay.
The most game changing mod for me was the enhanced hub, that one changes the way you build your economy drastically. Also, vanilla. This one is just a convenience to avoid reloads. Personally, I wouldn't pay for it by breaking my vanilla game. In any case, I'll see if I can find time to add that second vanilla-unfriendly version or may be a scripted patcher.

User avatar
TrixX
Posts: 2034
Joined: Wed, 18. Aug 10, 14:28
x3tc

Post by TrixX » Thu, 3. May 12, 05:50

:lol: medals :D

I could never play the vanilla game balance, it's just so damn slow. Hence I'll forever have a *modified* tag.

However this is actually a fix, so technically could be submitted to Ego for addition to a future patch...
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

palm911
Posts: 1130
Joined: Sun, 29. Jul 07, 22:52
x4

Post by palm911 » Thu, 3. May 12, 05:57

well i think people is free to use this or not. those files are not signed for a reason :)

i am with kurush on this one, it does not change the way the game is played.
X gamer , one at a time.

User avatar
TrixX
Posts: 2034
Joined: Wed, 18. Aug 10, 14:28
x3tc

Post by TrixX » Thu, 3. May 12, 06:55

palm911 wrote:i am with kurush on this one, it does not change the way the game is played.
It does though, it allows the ability to complete the missions instead of wandering around totally confused :lol:
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

kurush
Posts: 4320
Joined: Sun, 6. Nov 05, 23:53
x3tc

Post by kurush » Thu, 3. May 12, 07:07

TrixX wrote: It does though, it allows the ability to complete the missions instead of wandering around totally confused :lol:
And this could be game breaking for some vanilla purists :lol: You made a very good point before that it is essentially a fix that is better applied by Egosoft itself. They likely had some reason not to do it in the first place, probably to make the above mentioned vanilla-purists happy. Or, they just forgot because of poor communication between whoever writes MD and whoever provides the translation.
In any case, I actually like the idea of creating a separate file with changed entries only. This will help immensely to merge the changes if Egosoft ever manages to release a new patch for AP and also might work on TC.

Post Reply

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