raziel23x / skyrim-plugin-decoding-project

Automatically exported from code.google.com/p/skyrim-plugin-decoding-project
1 stars 3 forks source link

DESC does not show localization. #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What needs to be reviewed?

I am trying to get the DESC field in Spell to show the localization strings.  
The file xDump displays this as "DESC - Description" when the field is all 
zeros, but it's blank also when its EE 25 01 00

Describe how it is now.

EE 25 01 00 (75246) = ""
00 00 00 00 = ""
0A 00 49 6E 63 69 6E 65 72 61 74 65 00 = Incinerate

wbDESC := wbLString(DESC, 'Description', 0, cpTranslate);
wbDESCReq := wbLString(DESC, 'Description', 0, cpTranslate, True);

Describe the desired change.

Do I need to call the routine differently? I was wondering if it could display 
the following:  

EE 25 01 00 (75246) = "Your Vampiric blood gives you <100>% resistance to 
poison."
00 00 00 00 = "Zero Reference"

Outline the goals/benefits of the enhancement.

Edit may need a routine to treat this field in a special way.  When it has a 
value of "Zero Reference" there isn't a localization string for it.  Edit could 
either disable editing of that field or allow someone to add one and it is 
saved to the localization file for that specific plugin.

Original issue reported on code.google.com by danielhmpdx16@gmail.com on 19 Jul 2012 at 11:16

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
I think the DESC field for SPEL needs to look in .DLSTRINGS.

Original comment by danielhmpdx16@gmail.com on 19 Jul 2012 at 11:22

GoogleCodeExporter commented 9 years ago
Also I think I might need to start using wbLString to test other fields.  For 
example when I have 20 bytes of information, four of those bytes could be 
localization information.  Can I pass wbLString a wbByteArray or an wbInteger?

So can I call:

wbLString(DESC, [wbByteArray('Unknown', 4)], 0, cpTranslate, True);
                      ^^^^^ EE 25 01 00
Or Maybe

wbLString(DESC, [wbInteger('Unknown', itU32)], 0, cpTranslate, True);
                      ^^^^^ 75246

Then wbLstring sees that its getting either hex values, or an integer and then 
looks for the localization string?

If I am testing something I will be able to tell if it's not a localization 
string.  Say I change a filed that is actually an integer.  Once I change 
something in the record like an integer value or a flag, when xDump displays 
"Your Vampiric blood gives you <100>% resistance to poison.", but changes to 
"Fine day for a walk, isn't it" then I'll know that field is not something from 
the localization strings.

Original comment by danielhmpdx16@gmail.com on 19 Jul 2012 at 11:48

GoogleCodeExporter commented 9 years ago
Yeah looks like DESC always refers to DLSTRINGS regardless record signature, 
wiki needs updating. Will fix later.

Original comment by zila...@gmail.com on 20 Jul 2012 at 6:28

GoogleCodeExporter commented 9 years ago
Which Wiki, the USEPWiki?  

If it is my Wiki I'd be happy to add something to the Wiki.  What would you 
like me to add, and which Wiki page here on my site?

Original comment by danielhmpdx16@gmail.com on 20 Jul 2012 at 6:35

GoogleCodeExporter commented 9 years ago
http://www.uesp.net/wiki/Tes5Mod:String_Table_File_Format
"..appears to be that DLSTRINGS contains Journal/Book entries"

Original comment by zila...@gmail.com on 20 Jul 2012 at 11:34

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Can you look at the Spell BoundBow.

<Snip>
  SPEL - Actor Effect [000211ED] <BoundBow> "Bound Bow"
    Record Header
      Signature: SPEL
      Data Size: 171
      Record Flags
      FormID: SPEL - Actor Effect [000211ED] <BoundBow> "Bound Bow"
      Version Control Info 1: 1B 69 55 00
      Form Version: 40
      Version Control Info 2: 02 00
    EDID - Editor ID: BoundBow
    OBND - Object Bounds
      Corner #0
        X1: 0
        Y1: 0
        Z1: 0
        X2: 0
        Y2: 0
        Z2: 0
    FULL - Name: Bound Bow
    MDOB - Menu Display Object: STAT - Static [0010AB43] <MAGINVBoundWeapon>
    ETYP - Equip Type: EQUP - EQUP [00013F44] <EitherHand>
    DESC - Description
    SPIT - 
      Base Cost: 206
      Flags
      Type: Spell
      Charge Time: 0.500000
      Cast Type: Fire and Forget
      Type: Self
      Cast Duration: 0.000000
      Range: 0.000000
      Half-cost Perk: PERK - Perk [000C44BC] <ConjurationAdept50> "Adept Conjuration"
    Effects
      Effect
        EFID - Base Effect: MGEF - Base Effect [0001CEA0] <BoundBowFFSelf> "Bound Bow"
        EFIT - 
          Magnitude: 0.000000
          Area: 0
          Duration: 120
      Effect
        EFID - Base Effect: MGEF - Base Effect [00042500] <BoundBowMysticFFSelf> "Mystic Bow"
        EFIT - 
          Magnitude: 0.000000
          Area: 0
          Duration: 120
<Snip>

The Description field is Empty, all zeros, or doesn't point to anything however 
you want to word it. [DESC 04 00 00 00 00 00]  When xDump processes 
descriptions like that it reports unused data, which isn't true.

Can you add a check for that?  Maybe it could o that if it's Empty it uses the 
[DESC 04 00 00 00 00 00] and then displays "<No Reference>", "<No 
Description>", "<Empty>" or, whatever you think is best?

Original comment by danielhmpdx16@gmail.com on 20 Jul 2012 at 10:21

GoogleCodeExporter commented 9 years ago
Also if the error is not coming from this record it's still coming from some 
other description field.

<00:26.598> <Warning: Unused data in: SPEL \ DESC - Description>

Original comment by danielhmpdx16@gmail.com on 20 Jul 2012 at 10:46

GoogleCodeExporter commented 9 years ago
Fixed.

Original comment by zila...@gmail.com on 21 Jul 2012 at 8:48

GoogleCodeExporter commented 9 years ago
When you get a chance can you see why "DecorateWindhelmKillerClutter" from 
Update.esm does not show the localization string for a FULL field

FULL - Name: Unknown lstring ID    10E08

I think it should be, "Clean up that murderer's mess. 
(<Global=HDWindhelmKiller> gold)"

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 12:16

GoogleCodeExporter commented 9 years ago
I've updated localization rules.
When you encounter unknown lstring ID, message me. I'm afraid the rules are not 
final atm.

Original comment by zila...@gmail.com on 22 Jul 2012 at 7:38

GoogleCodeExporter commented 9 years ago
I'm adding a bunch of wbUnknown-s to the code now.  Anything to get it to run 
without saying that something is unused or out of order.  Once I am done with 
that I am going to change the locations that need wbLString.  After I am done 
with that then I'll let you know what I find.

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 7:42

GoogleCodeExporter commented 9 years ago
I think a good milestone for project is to define ALL records with unknowns so 
dump can work without any errors on any plugin, including skyrim.esm itself.

Original comment by zila...@gmail.com on 22 Jul 2012 at 7:47

GoogleCodeExporter commented 9 years ago
It won't hurt.  I was asking Elminster a few things today and one of his 
suggestions was for a routine that already exists.  I agree with you.  If it 
can run without errors on Skyrim.esm, then we can go back and finish.  Doing 
that will help us see the errors for just the one record we are working on.

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 7:51

GoogleCodeExporter commented 9 years ago
Next one is Quest stages, the CNAM entries.

Stages
      Stage
        INDX - Stage Index: 1627521024
        Log Entries
          Log Entry
            QSDT - Stage Flags
      Stage
        INDX - Stage Index: 1728053249
        Log Entries
          Log Entry
            QSDT - Stage Flags
      Stage
        INDX - Stage Index: 67108874
        Log Entries
          Log Entry
            QSDT - Stage Flags
            CNAM - Log Entry: Unknown lstring ID 0000228D

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 9:56

GoogleCodeExporter commented 9 years ago
I used this command line

TES5Dump -dg:QUST -xg:NAVI,CELL,WRLD -xr:NAVI,CELL,WRLD "Skyrim.esm" > 
"TES5DumpQUST_S.txt" 2> "TES5CONlogQUST_S.txt"

<00:19.860> <Warning: Unused data in: QUST \ VMAD - Papyrus Script Data>

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 9:11

GoogleCodeExporter commented 9 years ago
Ah yes, VMAD in rare cases can have a "fragments" section, until now I've never 
seen it anywhere. I'll look into it, you can define an unknown wbArray at the 
end of VMAD for now.

Original comment by zila...@gmail.com on 22 Jul 2012 at 9:37

GoogleCodeExporter commented 9 years ago
With Commit #181 just search for "Unknown #0:" using the command line I gave 
and it will take you to the information you need.

I found one that you can look at <DialogueWinterholdInnSceneINITIAL>

Unknown #0: 02 00 00 00 00 01 00 00 00 04 00 3D 11 0B 00 05 00 02 00 01 00 21 
00 57 69 6E 74 65 72 68 6F 6C 64 49 6E 6E 49 6E 69 74 69 61 6C 54 72 69 67 67 
65 72 53 63 72 69 70 74 00 01 00 0C 00 49 6E 69 74 69 61 6C 53 63 65 6E 65 01 
01 00 00 FF FF 3E 11 0B 00

Unknown #0: 
02 00 00 00 00 01 00 00 00 04 00 3D 11 0B 00 05 00 02 00 01 00 
21 00 WinterholdInnInitialTriggerScript 00 <-- Null or Zero terminated
01 00 
0C 00 InitialScene <-- Length Indicator, No Null or Zero termination
01 01 00 00 FF FF 3E 11 0B 00

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 10:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Also if there is a marker maybe something like what I have below will help.  I 
had a marker of NEXT between two CTDAs in QUST that I had to ask Elminster for 
help with.

wbRStruct('Script (Begin)', [
      wbEmbeddedScriptReq  <----  What you do now in VMAD
    ], [], cpNormal, True),
    wbRStruct('Script (End)', [
      wbEmpty(NEXT, 'Marker'),   <----  If you know what the Marker is
      wbEmbeddedScriptReq   <----  The New Fragment I mentioned
    ], [], cpNormal, True),

Hope all those suggestions help.

Original comment by danielhmpdx16@gmail.com on 22 Jul 2012 at 11:06

GoogleCodeExporter commented 9 years ago
There are no markers, just pure dynamic binary data to parse. I tried, but it 
is too hard.
Fragments will stay as unknown array.

Original comment by zila...@gmail.com on 23 Jul 2012 at 12:38

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The FULL Subrecords for ACTI References in a CELL Placed Reference don't show 
up.

GRUP Cell Persistent Children of CELL - Cell [00000D74] (in WRLD - Worldspace 
[0000003C] <Tamriel> "Skyrim" at 0,0))
          Cell: CELL - Cell [00000D74] (in WRLD - Worldspace [0000003C] <Tamriel> "Skyrim" at 0,0)
          Record Header
            Signature: REFR
            Data Size: 81
            Record Flags: PersistentReference QuestItem DisplaysInMainMenu, InitialyDisabled
            FormID: REFR - Placed Object [0007D916] (places ACTI - Activator [0005A5FE] <CWCatapult> "<Error: No localization for lstring ID 00004D1E>" in GRUP Cell Persistent Children of CELL - Cell [00000D74] (in WRLD - Worldspace [0000003C] <Tamriel> "Skyrim" at 0,0))
            Version Control Info 1: 00 00 00 00
            Form Version: 43
            Version Control Info 2: 05 00
          NAME - Base: ACTI - Activator [0005A5FE] <CWCatapult> "<Error: No localization for lstring ID 00004D1E>"

The string not being displayed is 00004D1E : Catapult

The plugin Dump is running on is Open Cities Skyrim.esp
The String belongs to Skyrim.esm

It looks like Edit does it correctly, Can Dump display the string?

Original comment by danielhmpdx16@gmail.com on 24 Sep 2012 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by zila...@gmail.com on 13 Oct 2012 at 5:55