-
Zitat von Milky-Way
Sehr schön! Damit sollte es tatsächlich am besten gehen. Ich denke die anderen Vorschläge sind zu umständlich.
-
Zitat von Milky-Way
Zitat von mud-freak
Sehr schön! Damit sollte es tatsächlich am besten gehen. Ich denke die anderen Vorschläge sind zu umständlich.
Das klingt gut.
-
Lehrling
Hello, when trying to install this I get these errors:
Constants.d:
Could not locate spellFXAniLetters.
Spell_ProcessMana.d:
Could not locate end of if-block.
Text.d:
Could not locate TXT_SPELLS.
Here is what its looking for in the files:
Constants.d:
Code:
const string spellFxAniLetters[100] =
{
"SLE",
"HEA",
"FBT",
"HEA",
...
};
Spell_ProcessMana.d
Code:
func int Spell_ProcessMana(var int manaInvested)
{
var int activeSpell;
activeSpell = Npc_GetActiveSpell(self);
if(activeSpell == SPL_PalLight)
{
return Spell_Logic_PalLight(manaInvested);
};
if(activeSpell == SPL_PalLightHeal)
{
return Spell_Logic_PalLightHeal(manaInvested);
};
//so on and so on.
if(activeSpell == SPL_SummonMud)
{
return Spell_Logic_SummonMud(manaInvested);
};
return FALSE;
};
Text.d:
Code:
const string TXT_SPELLS[100] =
{
"Święty płomień",
"Małe uleczenie",
"Święta strzała",
"Średnie uleczenie",
"Wypędzenie zła",
...
"TXT_SPL_RESERVED_96",
"TXT_SPL_RESERVED_97",
"TXT_SPL_RESERVED_98",
"TXT_SPL_RESERVED_99"
};
-
Zitat von Nefario
Hello, when trying to install this I get these errors:
Hi Nefario, I am sorry you ran into issues. Thank you for giving such detailed information about the errors and affected files! This makes helping you a lot easier.
These issues arise mostly because your scripts varry too much from the original scripts. This is of course not a bad thing, but the tool has trouble identifying the positions to insert new code.
- The first error (Constants.d about the spellFXAniLetters) occurred, because the tool is expecting the index of spellFxAniLetters to be MAX_SPELL not 100 as it is in your case. It should look something link this:
Code:
const string spellFxAniLetters[100MAX_SPELL] =
{
"SLE",
"HEA",
"FBT",
"HEA",
...
};
- The second file (Spell_ProcessMana.d) is very heavily altered in formatting. Nevertheless, it should work if you simply remove return FALSE; which is not necessary anyway, since the function ends afterwards. It should look something like this:
Code:
func int Spell_ProcessMana(var int manaInvested)
{
var int activeSpell;
activeSpell = Npc_GetActiveSpell(self);
if(activeSpell == SPL_PalLight)
{
return Spell_Logic_PalLight(manaInvested);
};
if(activeSpell == SPL_PalLightHeal)
{
return Spell_Logic_PalLightHeal(manaInvested);
};
//so on and so on.
if(activeSpell == SPL_SummonMud)
{
return Spell_Logic_SummonMud(manaInvested);
};
return FALSE;
};
- The third error (Text.d) is related to the first. It should look like this:
Code:
const string TXT_SPELLS[100MAX_SPELL] =
{
"Święty płomień",
"Małe uleczenie",
"Święta strzała",
"Średnie uleczenie",
"Wypędzenie zła",
...
"TXT_SPL_RESERVED_96",
"TXT_SPL_RESERVED_97",
"TXT_SPL_RESERVED_98",
"TXT_SPL_RESERVED_99"
};
Of course MAX_SPELL needs to be defined before hand in the Constants.d (if it isn't already) like so:
Code:
const int MAX_SPELL = 100;
I hope this fixes the errors. If not, please say so
Thanks for checking it out btw!
-
Lehrling
This fixed it. The changes in formatting must have happened because I based my mod on decompiled L'Hiver scripts using GothicSourcer. Thanks for the help!
-
Ich weiss nicht, ob jemand, der den Erhebenzauber (der mit den hochfahrenden Säulen aka. Elevate) schon benutzt hat, gemerkt hat, dass in seltenen Fällen beim Zaubern nichts passiert und manchmal der Cast-Effekt fehlt.
Während dem Erstellen von Blink (was ja auch ein Aufrechterhaltungszauber ist), bin ich dem Grund dafür glaube ich auf die Schlichte gekommen. Ich habe noch nichts dem bezüglich an Elevate getestet, aber ich bin mir sicher es liegt an der Animation.
Ein paar mehr Details für Interessierte:
So wie es instante und investierbare Zauber gibt, so sind auch (nur manche!) Animationen in der Humans.mds aufgeteilt in "Cast" und "Shoot". Das war mir so weit klar, aber ich dachte das läge einfach an der Komplexität der Animationen. Beim übernehmen der alten Skripte aus 2010 habe ich nicht mehr darauf geachtet. Aber wenn man für Investierzauber eine Animation festlegt die nicht in diese beiden Teile ("Cast" und "Shoot") eingeteilt ist, wird das Cast-Skript (Spell_Cast_*) bei zu langem Gedrückt-halten nicht aufgerufen. Ich habe gerade die Skripte nicht hier, aber ich werde das mal testen und hier einen kleinen Fix zur Verfügung stellen. (Einfach den Eintrag in der Humans.mds als neue Animation kopieren und dort in "Cast" und "Shoot" aufteilen).
Ein Fix dürfte denke ich auch die Inkonsistenz in der AI beheben, bei der ein NPC nicht so hoch fährt wie er soll, d.h. nicht lang genug castet (ist ja klar: wenn die Animation zu Ende ist hört der NPC auf).
Stay tuned. Kann ne Weile dauern, bis ich dazu komme. Dazu komme ich nicht mehr. Aber sollte mit der Erklärung oben relativ leicht sein, es selbst zu fixen.
Geändert von mud-freak (03.12.2016 um 18:47 Uhr)
-
Wie in der Readme bereits erwähnt, setzt der Manasucht-Zauber (tausche Mana gegen Lebensenergie) mindestens einen Manapunkt voraus, obwohl nur Lebensenergie abgezogen ist.
Zitat von Readme.txt
Achtung: Leider benötigt der Zauber minimal einen Manapunkt. Um das zu lösen wollte ich nicht extra Ikarus integrieren.
Wer den Zauber in diesem Aspekt verbessern möchte, kann sich an GiftGrüns Thread orientieren.
-
Adventurer
Hey all, I've made a little script to contribute:
This script enables NPCs to parry incoming spells using a randomizer, with a huge hand from mud-freak on coding:
into C_CanNpcCollideWithSpell
Code:
if(self.guild == GIL_DMT)
{
var int randomparry;
randomparry = Hlp_Random(3);
if(randomparry <= 1 && !C_BodyStateContains(self,BS_PARADE))
{
var int hAniCtrl; hAniCtrl = MEM_ReadInt(_@(self)+2432); // oCNpc.anictrl
const int oCAniCtrl_Human__IsInCastAni = 7047264; //0x6B8860
const int call = 0;
if (CALL_Begin(call)) { // Recyclable call (better performance)
CALL__thiscall(_@(hAniCtrl), oCAniCtrl_Human__IsInCastAni);
call = CALL_End();
};
if (!CALL_RetValAsInt()) // Return value: is the npc currently casting
{
AI_PlayAniBS(self, "S_MAGPARADE",BS_PARADE);
return COLL_DONOTHING;
};
};
};
What it does: On spell collision, if the NPC is not casting the random number will determine if he'll parry the spell or not (no damage applied, no effects applied).
If he's casting, he will not be able to parry the spell.
For now it works on Dementors only, but you can easily expand that to other guilds.
Have fun with it!
Geändert von Vic7im (10.12.2016 um 14:20 Uhr)
-
Zitat von Vic7im
Hey all, I've made a little script to contribute:
This script enables NPCs to parry incoming spells using a randomizer, with a huge hand from mud-freak on coding:
into C_CanNpcCollideWithSpell
Code:
if(self.guild == GIL_DMT)
{
var int randomparry;
randomparry = Hlp_Random(3);
if(randomparry <= 1 && !C_BodyStateContains(self,BS_PARADE))
{
var int hAniCtrl; hAniCtrl = MEM_ReadInt(_@(self)+2432); // oCNpc.anictrl
const int oCAniCtrl_Human__IsInCastAni = 7047264; //0x6B8860
const int call = 0;
if (CALL_Begin(call)) { // Recyclable call (better performance)
CALL__thiscall(_@(hAniCtrl), oCAniCtrl_Human__IsInCastAni);
call = CALL_End();
};
if (!CALL_RetValAsInt()) // Return value: is the npc currently casting
{
AI_PlayAniBS(self, "S_MAGPARADE",BS_PARADE);
return COLL_DONOTHING;
};
};
};
What it does: On spell collision, if the NPC is not casting the random number will determine if he'll parry the spell or not (no damage applied, no effects applied).
If he's casting, he will not be able to parry the spell.
For now it works on Dementors only, but you can easily expand that to other guilds.
Have fun with it!
Thanks for sharing! This is really nice!!
-
Neuling
Hallo,
@mud-freak danke noch mal für deine schnelle Antwort via pm. Leider hat es nicht funktioniert und wenn ich die Schnellfeuer-Zauber ausführen möchte zuckt er immer noch mit den Schultern als hätte er nicht genug Mana. :S
Hier der Code aus meiner startup.d
vielleicht hab ich da einfach nur was falsch geschrieben?
Code:
func void INIT_GLOBAL()
{
// wird fuer jede Welt aufgerufen (vor INIT_<LevelName>)
Game_InitGerman();
MEM_InitAll();
LeGo_Init(LeGo_FrameFunctions | GFA_LEGO_FLAGS);
GFA_Init(GFA_ALL & ~GFA_REUSE_PROJECTILES);
MoreAlphaVobs(2048); //normal: 256
MoreAlphaPolys(16384); //normal: 2048
CanDropItem_Init();
};
-
Zitat von Liri
Hallo,
@mud-freak danke noch mal für deine schnelle Antwort via pm. Leider hat es nicht funktioniert und wenn ich die Schnellfeuer-Zauber ausführen möchte zuckt er immer noch mit den Schultern als hätte er nicht genug Mana. :S
Ich kann mir vorstellen, dass das Schulterzucken darauf hinweist, dass du kein Ziel im Fokus hast. Der ist als Fokuszauber angelegt, wegen eines Problems in der Animation + Flugbahn der Geschosse.
-
Neuling
Ich habe mir jetzt einen sauberen Ordner angelegt und LeGo, Ikarus und dein Zauberpaket frisch installiert. Wieder das selbe Problem.. alles bis auf die Schnellfeuer-Zauber funktionieren. Wiedermal nur das Schulter zucken.
Ich habe auch jemanden im Fokus. Dieses mal ist es sogar ohne freies Zielen.
-
Zitat von Liri
Ich habe mir jetzt einen sauberen Ordner angelegt und LeGo, Ikarus und dein Zauberpaket frisch installiert. Wieder das selbe Problem.. alles bis auf die Schnellfeuer-Zauber funktionieren. Wiedermal nur das Schulter zucken.
Ich habe auch jemanden im Fokus. Dieses mal ist es sogar ohne freies Zielen.
Ich habe mal in das Skript reingeschaut und da wird mittels if (!C_NpcIsHero(self)) abgefragt, ob der Caster der Spieler ist - um genau zu sein, ob er PC_Hero ist. Die Abfrage könntest du durch if (!Npc_IsPlayer(self)) ersetzen, wenn dein Spieler nicht (immer) der PC_Hero ist oder auch einfacher weg lassen. (Ansonsten könnte zu wenig Mana die Ursache vom Schulternzucken sein, aber das hast du sicherlich überprüft.)
Geändert von mud-freak (03.03.2019 um 14:16 Uhr)
-
Neuling
Danke! Daran lag es x.x Habe im Spiel nie den Hero genommen, da ich einen anderen NPC hatte, der gleich alle Zauber, Mana und Kreise hatte.
Vielen Dank noch mal!
PS: Dein Zauberpaket ist super!
-
@mud-freak:
Hast du vielleicht eine Idee warum der Kettenblitz aus G1 in G2 keinen Schaden anrichtet bzw. die ZS_Zapped nicht auslöst?
-
Zitat von Liri
Danke! Daran lag es x.x Habe im Spiel nie den Hero genommen, da ich einen anderen NPC hatte, der gleich alle Zauber, Mana und Kreise hatte.
Vielen Dank noch mal!
PS: Dein Zauberpaket ist super!
Sehr gut, dass das so einfach zu beheben war! Diese Abfrage kann man wirklich aus dem Skript herauslassen. Ich glaube, die hatte ich nur eingebaut, um deutlich zu machen, dass der Zauber nicht von NPCs benutzt werden kann.
Zitat von Moe
@mud-freak:
Hast du vielleicht eine Idee warum der Kettenblitz aus G1 in G2 keinen Schaden anrichtet bzw. die ZS_Zapped nicht auslöst?
Keine konkrete. Ich weiß nur, dass der Zauber an einigen Stellen in der Engine (Zauberindex 40) erwähnt wird. Auch wenn es so aussieht, dass er eher auf Seiten der Engine implementiert ist, stimme ich Fawkes zu: Man braucht sich davon ja nicht abhalten lassen, ihn frei nachzubauen. D.h. die Skripte von Gothic 1 zur Seite legen und unvoreingenommen von Vorn beginnen.
-
Respekt für die Arbeit, das zeigt sehr schön, was mit Ikarus und Lego so alles
möglich ist. (Warum nur habe ich damals einfach das Handtuch geworfen?!)
Jetzt habe ich irgendwie Bock auf eine Runde Magicka
Eventuell gucke ich mir die Zauber irgendwann mal an, mich interessiert die Umsetzung davon.
Oparilames nachdem er seinen Gesellenbrief erhalten hat:
»Das war's mit dir, du Mistvieh!«
-
Hey mud-freak! Danke erstmal für den Blink Zauber!
Hab damit leider ein Problem: Ich bekomme Access Violation wenn ich die Blink Rune ausrüste? Woran könnte das liegen?
edit: Hier der Fehler
Code:
======================================= UNHANDLED EXCEPTION OCCURED ======================================================
======================================= CRASH INFOS: =====================================================================
Gothic II - 2.6 (fix), Parser Version: 50
User: Lucas Schlader, CPUType: 586, Mem: 2048 MB total, 2048 MB free
Camera: Pos(30551.1133/5344.59668/-15422.9014), At(-0.760606229/-0.266278982/-0.592092574)
Startup Options:-game:gothicgame.ini -zreparse -zlog:5,s -zmaxframerate:60
=============================================== CALLSTACK : ==============================================================
0023:007A20EE (0x0135F8E4 0x0000006D 0x00000001 0x2E2C7AB0) Gothic2.exe, zCPar_Symbol::GetValue()+174 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser_Symbol.cpp, line 609+20 byte(s)
0023:00484275 (0x0135F940 0x0000006D 0x00000000 0x2E2C7AC4) Gothic2.exe, oCSpell::GetSpellInstanceName()+293 byte(s), P:\dev\g2addon\release\Gothic\_carsten\oSpell.cpp, line 378
0023:004840F2 (0x0000006D 0x00000001 0x2E2C7AB0 0x22817468) Gothic2.exe, oCSpell::InitValues()+210 byte(s), P:\dev\g2addon\release\Gothic\_carsten\oSpell.cpp, line 363+145 byte(s)
0023:00483F2B (0x0000006D 0x2CD73410 0x22817468 0x2E2C7AB0) Gothic2.exe, oCSpell::oCSpell()+347 byte(s), P:\dev\g2addon\release\Gothic\_carsten\oSpell.cpp, line 296
0023:00475F8B (0x22817468 0x00000001 0x22817468 0x2AEFC560) Gothic2.exe, oCMag_Book::CreateNewSpell()+315 byte(s), P:\dev\g2addon\release\Gothic\_carsten\oMagic.cpp, line 416+54 byte(s)
0023:00739E50 (0x22817468 0x00000000 0x2AEFC560 0x307890F0) Gothic2.exe, oCNpc::Equip()+448 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oNpc.cpp, line 5550
0023:0074C4C0 (0x307890F0 0x00000000 0x307890F0 0x2AAD9350) Gothic2.exe, oCNpc::OnMessage()+5280 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oNpc.cpp, line 10850
0023:00786DD3 (0x307890F0 0x2AEFC560 0x00000000 0x1E50A25C) Gothic2.exe, zCEventManager::SendMessageToHost()+371 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zEventMan.cpp, line 269
0023:007870CA (0x1E50A010 0x00621903 0x09C371A8 0x0083C10C) Gothic2.exe, zCEventManager::ProcessMessageList()+202 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zEventMan.cpp, line 376
0023:00785F96 (0x09C371A8 0x0083C10C 0x1D9ADEA0 0x00000000) Gothic2.exe, zCEventManager::DoFrameActivity()+38 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zEventMan.cpp, line 145+9 byte(s)
0023:00621903 (0x00000001 0x1D9ADEA0 0x00000000 0x0135FC90) Gothic2.exe, zCWorld::Render()+515 byte(s), P:\dev\g2addon\release\ZenGin\_dieter\zWorld.cpp, line 825
0023:006C87EB (0x00400000 0x01543BBF 0x0135FEB4 0x003DA000) Gothic2.exe, oCGame::Render()+331 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 2658
0023:00425E6E (0x0082F0EC 0x00000001 0x00180DB0 0x1D9ADEA0) Gothic2.exe, CGameManager::Run()+1598 byte(s), P:\dev\g2addon\release\Gothic\_bert\oGameManager.cpp, line 767+47 byte(s)
0023:0078188B (0x0000002C 0x000543B8 0x0000000B 0x00000000) Gothic2.exe, MainProg()+75 byte(s), P:\dev\g2addon\release\Gothic\_ulf\Phoenix.cpp, line 111
0023:00503270 (0x00400000 0x00000000 0x01543BBF 0x00000001) Gothic2.exe, HandledWinMain()+928 byte(s), P:\dev\g2addon\release\ZenGin\_carsten\zWin32.cpp, line 1169
0023:00502DFD (0x0135FEB8 0x00000000 0x01543BBF 0x00000001) Gothic2.exe, WinMain()+141 byte(s), P:\dev\g2addon\release\ZenGin\_carsten\zWin32.cpp, line 1054+17 byte(s)
0023:007D43F8 (0x00000004 0x0000FFFF 0x000000B8 0x00000000) Gothic2.exe, WinMainCRTStartup()+224 byte(s)
Geändert von Moe (26.11.2019 um 16:40 Uhr)
-
Ich vermute das bei bei Einbau des spells einen Fehler gemacht hast, evt. im array spellFxInstanceNames.
-
Okay, ich hab in der Zwischenzeit den Zauber Entriegeln auch noch eingebaut und jetzt hab ich den Fehler statt bei Blink nun eben bei Entriegeln.
Dafür kann ich jetzt Blink ausrüsten, aber ich bekomme nun diesen Fehler:
[Bild: 2019_11_26_18_04_20_Greenshot.png]
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- Anhänge hochladen: Nein
- Beiträge bearbeiten: Nein
|