[MOD][AP][TC] True Relations v1.2.1 | | Updated 19/12/23

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
FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

[MOD][AP][TC] True Relations v1.2.1 | | Updated 19/12/23

Post by FriendlyFirePhoenix » Wed, 29. Mar 23, 17:14

https://user-images.githubusercontent.c ... bf1179.jpg
True Relations

True relations does two things.
  • Dynamically changes notoriety with each race in response to notoriety changes with allies and enemies of that race.
  • Fixes IFF settings for stations and their owned ships across the galaxy.
It started off as a port of the "True Relations" features of Improved Races 2 by Jack08. Hence the name. At this point there's no code left from IR2 - it does a little bit more and is a lot more CPU friendly.

I don't expect this to be too popular considering it's 2023 and judging by the level of whinging about the dynamic relations system in Farnham's Legend. But hey, you never know. Let me know if you find a bug - although this is a relatively simple mod so I don't expect many problems.

Installation

Download the latest release at the Github repo. More detailed instructions can be found in the readme.

True Relations @ Github

Dynamic Relations

With every cycle the plugin will check how notoriety has changed between you and the X3 races. For every race you've gained notoriety with you'll gain notoriety with their allies and lose notoriety with their enemies. These cycles are randomised to occur 20% of the time by default. With default settings they should occur about every 15 minutes on average. You can change the 20% value in the t file.

The plugin will notify what notoriety you've lost or gained as a result of dynamic relations and also inform you if you've gained or dropped a race rank.

The notoriety effect is calculated as a fraction of the original notoriety change via the following formula.

Code: Select all

notoriety-effect = notoriety-gain x (fight-rank + trade-rank - 1) / 100
The effect increases the higher your trade rank and fight rank. It's always possible to become friends with every race.

The ratio of 100 can be changed in the t file.

IFF Fixer

When the plugin is first activated it scans every AI station in the galaxy and sets its IFF settings according to the race's relations to one another and to you. It does the same for any ships owned by the station.

From there the plugin will cycle every 3 minutes by default. With each cycle it will select a random sector in the galaxy and check the stations in that sector. The plugin knows which sectors it has already scanned so you can be sure it will scan every sector eventually. Upon completion it will begin running through the universe again. Because it only scans one sector at a time it has little CPU impact.

The IFF Fixer is particularly useful for two situations:
  • Pesky hostile stations which won't turn friendly even though you've raised your notoriety with the relevant race.
  • Using a mod like Terran Conflict Plots for Albion Prelude which deactivates the Albion Prelude Terran-Commonwealth war. This plugin fixes stations that stay hostile as if the war hadn't been deactivated.
Compatibility
  • AP - Yes.
  • TC - Yes
  • Farnham's Legend - Clashes with FL's own dynamic relations functionality.
  • XRM - Yes
  • Litcube's universe - I've never played it, so I'm not sure. Try it and let me know!
Changelog

I post changes in this thread, view the changelog in the readme.
Last edited by FriendlyFirePhoenix on Tue, 19. Dec 23, 07:30, edited 7 times in total.
I made a couple of X3 mods | Colour By Race | True Relations

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD] [AP] True Relations v1.1

Post by FriendlyFirePhoenix » Thu, 1. Jun 23, 18:59

Updated True Relations - Version 1.1
  • Added German, French, Italian, Czecha and Polish translations.
  • Updated lib scripts in line with Colour By Race.
I made a couple of X3 mods | Colour By Race | True Relations

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD] [AP] True Relations v1.1

Post by FriendlyFirePhoenix » Fri, 1. Dec 23, 05:39

Updated True Relations - Version 1.2
  • Separated True Relations & Colour By Race into separate t files. True Relations now uses 9963. Previously it used 9964. Colour By Race uses 9964 and 9965.
  • Moved some constants hardcoded in script files into t file. This makes them more easily editable.
    • Ratio of dynamic reputation change.
    • Timer interval.
    • Chance of notoriety check.
  • Improved informational messages and debug logging.
    • Plugin will now inform you when your race title changes.
    • Plugin uses game tips where appropriate.
  • Added snipped to prevent True Relations being available in FL.
I made a couple of X3 mods | Colour By Race | True Relations

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD] [AP] [TC] True Relations v1.2

Post by FriendlyFirePhoenix » Fri, 1. Dec 23, 14:11

Hmmm can't quite parse out what you're asking exactly. Could you please rephrase?
I made a couple of X3 mods | Colour By Race | True Relations

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] [AP] [TC] True Relations v1.2

Post by alexalsp » Fri, 1. Dec 23, 14:44

Understood it myself that I need to sleep more ))
But there are other points, if you don't mind.

Code: Select all

\033RLost\033X %s %s notoriety as effect of %s %s notoriety gain.
\033BGained\033X %s %s notoriety as effect of %s %s notoriety gain.
\033GTrue Relations\033X fixing IFF across galaxy...checked %s stations and %s owned ships.
The %s have \033Rdemoted\033X you to "%s" from anger at your %s notoriety gain.
The %s have \033Bpromoted\033X you to "%s" in accordance with your %s notoriety gain.
Could you give the full texts of these lines to see what is substituted instead of

Code: Select all

%s
It's hard to translate without seeing the whole text.

Thank you.

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD] [AP] [TC] True Relations v1.2

Post by FriendlyFirePhoenix » Mon, 4. Dec 23, 16:58

Ah now I understand. Here's some typical examples of usage of those sentences.

Code: Select all

\033RLost\033X 100 Argon notoriety as effect of 1000 Paranid notoriety gain.
\033BGained\033X 10 Boron notoriety as effect of 101 Argon notoriety gain.
\033GTrue Relations\033X fixing IFF across galaxy...checked 100 stations and 150 owned ships.
The Argon have \033Rdemoted\033X you to "Federation Associate" from anger at your Yaki notoriety gain.
The Boron have \033Bpromoted\033X you to "Queens Knight" in accordance with your Argon notoriety gain.
Note that I have included some translations. If you want to suggest some edits then can you please send a pull request in Github?
I made a couple of X3 mods | Colour By Race | True Relations

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD] [AP] [TC] True Relations v1.2

Post by alexalsp » Mon, 4. Dec 23, 19:10

9963-L007.xml

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<language id="7">
    <!-- Russian -->
    <page id="9963" title="True Relations" desc="" voice="no">
<!-- Dynamic notoriety change = gain * (tradeSkill + fightSkill + 1) / ratio. Defaults to 100. -->
        <t id="1">100(ratio)</t>
<!-- Timer interval for wait between check for notoriety changes and IFF for sectors. Defaults to 180 seconds. -->
        <t id="2">180(seconds)</t>
<!-- Chance of dynamic notoriety check is randomised. The check occurs on each timer interval (every 180 seconds by default). Defaults to 20 percent which means a check every 15 minutes on average. -->
        <t id="3">20(percent)</t>
<!-- True Relations Strings  -->
        <t id="10">\033GTrue Relations\033X</t>
        <t id="100">44</t>
        <t id="101">(blank placeholder)</t>
        <t id="1000">\033GTrue Relations\033X by FriendlyFirePhoenix. v%s</t>
        <t id="1001">[author]{9963,10}[/author]\n[title]{9963,10} отключен[/title]\n\nГлобальная переменная удалена.\n\nДля полного удаления всех следов {9963,10} выполните следующие действия:\n1: Сохраните игру.\n2: Удалите файлы плагина из каталога X3.\n3: Загрузите свое сохранение.</t>
        <t id="1002">[author]{9963,10}[/author]\n[title]{9963,10} установлен[/title]\n\n{9963,10} будет постоянно вносить динамические изменения в репутацию вслед за обычными изменениями репутации. Вы можете изменить коэффициент динамических изменений к оригинальным значениям \033G\\X3\\{9963,101}\\t\\9963-L0{9963,100}.xml\033X.\n\nПри активации плагин исправил IFF для станций и принадлежащих им кораблей во всей галактике. С этого момента {9963,10} будет регулярно выбирать случайный сектор для исправления IFF, постепенно проходя через всю галактику.\n\nЕсли вы хотите быстро исправить IFF во всей галактике, вы можете деактивировать и снова активировать плагин.</t>
        <t id="1003">Инициализация \033GTrue Relations\033X. Это займет некоторое время...</t>
        <t id="1004">\033GTrue Relations\033X установлен.</t>
        <t id="1005">\033GTrue Relations\033X деактивирован.</t>
        <t id="1006">\033GTrue Relations\033X обновлен до версии %s.</t>
        <t id="1010">\033RПотеряно\033X %s %s репутации в результате приобретения %s %s репутации.</t>
        <t id="1011">\033BПолучил\033X %s %s репутации в результате получения %s %s репутации.</t>
        <t id="1012">\033GTrue Relations\033X исправление IFF в галактике... проверено %s станций и %s принадлежащим им кораблей.</t>
        <t id="1015">%s \033Rпонизили\033X вас до "%s" из-за получения репутации у %s.</t>
        <t id="1016">%s \033Bповысили\033X вас до "%s" за получение репутации у %s.</t>
    </page>
    <page id="389963" title="True Relations" desc="" voice="no">
        <t id="101">addon</t>
    </page>
</language>

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD][AP][TC] True Relations v1.2

Post by FriendlyFirePhoenix » Thu, 7. Dec 23, 11:11

Thanks! I didn't even know you could have Russian in this game. I'll add your translations. Any other languages I've missed?

Honestly I'm surprised you did a translation for this, but not Colour By Race - it seems to be much more popular than True Relations.
I made a couple of X3 mods | Colour By Race | True Relations

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: [MOD][AP][TC] True Relations v1.2

Post by alexalsp » Thu, 7. Dec 23, 21:24

FriendlyFirePhoenix wrote:
Thu, 7. Dec 23, 11:11
Any other languages I've missed?
https://store.steampowered.com/app/2820 ... _Conflict/
https://store.steampowered.com/app/2013 ... n_Prelude/

Russian
English
French
German
Italian
Polish
Chinese
Chinese (tr.)
Czech
Spanish
Japanese

https://store.steampowered.com/app/4833 ... ms_Legacy/

Russian
English
German
Spanish
Japanese

FriendlyFirePhoenix
Posts: 90
Joined: Tue, 14. Feb 17, 10:06
x3ap

Re: [MOD][AP][TC] True Relations v1.2.1 | | Updated 19/12/23

Post by FriendlyFirePhoenix » Tue, 19. Dec 23, 07:31

Updated True Relations - Version 1.2.1
  • Added Russian translation provided by Alexalsp.
  • Added Japanese translation.
I made a couple of X3 mods | Colour By Race | True Relations

Post Reply

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