[Gothic 2] Dwie bronie założone jednocześnie 7116 13

O temacie

Autor Pablo21293

Zaczęty 17.01.2013 roku

Wyświetleń 7116

Odpowiedzi 13

Pablo21293

Pablo21293

Użytkownicy
posty82
Propsy28
Profesjabrak
  • Użytkownicy
Cześć mam pytanie czy da rade zrobic cos takiego by mozna było miec załozony miecz jedno i dwuredzny jednoczesnie i jednoreczny wyciągac klawiszem 1 a dwureczny 2 i jeszcze kusza na 3
 

ElitarnyDuch

ElitarnyDuch

Użytkownicy
posty64
ProfesjaSkrypter
  • Użytkownicy
Powiem krótko bo to oczywiste. Szansa na to że to możliwe wynośi 0,00000000001% więc nie rub sobie nadzieji.
 

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
Powiem krótko bo to oczywiste. Szansa na to że to możliwe wynośi 0,00000000001% więc nie rub sobie nadzieji.
Nie znam się to się wypowiem, c#msg1067606nie?

To czy możesz rubić sobie nadziejię wynośiącą 0,00000000001% czy nieco większą, zależy od twoich umiejętności.
Właściwie gdybyś dał sobie spokój z kuszą, do pewnego stopnia da się to osiągnąć nie wychodząc poza zwykłe skrypty i mdsy. Sam kiedyś coś takiego zrobiłem - miecz jednoręczny był normalny, a ten dwuręczny był "typu" kusza, ale miał specjalnie podmieniony tryb i animacje walki na te od miecza dwuręcznego. Działało to fajnie oprócz jednego problemu - mianowicie jako że kuszami normalnie się nie dobija (teraz już właściwie nie pamiętam - dobija się?), gra crashowała przy próbie dobicia tym mieczem osoby nieprzytomnej.

Sprowadzało się do dobrania odpowiedniego modelu, funkcji on_equip i on_unequip z włączaniem/wyłączaniem overlayMDSa i samym overlayMDSem który zamieniał animacje i odpowiednim eventTagiem zmieniał tryb walki na ten od 2h.

Paser

Paser

Użytkownicy
Crazy Diamond
posty281
Propsy119
ProfesjaNierób
  • Użytkownicy
  • Crazy Diamond
Albo po prostu IDA Pro Free + Środowisko programistyczne  :wink:  
Hook Na Klawisze + zainicjowanie paru funkcji :P, potem wstrzyknąć liba do proces gothic2.exe
Zrobiłem sposób Avallacha w C# a nie daedalusie i działa.
 

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Double handed sword fight has been implemented already, although to my knowledge the scripts aren't public. It's not impossible, but expect to put in a lot of work/time. It will probably take you a long time to gain enough knowledge to even attempt such a thing :/
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
I guess that you didn't didn't understood the question properly (or just used improper words). Double handed swords and other weapons already are in game. He wants to have equipped two meele weapons at once, but as I understand not necessarily fight with both at once.
It isnt such hard, long ago I've done it by dynamically transforming one of swords into sword-like crossbow and enabling special mds which changed its sounds, animations and fight mode to that of sword. The only problem was with killing uncoscius enemies, game was always crashing when i tried to do that.

Jestem nawet prawie pewien że gdzieś te skrypty opublikowałem, prawdopodobnie w podobnym temacie w problematyce. Stanowią zarazem fundament do robienia duali w których nie musi występować podział na lewo- i praworęczne miecze.

There is although one else problem. As I remember, when data of the weapon is changed (for examppe, its type) it's changed for all current and future instances in the game. I guess that npc's who are already spawned and equipped won't have problems with using such weapon, but in case of these spawned or equipped after change, there may occur Unforseen Consequences.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Oops, indeed I meant double wielding.

As long as you don't want to fight with both at once it will be rather easy, it's trickier to implement hit detection and correct damage calculation though I think you might come a long way even with using mds and stuff.

And no, changing the data of one object won't effect other objects (wouldn't make sense anyway), though I suspect you did it in a way that had huge side effects due to not understanding the internal structure of instances and such. Does anybody need some documentation about parser symbols and instances and stuff? I could probably write up a post about them, but I don't know how useful that is...
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
As I remember, I used function Npc_GetEquippedMeleeWeapon. If editing data of instance returned by it won't affect existing and future objects with the same identifier (for example, itmw_sword_01), one problem less.
There still is a bug with trying to kill uncoscious npc with weapon with flags = ITEM_CROSSBOW and *eventTag (6 "DEF_FIGHTMODE"   "2h") in mds.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Why would you have item with the crossbow-flags equipped/drawn anyway? Use shield-flags and just attach the model to the right slot... Looks a lot easier to me, to be honest (Attaching a zCVob to a oCNpc on a certain slot is easily done).

Then you will always have a 1h-weapon equipped, at least engine-side :)
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
Lehona, my method not only worked except for killing uncoscious, but the second weapon was really working in fight - it was dealing proper damage without any special hacks. If I would use diffrent flags I guess I would have to implement fight mode with some advanced hacks in engine.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Then I'm gonna redraw my statements :p Didn't know it was working that well. Are the scripts somewhere online?
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
No, and I haven't them. But part with using special sword-like crossbow was pretty easy, the most important was applying overlayMDS with this event tag in weapon drawing animation:
*eventTag (5 "DEF_FIGHTMODE" "1HS")I found some old screenshots:

As I wrote, fihgt is working as normal without any hacks, the only problem was killing uncoscious enemies with that special sword.
I don't remeber if I had to set amunitoin for it, I guess no.

Harder was system of functions which were recognising whether player wants to change sword or equip second one on that special slot, and in the second case, re-equipping replaced sword, dynamically changing the second one to that "special crossbow" and equipping it again.

Lehona

Lehona

Użytkownicy
posty196
Propsy190
  • Użytkownicy
Wait, are we talking about Dual-Wielding or just being able to draw 2 melee weapons (not at the same time) without always changing the equipped one? I can see the latter one being rather easy, but fighting with two 1H weapons at the same time was what I was talking about... Confusion, woooh!
 
Unless specified otherwise, my posts are always about Gothic 2 Night of the Raven.

inż. Avallach

inż. Avallach

Administrator
posty7661
Propsy5238
NagrodyV
ProfesjaProgramista
  • Administrator
Equipping two meele weapons but fighting with only one at once. First is under "1" key, and second under... "2", as ranged weapons. Idea is from game "The Witcher" where hero has two kinds of swords.


0 użytkowników i 1 Gość przegląda ten wątek.
0 użytkowników
Do góry