EnglishGermanFrenchRussianPolishItalianSpanish
Log inRegister
 
[Solved] Changing Sector Names : Old problem, new question...
Post new topic Reply to topic
View previous topic :: View next topic
Author Message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

modified
PostPosted: Tue, 12. Sep 17, 08:29    Post subject: [Solved] Changing Sector Names : Old problem, new question... Reply with quote Print

I started looking into changing sector names just for the heck of it and found this useful thread :

https://forum.egosoft.com/viewtopic.php?t=332802&f=94&view=next

Jack08 wrote:

the name id is a concatenation of three parts.

Prefix: 102
X Pos: 01 (Example)
Y Pos: 01 (Example)


Great. I fire up x3ed2, open the 0001-L044 and find the sector names at pages (...)07. Awesome. However, in page 380007, some sectors have string values that go beyond 102-24-20..?

For example : Light of Hope @ string 1023800. So, how do those values get mapped into the game according to Jack08's explanation?

Thx,
-lpa



Last edited by lostProfitssssArrgh on Tue, 12. Sep 17, 17:48; edited 1 time in total
Back to top
View user's profile Send private message
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)

MEDALMEDALMEDAL

Joined: 02 Apr 2006
Posts: 20280 on topic

Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 09:58    Post subject: Reply with quote Print

Light of Hope an the names in the text file below are spare names, which were recorded, so that at a time convenient to Egosoft (e.g. within a patch) additional sectors with voiced names can be added. You can use those by putting a text reference to this id {7,1023800} at the desired location specific text id. This is done for the Unknown sector {7,1020000} a couple of times already.


_________________
Besteht Interesse an einem Nopileos-Hörbuch?

Farnhams Legende und Nopileos als E-Books!

"People who think they know everything are a great annoyance to those of us who do." - Isaac Asimov

"If it's not impossible, there must be a way to do it." - Sir Nicholas Winton
Back to top
View user's profile Send private message Visit poster's website
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 11:40    Post subject: Reply with quote Print

Thank you.


A couple more things:

- for future newb reference, the x and y sector coords are swapped in the t-files and start at 1 instead of 0 (ie Zyarth's Stand at x20 y05 is at string #1020621).

- I have LU 1.7.2 and Mayhem 2.1.3 installed. I'm using 9977-L044.xml to test sector names, specifically Unknown Omega at x20 y0. Litcube uses page 350007 and string 1020121 in 8385-L044 to define that sector (Joubarbe doesn't define sectors in his 9971 to 9973 t-files). So I added the same page and string number to my 9977 thinking that it would override Litcube's, but nothing changes... What am I missing ? :/

Back to top
View user's profile Send private message
Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)



Joined: 15 Nov 2004
Posts: 20453 on topic
Location: London
Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 12:05    Post subject: Reply with quote Print

In AP you should use pages id's starting with 38
So 380007.

The reason it might not have overridden is because of the order in which setup files are loaded. Yours may have been loaded earlier and therefore your text was the was that was overridden

380007 will always override 350007 however


_________________
My Scripts | MY X3TC Scripts | X3 Plugin Manager | Custom Gui
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 13:27    Post subject: Reply with quote Print

Cycrow wrote:

In AP you should use pages id's starting with 38
So 380007.


Done.

---

That didn't work at first, but it turns out that Joubarbe has delayed readtext commands in his setup files. I delayed mine for longer, it doesn't work on game load... Forcing the setup script via MSCI brings in the new names but they revert after a bit Headbang

I'm guessing there are calls to Joubarbe's readtexts and/or monitor scripts running. I'll keep looking in that direction and post the results.

Back to top
View user's profile Send private message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 14:37    Post subject: Reply with quote Print

Two candidates :

Both Lib.Gen.ErrorCode.GetCodeNumber and Lib.Gen.ErrorCode.Message have this :

Code:

line 1 :: load text: id=8383


The ErrorCode libs are being called from the Cmd.Freighter script (which loops of course).

So the renaming is most likely caused by Litcube's scripts reading 8383 which also contains sector names, not Joubarbe's (sorry!)

---

Gotta run for the time being, if anyone cares to pitch in...

Back to top
View user's profile Send private message
Joubarbe





Joined: 31 Oct 2006
Posts: 2569 on topic
Location: France
Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 15:34    Post subject: Reply with quote Print

Pandas are innocent.


_________________
Mayhem - Satellites Monitoring - Internal Distribution Network - ADS (Joubarbian Edition) - Bounty Board - The Joubarbian Toolkit - EasyConnect
Back to top
View user's profile Send private message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 17:46    Post subject: Reply with quote Print

Fixed by changing

Code:

line 1 :: load text: id=8383


to

Code:

line 1 :: load text: id=8398


in Lib.Gen.ErrorCode.GetCodeNumber and Lib.Gen.ErrorCode.Message.


Splitting custom text resources into deferred and immediate load files (9977 and 9978) should also help in the future. The sector names should't revert once all the freighters have updated their command sources.

Thanks for the help!

Back to top
View user's profile Send private message
Joubarbe





Joined: 31 Oct 2006
Posts: 2569 on topic
Location: France
Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 18:38    Post subject: Reply with quote Print

Now you can have fun with the mov files to allow Betty to say the new sector names... As I did once Smile


_________________
Mayhem - Satellites Monitoring - Internal Distribution Network - ADS (Joubarbian Edition) - Bounty Board - The Joubarbian Toolkit - EasyConnect
Back to top
View user's profile Send private message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 19:37    Post subject: Reply with quote Print

Fortunately, I just need Betty to speak 1 syllable and 1 number. Shouldn't be too hard Very Happy


That's a nice tool-set you linked here, I'll have to mess around with it. But I'm not seeing a Betty tool in there... At first, I was at least hoping for a built-from-the-ground-up Betty-Boop voice synth.


Disappointing, really Razz

Back to top
View user's profile Send private message
Jack08





Joined: 25 Dec 2005
Posts: 2943 on topic
Location: Australia
Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 20:14    Post subject: Reply with quote Print

Are you sure using page id 380007 didn't let the name override stick? i have concerns if you plan to release your mod, because you edited LU base files. Perhaps try 390007? not sure if the special handling will continue to 39 but it might be worth a try if it gets around editing core scripts.


_________________

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
Back to top
View user's profile Send private message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 20:22    Post subject: Reply with quote Print

The sector renaming won't be included if I ever release a mod for LU/Mayhem.

This was an experiment just for the sake of experiment. No worries Smile

Back to top
View user's profile Send private message
Jack08





Joined: 25 Dec 2005
Posts: 2943 on topic
Location: Australia
Thank you for registering your game
PostPosted: Tue, 12. Sep 17, 20:43    Post subject: Reply with quote Print

just throwing this out there because i remembered, if anyone ever wants to do anything "Dynamic" with names, or any strings really, LU has 3 commands that would allow you to write, erase, and rewrite a TextDB file from within MSCI:

Code:

write to addon-t file: %0 value=%1
write to addon-t #%0 append=%1 printf: fmt=%2, %3, %4, %5, %6, %7
write to addon-t #%0 append=%1 printf: pageid=%2 textid=%3, %4, %5, %6, %7, %8


so theoretically you could make a fully in-game sector renamer.

Therese also an hidden "Write file" & "read file" command that can write/read any file within the games directory, or the documents files - I deliberately left it out of the in-game command listing because well, its not safe - but it might be in the X3 Editor syntax file, unless i left it out of there too for the same reason haha.


_________________

"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire
Back to top
View user's profile Send private message
lostProfitssssArrgh





Joined: 22 Aug 2017

Location: Unknown Sector(23,19)

PostPosted: Tue, 12. Sep 17, 21:04    Post subject: Reply with quote Print

Wow! That's good to know, man.

Thanks a lot!

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic Reply to topic
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Control Panel
Login Data
The time now is Fri, 22. Sep 17, 20:44

All times are GMT + 2 Hours


Board Security

Copyright © EGOSOFT 1989-2017
Powered by phpBB © 2001, 2005 phpBB Group
Template created by Avatar & BurnIt!
Debug: page generation = 0.46094 seconds, sql queries = 28