[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: 3955
Joined: Mon, 7. Nov 05, 00:53

[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.
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: 4238
Joined: Fri, 20. Oct 06, 19:02

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

Dude, awesome!

User avatar
DrBullwinkle
Posts: 5704
Joined: Sat, 17. Dec 11, 02:44

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: 1618
Joined: Wed, 6. Nov 02, 21:31

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

I lurk alot for the most part now
:thumb_up:

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

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: 2000
Joined: Tue, 20. Jun 06, 19:43

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 ...

< Ich werde ab sofort auf eine korrekte Deutsche Rechtschreibung achten ! =) >

kurush
Posts: 3955
Joined: Mon, 7. Nov 05, 00:53

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.

User avatar
Vayde
Posts: 843
Joined: Fri, 6. Feb 04, 22:02

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: 13630
Joined: Sun, 16. May 04, 13:01

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: 3955
Joined: Mon, 7. Nov 05, 00:53

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: 5704
Joined: Sat, 17. Dec 11, 02:44

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: 13630
Joined: Sun, 16. May 04, 13:01

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: 3955
Joined: Mon, 7. Nov 05, 00:53

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: 13630
Joined: Sun, 16. May 04, 13:01

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: 5704
Joined: Sat, 17. Dec 11, 02:44

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. :)

Post Reply

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