• Уважаемые гости и новички, приветствуем Вас на нашем форуме
    Здесь вы можете найти ответы практически на все свои вопросы о серии игр «Готика» (в том числе различных модах на нее), «Ведьмак», «Ризен», «Древние свитки», «Эра дракона» и о многих других играх. Можете также узнать свежие новости о разработке новых проектов, восхититься творчеством наших форумчан, либо самим показать, что вы умеете. Ну и наконец, можете обсудить общие увлечения или просто весело пообщаться с посетителями «Таверны».

    Чтобы получить возможность писать на форуме, оставьте сообщение в этой теме.
    Удачи!
  • Друзья, доброго времени суток! Спешите принять участие в оценке работ на конкурсе "Таинственные миры" 2024!
    Ждем именно вас!

    Ссылка на конкурсную тему - тык
    Ссылка на тему с работами участников- тык

Готика 3 Script_ItemUseFuncEnabler + Cure Disease/Poison potion fix

fyryNy

Участник форума
Регистрация
2 Мар 2019
Сообщения
63
Благодарности
159
Баллы
180
This plugin adds functionality of executing script functions after using consumable item (potions, food, etc.).
Mostly created it to get rid of that annoying spell casting animations while drinking Potion against diseases or Antidote potions.
To utilize this, valid function name needs to be provided in ScriptUseFunc inside item's gCInteraction_PS property set. Also Spell field inside gCItem_PS has to be empty, as game will prioritize casting the spell if it's set, and ScriptUseFunc won't be executed then.
Example:
QHnBrkM.png

Providing invalid func name will throw an error on execution, which can be simply ignored.

Multiple functions can be provided, but have to be separated by a semicolon ;
For example you can create potion with ScriptUseFunc set to
Код:
MagicCureDisease;MagicCurePoison
and this potion will cure both poison and disease.

Functions are always executed on player entity, and are executed only if player uses the item.
I'm not sure if there are any usable functions right now, probably not that many. I have not checked anything besides curing disease and poison, which were my main goal.
Functions from summon/transform/teleport spells cannot be executed this way, as they require additional parameters to be passed, which can't be done at this moment and I see no point in doing that.

New functions can be added with gothic3sdk, I hope I could provide simple tutorial how to add new functions in near future, but we'll see what comes out of it, as I'm terrible teacher and my knowledge is limited, but maybe Georgeto will help with that (or someone else that knows a few things about the sdk).

With the script itself I provide edited templates for items It_Potion_CureDisease and It_Potion_CurePoison as working examples.

As always, tested only on latest game patch with parallel patch.

Special thanks to George for helping me again

 
Последнее редактирование:
Сверху Снизу