Pokaż wiadomości

Ta sekcja pozwala Ci zobaczyć wszystkie wiadomości wysłane przez tego użytkownika. Zwróć uwagę, że możesz widzieć tylko wiadomości wysłane w działach do których masz aktualnie dostęp.


Wiadomości - Vic7im

Strony: [1] 2 3 ... 5
1
Zapowiedzi modyfikacji / [G2NK] Requiem
« dnia: 2023-09-17, 13:00 »
https://www.youtube.com/watch?v=nxwUVlr3E94

2
Zapowiedzi modyfikacji / [G2NK] Requiem
« dnia: 2023-04-08, 23:10 »
Hey guys, I'm honored that someone still follows this mod, really.

I'm hard at work (after getting back an old build that actually worked) to restore Requiem to its former state, and it's getting closer day by day. I've made the mistake of giving hopeful deadlines and stuff like that, but as of now all I can say is, the mod is **not** dead, it will be done but it'll be out when it's ready.

I'm looking for good people with Ikarus/Lego knowledge (even Union), and a help with the Spacer/Blender. If you're interested (and you're good with it), feel free to drop me a DM here or on ModDB.

Thanks again for the attention, have a great Easter.

> Vic7im.

Oh right, a teaser, as usual ;) : https://streamable.com/acoclf

3
Skrypty / pochwy na miecze
« dnia: 2018-03-28, 00:01 »

Use this:

Spoiler
func void Regeneracja()
{
   
   if (hero.attribute[ATR_HITPOINTS] >= 0)
   {
     if (level_regeneracji == 1)
     {
        hero.attribute[ATR_HITPOINTS] += 1;
     }
     else if (level_regeneracji == 2)
     {
        hero.attribute[ATR_HITPOINTS] += 2;
        hero.attribute[ATR_MANA] += 1;
     }
     else if (level_regeneracji == 3)
     {
        hero.attribute[ATR_HITPOINTS] += 3;
        hero.attribute[ATR_MANA] += 2;
        hero.exp += 1;
     };

     if (hero.attribute[ATR_HITPOINTS]>= hero.attribute[ATR_HITPOINTS_max])
     {
         hero.attribute[ATR_HITPOINTS]=hero.attribute[ATR_HITPOINTS_max];
     };
     if (hero.attribute[ATR_MANA] >= hero.attribute[ATR_MANA_max])
     {
         hero.attribute[ATR_MANA]=hero.attribute[ATR_MANA_max];
     };
   };
};

4
Skrypty / Assigning Dialogue to NPCs Problem
« dnia: 2018-03-19, 17:18 »
Hello everyone, I'm having a little bit of an issue with assigning dialogues to NPCs.
I've managed to create a thieving system similar to Gothic 1, based on Returning 2.0's code. I wanted to share it but it doesn't work XD

If your dexterity is lower than the target's, they should turn around and start a conversation with you where you can try to talk your way out or get attacked.

Problem is, I can't get them to talk, at all. The Npcs turn around, look at me for a split second, then go back to their duties, if I talk to them they won't recognize the theft and act normal.

Going logically from point A to point B, this is the code of what happens.

Hero gets caught by focused NPC
Spoiler
var oCNpc _hero; _hero = Hlp_GetNpc(PC_HERO);
var c_npc pNpc; pNpc = MEM_PtrToInst(_hero.focus_vob);
var C_NPC thiefcatcher;     
[...]
if(pNpc.aivar[AIV_PlayerHasPickedMyPocket] == FALSE && !Npc_CanSeeNpc(pNpc,hero)&& hero.attribute[ATR_DEXTERITY] < pNpc.attribute[ATR_DEXTERITY]  && pNpc.npcType != npctype_friend)
{
                thiefcatcher = hlp_getnpc(pNpc);
                hero_caughtstealing = true;
                AI_TurnToNpc(pNpc,_hero);
                //npc_clearaiqueue(pNpc);
                b_resetthieflevel();   
                //b_clearperceptions(pNpc);
                AI_StartState(pNpc,zs_observeplayer,1,"");
};

Into ZS_ObservePlayer loop I put a condition that checks if the one who's looking at the player is the one who caught him (the thiefcatcher)

Spoiler
func int ZS_ObservePlayer_Loop()
{
    if(hero_caughtstealing == TRUE)
    {
        b_assigncatchertalk(self);
    };
[...]
};

Calling B_AssignCatcherTalk() that should assign the "Got you" dialogues I wrote to the NPC that has the same ID of the thiefcatcher
Spoiler

func void b_assigncatchertalk(var C_Npc slf)
{
    if(Hlp_GetInstanceID(slf) == Hlp_GetInstanceID(thiefcatcher))
    {
        b_assigntalkgotyou(slf);       
    };
};

This is B_AssignTalkGotYou()
Spoiler
func void B_AssignTalkGotYou(var C_Npc slf)
{
    dia_assigntalkgotyou.npc = Hlp_GetInstanceID(slf);
};

And then the dialogues:
Spoiler
instance dia_assigntalkgotyou(c_info) {
    nr = 1;
    condition = dia_assigntalkgotyou_condition;
    information = dia_assigntalkgotyou_info;
    permanent = true;
    important = true;
};

[...]
I put as condition the hero_caughtstealing variable.

I made the game print me the name of the thiefcatcher NPC to see if I did something wrong, but it correctly writes down the name of the NPC that caught me.

Problem is, I don't know why it won't talk to me.

Cheers!

5
Materiały / [Gothic 2] Skrypt dwóch mieczy
« dnia: 2017-09-03, 16:19 »
Shit sorry I don't know what I've done I clicked the flag and I really wanted to +1 you XD

By the way, I've complemented your code a little bit, adding the offhand weapon damage to the mix (unfortunately, only as a damage boost on the main weapon).

I have yet to test the code thoroughly, will do later.

func void Dual_Draw()
{
var C_ITEM MainHand; //added
if(ECX != _@(hero))
{
return;
};

if (oCNpc_GetSlotItem(hero, "ZS_RIGHTHAND")
&& !oCNpc_GetSlotItem(hero, Dual_SlotDraw))
{
var c_item it; it = _^(Ext_RemoveFromSlot(hero, Dual_SlotEquip));
Ext_PutInSlot(hero, it, Dual_SlotDraw);
MainHand = Npc_GetEquippedMeleeWeapon(hero); //added
MainHand.DamageTotal += it.DamageTotal; //added
Dual_SwimFix = _@(it);
};
};

func void Dual_UnDraw()
{
var C_ITEM MainHand; //added
if(ECX != _@(hero))
{
return;
};

if (oCNpc_GetSlotItem(hero, "ZS_SWORD")
&& !oCNpc_GetSlotItem(hero, Dual_SlotEquip))
{
var c_item it; it = _^(Ext_RemoveFromSlot(hero, Dual_SlotDraw));
Ext_PutInSlot(hero, it, Dual_SlotEquip);
MainHand = Npc_GetEquippedMeleeWeapon(hero); //added
MainHand.DamageTotal -= it.DamageTotal; //added
Dual_SwimFix = 0;
};
};


It just edits the Dual_Draw() and Dual_UnDraw() functions.

6
Materiały / [Gothic 2] Skrypt dwóch mieczy
« dnia: 2017-09-02, 12:51 »
const int oCNpc_EVDrawWeapon2 = 7656832; //0x0074D580


Post połączony: 2017-09-02, 12:29
This script is big shit - i must rewrite because in old script i used 4 aivars for duals for only hero!.

Thank you! I've tried and animations don't rig, the left-sword stays behind the hero when using DS animations (I have permission to use those :P)

About the new script, you mean the one in unbalance 1.4?  I had a look at it but the game creates a looping stacktrace error that freezes the game, so I thought it was a work in progress script :P
Edit: The looping error comes from the MEM_ReadInt part
Cytuj
MEM_ReadInt(ESP+324+4));

If you need me to test something, let me know!

7
Materiały / [Gothic 2] Skrypt dwóch mieczy
« dnia: 2017-09-02, 09:59 »
Hello there @Siemekk, good morning!

I'm trying to make the dual wield script work but I recieve one error when parsing it, there's no call for  HookEngineF(oCNpc__EV_DrawWeapon2), Ikarus only goes as far as weapon 1.
Cytuj
const int oCNpc__EV_DrawWeapon                      = 7654416; //0x74CC10 Hook: Shields
const int oCNpc__EV_DrawWeapon1                     = 7656160; //0x74D2E0 Hook: Shields

What's the engine address for drawweapon2? :P

8
Hey everyone, I wanted to create an armor similar to the one from the cancelled Gothic sequel



It obviously doesn't work in game and crashes (access violation, will update with logs later).
Steps done:
# Changed appearance of existing armor
# Merged two skulls (skull.3ds) in the scene
# They still are two different entities, named Skull1 and 2 (with the zm_ prefix)
# Connected them to the main body ( zm_Sld_Tm)
# Compiled
# Access Violation error
# Restart game
# Shows armor without skulls, and different texture

I have a couple questions:

#1: How do I join the skulls to the main armor, specifically how do I rig them onto a bone? I fear some of the issues are that the skulls aren't exactly connected to the armature, but I'm a noob with Blender and couldn't find anything helpful on this site.
#2: I have added to the normal guard armor two skulls, which are .3ds files. Does that compromise the compiling in-game? They're two different formats after all.

I'll upload the files shortly, so you can have a look at them yourselves.
EDIT: https://mega.nz/#!FUBHSLiA!uu8V0POqv7llN5VzRcFB-THn_V3-2IeKmy7_cCcRbQM

9
Skrypty / [TICK TOCK] Noob question
« dnia: 2017-02-05, 10:44 »
Is it possible to create tick tock functions that refresh every 0.5 seconds instead of "waiting" for a full second?

In other words, can the tick tock timer be a float instead of an integer?

Thanks!

10
Zapowiedzi modyfikacji / [G2NK] Requiem
« dnia: 2016-12-24, 20:08 »
Wczytałem jeszcze raz i tym razem poszło. Oczywiście że wgrywałem na czystego Gothica 2. W mody gram od bardzo wielu lat i nie przypominam sobie tak zbugowanej gry. Zobaczymy jak będzie dalej.

Fingers crossed!

11
Skrypty / Zachowanie animacji
« dnia: 2016-12-14, 18:01 »
Can you share function?

It's exactly what you wrote :)

Broadcast Function
Spoiler
//#################################################
//
//    Nutzungshinweise:
//
//#################################################

/*************************************************
//   Idee
//************************************************

Die hier vorgestellten Funktionen ermöglichen es,
für alle Npcs in der Welt oder alle Npcs in der KI-Glocke
eine beliebige Funktion aufzurufen.

//************************************************
//   Setup
//************************************************

Eine aktuelle Version von Ikarus wird benötigt.
Ikarus gibt es hier:
http://forum.worldofplayers.de/forum/threads/969446-Skriptpaket-Ikarus-3

Die Datei, die du grade liest, ist nach Ikarus zu parsen.
 
//************************************************
//   Funktionen
//************************************************

func void DoForAll    (var func function)
func void DoForSphere (var func function)
 
"function" muss eine Funktion sein, die einen Parameter
vom Typ C_NPC nimmt und nichts zurückgibt.
DoForAll ruft function für jeden Npc auf, der in der Welt existiert.
DoForSphere ruft function für jeden Npc in der KI-Glocke auf
(also im Radius von ~40 Meter um die Kamera)

Beispiel:

**************************
func void foo() {
    DoForSphere(SayHi);
};

func void SayHi(var C_NPC slf) {
    PrintDebug(ConcatStrings (slf.name, " sagt Hallo!"));
};
**************************

Eine mögliche Anwendung für DoForAll wäre ein Schwierigkeitsgradsystem, dass,
wenn der Schwierigkeitsgrad verändert wird, alle Npcs anpassen muss.

######### Broadcasts #########

Eine einfache Abwandlung dieser Funktionen ist der Broadcast.
Die Idee ist hierbei, dass ein Npc, der "Caster", eine Nachricht
an alle anderen Npcs sendet, die dann bei jedem Npc verarbeitet wird.

Beispielsweise könnte ein Npc, der einen Massenheilzauber spricht,
dies "broadcasten" und die Npcs reagieren darauf, indem sie ihre Lebensenergie
auffüllen (wenn sie in der selben Partei kämpfen wie der Caster).
Grundsätzlich ergeben sich durch Broadcasts mannigfache Möglichkeiten für Flächenzauber.

Broadcasts können auch Wahrnehmungen sinnvoll ergänzen und helfen eine Situation zu überblicken.
Etwa könnte ein Monster, bevor es den Spieler angreift erstmal einen "durchzählen!"-Broadcast
herausschicken, indem sich alle Freunde des Monsters "melden". So könnte ein Wolf,
der alleine ist, fliehen (vielleicht sogar zu einem Rudel in der Nähe);
ein Wolf, der im Rudel steht dagegen mutiger sein.

Ein Troll, der den Spieler kommen sieht, könnte das allen Npcs mitteilen,
woraufhin vielleicht Goblins in der Umgebung bei ihm Schutz suchen.

Doch nun zur Funktion:

func void Broadcast (var C_NPC caster, var func function)

function muss eine Funktion sein, die zwei C_NPC Parameter entgegennimmt und nichts zurückgibt.
Dann wird function(npc, caster) für jeden Npc aufgerufen, der folgende Bedingungen erfüllt:

1.) Er ist in der KI-Glocke
2.) Er ist nicht tot (HP != 0).

Es gibt eine erweiterte ("EXtended") Version von Broadcast mit folgender Signatur:

func void BroadcastEx(var C_NPC caster, var func function,
                      var int excludeCaster, var int includeDead, var int includeShrinked)
                     
Sind die drei zusätzlichen Parameter 0, so verhält sich BroadcastEx genau wie Broadcast.
Ansonsten beeinflussen die drei Parameter folgendes, wenn sie nicht Null sind:

    excludeCaster:   function wird nicht für den Caster aufgerufen
                     (das heißt der Caster benachrichtigt sich nicht selbst)
    includeDead:     Auch tote Npcs werden benachrichtigt (Bedingung 2. wird also ignoriert)
    includeShrinked: Auch Npcs außerhalb der KI-Glocke (die daher nur in einer abgespeckten
                     Version in der Welt existieren (kein aktives Visual)) werden benachrichtigt.
                     (das heißt Bedingung 1. wird ignoriert).

Beispiel:

**************************

var int friendCount;
//Gibt Anzahl Freunde von slf zurück, die in der KI-Glocke sind.
func int CountFriends(var C_NPC slf) {
    friendCount = 0;
    Broadcast(slf, CountFrieds_Sub);
    return friendCount;
};

//Hilfsfunktion:
func void CountFrieds_Sub(var C_NPC slf, var C_NPC caster) {
    if (Npc_GetPermAttitude(slf, caster) == ATT_FRIENDLY) {
        friendCount += 1;
    };
};

**************************

Anmerkung: Schachteln der Funktionen ist nicht erlaubt.
Das heißt während eine Ausführung von DoForAll / DoForSphere läuft,
darf keine weitere gestartet werden.
*/

//#################################################
//
//    Implementierung
//
//#################################################

//************************************************
//   The Core: Iterating through Lists.
//************************************************

func void _BC_ForAll(var int funcID, var int sphereOnly) {
    MEM_InitAll(); //safety, don't know if user did it.

    var int busy;
    if (busy) {
        MEM_Error("Broadcast-System: Nesting is not allowed!");
        return;
    };
   
    busy = true;
   
    var C_NPC slfBak; slfBak = Hlp_GetNpc(self);
    var C_NPC othBak; othBak = Hlp_GetNpc(other);
   
    if (sphereOnly) {
        /* to speed things up (and do the filtering)
         * we only search the (small) active Vob List */
        var int i;    i    = 0;
        var int loop; loop = MEM_StackPos.position;
       
        if (i < MEM_World.activeVobList_numInArray) {
            var int vob;
            vob = MEM_ReadIntArray(MEM_World.activeVobList_array, i);
           
            if (Hlp_Is_oCNpc(vob)) {
                var C_NPC npc;
                npc = MEM_PtrToInst(vob);
                MEM_PushInstParam(npc);
                MEM_CallByID(funcID);
            };
           
            i += 1;
            MEM_StackPos.position = loop;
        };
    } else {
        /* walk through the entire Npc List (possibly large). */
        var int listPtr; listPtr = MEM_World.voblist_npcs;
        loop = MEM_StackPos.position;
       
        if (listPtr) {
            vob = MEM_ReadInt(listPtr + 4);
           
            if (Hlp_Is_oCNpc(vob)) {
                npc = MEM_PtrToInst(vob);
                MEM_PushInstParam(npc);
                MEM_CallByID(funcID);
            };
           
            listPtr = MEM_ReadInt(listPtr + 8);
            MEM_StackPos.position = loop;
        };
    };
   
    self  = Hlp_GetNpc(slfbak);
    other = Hlp_GetNpc(othbak);
   
    busy = false;
};

func void DoForAll    (var func _) {
    var MEMINT_HelperClass symb;
    var int theHandlerInt;
    theHandlerInt = MEM_ReadInt(MEM_ReadIntArray(contentSymbolTableAddress, symb - 1) + zCParSymbol_content_offset);

    _BC_ForAll(theHandlerInt, 0);
};

func void DoForSphere(var func _) {
    var MEMINT_HelperClass symb;
    var int theHandlerInt;
    theHandlerInt = MEM_ReadInt(MEM_ReadIntArray(contentSymbolTableAddress, symb - 1) + zCParSymbol_content_offset);
   
    _BC_ForAll(theHandlerInt, 1);
};

//************************************************
//   Building on that: The Broadcast
//************************************************

var int   _BC_funcID;
var int   _BC_CasterPtr;
var C_NPC _BC_Caster;
var int   _BC_ExcludeCaster;
var int   _BC_SendToDead;

func void _BC_CallAssessFunc(var C_NPC slf) {
    //ignore dead, unless they are explicitly included
    if (!slf.attribute[ATR_HITPOINTS] && !_BC_SendToDead) {
        return;
    };
   
    //ignore caster if this is wanted
    if (_BC_ExcludeCaster) {
        if (_BC_CasterPtr == MEM_InstToPtr(slf)) {
            return;
        };
    };
   
    MEM_PushInstParam(slf);
    MEM_PushInstParam(_BC_Caster);
    MEM_CallByID(_BC_funcID);
};

func void _BC_Broadcast(var C_NPC caster, var int funcID, var int excludeCaster, var int includeDead, var int includeShrinked) {
    _BC_ExcludeCaster = excludeCaster;
    _BC_Caster        = Hlp_GetNpc(caster);
    _BC_CasterPtr     = MEM_InstToPtr(caster);
    _BC_SendToDead    = includeDead;
    _BC_funcID        = funcID;
   
    if (includeShrinked) {
        DoForAll(_BC_CallAssessFunc);
    } else {
        DoForSphere(_BC_CallAssessFunc);
    };
};

func void Broadcast  (var C_NPC caster, var func _) {
    var MEMINT_HelperClass symb;
    var int reactionFuncID;
    reactionFuncID = MEM_ReadInt(MEM_ReadIntArray(contentSymbolTableAddress, symb - 1) + zCParSymbol_content_offset);
   
    _BC_Broadcast(caster, reactionFuncID, 0, 0, 0);
};

func void BroadcastEx(var C_NPC caster, var func _, var int excludeCaster, var int includeDead, var int includeShrinked) {
    var MEMINT_HelperClass symb;
    var int reactionFuncID;
    reactionFuncID = MEM_ReadInt(MEM_ReadIntArray(contentSymbolTableAddress, symb - 4) + zCParSymbol_content_offset);
   
    _BC_Broadcast(caster, reactionFuncID, excludeCaster, includeDead, includeShrinked);
};

In AI_constants I have
const int AIV_BROADCASTS_ANIM = 95;
I made a new file and pasted your function in it
func void BS_SaveAnim(var c_npc slf)
{
/*I tutaj dajemy warunki w zależności od ilości stylów. Ja dam tutaj jeden dla przykładu ;) */
if(slf.aivar[AIV_Broadcasts_Anim]==1)// arcymistrz
{
Mdl_RemoveOverlayMds(slf,"Humans_1hst2.mds"); //Wyłącz mu stary styl (ten bo ma >60% walki mieczem)
Mdl_RemoveOverlayMds(slf,"SHIELD_UNSKILLED.mds"); //Wyłącz mu obecny styl
Mdl_ApplyOverlayMds(slf,"SHIELD_UNSKILLED.mds");//I włącz go na nowo...
};
};


Then put this: aivar[AIV_Broadcasts_Anim] = 1;
On Cedric:

instance PAL_216_CEDRIC(NPC_DEFAULT)
{
name[0] = "Cedric";
guild = GIL_PAL;
id = 216;
voice = 12;
flags = 0;
npctype = NPCTYPE_MAIN;
b_setattributestochapter(self,6);
fight_tactic = FAI_HUMAN_MASTER;
aivar[AIV_NPCSHIELD] = TRUE;
EquipItem(self,itmw_1h_pal_sword);
EquipItem(self,itar_palshield2);
[color=red]        aivar[AIV_Broadcasts_Anim] = 1;[/color]
b_createambientinv(self);
b_setnpcvisual(self,MALE,"Hum_Head_Fighter",FACE_N_NORMALBART10,BODYTEX_N,itar_pal_h);
Mdl_SetModelFatness(self,0);
Mdl_ApplyOverlayMds(self,"Humans_Militia.mds");
Mdl_ApplyOverlayMds(self,"HUMANS_TALKGESTURES2.mds");
b_givenpctalents(self);
b_setfightskills(self,85);
daily_routine = rtn_start_216;
};


func void rtn_start_216()
{
ta_practice_sword(7,0,19,0,"NW_CITY_LHCASTLE_BASE_04");
ta_sleep(19,0,7,0,"NW_CITY_LEOMAR_BED_03");
};

Wrote this in the Startup.d
func void init_global()
{
//Ikarus and LeGo startup
//things
DoForAll(BS_SaveAnim);
//other things
}

Load the game up and it crashes =(
I've changed the animation SHIELD_UNSKILLED with SHIELD_ST3

12
Skrypty / Zachowanie animacji
« dnia: 2016-12-14, 16:25 »
Hey Siemekk, I get an access violation error using this script.

In AI_Constants I have
const int AIV_BROADCASTS_ANIM = 95;
Broadcast function copy-pasted from WoG, put right after LeGo
http://forum.worldofplayers.de/forum/threads/775333-Script-Broadcasts?p=17232705&viewfull=1#post17232705

Put    "aivar[AIV_Broadcasts_Anim] = 1;   " in Cedric,

Copy-pasted your function (in order, it's one of the last ones before Startup.d

Gothic-Sourcer doesn't create any errors of sorts, but once I start the game it simply crashes.

Crash report:
Spoiler
======================================= UNHANDLED EXCEPTION OCCURED ======================================================
======================================= CRASH INFOS: =====================================================================
Gothic II - 2.6 (fix), Parser Version: 50
User:  KEKBUR,  CPUType: 586,  Mem: 0 MB total, 0 MB free
Startup Options:
=============================================== CALLSTACK : ==============================================================
0023:0079249D (0x00003FDB 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser::DoStack()+2877 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1405+40 byte(s)
0023:00792504 (0x00003FDB 0x00AB4108 0x00000000 0x00AB40C0) Gothic2.exe, zCParser::DoStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
0023:00792504 (0x0002052C 0x183B6414 0x00AB4118 0x00AB40C0) Gothic2.exe, zCParser::DoStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
0023:00792504 (0x000206E9 0x0000A4CC 0x0082E6F0 0x15C895E0) Gothic2.exe, zCParser::DoStack()+2980 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1415
0023:00792CBF (0x00AB40C0 0x0000A4CC 0x0135FA9C 0x0135FAA0) Gothic2.exe, zCParser::CallFunc()+719 byte(s), P:\dev\g2addon\release\ZenGin\_ulf\zParser.cpp, line 1551
0023:006C20BF (0x0135FBD4 0x15C895E0 0x0135FBD0 0x0135FB00) Gothic2.exe, oCGame::CallScriptInit()+351 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 886
0023:006C9FE0 (0x0135FA9C 0x0135FB6C 0xFFFFFFFE 0x0135FB6C) Gothic2.exe, oCGame::LoadWorldStartup()+976 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 3150
0023:006C92DE (0xFFFFFFFE 0x0135FB00 0x18D5A26E 0x0135FCA0) Gothic2.exe, oCGame::LoadWorld()+558 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 2902
0023:006C6696 (0xFFFFFFFE 0x0135FBD0 0x0082E6F0 0x00000000) Gothic2.exe, oCGame::LoadGame()+246 byte(s), P:\dev\g2addon\release\Gothic\_ulf\oGame.cpp, line 2147
0023:00429BF9 (0x00000015 0x00400000 0x01723F4C 0x0135FEC4) Gothic2.exe, CGameManager::Menu()+2345 byte(s), P:\dev\g2addon\release\Gothic\_bert\oGameManager.cpp, line 1474
0023:00425C35 (0x0082F0EC 0x00000001 0x001105DE 0x15C895E0) Gothic2.exe, CGameManager::Run()+1029 byte(s), P:\dev\g2addon\release\Gothic\_bert\oGameManager.cpp, line 713
0023:0078188B (0x0000002C 0x00228ED9 0x00000016 0x00000000) Gothic2.exe, MainProg()+75 byte(s), P:\dev\g2addon\release\Gothic\_ulf\Phoenix.cpp, line 111
0023:00503270 (0x00400000 0x00000000 0x01723F4C 0x00000001) Gothic2.exe, HandledWinMain()+928 byte(s), P:\dev\g2addon\release\ZenGin\_carsten\zWin32.cpp, line 1169
0023:00502DFD (0x0135FEC8 0x00000000 0x01723F4C 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)

13
Skrypty / Zachowanie animacji
« dnia: 2016-12-13, 12:34 »
Spoko poradnik, tylko mogłeś napisać jak działa pakiet broadcast - wykonuję daną funkcje x razy (gdzie x to liczba wszystkich lub pobliskich npc, przyjmując jako argument kolejnych npc.

No i jeszcze tak się zastanawiam czy nie powinieneś wykorzystać DoForAll (Pewnie zadziała dużo wolniej), DoForSphere wykonuję funkcję tylko dla enpeców w odległości 40 metrów od kamery więc nie zawsze będzie działać.

Depends, if the function "resets" NPC AI, stopping their routines for a split second, DoForAll would be better imo. You put it at every EnterXWorld and in the game_init and that's it.
If it doesn't break the routines a timed, looping function would work too, but the problem would be for NPCs having tens of thousands of .mds files overwriting one other (just assuming they'll do, not really sure about that)

Thanks for the script Siemekk!!!

14
Skrypty / [Script] Diablo2-like potions
« dnia: 2016-12-11, 13:13 »
Hello! This script makes potions work like Diablo2. If you have less than the potion restoration value*3 it restores the normal amount (like, a healing potion heals for 50 hp if you have less than 150 max hp), otherwise it restores a certain % of your total HP in 5 seconds, over time.

func void lowmana()
{
    var int manunterzo; manunterzo = hero.attribute[ATR_MANA_MAX]/3;
    Npc_ChangeAttribute(hero,ATR_MANA,manunterzo/25);
};




func void useitpo_mana_01_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(hero.attribute[ATR_MANA_MAX] <= 90)
        {
            Npc_ChangeAttribute(self,ATR_MANA,MANA_ESSENZ);
        }
        else if (hero.attribute[ATR_MANA_MAX] > 90 && !FF_ACTIVE(LowMana))
        {
            FF_ApplyOnceExt(LowMana,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_MANA,1500);
    };
};


func void medmana()
{
    var int manunmezzo; manunmezzo = hero.attribute[ATR_MANA_MAX]/2;
    Npc_ChangeAttribute(hero,ATR_MANA,manunmezzo/25);
};






func void useitpo_mana_02_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(hero.attribute[ATR_MANA_MAX] <= 140)
        {
            Npc_ChangeAttribute(self,ATR_MANA,70);
        }
        else if (hero.attribute[ATR_MANA_MAX] > 140 && !FF_ACTIVE(MedMana))
        {
            FF_ApplyOnceExt(MedMana,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_MANA,1500);
    };
};
func void Higmana()
{
    var int manun; manun = hero.attribute[ATR_MANA_MAX];
    Npc_ChangeAttribute(hero,ATR_MANA,manun/25);
};






func void useitpo_mana_03_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(!FF_ACTIVE(HigMana))
        {
            FF_ApplyOnceExt(HigMana,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_MANA,1500);
    };
};




instance ITPO_MANA_01(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_MANAESSENZ;
    visual = "ITFO_POTION_MANA_01.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_mana_01_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    ////effect = "SPELLFX_MANAPOTION";
    description = "Mana Essence";
    text[1] = "Partially restores your mana";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_MANAESSENZ;
};




instance ITPO_MANA_02(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_MANAEXTRAKT;
    visual = "ITFO_POTION_MANA_02.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_mana_02_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    ////effect = "SPELLFX_MANAPOTION";
    description = "Mana Extract";
    text[1] = "Partially restores your mana";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_MANAEXTRAKT;
};


instance ITPO_MANA_03(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_MANAELIXIER;
    visual = "ITFO_POTION_MANA_03.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_mana_03_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    //effect = "SPELLFX_MANAPOTION";
    description = "Mana Elixir";
    text[1] = "Completely restores your mana";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_MANAELIXIER;
};




func void lowaccapi()
{
    var int lifeunterzo; lifeunterzo = hero.attribute[ATR_HITPOINTS_MAX]/3;
    Npc_ChangeAttribute(hero,ATR_HITPOINTS,lifeunterzo/25);
};




func void useitpo_health_01_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(hero.attribute[ATR_HITPOINTS_MAX] <= 150)
        {
            Npc_ChangeAttribute(self,ATR_HITPOINTS,50);
        }
        else if (hero.attribute[ATR_HITPOINTS_MAX] > 150 && !FF_ACTIVE(Lowaccapi))
        {
            FF_ApplyOnceExt(Lowaccapi,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_HITPOINTS,50);
    };
};


func void medaccapi()
{
    var int lifeunmezzo; lifeunmezzo = hero.attribute[ATR_HITPOINTS_MAX]/2;
    Npc_ChangeAttribute(hero,ATR_HITPOINTS,lifeunmezzo/25);
};




func void useitpo_health_02_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(hero.attribute[ATR_HITPOINTS_MAX] <= 210)
        {
            Npc_ChangeAttribute(self,ATR_HITPOINTS,70);
        }
        else if (hero.attribute[ATR_HITPOINTS_MAX] > 210 && !FF_ACTIVE(medaccapi))
        {
            FF_ApplyOnceExt(medaccapi,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_HITPOINTS,70);
    };
};




func void hiaccapi()
{
    var int gharbl; gharbl = hero.attribute[ATR_HITPOINTS_MAX];
    Npc_ChangeAttribute(hero,ATR_HITPOINTS,gharbl/25);
};




func void useitpo_health_03_advanced()
{
    if(Npc_IsPlayer(self))
    {
        if(hero.attribute[ATR_HITPOINTS_MAX] <= 250)
        {
            Npc_ChangeAttribute(self,ATR_HITPOINTS, 120);
        }
        else if (hero.attribute[ATR_HITPOINTS_MAX] > 250 && !FF_ACTIVE(hiaccapi))
        {
            FF_ApplyOnceExt(hiaccapi,200,25);
        };
    }
    else if(!Npc_IsPlayer(self))
    {
        Npc_ChangeAttribute(self,ATR_HITPOINTS,120);
    };
};




instance ITPO_HEALTH_01(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_HPESSENZ;
    visual = "ITFO_POTION_HEALTH_01.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_health_01_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    //effect = "SPELLFX_HEALTHPOTION";
    description = "Essence of Healing";
    text[1] = "Partially restores your life";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_HPESSENZ;
};






instance ITPO_HEALTH_02(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_HPEXTRAKT;
    visual = "ITFO_POTION_HEALTH_02.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_health_02_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    //effect = "SPELLFX_HEALTHPOTION";
    description = "Extract of Healing";
    text[1] = "Partially restores your life";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_HPEXTRAKT;
};


instance ITPO_HEALTH_03(C_ITEM)
{
    name = NAME_TRANK;
    mainflag = ITEM_KAT_POTIONS;
    flags = ITEM_MULTI;
    value = VALUE_HPELIXIER;
    visual = "ITFO_POTION_HEALTH_03.3ds";
    material = MAT_GLAS;
    on_state[0] = useitpo_health_03_advanced;
    scemename = "POTIONFAST";
    wear = WEAR_EFFECT;
    //effect = "SPELLFX_HEALTHPOTION";
    description = "Elixir of Healing";
    text[1] = "Completely restores your life";
    text[2] = "Duration (seconds):";
    count[2] = 5;
    text[5] = NAME_VALUE;
    count[5] = VALUE_HPELIXIER;
};

Healing/Mana Essences restore 50 points if hp/mana is less than 150, or restore 1/3 of total hp/mana if above said value.
Healing/Mana Extracts restore 70 points if hp/mana is less than 210, or restore 1/2 of total hp/mana if above said value.
Healing/Mana Elixirs restore 120 points if hp/mana is less than 250, or fully restore hp/mana if above said value


Enjoy!

15
MDS i animacje / Problem with Blender
« dnia: 2016-10-20, 00:28 »
Also make sure, that every modifications of your model are made in EDIT MODE, because when exporting, blender will zero rotation and scale values that you apply in OBJECT MODE, i'm not sure what will happen with location though, but probably the same thing.

THAT! Thanks man, really saved my ass. Props to you! :)

16
MDS i animacje / Problem with Blender
« dnia: 2016-10-19, 21:03 »
Good evening everyone!

I have a question to ask, I've created a new helm and saved it into a .3ds using Kerrax import/export plugin for Blender.

All good, mesh is in the game and everything, except that when I equip it, the helm is flipped backwards (ie: the head points towards the neck and vice versa) and I have no clue how to rotate it!

I've tried rotating the mesh in Blender but regardless of the rotation, it will ALWAYS be backwards. Can anyone help me fixing this? I have the same issue with a weapon, and I'd love to know how to ****ing do this absurdely simple thing XD


17
Zapowiedzi modyfikacji / [G2NK] Requiem
« dnia: 2016-10-18, 20:58 »
Looking for a skilled Blender/3dsMax user to help me importing this into the game. For all I care about credits, he can take all credit for it. I just want this to be in the game! :D

Getting a CTD because of too many vertices/faces, I think. The armor is 100% ready and textured, I just need to fix this crashing issue.

https://i.imgsafe.org/6712f4af8a.jpg

Please contact me in private, cheers!

Vic7im

18
Skrypty / Weird AI behaviour
« dnia: 2016-09-01, 16:48 »
Try WinMerge - it will show you which scripts you have changed and what have you changed exactly in them. In can help more if you will have problems with using it.

Thanks man, cheers. I've uncovered more stuff in the meantime. Using original G2 scripts everything works fine (well, duh), but when I add the AST.dll file, goblins have a different ID and don't percieve anything (no damage, no enemies, nothing). I think that's where the problem is, since I've done NOTHING but add the AST core scripts to the vanilla ones.

Soo, I think it's them, I'll work around that. Thanks anyway :)

Post połączony: 2016-09-02, 08:44
Fixed, started over and replaced the wrong scripts, can close mods! Thank you Avallach!

19
Skrypty / Weird AI behaviour
« dnia: 2016-09-01, 16:20 »
Yes

20
Skrypty / Weird AI behaviour
« dnia: 2016-09-01, 15:17 »
Zero knowledge, unfortunately.

Strony: [1] 2 3 ... 5
Do góry