Home Risen Risen2 Risen3 Forum English Russian

Registrieren Hilfe Kalender Heutige Beiträge
Ergebnis 1 bis 3 von 3
  1. #1 Zitieren
    Lehrling
    Registriert seit
    Mar 2015
    Beiträge
    49
    Some weapons in Risen are blocked for Nameless Hero, for example broom or ogre axe (i have no idea how they named it in English). Some NPC can fight with them (Tilda can fight with broom and Gryger can fight with his big club), but a nameless hero can't because there is no script for him to equip them.

    I was trying to change it with edit command, but i failed, because i can't edit already owned item, and if i edit item and then equip it, all properties come back to normal. Then i tried to edit templates with TPLedit (v0.02), but it was pointless to, because it don't allow me to edit CanEquipScript and similar, because it's "not available in this version".

    Any ideas what else i can do to equip them?
    xenonisbad ist offline Geändert von xenonisbad (31.03.2015 um 20:34 Uhr)

  2. #2 Zitieren
    Ehrengarde Avatar von Baltram
    Registriert seit
    Jun 2006
    Beiträge
    2.264
    You can edit the templates using Script_Extensions.dll which you need to put in Risen\bin\scripts (documentation here).
    For it to work you also need to put mountlist_packed.ini in your Risen\bin directory.

    As an example I modified It_Broom.tple (unzip to Risen\data\common\templates) so it can be used as a weapon.
    Here is what you can do to replicate this:

    1. Enable debug mode via [Ctrl] + [Alt] + [NumPad0]

    2. Open the console and subsequently execute the following commands:
    (Note that using the autocompletion [Tab] for both command names and parameters will save you quite some time!)

    Code:
    DynEntity Spawn It_Broom                           // Spawns the broom
    DynEntity Spawn It_1H_Club                         // Any weapon would do here
    DynEntity RemovePropertySet #r2 gCInteraction_PS   // This is supposed to remove the property set gCInteraction_PS from the broom and although an error message is displayed it partly works
    DynEntity AddPropertySet #r2 gCInteraction_PS #r1  // Copies the property set gCInteraction_PS from the club to the broom
    DynEntity Edit #r2                                 // Opens the property editor for the broom

    3. Navigate to the 'Item' property set and set the properties CanEquipScript, OnEquipScript and OnUnEquipScript to 'CanEquipMeleeWeapon', 'OnEquipMeleeWeapon' and 'OnUnequipMeleeWeapon' respectively.
    (Navigate back to the property set list and then re-open the Item property set to see if your changes were successful - otherwise there was a typo or you forgot to confirm by pressing [Enter])

    4. Execute the command DynEntity ExportAsTemplate #r2 in the console. This saves It_Broom.tple in your data\common\templates directory. (Note that this directory should NOT contain the original template files. Instead keep the unpacked original tples in the directory data\common\_templates as they are write-protected.)
    Baltram ist offline Geändert von Baltram (30.03.2015 um 18:59 Uhr)

  3. #3 Zitieren
    Lehrling
    Registriert seit
    Mar 2015
    Beiträge
    49
    Thanks a lot! I just go step by step and it worked for me, then I analyzed everything you told me to do. It seems that I understand everything what have i done and why. This Script_Extensions.dll is pretty usefull tool. It can play animations too!
    xenonisbad ist offline

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •