Gothic II: Gold Classic

Gothic II: Gold Classic

Telekinesis
 Este tema se ha marcado como fijo, por lo que probablemente sea importante
D36  [desarrollador] 14 JUL 2022 a las 9:25 a. m.
For developers
To use telekinesis spell in your mod, add rune and scroll instances to your scripts:
const int SPL_Cost_Telekinesis = 1; //mana consumption per second //rune instance ItRu_Telekinesis(C_ITEM) { name = NAME_RUNE; mainflag = ITEM_KAT_RUNE; flags = 0; value = 1000; //price visual = "ItRu_Telekinesis.3ds"; material = MAT_STONE; spell = 65; //spell index - do not change! mag_circle = 1; //magic circle to use rune wear = WEAR_EFFECT; effect = "SPELLFX_WEAKGLIMMER"; description = "Telekinesis"; text[0] = NAME_Mag_Circle; count[0] = mag_circle; text[1] = "Mana per sec."; count[1] = SPL_Cost_Telekinesis; text[5] = NAME_Value; count[5] = value; }; //scroll instance ItSc_Telekinesis(C_ITEM) { name = NAME_Spruchrolle; mainflag = ITEM_KAT_RUNE; flags = ITEM_MULTI; value = 150; //price visual = "ItSc_Telekinesis.3DS"; material = MAT_LEATHER; spell = 65; //spell index - do not change! cond_atr[2] = ATR_MANA_MAX; cond_value[2] = SPL_Cost_Telekinesis; wear = WEAR_EFFECT; effect = "SPELLFX_WEAKGLIMMER"; description = "Telekinesis"; text[0] = NAME_MageScroll; text[1] = "Mana per sec."; count[1] = SPL_Cost_Telekinesis; text[5] = NAME_Value; count[5] = value; };
After that you will be able to integrate them to the gameplay: add to trade, insert into world, implement in crafting and teaching, etc.

Spell uses index 65, which is not used in the original game. Please don't take this index with another spell.

Also the code above can be added to the text file with .d extension and placed in system\autorun folder. This will allow you, for example, to change the magic circle requirement for rune without interfering with game's scripts.

To restrict certain items from being moved add them to the C_CanMoveItemWithTelekinesis function. Example:
func int C_CanMoveItemWithTelekinesis(var C_Item itm) { if(Hlp_IsItem(itm,ItMi_Nugget)) { return FALSE; }; return TRUE; };
Última edición por D36; 30 NOV 2024 a las 8:14 a. m.