[Mod] UT CaC Advanced Renaming

The place to discuss scripting and game modifications for X Rebirth.

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

Post by UniTrader » Tue, 4. Oct 16, 00:28

Just uploaded another Update - just some small fixes, improvements and one or 2 small new features (mostly to work together with another Extension of mine) - will write together the Patch notes today evening.

EDIT: Patch notes:

=> Added leading Zeroes to %subnumber (based on total number of renamed subordinates)
=> new Expression %scriptset to indicate the Script Set used by the Objects controlentity (Currently only Vanilla and my Manager Scrit)
=> new Special Expressions DEBUG and DEBUG OFF - first one stays in the Name unchanged, but sets this.$debug on all relevant Entities on the Object (used by my scripts to activate debug output), second one is removed completely from the Name but also deletes the aforementoined Variable
Note: it does not activate the vanila debug output yet - have to find out how to do this best first.

=> (only fot my Manager- and soon-to-be Fleet Command Script) 2 new Expressions:
%ordercount => Length of Command Queue
%currentorder => currently executed Command

=> diverse bugfixes and opimisations
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 ;)

ghowsak
Posts: 10
Joined: Mon, 26. Sep 16, 13:30
x4

Post by ghowsak » Wed, 5. Oct 16, 21:00

Hey there,

I recently restarted my 4.0 savegame from a few months back and I'm having a blast playing again.
Just a few hours back I installed some mods from the workshop and they all work fine.

I also loaded your mod up and its so much better with colored names when clicking through the tradewindows etc :D

But I noticed a Bug:
I can use the code on everything, but when I use it on several stations, the "code" does not work, see screenshot 1/2
Could this be, because those stations are in custom zones in DeVries? See screenshot 3

Pic 1 http://www.bilder-upload.eu/show.php?fi ... 694105.jpg
Pic 2 http://www.bilder-upload.eu/show.php?fi ... 694094.jpg
Pic 3 http://www.bilder-upload.eu/show.php?fi ... 694176.jpg

Or could there be some other problem with it?

Thanks for your hard work!
-ghowsak

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

Post by UniTrader » Wed, 5. Oct 16, 21:12

the place where the Station is shouldnt matter at all.. if you know how to use the Debuglog and you are using the latest Version (not yet on Steam) could you activate it, add DEBUG (in all caps) to any name which does not work and send me the Log? (after that either dont save or change it to DEBUG OFF which should then be auto-removed)


might it be possible that you renamed with the Extension disabled and enabled it after that? then just entering and confirming the Rename Menu should fix it (this script does not permanently run in the background but does some tricks to the Object names to tell the game it should display them in colors, but it runs only on Rename events, and at some update events like giving employees a skill book)
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 ;)

ghowsak
Posts: 10
Joined: Mon, 26. Sep 16, 13:30
x4

Post by ghowsak » Wed, 5. Oct 16, 21:30

I'll send you the Debug via PN, its not that big. Hopefully its right, never done it before, just googled it (https://www.egosoft.com:8444/confluence ... d=30113934)

there seem to be also errors with other mods. Ill redo the hole thing with only your mod enabled shortly after.

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

Post by UniTrader » Wed, 5. Oct 16, 21:37

mostly interested in a Snippet where a problem Ship has the word DEBUG (in caps!) in it during renaming since this triggers additional output useful for tracking down issues ;) (in fact it prints every internal conversion step of the renaming process)
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 ;)

ghowsak
Posts: 10
Joined: Mon, 26. Sep 16, 13:30
x4

Post by ghowsak » Wed, 5. Oct 16, 23:29

I finaly think I found the problem: you have to have a DEFENSE OFFICER on those stations. Manager / Engineer / Specialist doesnt matter - but the script for color naming stations is somehow tied to the defense officer npcs.

See my PN for further info and testing analysis.

eikichi14
Posts: 13
Joined: Mon, 6. Oct 08, 17:31
x4

Post by eikichi14 » Fri, 7. Oct 16, 14:44

Hi, an upgrade would be to add a close tag that we can add at the end or doing it in the script.

When I tested your mod, the last color was red and that was looking good in fleet window.
But in other window like log, ship, station or minimap info pop, all the text after the ship/station name was red. That also give me the impression that order bugger more often on there ships that those who doen't use special rename.
Quand l'envie cède aux désirs, l'azur ce fissure

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

Post by UniTrader » Fri, 7. Oct 16, 16:49

just noticed that this function is present but not documented - /nor is there to return to regular text color if i am not mistaken (may not affect all menus in the intended way because they do some coloring themselves)


what "order bugger" do you mean btw? cannt imagine in which way a ship name could influence ship behavior
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 ;)

eikichi14
Posts: 13
Joined: Mon, 6. Oct 08, 17:31
x4

Post by eikichi14 » Fri, 7. Oct 16, 17:48

Hum by "order bugged" it's more like (n/7) at the end of ship name that stay even when they already have finished all their task. The only time i see that was when testing this mod.

I don't know how they color text in this game but i was thinking that some tag was open but not closed because the color extend to the text after ship name.

Might be some bug of X Rebirth alone ^^
Quand l'envie cède aux désirs, l'azur ce fissure

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

Post by UniTrader » Fri, 7. Oct 16, 20:03

hmm, i have never seen this - a save for analysis might be helpful.

regarding opening and closing: not really, what i offer is very similiar how it works internally: \033R marks the beginning of red text (the \033 is internally converted to some kind of invisible char you cannot type usually), \033B is for blue text and \033X marks the beginning of regular colored Text (can be generated with the aforementoined /nor ) - so the syntax only has by design onlyx start tags, but no closing ones
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 ;)

eikichi14
Posts: 13
Joined: Mon, 6. Oct 08, 17:31
x4

Post by eikichi14 » Fri, 7. Oct 16, 20:54

Oh didn't see that type of coloring code in the language I use, interresing :D

I didn't see a tag for the actions left for ship like (n/7) i speak earlier.
I would like to color just this part but even with the reset tag that would add it after and don't color it.

Is it technicaly possible to do that or it's forcely applied by the game after the name and you don't have an hand on it ?
Quand l'envie cède aux désirs, l'azur ce fissure

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

Post by UniTrader » Fri, 7. Oct 16, 22:46

this info is added by the Game after the regular name - i could change it, but its outside the scope of this mod and i want to keep changes to lua files to the necesary minimum ( the whole property menu is defined by one lua file and for modding lua stuff only full file replacements are possible afaik.. )
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 ;)

eikichi14
Posts: 13
Joined: Mon, 6. Oct 08, 17:31
x4

Post by eikichi14 » Sat, 8. Oct 16, 01:12

Yeah less file impacted, better it is :D

Well i will make them stand out by coloring the text before with the closing tag in hand (haven't tested it yet) that would do the trick.
Quand l'envie cède aux désirs, l'azur ce fissure

User avatar
Miniding
Posts: 937
Joined: Fri, 14. Dec 07, 11:33
x4

Post by Miniding » Sun, 9. Oct 16, 20:29

I did see a few times this full-colored text when your last color choosen for renaming colored every following sentence too....

I thought this was either a "missed" or some "close expression tag" forgotten but it doesn't happen regulary. It's just 2 or 3 time since I use your mod... if this occured again, I will take a screen and try to have a debug log with it...

I did see the non working stations expressions... Now that everything is ok and since you deliver updates for the mod, I thought YOU dealed with it! I didn't see why it is linked to the defense officer but I didn't have one on every station of mine for sometimes so maybe the code "applyed" when I put a DO in my station.

Didn't check the LUA files, will try to these days ^^
Miniding
X3 Reunion - X3 Terran Conflict - X3 Albion Prelude - X Rebirth - X4 CE...

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

Post by UniTrader » Mon, 10. Oct 16, 12:30

About the colors: as mentoined earlier the text coloring system of XR doesnt have start and end tags but only start tags. i will add an "end colored text"-tag at the end of each name in the next version though (and force an update of all names so it will take effect immediately)
note that some text is also colored by the game itself and the "back to default color" might still result in diffrent-colored text. If you encounter such menus/dialogues in the next version let me know so i can look into a possible fix ;)

about the DO requirement: also looking into changing this, though i personally would prefer consistency (unformatted name is always saved on $object.controlentity, instead of $object.controlentity for ships and $object.tradenpc for stations)


Also sorry for late reply, had only 1 day weekend and wasnt in the mood for modding - will make the aforementoined changes by the weekend for the dl version ;) same Update for steam will follow a couple days later if no issues arise
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
Miniding
Posts: 937
Joined: Fri, 14. Dec 07, 11:33
x4

Post by Miniding » Tue, 11. Oct 16, 23:05

You still rock dude!
I took a look at lua... Understandable but quite far from my knowledge... I try to learn and do...

Keep up
Thanks
Miniding
X3 Reunion - X3 Terran Conflict - X3 Albion Prelude - X Rebirth - X4 CE...

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

Post by UniTrader » Wed, 12. Oct 16, 04:11

ok, just updated the Dropbox Version once more (steam will follow this weekend if no issues arise)

changes:
=> Added Normal Color Tag at the end of all Names (happens transparently and is not displayed in the Rename menu)
=> Changed Renaming Responsibility on Stations from DO to Manager (transition shouldnt be noticeable - if something doesnt work as expected let me know)
=> New automatically generated Shortname Added (its the Object Name minus all expressions which can change) - it is used for exressions like %superiorobject
=> (forgotten in last changelog): new Expressions %SCP, %SMP, %SDP etc. - displays all primary Skills of Captain/Manager/Defense in order of importance ( like "534" )
=> (forgotten in last changelog): new expressions /rco0 to /rco9 - results in random colors (one for each of the 10 expressions)



EDIT 2016-10-15: Updated Steam Version (and added a small fix for the shortname feature in both Dropbox and Steam Version)
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
Miniding
Posts: 937
Joined: Fri, 14. Dec 07, 11:33
x4

Post by Miniding » Sun, 16. Oct 16, 11:57

Changelog traduced for FR on Steam.
Good work Uni
Miniding
X3 Reunion - X3 Terran Conflict - X3 Albion Prelude - X Rebirth - X4 CE...

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

Post by UniTrader » Sun, 16. Oct 16, 14:51

and again a smaller update:

=> Fixed: Updating Object Names Globally using the Version Number in the Custom Expressions file didnt work
(note: patch forces an update of all Player Object Names)
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
Miniding
Posts: 937
Joined: Fri, 14. Dec 07, 11:33
x4

Post by Miniding » Sun, 16. Oct 16, 20:12

Saw that... Translation done too!
Miniding
X3 Reunion - X3 Terran Conflict - X3 Albion Prelude - X Rebirth - X4 CE...

Post Reply

Return to “X Rebirth - Scripts and Modding”