[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

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

Post by Miniding » Sat, 24. Sep 16, 20:44

Ok! I'm not totally sure how to use this but I will give it a try very soon... When I'll be able to stay more than few secs sitting in front of my PC... I just went out of hospital few days ago so it's a bit difficult for now...

Thanks for the infos, will try to do so!

Will tell you about my results anyway...

Thanks again
Regards

EDIT :

Ok I just got an eye on the file .....-033.xml I made from your original -049.xml one.

I think I found where to go...

Will keep you on touch 8)
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, 25. Sep 16, 16:02

just noticed the L049 file isnt entirely up to date - i forgot to add some expressions i added when i made the first steam version there. to be exact its these Entries in Page 5554302:

Code: Select all

  <!-- Freight Class Expression and Results -->
  <t id="200">%freightclass</t>
  <t id="201">U(niversal - equals BCEL)</t>
  <t id="202">B(ulk)</t>
  <t id="203">C(ontainer)</t>
  <t id="204">E(nergy)</t>
  <t id="205">L(iquid)</t>
  <t id="206">F(uel)</t><!-- For Completeness; unused -->
  <t id="207">S(hips)</t><!-- For Completeness; implemented but shouldnt appear in regular game -->
  <t id="208">I(nventory)</t><!-- For Completeness; implemented but shouldnt appear in regular game -->
  <t id="209">M(ultiple)</t>
  <!-- Station Building Stages (Vanilla sequences only; will be made more general once standard string functions are available)) -->
  <t id="301">%stageA#</t>
  <t id="302">%stageB#</t>
  <t id="303">%stageC#</t>
  <t id="304">%stageD#</t>
  <t id="305">%stageE#</t>
  <t id="306">%stageF#</t>
  <t id="307">%stageG#</t>
  <t id="308">%stageH#</t>
  <t id="309">%stageI#</t>
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 » Sun, 25. Sep 16, 19:31

ok, once more update time here:

=> new Function: Mass Renaming Big Ship/Small Ship Subordinates only
=> new expressions:
-> %subnumber - serial number of Subordinate when mass renaming
-> %subtotal - total number of Subordinates
Note: when mass renaming small/big Ships both apply to the specific sub-set of subordinates only.
=> Fixed/Completed German Lang File
=> some preperation work to work togehter with another mod of mine (not functional yet)


DL Link is still the same.
https://www.dropbox.com/s/rmsr6jay7bnwu ... ng.7z?dl=1

will update steam version later..
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 » Mon, 26. Sep 16, 10:53

Ok Thanks I will work on French with the updated version.

I just notice Something "Strange" for my first try to translate... I was able to rename one of my ships with the %PURPOSE expression. Worked in french, but I wasn't enable to delete it after that even fully renaming manually vanilla way...

Any idea why?

Thanks again for the work!

Regards.
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, 26. Sep 16, 12:09

did you use the single or mass renaming function? mass renaming leaves the current ship unaffected. also upper case expressions are just for internal usage, i made all useable expressions lower case (i do some double-conversions with an intermediate upper case)


anyway will check this at home..
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 » Mon, 26. Sep 16, 17:41

Ok I got to manage all translation for L033 Page...

Sorry for this maybe noob(as I am in dev) question but when I insert my L033 page in your mod, the 3 button you add in renaming screen are titled some "READ-TEXT..." and seem to lock out renaming anything after that.

I heard you when you say "will check when at home" and I don't want to bother you. I'm just interested in the mod and want to get involved in for once as I always used community's Mods form X3 to now...

Thanks again
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, 26. Sep 16, 17:48

sounds to me like you broke the syntax ot the t file (some <t id="****">Text</t> not properly closed/opened, like deleted one char too much..)

either check it with a proper xml editor (should highlight the Error) or feel free to send me the file ;)



btw: question about personal tastes for this Mod: for the color codes and skills i restricted my expressions to 3 letter combos to prevent the Names from getting overly long, for other expressions i used a completely desriptive (but a bit long) expression - which way would you prefer? (i personally think shorter expressions are better - less chance for mistakes)


PS deleted a duplicate of the previous post
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 » Mon, 26. Sep 16, 20:50

ok, small update on the not accepting changes issue:

there are actually 2 Issues here:
1) If you use the Name from the superior unchanged for the subordinates it will not accept the input because the Name (for the current Object) didnt change
2) Some UI Vars are not cleared (which i thought were) and therefore when you did once use mass renaming every next renaming will be a mass renaming when you intend it to be a renaming of the current Object

will work on fixing both, but as stopgap measure either use the debug line and type "reloadui" or reload a Savegame - both should reload the UI and clear these wrong Variables
Sorry about that, these are one of my first steps in changint something in the UI like Adding buttons
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 » Mon, 26. Sep 16, 21:05

UniTrader wrote:sounds to me like you broke the syntax ot the t file (some <t id="****">Text</t> not properly closed/opened, like deleted one char too much..)

either check it with a proper xml editor (should highlight the Error) or feel free to send me the file ;)
......
I edit with Notepad++ and Neither me or it found mistake open/closed ... I4m not an expert though...
UniTrader wrote: ...

btw: question about personal tastes for this Mod: for the color codes and skills i restricted my expressions to 3 letter combos to prevent the Names from getting overly long, for other expressions i used a completely desriptive (but a bit long) expression - which way would you prefer? (i personally think shorter expressions are better - less chance for mistakes)

...
I'm not sure I understand exectly what you mean but I think I see your point... Also think shorter expressions are better and probably more easy to manage with furher updates or functions...
UniTrader wrote: ...
PS deleted a duplicate of the previous post
Sorry for that. Some browser freezing happend yesterday when answering to you... won't happen again. Strange I didn't see it yesterday when reading my post after, bye the way.


Here's what I modified in L033 file

Code: Select all

  <!-- Objectputposes -->
  <t id="11001">%PURPOSE:</t><!-- just for defining the prefix for the next Entries, no actual replacement -->
  <t id="11002">%PURPOSE:trade</t>
  <t id="11003">Commerce</t>
  <t id="11004">%PURPOSE:fight</t>
  <t id="11005">Combat</t>
  <t id="11006">%PURPOSE:build</t>
  <t id="11007">Construction</t>
  <t id="11008">%PURPOSE:mine</t>
  <t id="11009">Minage</t>
  <t id="11010">%PURPOSE:hack</t>
  <t id="11011">Piratage</t>
  <t id="11012">%PURPOSE:scan</t>
  <t id="11013">Scanner</t>
.......................
  <!-- Freight Class Expression and Results -->
  <t id="200">%freightclass</t>
  <t id="201">U(niversel - equals VCEL)</t>
  <t id="202">V(rac)</t>
  <t id="203">C(onteneur)</t>
  <t id="204">E(nergie)</t>
  <t id="205">L(iquide)</t>
  <t id="206">F(uel)</t><!-- For Completeness; unused -->
  <t id="207">S(hips)</t><!-- For Completeness; implemented but shouldnt appear in regular game -->
  <t id="208">I(nventaire)</t><!-- For Completeness; implemented but shouldnt appear in regular game -->
  <t id="209">M(ultiple)</t>
......................
<t id="1001">                             Renommer en masse</t><!--leading spaces intentional to center text till i find out how to do it properly-->
  <t id="1002">Tous les Subordonnés</t>
  <t id="1003">Renommer tous les subordonnés du Vasseau/Station</t>
  <t id="1004">Gros Vaisseaux</t>
  <t id="1005">Renommer uniquement les L/XL subordonnés à vaisseau/Station</t>
  <t id="1006">Petits vaisseaux</t>
  <t id="1007">Renommer uniquement les S/M subordonnés à vaisseau/Station</t>
  <t id="1008">Sélection du logo \(Sera appliqué au prochain passage au Chantier Naval)</t>
  <t id="1009">Logo Superieur/Par défaut</t>
  <t id="1010">Logo actuel</t>
Maybe I broke some function when translating...

Thanks again for the work
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, 26. Sep 16, 21:36

just tested it and it worked for me.. no idea what was wronf with your File..
see here
btw: is there a shorter term for "Tous les Subordonnés"? because its longer than the button, and i dont want to start resizing buttons based on Language Needs... anyway, just Updated the dropbox Version:

Chages:
=> French Language Added (still needs some refinement)
=> Fixed: several Issues with renaming the wrong/no Objects
=> as sideeffect a manual Name Update is now possible by Renaming but leaving the Name unchanged

Link is still the same
https://www.dropbox.com/s/rmsr6jay7bnwu ... ng.7z?dl=1
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, 27. Sep 16, 19:55

I took it and tested it a bit...

Despite some few null (caused by my mistake demanding NPC's skills on one that can't exist on a station....) I find it great.

Only the 3 buttons (only the first one in fact)'s text is too long... Should correct it by "Tous subordonnées" that would fit better.

Otherwise, I find it very efficient.

I don't know if you need help but I would be glad to translate your SteamWorkshop's description of the MOD. I can deal with that !

Thanks again and again for the work!!

Regards
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 » Tue, 27. Sep 16, 22:16

Will Add you as Contributor in Steam for that, its easieast this way ;) will update steam Version to current DL Version this weekend if no issues arise in the meantime. Text is also updated internally, will be changed in next Version since its just some minor text overlap, nothing serious.

regarding the null for non-existent values: yep, thats causesd by using skill values for non-existent NPCs. its unchanged Script Engine behavior to return null for these, and it will also display it for compatible but non-present Employees. i like it this way because it stands out if someone is missing - or are there better suggestions for this case? (its simple to change this ^^)
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 » Wed, 28. Sep 16, 20:16

Tell me what and when to do, and I will. My pleasure.

Waiting for the week-end...

Regarding the "null"... If that occures only for missing NPC, is it possible to get a "No Captain" or "No Engineer" regarding the missing one?

That's bonus feature, I agree, it's just cosmetic. Not needed, I understand the null result.
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, 28. Sep 16, 20:24

this is imo a bit long, and if you want all primary stats of eg the DO in the name (without DO) it would result in something like this:
Taranis 345 No Defense OfficerNo Defense Officer NoDefense Officer
(one "No Defense Officer" for each skill which should be displayed) - something short like X (or the current null ) would be better i think..

PS i can only add friends to the Workshop Contributors, so accept my invite first ^^
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 » Wed, 28. Sep 16, 23:25

I did... didn't see it before. Sorry lol

I understand that way null is cool ^^
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 » 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 ;)

Post Reply

Return to “X Rebirth - Scripts and Modding”