Home Risen Risen2 Forum English Russian

Register FAQ Calendar Today's Posts
Results 1 to 11 of 11
  1. #1 Reply With Quote
    Mod-Starter Project  LordOfWAR's Avatar
    Join Date
    Mar 2008
    Location
    Ukraine
    Posts
    3,648
    Hello all .

    Now it is possible to edit R2 tple files (properties of any NPCs, Objects or Items). It is not an final version, because I am still not implemented all arrays support, but most of values already can be changed.

    Download: http://www.worldofrisen.de/english/download_86.htm

    How to use:

    1. Extract "...\risen 2\data\common\templates.pak" using Risenaut.
    2. Launch Tple editor.
    3. Open tple file.
    4. Change needed values.
    5. Save tple file.
    6. Copy new tple file into "AppData\Risen2\Config" folder (not recomended, because it didn't work for some tple files) or pack it back to pak archive.

    Tple editor have three types of visual editors:

    1. Simple editor:



    2. Multi-editor (for editing arrays & some complicated data types)



    3. Hex-editor



    As you can see, here is also checkbox - "Enable HEX-editor for all PropertySets". If you will enable this, then only hex editor will be shown for all data types, even if save/load functions for needed datatype exists. So, you can change some value and then check how it will looks under HEX editor. On HEX editor window you also can import/export (load/save) binary data.

    Some values (enums, scripts, bool types) already have their own "PickList" (for example you can change True to False).

    ---

    You probably will notice that tple files also have eCTemplateProxyEntity data types (guids) -> it is guids (references to tple files).

    Tple file have two guids - first one (parent) and second, lets say - "child". And seems like game works only with slave/child values (for example only child values used for refering to tple files in eCTemplateProxyEntity).

    List of all parent & child tple guids you can find here: tple_guid_list.zip

    If someone will have any questions, just post it here, I think that some users will be able to answer .

    ---

    Credits: Thanks a lot to NicoDE for additional info about tple/enums/bcMatrix format, hashes & bcMatrix unit

    LordOfWAR is offline Last edited by LordOfWAR; 02.09.2012 at 18:10.

  2. #2 Reply With Quote
    Modderator  |Lorn|'s Avatar
    Join Date
    Aug 2007
    Location
    Gothic 3 - Editing
    Posts
    4,340
    Thanks for this! Very nice!
    |Lorn| is offline

  3. #3 Reply With Quote
    Ritter Baltram's Avatar
    Join Date
    Jun 2006
    Posts
    1,030
    Fantastic!

    There's a small bug: If one clicks on an enum property (e.g. UseType), the program takes some seconds to load the values which leads to "Access Violation" errors when clicking on a different PropertySet in the meantime.

    EDIT:
    The program really should modify the three time stamps that are present in each .tple file upon saving. This is needed for overriding the instances in .lrent files.
    Baltram is offline Last edited by Baltram; 27.06.2012 at 15:02.

  4. #4 Reply With Quote
    Ritter [>Silverback<]'s Avatar
    Join Date
    Nov 2005
    Location
    ung unmöglich
    Posts
    1,816
    This is great!
    Thanks.
    - Macht's gut und danke für den Fisch. -
    ~ Phynkchen alias [>Silverback<] ~

    _________________________________
    Es ist sehr viel besser, wenn man mehr kann als man macht,
    als wenn man mehr macht als man kann.
    [>Silverback<] is offline

  5. #5 Reply With Quote
    Mod-Starter Project  LordOfWAR's Avatar
    Join Date
    Mar 2008
    Location
    Ukraine
    Posts
    3,648
    Quote Originally Posted by Baltram View Post
    There's a small bug: If one clicks on an enum property (e.g. UseType), the program takes some seconds to load the values which leads to "Access Violation" errors when clicking on a different PropertySet in the meantime.

    EDIT:
    The program really should modify the three time stamps that are present in each .tple file upon saving. This is needed for overriding the instances in .lrent files.
    I am just updated file to v0.8 on the same download page - http://www.worldofrisen.de/english/download_86.htm

    Bug should be fixed and Tple editor will update all timestamps on save .

    LordOfWAR is offline Last edited by LordOfWAR; 28.06.2012 at 15:38.

  6. #6 Reply With Quote
    Ritter Baltram's Avatar
    Join Date
    Jun 2006
    Posts
    1,030
    Quote Originally Posted by LordOfWAR View Post
    I am just updated file to v0.8 on the same download page - http://www.worldofrisen.de/russian/download_86.htm

    Bug should be fixed and Tple editor will update all timestamps on save .
    Thank you!
    Baltram is offline

  7. #7 Reply With Quote
    Drachentöter Teron Gorefiend's Avatar
    Join Date
    Nov 2006
    Location
    im Alchemielabor
    Posts
    4,256
    hi looks great, however I have a few questons.

    Quote Originally Posted by LordOfWAR View Post
    [*]Copy new tple file into "AppData\Risen2\Config" folder (not recomended, because it didn't work for some tple files) or pack it back to pak archive.
    which archiv, where is this pak order?

    I only tested this tool for mayby 1 min but how can I chance bonus from equipment?
    I guess that I can change them in OnUseModifySkills. But unluckily this area is only aviable in hex editor. Other propertys like gold value can easy be changed because they arent in hex editor.

    For example I wanted a hat with +5bulletprotection, +5musket skill and +5maximum blood. How can I do that?


    Other questions:
    -can I give NPC enemys new weapons?
    -can I change value of skills. for example increase the critical strke change and the gold cost to learn this
    -can I increase the maximum attribut level? From 10 to lets say 12. Alternative, can I reduce the amount of glory per kill.
    Teron Gorefiend is offline

  8. #8 Reply With Quote
    Ehrengarde JFaron's Avatar
    Join Date
    Sep 2010
    Location
    Schleswig-Holstein, DE
    Posts
    2,903
    Quote Originally Posted by Teron Gorefiend View Post
    which archiv, where is this pak order? [...]
    Open [Steam]\SteamApps\common\risen2\data\ and choose one of the subfolders. You'll see *.pak-archives which can be extracted with risenAUT. The templates (*.tple) are placed in data\common\templates.pak

    -can I give NPC enemys new weapons?
    Yes, try opening an NPC with the Tple Editor. But I think these information are stored somewhere in the lrents, which means, it's not possible yet.

    -can I change value of skills. for example increase the critical strke change and the gold cost to learn this
    The critical what? If you are talking about the damage done by critical hits I don't know...
    The gold costs are stored in the info files. Get Nico's Quest Export and open the compiled_infos.bin in data\compiled\library\. Choose an info file and you'll see "GoldCosts" somewhere. You could change this value using an hex editor, but it'd be very hard to change every value using such a tool.

    -can I increase the maximum attribut level? From 10 to lets say 12.
    It should be possible, but I have no idea.

    Alternative, can I reduce the amount of glory per kill.
    Try to increase the level of the monsters using the tple-Editor.

    edit: Ok. I tried to "analyze" OnUseModifySkills Here is the important stuff:
    Spoiler:(zum lesen bitte Text markieren)
    Code:
    [...]
    
    unint32_t variable_type				// e. g. "int"
    unint32_t bla_hash				// e. g. "Amount"
    unint32_t no_idea1
    unint32_t Value
    
    unint32_t enum?					// e. g. Assault "enum gESkill"
    unint32_t bla2_hash				// e. g. It_Rif_Assault "Skill"
    unint32_t no_idea2
    unint32_t bla3_hash 				// e. g. It_Rif_Assault "gESkill_Skill_Firearms_Musket"
    
    [...]

    Note: The following is completely theoretical. I didn't try it ingame and I did only check a few weapons (Rifles, Shotguns and sabres). I think (hope) it work's for clothing either.

    To modify the kind of bonus you have to look for enum gESkill, of course it's not shown like that. You are looking for the DWORD (=4 bytes) C5 5B 44 90, in characters it's .[D.; You should find it at (13|3), I think.
    The next 4 Bytes (In the tple-Editor 1 Byte = 1 field = 2 hex-characters) should ever be 84 6B 19 0E. It says Skill.
    Ignore the following DWORD (08 00 00 00) ...
    ... and pay attention to the next one: It controls which skill will be increased. In "It_Rif_Assault" you'll see FE D3 52 E0. If you turn the values you'll end in E0 52 D3 FE. If you search for this value in the *.ini-file of Nico's Quest Tool (without spaces!) you'll find gESkill_Skill_Firearms_Musket. I'm pretty sure that's the Musket-Skill

    To modify the bonus you need to find an integer (int) and "Amount". So have a look for 30 80 88 0B @(14|2) and F9 A2 71 A7 @(1|3). Ignore the next DWORD (04 00 00 00), the following one is the Value, you want to change. You have to enter the value as a hexadecimal value. You could use this converter.

    Last but not least: I have no idea which parts have to be duplicated to apply several boni to one item.

    I hope it's understandable...

    Unendliche doch ungenutze Möglichkeiten. Risen Modding.
    Bereit zu Sterben? Mass Effect Hardcore Challenge.
    JFaron is offline Last edited by JFaron; 07.07.2012 at 20:54. Reason: added information

  9. #9 Reply With Quote
    Mod-Starter Project  LordOfWAR's Avatar
    Join Date
    Mar 2008
    Location
    Ukraine
    Posts
    3,648
    Hi Teron Gorefiend .

    I am created tple editor by just adding "rewrite" procedures for needed data types. You can change something, but I don't know (can't be sure) where to edit needed values. But let's take a look:

    Quote Originally Posted by Teron Gorefiend View Post
    I only tested this tool for mayby 1 min but how can I chance bonus from equipment?

    I guess that I can change them in OnUseModifySkills. But unluckily this area is only aviable in hex editor. Other propertys like gold value can easy be changed because they arent in hex editor.

    For example I wanted a hat with +5bulletprotection, +5musket skill and +5maximum blood. How can I do that?
    Probably you are right, items skill bonus should be edited in "Skills arrays" -> I will add their support inside tple editor in next 1-2 week (currently I don't have so much time as recently )


    Quote Originally Posted by Teron Gorefiend View Post
    -can I give NPC enemys new weapons?
    I don't remember if there is items values (datatypes) inside tple files which can do that... Probably it can be changed in some other filetype (for example *.lrents).

    Quote Originally Posted by Teron Gorefiend View Post
    -can I change value of skills. for example increase the critical strke change and the gold cost to learn this
    -can I increase the maximum attribut level? From 10 to lets say 12.
    You can change some basic skill values inside NPC's tple files, like - "Blood, ProtectionBlade ...". But for editing max attribut level (except blood (you can change MaxBlood value inside NPC's tple -> class gcSkills_NPC_PS -> MaxBlood)), or for editing "gold cost to learn skills" you should edit lrent or infos (bin) files.

    Quote Originally Posted by Teron Gorefiend View Post
    Alternative, can I reduce the amount of glory per kill.
    Yes, it is possible to change it inside tple files - "tple -> class gCNPC_PS -> XP".


    LordOfWAR is offline

  10. #10 Reply With Quote
    Research NicoDE's Avatar
    Join Date
    Dec 2004
    Posts
    6,604
    Quote Originally Posted by Teron Gorefiend View Post
    I guess that I can change them in OnUseModifySkills. But unluckily this area is only aviable in hex editor.
    I assume you have to wait until LordOfWAR implements an array editor.

    The format is quite simple:
    Code:
    class bTObjArray<T> {
        uint32_t Count;
        T        Array[Count];
    };
    But I don't know how much effort is required to implement it in the program (might be a lot).

    The bCRuntimeClass format is already documented (starts with "GEC0"). Let's have a look at the gCItem_PS.OnPossesModifySkills in data\common\templates\Items\LegendaryItems\It_Blue_BLA_Comb.tple (one element):
    Code:
    class gCModifySkill (0xBAFAF46C), 1 {
    	Properties {
    		Modifier (0xDCEA4FF4), enum gESkillModifier (0xD56956B4), 0x00000008 {gESkillModifier_AddValue (0x4B7DC864), 0x00000000 (0)}
    		Amount (0xA771A2F9), int (0x0B888030), 0x00000004 {0x00000001 (1)}
    		Skill (0x0E196B84), enum gESkill (0x90445BC5), 0x00000008 {gESkill_Stat_Blades (0x518D5E55), 0x00000003 (3)}
    	}
    	Serializer {
    		class gCModifySkill (0xBAFAF46C), 1, 0x00000000 {}
    		class gCSkillValue (0xE37F42A1), 1, 0x00000000 {}
    		class gCSkillValueBase (0x40D787FC), 1, 0x00000000 {}
    		class bCObjectBase (0x84ADA072), 1, 0x00000000 {}
    	}
    }
    (note that I exchanged the type and the name to make the dump more readable - in the bin the TypeHash is stored first, followed by the NameHash)
    Since gCModifySkill have all the same size, hex-editing is not that complicated, ones you have exported an original entry.



    ps: All registered enumeration values and hashes are documented here:
    http://forum.worldofplayers.de/forum...8#post19164278
    Code:
    [...]
    0xD56956B4=enum gESkillModifier
    [...]
    0x940D6033=gESkillModifier_AddPercentOfMax
    0x4B7DC864=gESkillModifier_AddValue
    0x5A4E7CF3=gESkillModifier_SetToMax
    0x28843EAA=gESkillModifier_SetToValue
    [...]
    [enum gESkillModifier]
    gESkillModifier_AddValue=0 (default)
    gESkillModifier_SetToMax=1
    gESkillModifier_SetToValue=2
    gESkillModifier_AddPercentOfMax=3
    [...]
    "Some components report an error/warning but you have decided to ignore them."
    NicoDE is offline Last edited by NicoDE; 08.07.2012 at 14:47.

  11. #11 Reply With Quote
    Mod-Starter Project  LordOfWAR's Avatar
    Join Date
    Mar 2008
    Location
    Ukraine
    Posts
    3,648
    Tple editor executable file updated to v0.9 on same download page .

    Some part of arrays already implemeted and it is now possible to edit items skill bonus, required skills, crafting ingridients, interaction arrays and many other things:



    Already parsed arrays:

    Code:
    class bTObjArray<class bCString>
    class bTObjArray<class eCEntityProxy>
    class bTObjArray<class eCPrefabMesh>
    class bTObjArray<class eCTemplateEntityProxy>
    class bTObjArray<class gCCraftIngredient>
    class bTObjArray<class gCInteraction>
    class bTObjArray<class gCModifySkill>
    class bTObjArray<class gCNavOffsetPoint>
    class bTObjArray<class gCSkillValue>
    class bTValArray<class bCVector>
    class bTValArray<float>

    Currently unpares arrays data-types:

    Code:
    class bTRefPtrArray<class gCStateGraphState *> //Contain unknown to me serialiser data...
    class bTRefPropertyArray<class eCCollisionShapeBase *> //Have unknown to me "class bcMotion" as one of the properties.
    
    
    Empty arrays:
    
    class bTObjArray<class eCFlockingFieldObstacle>
    class bTObjArray<class eCWeatherOverwrite>
    class bTObjArray<struct gCNavigation_PS::gSTrailElement>
    class bTObjArray<struct gCNavigation_PS::gSVisitedNavCluster>
    class bTRefPropertyArray<class eCAudioEmitterShape *>
    class bTRefPropertyArray<class gCStateGraphEventFilter *>

    LordOfWAR is offline

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •