Behold NPC !

Discussion in 'General Modification' started by Zoltec, Sep 3, 2013.

Remove all ads!
  1. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Well, I'l eagerly wait for that tool if that time comes. Anyway, I'll post two Male and Female, and I'll give you instruction on how to create what I've created.

    Not ready yet;
     
    Last edited: Sep 4, 2013
  2. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    How will you change the material references in the .SKM using offsets, so that the material pointers will be corrected for PCs/NPCs? Any tutorials? I'm dribbling to test one. :dribble: I have to manually know the process.
     
  3. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    like I said earlier, the offset is the byte in the file

    so the program has a file seek position that goes directley to that byte in the file,

    then it searches and replaces the material def path pointer

    00000: 99 00 00 00 28 00 00 00 01 00 00 00 EC 3B 00 00 |....(........;..
    00016: C8 08 00 00 6C 3C 00 00 5A 04 00 00 EC FA 02 00 |....l<..Z.......
    00032: 00 00 00 00 00 00 00 00 00 00 FF FF 42 69 70 30 |............Bip0
    00048: 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |1...............


    the first 32 bytes of a skm, the yellow portion is the
    material number of (count) , and the offset (byte in file)

    in hex translates to 1 material at offset
    00 00 3B EC= 15340 byte

    you see at that offset

    15328: 00 00 80 3F 00 00 00 00 00 00 00 00 61 72 74 2F |...?........art/
    15344: 6D 65 73 68 65 73 2F 4D 6F 6E 73 74 65 72 73 2F |meshes/Monsters/
    15360: 48 79 64 72 61 2F 48 79 64 72 61 2E 6D 64 66 00 |Hydra/Hydra.mdf.
    15376: 08 1C 2F 00 70 05 2F 00 08 1C 2F 00 10 1C 2F 00 |../.p./.../.../.
    15392: 88 00 00 00 00 00 00 00 C1 60 40 00 C1 60 40 00 |.........`@..`@.

    yellow marks that exact position in file at 61h

    in C/C++
    I would tell my file stream
    i.e.
    myfile.seekg( 15340 );

    or

    long offset = 15340
    myfile.seekg( offset )

    you already know this process in a way sorta,
    but your ownly searching for it, when you
    now know how to find it exactly
     
    Last edited: Sep 4, 2013
  4. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    I seem to understand it. I'll try it! :)

    PC_PT001_Male.SKM has a binary of B4 23

    Reversed it to 23 B4

    Looked for 23 B0 and I've found 23 B4 which is the path art/mesh/etc...

    Thanks, for this info.
     
  5. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    You see the thing is; I need to add another row in every row of material.mes which is {014}. And I want to trace if the PC_Human_Male.SKM .SKM file has any connections with the material.mes which is for example he is pointed to

    {000}{HEAD:art\meshes\PCs\PC_Human_Male\head.mdf} OR
    {012}{HEAD:art\meshes\PCs\PC_Human_Male\head.mdf}

    I'm aware that they are bound to their respective race, but I'm looking for a method to override things, so I can point the line {014} to my modified .SKM PC.
     
  6. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Journal

    Addmesh.mes Items do not overlay with the modified .SKM [while]
    Material.mes Items overlay with the modified .skm i.e. Elmo's belly on cloth armor.

    [I need to verify this before converting the items in material.mes to addmeshes]

    The point of this, is to equip the new texturized NPCs with items. addmeshes.mes seems to be successful in overlaying the texture to the new NPC skin. While materials.mes is not currently readable, seems need to find another method other than adding a new line of race...

    Partial Addmesh readable
    Pure Addmesh readable
     
    Last edited: Sep 5, 2013
  7. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Journal #2

    I'm creating a fully addmesh version of fullplate mail but in the end it, when I drag and drop the .OBJ file to anim8or it says; <SimpleSolid::VertexN: Bad point index>, Any suggestions XVicious? I've already updated the vertex and faces but to no avail. The error still insisted. :dizzy:
     
  8. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Here... See the attachment for file inspection.

    ori vertex___232__E8
    ori faces____231__E7
    new vertex__430__1AE = AE 01
    new faces___448__1C0 = C0 01

    [​IMG]
     

    Attached Files:

    Last edited: Sep 5, 2013
  9. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    So I'd managed to add a new race the 'Derro' but it seems it's not calling the textures I set for it... And it will likely falls down to the same problem I had. :sadblinky

    Anyway, here's a pic of dsdasfasf and Elmo

    Okay, I set Elmo's model mesh to my custom PC texture so he's greenish. And for dsdasfasf I run the console and typed; game.party[0].stat_base_set(race,65) and tadah! It called Derro's race in stat.mes but it is still called Dwarf in Inventory UI and the skin its not calling my custom one!.... UGH! So Cujo is correct on this one... :anger:

    [​IMG]
     
  10. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    I'm still wandering about the static meshes... maybe you XVicious knows what he's talking about... :errf:
     
  11. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Okay, this research enables us to change the skin color of Humans, Dwarves, Half-orcs, Halflings, Gnomes, and Elves.

    Though, I doubt from the moment the creation of unique skins for NPCs, since, I cannot find the materials.mes offsets that will enable the .SKM files to load the items properly. Although the skins and addmeshes(partial and full) can be loaded, it does not garauntee that it will work with material.mes items.

    Adding Unique NPCs, PC-Based Body Types, and Temporary Characters textures in meshes.mes section are now possible.

    :paper:
     
  12. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8

    Ok yea so If you add points (noticing the file was double in size almost ,new)

    if you added points you changed the offset of the triagnles

    because you add more points and vertx data
    you increasing the bit offsets for tiangles

    so since you add points also, you need to now change the triangle offset


    I had said earlier that adding more points causes problems with animation
    cause: is because the bones tagging every vertex are in the original order
    spicifically, you have to arrange the bones to be share with the new points
    -very difficult to do-

    it is possible to do this with the SKB file

    example hex not the armor file

    00000: 99 00 00 00 28 00 00 00 01 00 00 00 EC 3B 00 00 |....(........;..
    00016: C8 08 00 00 6C 3C 00 00 5A 04 00 00 EC FA 02 00 |....l<..Z.......
    00032: 00 00 00 00 00 00 00 00 00 00 FF FF 42 69 70 30 |............Bip0
    00048: 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |1...............

    red : vetex (points: counts and offsets) each 4 bytes (starting offset 016)
    yellow: triangle counts and offsets : 4 by 4 bytes (starts @ 016 + 8)

    vert count:C8 08 00 00
    vert offset:6C 3C 00 00

    triangle count:5A 04 00 00
    triangle offset:EC FA 02 00

    (hex value presented in reverse order)


    say I doubled the points in the example
    I have 99 bones I need to tag all the new points with
    the correct bones (weights attched to the vertex) ; and in a specific
    order the points are arranged ( to get the correct animation)

    the reason you get your BAD VERT error is becasue the points and
    triangle index was allocated wrong; the reason is because the triangle
    offset was wrong. during your conversion the program goes to fecth the
    index via the offset, if it had the wrong numbers you get that error,
    its saying you indexed vertex data that doesnt exist

    some bad numbers in your conversion
    as example of this

    f 16425/16425/16425 37881/37881/37881 16948/16948/16948
    f 16456/16456/16456 1/1/1 1/1/1
    f 15889/15889/15889 60818/60818/60818 15805/15805/15805
    f 16253/16253/16253 1/1/1 1/1/1
    f 15985/15985/15985 54611/54611/54611 15621/15621/15621
    f 16257/16257/16257 1/1/1 1/1/1

    these High numbers ref vertex's that are not there
    these numbers should only be as high as the number of points

    g mesh01
    # No. points 430:

    the program would have placed some of your vertex data inside these index's

    instead of getting numbers size INT or LONG
    your getting FLOATS

    TOEE would crash if you tried to load this MOD
    -memory boundry error- crash to desktop-
     
    Last edited: Sep 5, 2013
  13. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    :yes:
    I see, so There the HEAD was referenced as a replace string inside the skm
    TOEE would see the ref HEAD (check materials.mes) and know to look @ path
    art\meshes\PCs\PC_Human_Male\head.mdf
    for the material def

    edit: maybe there race is also referenced inside the SKM
    near the MDF pointer

    PC human male
    09136: 00 00 00 00 43 48 45 53 54 00 2F 00 68 01 2F 00 |....CHEST./.h./.
    09152: 00 00 00 00 11 00 00 00 01 01 00 00 00 75 EA 77 |.............u.w
    09168: 00 00 00 08 B0 1C 2F 00 28 1C 2F 00 50 05 2F 00 |....../.(./.P./.
    09184: 28 1C 2F 00 30 1C 2F 00 88 00 00 00 00 00 00 00 |(./.0./.........
    09200: C1 60 40 00 C1 60 40 00 B0 FF 12 00 F4 64 FB 77 |.`@..`@......d.w
    09216: 48 16 F8 77 79 42 EA 77 D4 FE 12 00 01 00 00 00 |H..wyB.w........
    09232: 99 9E 36 00 00 00 00 00 E4 FE 12 00 87 CE 40 00 |..6...........@.
    09248: B0 FF 12 00 7B D7 40 00 FF FF FF FF 0E 00 00 00 |....{.@.........

    pc human female
    09136: 00 00 00 00 43 48 45 53 54 00 2F 00 68 01 2F 00 |....CHEST./.h./.
    09152: 00 00 00 00 11 00 00 00 01 01 00 00 00 75 EA 77 |.............u.w
    09168: 00 00 00 08 B0 1C 2F 00 28 1C 2F 00 50 05 2F 00 |....../.(./.P./.
    09184: 28 1C 2F 00 30 1C 2F 00 88 00 00 00 00 00 00 00 |(./.0./.........
    09200: C1 60 40 00 C1 60 40 00 B0 FF 12 00 F4 64 FB 77 |.`@..`@......d.w
    09216: 48 16 F8 77 79 42 EA 77 D4 FE 12 00 01 00 00 00 |H..wyB.w........
    09232: 99 9E 36 00 00 00 00 00 E4 FE 12 00 87 CE 40 00 |..6...........@.
    09248: B0 FF 12 00 7B D7 40 00 FF FF FF FF 0E 00 00 00 |....{.@.........

    these look to be identical
    I still dont understand the garbage after the path???


    ...interesting...

    I see what you mean; we dont need to change the MDF ref inside the SKM
    to create a new race, unless you wanted to create a sub type with a different texture reference.

    adding race DROW example
    {014}{HEAD:art\meshes\PCs\PC_DROW_Male\head.mdf}
    {015}{HEAD:art\meshes\PCs\PC_DROW_Female\head.mdf}
    ....
    then every paragraph line down adding the two refs for the drow
    for there body and equipment textures

    then of cource the adding the ref's inside
    meshes.mes
    addmesh.mes
    discription.mes
    protos.tab


    :thumbsup:good LUCK !
     
    Last edited: Sep 5, 2013
  14. XVicious

    XVicious Established Member

    Joined:
    Jun 21, 2013
    Messages:
    427
    Likes Received:
    8
    I know you are a little familiar with the GUI in TOEE

    Little off subject;

    heave you ever looked into cracking the MULTI player portion
    open?
    l\data_bk\TOEE3\mes\
    mutiplayer.mes
    Code:
    //
    // Multiplayer
    //
    // Index of MessageIDs
    // 0900-0999 : Multiplayer Server Starting Messages
    // 1000-1099 : Multiplayer Control UI Messages
    // 1100-1199 : Multiplayer Notice Messages
    // 1200-1299 : Multiplayer Chat Messages
    // 1900-1999 : Multiplayer Game Saving Messages
    // 2000-2099 : Multiplayer Party Messages
    // 3000-3099 : Multiplayer Internet Messages
    
    // Used with verification of packet info/etc.
    {10}{Succeeded}
    {11}{Failed}
    
    // Used with (Multiplayer) Preferences Interface
    {50}{On}
    {51}{Off}
    
    // Used with (Multiplayer) UI
    {60}{Open}
    {61}{Closed}
    
    {65}{Dying}
    
    
    // UI Window Titles
    {75}{None}
    {76}{Choose Connection}
    {77}{Choose Game}
    {78}{Player Preferences}
    {79}{Server Preferences}
    {80}{Connecting}
    {81}{Starting Server}
    
    // Choose Connection UI Buttons
    {100}{Join LAN Game}
    {101}{Join Internet Game}
    {102}{Host Game}
    {103}{Player Setup}
    {104}{Server Options}
    {105}{Cancel}
    
    // Choose Game UI Buttons
    {120}{Join}
    {121}{Cancel}
    
    // Choose Game UI Column Headings
    {170}{Server Name}
    {171}{Ping}
    {172}{# Players}
    {173}{Scenario}
    {174}{Status}
    
    
    // Starting Server UI Column Headings
    {180}{Server Name}
    {181}{# Players}
    {182}{Scenario}
    {183}{Status}
    
    {185}{Player Name}
    {186}{Ping}
    
    // Starting Server UI Buttons
    {190}{Start}
    {191}{Cancel}
    
    
    // Connecting UI Buttons
    {195}{Cancel}
    
    
    //
    {200}{Connecting...}
    {201}{Cannot Connect}
    {202}{Server Full}
    {203}{You are Banned from this Server}
    
    {240}{Lagging}
    {241}{Server Connection Lost}
    
    // Joined, transferring startup data
    {300}{Awaiting Game State...}
    {301}{Awaiting Scenario Info...}
    {302}{Awaiting Object Info...}
    {303}{Awaiting Game Start...}
    
    // Debug information -- Statistical Information
    {350}{Ping: %d}
    {351}{Packet Loss: %d}
    // Debug Information -- Specific Errors
    {360}{Game Time Difference: %d}
    {361}{Rnd Difference: %d}
    
    // (Multiplayer) Server Preferences Interface
    {500}{Change Name}
    {501}{Player Killing}
    {502}{Max Players}
    {503}{Done}
    
    // Player Preferences Interface
    {600}{Name}
    {601}{Done}
    
    // 0900-0999 : Multiplayer Server Starting Messages
    {900}{The module %s.dat could not be found. Clients which join your server may experience oddities if your data differs.}
    {901}{Could not load the specified module '%s'. Cannot continue.}
    {902}{No start map could be found for that module.}
    {903}{No PC data was found. Your character must be in error. Creating a default character.}
    
    // 1000-1099 : Multiplayer Control UI Messages
    {1000}{Status: %s}
    {1001}{Ready}
    {1002}{Waiting}
    {1003}{Loading}
    {1090}{Disconnect}
    {1091}{Ban}
    
    // 1100-1199 : Multiplayer Notice  Messages
    {1100}{Player %s(%d) has left the game.}
    {1101}{Player %s(%d) has been kicked from the game.}
    {1102}{Player %s(%d) has been banned, no connections from this host will be allowed.}
    {1103}{The server has unexpectedly disconnected, your game may be unavailable.}
    {1104}{Player has joined the game.}
    {1105}{The player has connected, resuming the game.}
    {1106}{Please wait a player is joining the game.}
    
    // 1200-1299 : Multiplayer Chat Messages
    {1200}{%s: %s}
    {1210}{You can't talk while dead.}
    {1211}{You can't talk while unconscious.}
    
    // 1900-1999 : Multiplayer Game Saving Messages
    // 1900 - character that signifies yes in a dialog
    // 1901 - character that signifies no in a dialog
    {1900}{y}
    {1901}{n}
    {1902}{Do you wish to save your character?}
    {1903}{Do you wish to export your character to Multiplayer?}
    {1904}{The character %s already exists. Do you wish to overwrite the file?}
    
    // 2000-2099 : Multiplayer Party Messages
    {2000}{%s joined the party.}
    {2001}{%s has joined you to their party.}
    {2002}{%s left the party.}
    {2003}{You have left the party: %s}
    
    {2005}{Join Failed: %s.}
    {2006}{Join Failed: %s cannot join self.}
    {2007}{Join Failed: %s is already in a party.}
    
    {2010}{Disband Failed: %s.}
    {2011}{Disband Failed: %s is not in a party.}
    {2012}{Disband Failed: %s is not in your party.}
    
    {3000}{Waiting for a response from WON servers.}
    {3001}{Waiting for Message Of The Day.}
    {3002}{Checking for Arcanum updates.}
    {3003}{A newer version of Arcanum is available (and may be required for internet play), do you wish to upgrade?}
    
    Cracking this open would be a
    GOD-send ,gasp

    WHY hasn't CO8 done this!! ????
    Dang
     
  15. Zoltec

    Zoltec Pгōdigium

    Joined:
    Apr 22, 2012
    Messages:
    547
    Likes Received:
    16
    Perhaps most twas right, thee have taught me informative things. But I'd already tried adding rows in every paragraph and it's not working, I know all the necessary connections to make i.e. meshes.mes, addmesh.mes, description.mes, onames.mes, protos.tab, stat.mes, stat_enum.mes, and etc. In the end twas me who ended as a failure. Alas, I cannot make the Derro race to connect with the new skin/texture I implemented. And I've been thinking that .SKM file lies the answers to our questions. The race must be hidden deeply within the symbols, only waiting to be deciphered! :tears:

    I..I..need to connect my .SKM file through {14} {} in materials.mes, so our charname would be able to equip properly the items that don't have addmesh or have an addmesh(partial), as it will remain invisible in their bodies. Though, addmesh can be viewed because, they are atop of the gears, the real pain is the materials.mes items, they are not being rendered because the line {14} cannot be read by the game, except by adding a new race which is impossible without .dll hack. That's why I seek the .SKM files themselves, to be able to find ways in overriding the line {14} to be read by the .SKM files instead of {0}{PC_Human_Male} or {1}{PC_Human_Female} or {2}{PC_Dwarf_Male}.
     
    Last edited: Sep 5, 2013
Our Host!