shittakaburi Posted December 2, 2011 Share Posted December 2, 2011 You may have noticed that names of items are stored differently in Skyrim. Instead of a proper name in the "name" field, there is a 4 byte hex code that is associated with the string files in the Data folder. The obvious reason for this is easier localization. The problem for modders is that our plugins do not have access to the string files, so any cells or items we alter that have a "name" field will display the ANSI encoding of the 4 byte hex. At first, I simply changed the 4 byte hex code to a proper name, like "Breezehome" and moved on. That worked. However, I have had users reporting that housecarls are not properly showing up when they first purchase a house. The only thing that could possibly cause this, I believe, is changing this hex coded string. Does anyone have any experience with this? I would appreciate any guidance. Link to comment Share on other sites More sharing options...
Lucubration Posted December 2, 2011 Share Posted December 2, 2011 The only thing I can add about strings is, if TESsnip makes you edit them in a hex editor because it doesn't properly recognize them as actual strings, make sure you terminate them with a single null byte (an extra 0 at the end of the hex value). That prevents the 'garbage' text you sometimes see after strings in-game. Usually this is only necessary for DESC values, though. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2011 Share Posted December 2, 2011 Assuming the 4 byte field is fixed length (as just a pointer) , how would you spell out 'BreezeHome' with only 4 bytes? Each byte can represent just one ascii character. You would be overflowing into other fields, probably causing issues because the record is technically corrupt. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2011 Share Posted December 2, 2011 If I were to guess, looking at the Data\Strings directory, each plugin made with the CK will have it's own set of string files, prefixed with the plugin name. Right now there are only two official plugins I know about - Skyrim.esm and update.esm, and a set of string files for each, it appears. Link to comment Share on other sites More sharing options...
shittakaburi Posted December 2, 2011 Author Share Posted December 2, 2011 The "Name" field is a constant 4 bytes long in the Skyrim plugin but it is not fixed. And I am terminating with a null byte. The name looks fine and shows up fine, that's not the issue. I tried copying the string file for Skyrim and renaming it to my plugin, like one would a BSA, but that had no impact. I suppose I'll have to wait for CK to see what's going on. Thanks. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2011 Share Posted December 2, 2011 The "Name" field is a constant 4 bytes long in the Skyrim plugin but it is not fixed. And I am terminating with a null byte. The name looks fine and shows up fine, that's not the issue. I tried copying the string file for Skyrim and renaming it to my plugin, like one would a BSA, but that had no impact. I suppose I'll have to wait for CK to see what's going on. Thanks. Just leave the 'CELL' record as vanilla. You don't need to edit the cell name if you are just re-arranging or adding objects to the cell. Just leave the 4 bytes alone, and it should be fine. Link to comment Share on other sites More sharing options...
shittakaburi Posted December 2, 2011 Author Share Posted December 2, 2011 Not true. Or, if true, tell me what I am doing wrong. For example, I added an enchanting table to Breezehome. When you are standing at the door to Breezehome, instead of it saying "Breezehome" it shows ANSI expression of the 4-byte hex. So I must alter the field. Maybe I am including too much information in my plugin? I am including the CELL info since I thought that was necessary. Are you saying it is not? OT: I see you made Brisa, I really liked that mod, good work. Link to comment Share on other sites More sharing options...
rickerhk Posted December 2, 2011 Share Posted December 2, 2011 Not true. Or, if true, tell me what I am doing wrong. For example, I added an enchanting table to Breezehome. When you are standing at the door to Breezehome, instead of it saying "Breezehome" it shows ANSI expression of the 4-byte hex. So I must alter the field. Maybe I am including too much information in my plugin? I am including the CELL info since I thought that was necessary. Are you saying it is not? Well, just going by the way the previous games work, you do need the CELL record, but it will be identical to the master, then you add your changes to either the temporary or persistent references. But if an identical override of the CELL record is not reading the same string data as the orginal esm does, then that's a problem we probably won't know the answer to until we get the CK. The fact that putting a string in there works is also puzzling, though it may be default behavior if the string files for a plugin are missing. This is all just guessing on my part. I guess I don't know the answers in this case. OT: I see you made Brisa, I really liked that mod, good work.Thanks ;) Link to comment Share on other sites More sharing options...
shittakaburi Posted December 2, 2011 Author Share Posted December 2, 2011 Yes, the behavior is different in Skyrim than previous games when it comes to localization. Most, maybe all, proper names are in the external string list and the name field just has a 4-byte hex code. I also think it's interesting that we can force the string. I imagine there is some code somewhere that says "If no string list, default to name", since that is what seems to happen. Anyway, thanks for the input. Link to comment Share on other sites More sharing options...
rickerhk Posted December 3, 2011 Share Posted December 3, 2011 Looks like someone already figured it out. If the plugin flag is 80 (or 81 for an esm) then it expects a string file. Otherwise it won't.The thing is, there may be exe bugs with plugins that don't require a string file, since both skyrim.exe and update.exe have one. So maybe that's the problem. You can make your own string file if you want. The formats are here: http://www.uesp.net/wiki/Tes5Mod:File_Formats Link to comment Share on other sites More sharing options...
Recommended Posts