[SCR] [11.11.08] [X3TC V1.1] SNM - Ship/Station Names Managment

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

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

[SCR] [11.11.08] [X3TC V1.1] SNM - Ship/Station Names Managment

Post by UniTrader » Tue, 11. Nov 08, 12:40

Here is my Script for colored Ship Names, this Script works fine but Bugs are possible, so make Backups of your Savegames.
The Script itself is ready but the Readme is not finished yet, i have only rewritten the Important parts of the Readme of this Script from Reunion...

Here is the Temporary Readme to explain the function of this Script:

Function:
The SNM is an extension to make the management of ships and stations easier by coloured names.

What it does
All player owned ships and stations where checked of token in there names. These token where replaced by the accordant announced text.

The routine works periodically every minute (can be changed in the t-file ;) page id 8641, text id 1 is the time between two runs in seconds for all scripters here ;))

If anybody wants the routine can be shut down in the AL-Plugin-menu.
Planned for next Version: All colours in station-names and ship-names will be removed (if there are no changes at the names by reactivation, all colours would be set like before)

In addition there is a new Hotkey which is for Mass renaming or Renaming of the Targeted Ship (or to make the Name of an non-player-object colored ;))


To dye a word or text you only have to write a token at the beginning:

/gry for grey
/blu for blue
/cya for Cyan
/grn for green
/mag for magenta
/red for red
/whi for white
/yel for yellow
/bck for black
/nor to come back to normal text colour.


With the following token mutated vowels and special signs could be created (NOT UPDATED FOR TC; the updated Readme will follow soon.. there are too many new Characters that have to be sorted..)

Mutated vowels:
/:a for ä
/:A for Ä
/:o for ö
/:O for Ö
/:u for ü
/:U for Ü
/sz for ß

Special signs:
/sbo for [
/sbc for ]
/cbo for {
/cbc for }
/til for ~
/vl for |
/ex2 for ²
/ex3 for ³
/at for @
/cir for °
/reg for ®
/+- for ±
/par for §
/cs for ø

Greek letters:
/alpha for α
/beta for β
/gamma for γ
/delta for δ
/epsilon for ε
/zeta for ζ
/eta for η
/theta for θ
/lota for ι
/kappa for κ
/lambda for λ
/mu for μ
/nu for ν
/xi for ξ
/omicron for ο
/pi for π
/rho for ρ
/sigma_e for ς
/sigma for σ
/tau for τ
/upsilon for υ
/phi for φ
/chi for χ
/psi for ψ
/omega for ω

French letters:
/*a for à
/^a for â
/'a for á
/*e for è
/^e for ê
/'e for é
/*o for ò
/^o for ô
/'o for ó
/*u for ù
/^u for û
/'u for ú
/,c for ç
/,C for Ç
/oe for œ
/:i for ï
/:e for ë

Moreover there are flexible strings, which were automatically updated:

/hbn adopt the name of homebase (only ships with homebase)
/hbs adopt the sector of homebase (only ships with homebase)
/lvlt adopt the current Trade Rank of the Pilot
/lvlf adopt the current Fight Rank of the Pilot
/typ adopt the type of ship/station

example:

/blu/alpha /red/hbn /yelMamba /redAttacker /norexample (homebase is “Headquarter”)
α Headquarter Mamba Attacker example


There is one more feature added: Decimal numbers can be shown in followed display form:
/numI<Number> for roman number (major implemented sign is M, is equivalent to 1000)
/numa<Number> for small letters (as yet only till 26 assisted)
/numA<Number> for big letters (as yet only till 26 assisted)
/numg<Number> for small greek letters (as yet only till 24 assisted)
/numG<Number> for big greek letters (as yet only till 24 assisted)
/num#<base>#<Number> for numbers in other systems, for example binary (base 2), Octal (base 8), Hex (base 16) (assisted till base of 109 and <number> < 2.000.000.000 / <base>). The standard length for this Number is 2 Signs.

Notes:
- It isn’t advisable to use only red names (and at stations blue too) . So you can’t see if there were attacked (or needs resources).

- Colour-tags are two invisible signs in the name-string, at this position the cursor act up while renaming, so don’t be amazed.


Adding own shortcuts:
Planned for Next Version of the Readme

Installation:
Extract the archive into your X³-folder (t-files into the t-folder and script-files into the scripts-folder) The SE is necessary (activation: rename yourself into “Thereshallbewings”). (Lucike posted possibilities to install scripts without activated SE)

Update former versions:
* No former versions for TC

Downloadlink & Important Note:
Make Backups of your Savegames. This Script is not guarateed to be Bug-Free and it makes your Savegame ***modified***
Last edited by UniTrader on Wed, 12. Nov 08, 15:19, edited 1 time in total.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 11. Nov 08, 13:20

everyboby who downloaded this Script until now please re-download it.. there was a small mistake in the t-files...
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Tue, 11. Nov 08, 14:19

Wooohooo! Its finally here!


Thanks!


joelR

Happyblue
Posts: 163
Joined: Sun, 14. Mar 04, 05:15
x4

Post by Happyblue » Tue, 11. Nov 08, 18:00

Clunky, buggy and not intuitive at all. I aplaude the effort man, I'll try it again when you have it polished.

Someone please remake ACC

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 11. Nov 08, 18:11

ok, then please tell me what i can do better... perhaps i have no real feeling for what is good for mass renaming because i have only 1 Ship :roll: i have released this because i wanted some user Input, not because it was 1000% finished... :roll:
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Tue, 11. Nov 08, 20:24

http://www.asser.net/ship.jpg

As you can see there, when i run through the menu commands, it renames the ship with the Readtext names in the selected color's i did.

Useing dvd version with 1.2.1 patch.

It could be doing that because after i do the options i want to, i hit the escape key. I did not see a exit or finish option at any menu (unless i went to a option about homebase and then when i did that, i useally got a blank name for anything)

Happyblue
Posts: 163
Joined: Sun, 14. Mar 04, 05:15
x4

Post by Happyblue » Tue, 11. Nov 08, 20:53

I installed as instructed and had the same problems. Maybe it was your interface but I could not make it work and I tried like the dickens.

I think many people are looking for a script that will rename homebased ships in the following manner. Name of homebase, name of ship, number

IE Homebase is your carrier named "Elephant" it has 3 busters and 1 Nova as homebased fighters. The should be renamed:

Elephant Buster 01
Elephant Buster 02
Elephant Buster 03
Elephant Nova 01

Anything that would simplify the renaming process would be greatly appreciated. I currently run with a panther, 2 carriers and a TP all loaded with fighters as well as several stations with ships and a weapon platform that has docked fighters. When they lose ships it is a nightmare to figure out which base lost what ship unless they are renamed to show where they came from.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Tue, 11. Nov 08, 21:24

that was the String for the /fnum-function, wich has now another number :S i thougt i had tested it yesterday before i packed the Files.. :S

And the Finish-Button ended up in the Wrong Menu somhow.. it was planned in the menu for the Color Selection for the second Name Block... :S

I know this could be tested better before the Release but it is not good when only i am testing my own things because own mistakes are overlooked easily and i think something is self-explanatory even when it is difficult made.. but when i ask in the Forum for Testers i get only one or two replies, not more and this is not enough for some serious tests... so i have to release it tested only by myself when i want something to be released...




Memo to me: ask only for the Number Format when a Number Option is chosen...


PS temporary Workaround when you need the Function: add this Line to the t-file:

Code: Select all

 <t id="21">/fnum</t>
a fixed Version will be uploaded tommorrow..
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Tue, 11. Nov 08, 21:45

For me the style i like is

Class Name Number Homebase

Witch each one being a differnt color of course ;)
M3 being able to be one color, M4 a differnt color and so forth.

Menu with it are fine so far. When i will be able to rename ships with it, ill play around with it more.

Would it be posible to have a check on renameing on ships already renamed with CAG, CLS, EST ?

User avatar
joelR
Posts: 2008
Joined: Mon, 9. Jul 07, 23:33
x3tc

Post by joelR » Wed, 12. Nov 08, 00:19

Happyblue wrote:Clunky, buggy and not intuitive at all. I aplaude the effort man, I'll try it again when you have it polished.

Someone please remake ACC
Well welcome to the X3 user interface. What about it isnt clunky and unintuitive? Show me your ship naming script!

Anyhow great work UniTrader. This was an X3R must have for me. Really makes ship and station management far more enjoyable and "intuitive." Bugs can be fixed. Thanks for doing that. I look forward to future versions.

amirite
Posts: 243
Joined: Thu, 23. Oct 08, 22:01

Post by amirite » Wed, 12. Nov 08, 09:57

This is cool, definitely a good start, however I have to agree with HappyBlue that clunky and unintuitive describe this pretty well. It's actually MORE work to rename my ships now, and having tons of text commands to have to remember is quite annoying. As you said however it's not even finished yet so I look forward to seeing more. I hope you don't plan on using this same approach as you develop it though?
-TEVE

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Wed, 12. Nov 08, 10:01

You do know that you can set up a hotkey to use it and not have to use the / commands, right?
Although its broken right now and will be fixed later on today.

I renamed about 40 ships in around 10 seconds. /shrug

smbh
Posts: 129
Joined: Wed, 10. Jan 07, 06:22

Post by smbh » Wed, 12. Nov 08, 10:10

asser69 wrote:http://www.asser.net/ship.jpg

As you can see there, when i run through the menu commands, it renames the ship with the Readtext names in the selected color's i did.

Useing dvd version with 1.2.1 patch.

It could be doing that because after i do the options i want to, i hit the escape key. I did not see a exit or finish option at any menu (unless i went to a option about homebase and then when i did that, i useally got a blank name for anything)
Sorry for the offtopic (nice script btw, hotkey assignment will be awesome) - in your screenshot, were did you get the Automatic Target Aquisition ?

(----____JEFF____----)
Posts: 269
Joined: Sat, 20. May 06, 14:55
x3tc

Post by (----____JEFF____----) » Wed, 12. Nov 08, 10:22

Maybe it's a good idea to incorporate some sort of template system, that way you set up a naming scheme (or multiple) and that's used automatically for all ships. And if you don't want a ship to be renamed use can use a tag, like you now have for all those colors and stuff.

Anyway the script sounds pretty good to me, maybe a bit rough around the edges, but I'm used to that in X3 ;)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Wed, 12. Nov 08, 11:42

there is already a "template system" in it when you modify the t-file a bit ;)

for example when you add

Code: Select all

 <t id="1598">/Name1</t>
 <t id="1599">/grn/hbn /blu/typ /yel</t>
and change the t id 999 from

Code: Select all

 <t id="999">1598</t>
to

Code: Select all

 <t id="999">1600</t>
you have to write only /Name1 01 to change the Name for the Ship into

Solar Power Plant Mercury 01

for example ;)

you can expand the number of Templates as much as you want, you only have to increase the number in t id 999 into the last t id +1 ;) (BUT IT MUST BE AN EVEN NUMBER...)

It is only not documented because i stuck on how to explain this to somebody who has never done anything with t-files ^^

PS when you want a Template for all new bought Ships just use "Your" instead of /Name1 in my small example and remember that the Ship type is then at the End of the Name because it is not replaced ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

BlackRain
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 7406
Joined: Mon, 15. Dec 03, 18:53
x4

Post by BlackRain » Wed, 12. Nov 08, 14:41

Hmm, I downloaded this and installed it but it isn't working. I run the hotkey, the menu comes up and I choose all the options, but it doesn't rename any ships.

(----____JEFF____----)
Posts: 269
Joined: Sat, 20. May 06, 14:55
x3tc

Post by (----____JEFF____----) » Wed, 12. Nov 08, 14:48

thanks UniTrader for explaining that, I'll have a look at it ;)

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Wed, 12. Nov 08, 15:32

Version 1.1 released...

Changes:

- Changed the Order of the Questions for a Name Block in the Name Creating Assistent (in Previous Version Color -> Number Format -> Content, now Content -> Color -> Number Format (when it makes sense) )

- changed the 2 mistaken IDs in the Script Code

- several other improvements / bugfixes in the Menu for Mass Renaming


Complete Readme will follow soon.. i am not really good in writing longer texts in english so i think it will be out tomorrow evening..


Installation/Updating: just overwrite the existent Files... ;)

@BlackRain
The Hotkey is not the Main part of this Script, it is more an addition.. the Main part is to format the Ship Names you set by the normal rename-function ;) (it can last a bit because the Names of all Ships are checked every Minute... )
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Thrandisher
Posts: 357
Joined: Sun, 1. Jul 07, 03:33
x4

Post by Thrandisher » Thu, 13. Nov 08, 04:10

Home base name ends up showing /hbn and Home Base Sector ends up as /hbs when useing the menu's.

How does the number system work? I did the first option to rename 3 of my ships, Q 1, Elephant 2, Something 3. That was the end resault. I would have thought each would be named 1 since they were the only kind.

If i had 2 Q ships and 1 Elephant, i would exspect it to come up as, Q 1, Q 2, Elephant 1 and not Q 1, Q 2, Elephant 3.

Other bug i saw was, Target a ship, hit hotkey and change color to blue, Target same ship again, hit hotkey, hit escape. End resault is the ship being named -1Ship Name .

Other then that, everything is great so far. If i run into anything else, ill let ya know.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Thu, 13. Nov 08, 08:21

asser69 wrote:Home base name ends up showing /hbn and Home Base Sector ends up as /hbs when useing the menu's.
Has the Ship a Homebase? when not this Strings are not substituted... and it is definetely not related to the menus because the menu and the automatic renaming of the Ship name are calling the same Script for the end Formatting.. the Menus are only faster because the Script is called directly after the setting of the Name...
asser69 wrote:Other bug i saw was, Target a ship, hit hotkey and change color to blue, Target same ship again, hit hotkey, hit escape. End resault is the ship being named -1Ship Name .
I will have a look into it ;)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

Post Reply

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