Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-13-2009, 03:44 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default eqstr_us.txt

I am trying to understand the logic behind eqstr_us.txt. Here are the first few lines of the file:
Code:
EQST0002
0 5901
1 %1 %2 %3 %4 %5 %6 %7 %8 %9
100 Your target is out of range, get closer!
101 Target player not found.
102 Duplicate Lore Item deleted.
103 Duplicate Lore Item deleted.  There was one already in your bank.
Can someone explain the significance of line 2? What does "0 5901" refer to (it's NOT the number of lines in the file).

Also, what other code/files are the lines referencing? If a line is changed, it produces an error "cannot find string" message once you get to the character select screen. Thanks for any help.
Reply With Quote
  #2  
Old 09-13-2009, 05:39 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Okay, I've answered one of my own questions. It appears 5901 does refer to the number of paragraphs below the first two lines there are significant gaps in the numeric titles for the lines, but the paragraph count is 5903 for the file). But I stll cannot figure out what other code or files this txt file is referencing. Any help on that will be greatly appreciated.
Reply With Quote
  #3  
Old 09-13-2009, 06:10 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

The eqgame.exe uses the text file to "push" messages to the client. If you use a program like IDA or Ollydbg, you could search for the push 100 and it would be (most likely) at the end of the function for target range check.
Reply With Quote
  #4  
Old 09-13-2009, 09:13 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Thanks Joligario; I downloaded Ollydbg and about half a dozen similar exe analyzers, and still cannot find the references. I assume at this point eqstr_us.txt cannot be changed without hacking into the exe. That's too bad.
Reply With Quote
  #5  
Old 09-14-2009, 01:12 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

The "IDs" (the number at the beginning of the line) are considered String IDs and are used by the Message_StringID functions in the source. The most common one we use is Client::Message_StringID().

Basically, instead of the server sending the string, it sends just the string ID (so, less data over the wire). If the string ID has any variables (%1, %2, etc), you can also send a smaller string as part of the function that will be inserted where the variable is.

The idea behind EQ using a file like this is you don't have to recompile the EXE if you want to change what the strings output, especially when translating to another language.

As for the "cannot find string" error, I would recommend changing it in eqstr_en.txt also, although I'm pretty sure it's been depreciated (although maybe not entirely). It looks like the line endings are Windows-style & there is a new line at the end of the file, so as long as you maintain that, it should be fine.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #6  
Old 09-14-2009, 07:23 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

So, what I'm hearing you say is that there is no validation of characters for each line, and in theory I should be able to change the 'Entering [zone]" text that appears while zoning simply by changing the string next to the numbered reference for that zone. That makes sense of the numbering system at the beginning of each line.

Yet I just attempted to change line 2303 (Felwithe) to another name, in both eqstr_us.txt and eqstr_en.txt, and upon reaching the character select screen I receive the following message: [5 ERROR: String not found. (1530)]. I'm concluding the first number in the brackets is simply the character level since that number changes when I select another character. The error number itself (1530) also changes, but I cannot map it to anything. Selecting some characters produces error 1530, others 1502, 1542, or 1558. The difference is not due to zone since some characters in the same zone have different numbers while others in different zones have the same number.

Any suggestions on what's going on here and how I might be able to change these zone references?
Reply With Quote
  #7  
Old 09-14-2009, 08:43 PM
ojamajoe
Fire Beetle
 
Join Date: Jan 2009
Location: Central USA
Posts: 8
Default

I've not done a lot with eqstr_us.txt or eqstr_en.txt, but the only time I had trouble playing with these files was when I used notepad to edit them; which apparently adds carriage returns. I've not had them misbehave when I used something like notepad ++ to edit them, nor have I figured out where the lines you are trying to edit are referenced by the client.
Reply With Quote
  #8  
Old 09-14-2009, 09:31 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,497
Default

Also, don't forget your hex -> dec conversions... When reading and searching that is.
Reply With Quote
  #9  
Old 09-15-2009, 12:18 AM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Okay, using Notepad++ resolved the "string not found" issue. However, after changing the zone name and logging in, I see no change in the zoning message when entering the zone whose name I changed. In fact, I do not see any effect at all after changing the zone name in both str files. Am I missing something here?
Reply With Quote
  #10  
Old 09-15-2009, 02:48 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

You may also want to take a look into dbstr_us.txt.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #11  
Old 09-15-2009, 03:27 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

it has been long figured out that zones names cannot be changed by editing them in that file.
Its believed that zone names are hard coded into the exe.

Shards of Delaya have changed zone names, but they have been known to hacked the exe file
Reply With Quote
  #12  
Old 09-15-2009, 07:12 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Quote:
it has been long figured out that zones names cannot be changed by editing them in that file. Its believed that zone names are hard coded into the exe.
Damn.
Quote:
Shards of Delaya have changed zone names, but they have been known to hacked the exe file
SoD was the inspiration for my inquiry. Was hoping for an easy solution to creating a truly custom game, but I guess I'll have to settle for a partial one.
Reply With Quote
  #13  
Old 11-04-2009, 04:03 PM
Xardon
Fire Beetle
 
Join Date: Jul 2007
Posts: 1
Default

Quote:
Originally Posted by ChaosSlayerZ View Post
it has been long figured out that zones names cannot be changed by editing them in that file.
Its believed that zone names are hard coded into the exe.

Shards of Delaya have changed zone names, but they have been known to hacked the exe file
Not true ... the eqstr_us.txt file for the zones is only the text that gets displayed when zoning ... like Entering My Happy Zone.

If in game you want it to ... when you do a /who all happyzone say There are 10 people in My Happy Zone. You need to make sure the shortname (happyzone) and longname (My Happy Zone) in your zone table reflect that. All the client cares about is the zoneidnumber ... that's it.
Reply With Quote
  #14  
Old 12-15-2009, 01:17 PM
neiv2
Hill Giant
 
Join Date: Mar 2009
Location: CO
Posts: 183
Default

Quote:
Not true ... the eqstr_us.txt file for the zones is only the text that gets displayed when zoning ... like Entering My Happy Zone.

If in game you want it to ... when you do a /who all happyzone say There are 10 people in My Happy Zone. You need to make sure the shortname (happyzone) and longname (My Happy Zone) in your zone table reflect that. All the client cares about is the zoneidnumber ... that's it.
Although that would make sense technically, neither of these will work in real life. You cannot change the short name of a zone in the zone table (and corresponding tables) without breaking the zone (it simply will not recognize that zone exists). And, you cannot change the eqstr_us.txt file and expect it to display Entering Happy Zone. Believe me, I've tried this at least a dozen times. In most cases it just breaks the game and displays "String not found" messages at the character select screen. But it never changes the "Entering" text when zoning. Something else in the code is responsible for that.

Having said that, Xardon, if you could disclose the secret to changing zone names without breaking the game or hacking the code, it would be greatly appreciated.
Reply With Quote
  #15  
Old 12-16-2009, 08:05 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

The reason your strings get corrupted is because you screwed up the string file format when edited it with soemthing like regular windows notepad. You need to use an editor which shows and preserves special lien characters which used in that file. Like shell edit or Notepad++.

But in either case- I have tried altering both: the long name in DB and a name in string file (both of them) at SAME time- and it produced no effect, other one the one in chat box.

Also, I have no idea why Xardon keeps referring to short name file - it can never be changed unless you want to perma screw up the zoning =)
And it does not in any way impact the zone name you see on screen or in chatbox
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 03:23 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3