[MD/SE] Dynamic Colored Sector Names v2.1b - 20 Jan 2011 [XTC Compatible]

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

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

[MD/SE] Dynamic Colored Sector Names v2.1b - 20 Jan 2011 [XTC Compatible]

Post by h2o.Ava » Mon, 20. Dec 10, 08:31

Deutsch Version

Colored Sector Names uses a Script and MD to change the color of every sector's name to coincide with its owner.

Universe Map - Sector names are colored according to Race:
[ external image ]

Sector Map - Gate names show the colors:
[ external image ]



Installing:
  • Ensure MD Control is installed and Thereshallbewings is activated.
  • Reinit Script cache, wait a few seconds until a subtitle stating this is installing appears.
  • Enjoy.


Version: 2.1b
[ external image ] - English
(zip)
(7z)
(spk)

[ external image ] - German
(zip)
(7z)
(spk)


:!: Requires: MD Control
:!: Requires: Colored Object Fix



Compatibility:
Compatible with XTC
Compatible with STO
Save game compatible.
:!: Not compatible with mods which add new sector names (let me know of any of these and I can add compatibility).



Known problems:
This problem should be fixed in X3TC v3.1
Scripts which use colored object names in messages will display as blank.
Unless you are using scripts which have implemented the Color Extraction Code when they use 'send message'/'send question'/'write to players logbook'. Contact those script creators and ask them to add this as a patch to their script or ask them to contact me and give me permission to do so on their behalf, I'll gladly make patches.


Developers:
If you want your mods to be compatible then add these lines to your code anytime you change the sector's owner.
  • $null = null
    START $null->call script 'plugin.dynamic.colored.sector.names' : sector=$sector
Last edited by h2o.Ava on Sat, 22. Jan 11, 00:31, edited 25 times in total.

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Mon, 20. Dec 10, 08:31

Change Log
  • v2.1 - SETA can be used, fixed STO compatibility, minor spelling fixes and visual improvements, added debug logging output

    v2 - descriptions are back, all known bugs fixed, code optimized

    v1.3 - Menu implementation: uninstall, update all, manual coloring.

    v1.2 - Fixes, completion time decreased, dynamic functionality removed

    v1.1 - XTM Compatibility

    v1.0 - Standalone complete, dynamic functionality is untested

    v0.9 - Initial beta release
Last edited by h2o.Ava on Wed, 19. Jan 11, 22:50, edited 5 times in total.

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Mon, 20. Dec 10, 08:32

To do:
  • Enable ETNO compatibility.





FYI:
This is the first full fledge example showing the power of MD Control.
The script engine does all the calculations and chooses the correct text.id.
It then sends variables to MD via MD Control's variable handler.
Last edited by h2o.Ava on Wed, 19. Jan 11, 05:08, edited 13 times in total.

blackwidow2ggst
Posts: 30
Joined: Fri, 9. Mar 07, 02:45

Post by blackwidow2ggst » Tue, 21. Dec 10, 02:49

Looks good but doesn't seem to work for me. When it says its installing and to wait 5 min it goes though each sector and names them something like "sector 05-06" without any added color. After about 10 min it finishes telling me MD has been installed. If I save and reload it just seems to do the process all over again but never tells me it has finished.


[ external image ]

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Tue, 21. Dec 10, 13:26

That occurs if your T file isn't there.
I'll check to make sure that I packed it correctly.


edit:
I forgot to upload the T file.
Incoming fix.

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Tue, 21. Dec 10, 13:38

While I really like the view itself - you know, that colored strings make problems in the player's log? Meaning messages including color-tags (\033 ones) are not displayed at all... I suggest to either test that or write a warning into the OP ;)

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Tue, 21. Dec 10, 13:55

Updated: V1.1
Now compatible with XTC


Thanks, I'll add a code snippet for scripters that needs to be added to any script which sends the sector name via messages.
Let me know of any in particular and I'll make temporary patches.

User avatar
Trickmov
Posts: 1431
Joined: Wed, 7. Nov 07, 19:48
x3tc

Post by Trickmov » Tue, 21. Dec 10, 14:00

The problem are the ES-messages... for instance the ship-killed-message. I don't know atm, if the sector is mentioned there, but that is the reason, that some colored-shipnames-scripts are not really recommandable.

However, for XTC this is no problem, as there is a custom warning (subtitle), which does not have that problem.

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Tue, 21. Dec 10, 14:08

You are correct, these will work in subtitles. However, messages and logbook entries will blank unless the string patterns are replaced.

confusion
Posts: 9
Joined: Fri, 16. Jul 10, 19:18
x3tc

Post by confusion » Wed, 22. Dec 10, 15:15

er...I installed this script and it seems to work well, but the first letter of the name of the sector remains uncolored and the second line of a sector's name is also white. Is this intended?

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Wed, 22. Dec 10, 16:06

Intentional and Hardcoded:
The first letter is uncolored so that you can search for sectors by pressing the first letter of its name when you are on the Universe map.

The second line turning that greyish white when it is near the edge of the screen is hardcoded, nothing can be done about it. :(

masskaos
Posts: 14
Joined: Sat, 20. Feb 10, 21:01
x3tc

Not the sharpest at installing scripts

Post by masskaos » Thu, 23. Dec 10, 03:05

Hello,
after installing (correctly is quite debatable) I waited for the appropriate signals. Then saved and reloaded game. I now get the following message-

mdc-se your mdc.array(9,0,0,0,0,0) did not reset the ships

and of course no colored sectors :(

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Thu, 23. Dec 10, 04:13

That is very odd.
You shouldn't be seeing that message since it loaded and ran.
A new version will be out soon.
Please stand by.

Also: the first letter is uncolored so that if there is a mission in that sector then the first letter will turn Orange-ish.

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Thu, 23. Dec 10, 04:54

Update 1.2
Minor fixes

It now runs faster, however still give yourself 5 minutes of real time to let it load every sector, especially if you are running it on XTC.

Dynamic Coloring is no longer an option, SE will not allow the special character that MD creates "←" in the name to make it colored.
In a future update I'll create a menu system where you can manually change the colors for you own sectors or other sectors.

The next update will color the Pirate sectors and fix the lone Kha'ak sector uncolored bug.

edit:
Since I figured out how to extract the colors, we're back in business with dynamic color changing. Next update will have those bug fixes and a better/easier dynamic system which STO and other's and use.

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Thu, 23. Dec 10, 23:51

Hi h2o.Ava, i tried yr script on x3 TC 3.0 XTC (with the director XTC) and so far it doesnt seem to give Terran and Aldrin their respective colours
(they are totally seperate races in XTC and therefore need seperate colours). Can you pls take a look when you have the time..

thnks,


qwizzie

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Thu, 23. Dec 10, 23:55

Gladly.

I was going to add give pirates their own color, however since only one color is remaining..
I haven't played XTC much, are pirates important or can they remain the same color as an unknown sector?

masskaos
Posts: 14
Joined: Sat, 20. Feb 10, 21:01
x3tc

Post by masskaos » Fri, 24. Dec 10, 00:50

h2o.AvA wrote:That is very odd.
You shouldn't be seeing that message since it loaded and ran.
A new version will be out soon.
Please stand by.

Also: the first letter is uncolored so that if there is a mission in that sector then the first letter will turn Orange-ish.
Hello, same issue with new version. I turned off all my ~30ish other mods and scripts and the error went away. Now which one is the trouble maker??? I will try to narrow this down as I get some free time. Christmas crunch and all :D

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Fri, 24. Dec 10, 01:01

The script runs MD and MD tells the script to reset.
Something MD related is preventing MD from running or something happened in MD Control sector.

Use cycrow's cheats and reveal every sector.
Then warp yourself to MD Control by hitting "M" until MD Control's name appears in the description box.
You should see 10 stations and 6 ships.

masskaos
Posts: 14
Joined: Sat, 20. Feb 10, 21:01
x3tc

Post by masskaos » Fri, 24. Dec 10, 01:49

h2o.AvA wrote:The script runs MD and MD tells the script to reset.
Something MD related is preventing MD from running or something happened in MD Control sector.

Use cycrow's cheats and reveal every sector.
Then warp yourself to MD Control by hitting "M" until MD Control's name appears in the description box.
You should see 10 stations and 6 ships.
Ok, removed script, Rename ships with Expression 1.7, and the mdc.array() error went away (progress :) ) but still no colored map.

I did notice a MD Control where Kingdom End should be on the map-
and yes there are 10 stations numbered 0 thur 9 and 6 ships numbered 0 thur 5. Is this correct? Sector's race is unknown

h2o.Ava
Posts: 317
Joined: Sun, 12. Oct 08, 04:04
x3tc

Post by h2o.Ava » Fri, 24. Dec 10, 02:18

Do you have a sector above Neptune at coordinate [0,9]?
Did you install XTC's director file instead of Vanilla's?

XTC places MD Control at [0,0], same coords as Kingdoms End. Also, if you have a sector above Neptune then MD Control gets placed at [0,0]

Post Reply

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