Okay, What Should We Do About Long Descriptions?

Discussion in 'The Temple of Elemental Evil' started by Gaear, Apr 29, 2013.

Remove all ads!
  1. AjiTae

    AjiTae God

    Joined:
    Nov 7, 2012
    Messages:
    50
    Likes Received:
    0
    But it is so simple... Just open it with any hex editor(for exaple hxd) and you'll see only 4 bytes:
    2 for width: 58 02
    2 for height: 90 01
    It is hexadecimal values in reverse order(little-endian).

    So you need just convert new values to hex(windows calc is able), reverse and put it there.
    For example: 1280 dec. -> 500 hex. -> 00 05 bytes

    Heh. It's always like that.=\
     
  2. AjiTae

    AjiTae God

    Joined:
    Nov 7, 2012
    Messages:
    50
    Likes Received:
    0
    v0.1b Photoshop script to automate ui image creation:
    Alpha layer goes from transparent,
    background - from the bakground layer(to create one go to Layer -> New -> Background from Layer), or, if none, from current background color.

    Output: .tga files "name_x_x.tga" and "name.img" file.

    Script + example(random png, output files, screenshot):
     

    Attached Files:

    Last edited: May 8, 2013
  3. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Okay, at long last I have deciphered AjiTae's .img file hack method and worked up a new larger generic UI. Everything works here except that I can't figure out how to move the item title text, which should be centered but as you can see is not. Small price to pay I suppose.

    I also was surprised to discover that long_description.mes will handle carriage returns (I was almost positive I had tried that before and it didn't), so we can now take advantage of the extra real estate by dsiplaying all the technical info line-item style, which I think is much easier to digest than having it all mashed together.

    screen.jpg

    Thanks, AT! :thumbsup:

    Also thanks to everyone else for all your input and suggestions.
     
  4. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    This is really good news. The ability to show complete and formatted almost unlimited text should greatly enhance the game.

    In short ... Me likey!
     
  5. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Okay, I need a volunteer!

    We need to format long_description.mes so as to display all item long descriptions the way they appear in the example pic I posted above. Basically it looks like this within the file itself:

    Code:
    {4058}{A dagger is a double-edged knife used for stabbing, thrusting, or as a secondary defense weapon in close combat.
    
    Enchanted
    Enhancement Bonus: +1
    To Hit Bonus: +1
    Damage: 1d4+1
    Damage Type: Piercing and Slashing
    Critical Range: 19-20/x2
    Weapon Proficiency: Simple, Dagger}
    As opposed to this:

    Code:
    {4058}{A dagger is a double-edged knife used for stabbing, thrusting, or as a secondary defense weapon in close combat. This weapon is enchanted.  /  Enhancement Bonus: +1  /  To Hit Bonus: +1  /  Damage: 1d4+1  /  Damage Type: Piercing and Slashing  /  Critical Range: 19-20/x2  /  Weapon Proficiency: Simple, Dagger}
    As you can see, this will involve entering a lot of tedious carriage returns, as well as having a mind for paying attention to the order of things (damage comes after to-hit, etc.) and correcting any errors along those lines. I've done the first hundred or so, but I should really be moving onto other things. Any takers? Let me know here and I will post long_description.mes for you to hack! :)
     
  6. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,177
    Likes Received:
    34
    How many lines are we talking? Mother's Day is tomorrow...
     
  7. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    A lot. Weapons go up to about 4700 (with significant gaps), and armor probably about the same, only with more gaps. Then there's a few items ...

    It probably wouldn't be a one day project.
     
  8. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,177
    Likes Received:
    34
    Hmmm... is the "<space><slash><space>" delimiter common? A global replace with a carriage return should make short work if it is.
     
  9. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    It is, but can you insert a carriage return into the Notepad replace function?
     
  10. Daryk

    Daryk Veteran Member

    Joined:
    Jan 14, 2012
    Messages:
    1,177
    Likes Received:
    34
    Notepad apparently won't do it, but Word will. In the "Replace with..." field, type ^p.
     
  11. AjiTae

    AjiTae God

    Joined:
    Nov 7, 2012
    Messages:
    50
    Likes Received:
    0
    Gaear, nowadays you can do almost everything with text.)
    Any extended editor can do this.

    Code:
    Notepad++:
    
    Search -> Replace ->
    
    x Extended(\n, \r, \t, \0, \x...)
    
    Find what: / 
    Replace with:\n
    (or \r\n)
    With doubled carriage return after description.
    Code:
    Notepad++:
    
    Search -> Replace ->
    
    x Regular Expression
    
    Find what:([\r\n]+\{[^/]*)|\s*/\s+
    Replace with:\1\n
    
    Swap the description and characteristics.(after previous)
    Code:
    Notepad++:
    
    Search -> Replace ->
    
    x Regular Expression
    
    Find what:([\r\n]+|^)(\{\s*\d+\s*\}\s*\{)([^\r\n}]+)(\n{2})([^}]*)
    Replace with:\1\2\5\4\3
    
    And so on. :)
     
    Last edited: May 12, 2013
  12. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Thanks guys, I'll check into it.
     
  13. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Alrighty, can someone tell me where I can find SRD descriptions of weapons? I mean the sing-songy ones specifically, not just stat lists. I see some of the ones we've got in there now (added by Co8 apparently) are ... sort of precious. For example, "A shortbow shoots arrows powered by the elasticity of the bow. Energy is stored in the limbs of the bow and transformed into rapid motion when the string is released, with the string transferring this motion to the arrow." :eek:_O:

    Seriously? If that proves to be an 'official' description of a shortbow, fine, but it sounds suspiciously like something krunch would write. ;)

    I'd like SRD descriptions, now that we've got lots of space. Only I can't find any in the SRD. Help.
     
  14. sirchet

    sirchet Force for Goodness Moderator Supporter

    Joined:
    Dec 6, 2003
    Messages:
    3,721
    Likes Received:
    49
    Like this?

    Longbow:

    You need at least two hands to use a bow, regardless of its size. A longbow is too unwieldy to use while you are mounted. If you have a penalty for low Strength, apply it to damage rolls when you use a longbow. If you have a bonus for high Strength, you can apply it to damage rolls when you use a composite longbow but not a regular longbow.

    If so, you can merely search in google for the name of the object and then look at the description, choose the SRD link of course. ;)
     
  15. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    Yeah I did see those, but they don't seem ... descriptive. Moreso technical. Are there any others?
     
Our Host!