Home Risen Risen2 Risen3 Forum English Russian

Registrieren Hilfe Kalender Heutige Beiträge
Seite 10 von 11 « Erste ... 367891011 Letzte »
Ergebnis 181 bis 200 von 217
  1. #181 Zitieren
    Ritter
    Registriert seit
    May 2009
    Beiträge
    1.688
    understood! if you are interested in, i've resently uploaded the script including the source.
    [Bild: dtc_sig.jpg]

    Harald Iken: Überhaupt sollte man als Spieleentwickler das Wort "einfach" oder noch besser "mal eben" aus seinem Wortschatz streichen.
    Kuchenschlachter ist offline

  2. #182 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    NOMINMAX is now defined for Windows.h (to avoid conflicts with the STL and other SDKs).
    You should use std::min<> and std::max<>.
    NicoDE ist offline

  3. #183 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    I added DebugCLR and ReleaseCLR configurations to the Risen SDK Libraries to introduce basic support for mixed mode projects (compiled with /clr).

    You might notice that DebugCLR uses Multi-threaded DLL (/MD) instead of Multi-threaded Debug DLL (/MDd) (/clr requires /MD or /MDd). The reason is that the SharedBase.dll statically links to the release version of the SmartHeap library (SHW32.dll). If you use only the SharedBase.dll in your project you’re "lucky" and see the attached message from the SmatHeap library. If you’re using more Genome libraries (Engine.dll) it only displays the second message.
    Miniaturansichten angehängter Grafiken Miniaturansichten angehängter Grafiken SmartHeap.png   DLLInitFailed.png  
    NicoDE ist offline

  4. #184 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    While working on a code review of the SharedBase library, I plan breaking changes for GE_ARR_NEW and the container templates (bugs, interface, naming, missing functionality, ...). If you are heavily using the containers, please drop me a note and tell me the features you would miss.
    NicoDE ist offline

  5. #185 Zitieren
    Rookie
    Registriert seit
    Jul 2013
    Beiträge
    4
    But how the script adding in this SDK really work? I tried to add my script like that:

    Code:
    g_ScriptInit.m_arrScripts.Add( gSScriptInitScript( "myscript", __FILE__, myscript ) );
    Code:
    GEInt GE_STDCALL myscript( gCScriptProcessingUnit *, GELPVoid, GELPVoid, GEInt )
    {
        if( world.IsGameRunning() && !world.IsPaused() && !gui2.IsLoading() )
        {
            Entity player = world.GetPlayer();
            if( player )
            {
                player.Kill();
            }
        }
        return 1;
    }
    I thought it will kill my player all the time, It doesn't even work with the endless loop. There's not enough info about it I think the function "myscript" isn't even executed
    harry321 ist offline Geändert von harry321 (30.07.2013 um 23:20 Uhr)

  6. #186 Zitieren
    Ehrengarde Avatar von Baltram
    Registriert seit
    Jun 2006
    Beiträge
    2.264
    Zitat Zitat von harry321 Beitrag anzeigen
    I think the function "myscript" isn't even executed
    You did register the script correctly but why would it be executed? You need something to trigger/call that script. For example, if you change the name to "CON_myscript" you could invoke it by executing "myscript" in the console (cheat mode). Or you could connect the script with an interact (chest/alchemy table/campfire/door/etc.). You could also invoke the script from within a dialogue. There are many more possibilities - it really depends on what you want to achieve with the script.
    Baltram ist offline

  7. #187 Zitieren
    Rookie
    Registriert seit
    Jul 2013
    Beiträge
    4
    Zitat Zitat von Baltram Beitrag anzeigen
    You did register the script correctly but why would it be executed? You need something to trigger/call that script. For example, if you change the name to "CON_myscript" you could invoke it by executing "myscript" in the console (cheat mode). Or you could connect the script with an interact (chest/alchemy table/campfire/door/etc.). You could also invoke the script from within a dialogue. There are many more possibilities - it really depends on what you want to achieve with the script.
    There is a callback in the engine, OnGameStart how could I put there my instructions, just add the script with name "OnGameStart"?

    In the Script_Clock I see OnDebugClock but how it is being executed if it's not the game part and persists only once in the code. I've already know how to add my own command, but need something more.

    I've also looked at your script and there was OnTradeInfo_ClearTradeInventory, when is it called? I see there's a special convention OnTradeInfo_* so I could make a script OnTradeInfo_foo and it will be executed on this unknown action right?

    Is there any "render" callback which will do what I want per frame? I don't really get it(the logic) right know even if I know the language

    And why the array of scripts should be empty before I add something to it? I see that every script from the repository clears or checks if the array is empty and then adds...

    Most of the script functions already built in have arguments

    gCScriptProcessingUnit *, GELPVoid, GELPVoid, GEInt

    I see, but don't exactly know what do they mean.

    EDIT: I see there are Interact_Player_* functions which are responsible for interaction but don't really know how to use it all... damn. I am too stupid for that :/
    harry321 ist offline Geändert von harry321 (31.07.2013 um 09:21 Uhr)

  8. #188 Zitieren
    Ehrengarde Avatar von Baltram
    Registriert seit
    Jun 2006
    Beiträge
    2.264
    Zitat Zitat von harry321 Beitrag anzeigen
    There is a callback in the engine, OnGameStart how could I put there my instructions, just add the script with name "OnGameStart"?
    You don't just need to replace OnGameStart, you also need to call the original function (which is quite complex so rewriting it is not an option).

    Have a look at Script_Dex_Melee to see how this can be achieved (in this script project the script DoDamage is "hooked").

    Zitat Zitat von harry321 Beitrag anzeigen
    In the Script_Clock I see OnDebugClock but how it is being executed if it's not the game part and persists only once in the code.
    You need to register that script as a debug key in %localappdata%\Risen\ConfigUser.xml. (See Script_Clock.txt).

    Zitat Zitat von harry321 Beitrag anzeigen
    I've also looked at your script and there was OnTradeInfo_ClearTradeInventory, when is it called?
    This script is supposed to be called from within dialogs ("infos" in Risen) via the info command "gCInfoCommandRunScript".

    Zitat Zitat von harry321 Beitrag anzeigen
    Is there any "render" callback which will do what I want per frame?
    Here is a list of registered scripts. OnGameProcess or OnPlayerTick sound like good candidates if you want to have your script called per game tick. If you really need it to be called per frame, you could hook eCCameraBase::Render (this is not a script). See this file for an example (here, gCCameraAdmin::OnAction is hooked). You need to include m_hook.h and m_hook.cpp in your script project.

    Zitat Zitat von harry321 Beitrag anzeigen
    And why the array of scripts should be empty before I add something to it? I see that every script from the repository clears or checks if the array is empty and then adds...
    Possibly this is to secure that the scripts are only registered once even if ScriptInit was to be called multipe times.

    Zitat Zitat von harry321 Beitrag anzeigen
    Most of the script functions already built in have arguments

    gCScriptProcessingUnit *, GELPVoid, GELPVoid, GEInt
    Every "script" must have these arguments. There are also AIScripts, AICallbacks and AIStates, which have different signatures. All original script functions start with this code:

    Code:
    Entity Self;
    Entity Other;
    if ( a_pSelf )
        Self = a_pSelf;
    else
        Self.AttachTo( a_pSPU.GetSelfEntity() );
    if ( a_pOther )
        Other = a_pOther;
    else
        Other.AttachTo( a_pSPU.GetOtherEntity() );
    So the first three parameters gCScriptProcessingUnit * a_pSPU, Entity * a_pSelf, Entity * a_pOther are used to initialize the entities 'Self' and 'Other' (what Self and Other are depends on the context). The GEInt-Parameter can be everything (GEInt really is just a placeholder type in this case). In console commands for example it is a pointer to a structure that contains information on how the console command was called.

    Zitat Zitat von harry321 Beitrag anzeigen
    EDIT: I see there are Interact_Player_* functions which are responsible for interaction but don't really know how to use it all... damn. I am too stupid for that :/
    Well, Rome wasn't built in a day. Of course it takes some time to get a feeling of how the SDK works. But there are at least two persons who will assist you.
    Baltram ist offline Geändert von Baltram (31.07.2013 um 10:02 Uhr)

  9. #189 Zitieren
    Rookie
    Registriert seit
    Jul 2013
    Beiträge
    4
    Many thanks for answering the questions!

    I'll try to do something now, It's sad that this thread was inactive for 2 years (where the fuck are you ppl?) Risen is awesome just like the Gothic series.
    harry321 ist offline

  10. #190 Zitieren
    Rookie
    Registriert seit
    Jul 2013
    Beiträge
    4
    Baltram: do you know if there's some class responsible for player look? I mean face, body and all this stuff. I couldn't find it which is sad because these things are very important for me. It's possible to change files responsible for look, but it must be possible to set it with a function.
    harry321 ist offline

  11. #191 Zitieren
    Ritter
    Registriert seit
    May 2009
    Beiträge
    1.688
    Have a look at this:http://svn.nicode.net/risensdk/branc...89&view=markup

    the line actually executing the change in look is "pInventoryPS->GetDefaultSlot( a_enuSlot ).SetTemplate( NewDefaultHead );".
    To make the change persistent you have to save the resposinble file.
    [Bild: dtc_sig.jpg]

    Harald Iken: Überhaupt sollte man als Spieleentwickler das Wort "einfach" oder noch besser "mal eben" aus seinem Wortschatz streichen.
    Kuchenschlachter ist offline

  12. #192 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    Next week (2013-11-11 to 2013-11-17) I will migrate *.nicode.* to another server.
    All public files/services should be available on the new server, but you should avoid committing to the subversion projects (changes after the export will be lost).

    Best regards
    Nico Bendlin
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline

  13. #193 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    All services should work again.

    Note that the DNS updates might take a while. The new IP address of *.nicode.net is 91.250.119.181 (apache and svnserve have been stopped on 178.77.72.177 to avoid accessing the old server).
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline

  14. #194 Zitieren
    Ehrengarde Avatar von Baltram
    Registriert seit
    Jun 2006
    Beiträge
    2.264
    Zitat Zitat von NicoDE Beitrag anzeigen
    Note that the DNS updates might take a while.
    Das ist wahr. Ich klicke seit ein paar Stunden wie ein Verrückter alle fünf Minuten erfolglos auf mein Bookmark.
    (Bin nämlich gespannt, ob sich durch den Umzug an der Geschwindigkeit etwas getan hat - war in der Vergangenheit manchmal sehr langsam.)

    Darf man nach dem Zweck des Umzugs fragen?
    Baltram ist offline

  15. #195 Zitieren
    research Avatar von NicoDE
    Registriert seit
    Dec 2004
    Beiträge
    7.410
    Zitat Zitat von Baltram Beitrag anzeigen
    Ich klicke seit ein paar Stunden wie ein Verrückter alle fünf Minuten erfolglos auf mein Bookmark.
    If http://svn.nicode.net/risensdk/ is still not working for you, use http://nicode.net/svn/risensdk/
    For Subversion you should use svn://nicode.net/risensdk.
    Maybe your bookmark is dead because I did not migrate something or deep links might have changed due to different package versions or differences in the configuration.

    Zitat Zitat von Baltram Beitrag anzeigen
    (Bin nämlich gespannt, ob sich durch den Umzug an der Geschwindigkeit etwas getan hat - war in der Vergangenheit manchmal sehr langsam.)
    I doubt it will be faster or more stable at all.
    The used Virtual Server package has no guaranteed/dedicated CPUs/vCores.
    Therefore you should not expect any performance boost (and sometimes I'm moving a lot of data on the server ).

    Zitat Zitat von Baltram Beitrag anzeigen
    Darf man nach dem Zweck des Umzugs fragen?
    nicode.net was on a Host Europe Virtual Server Linux L 4.0 with Ubuntu 8.04 LTS (Hardy). Since the support for Ubuntu 8.04 LTS ended this year, I upgraded to the current Host Europe Virtual Server Linux Starter 7.0 with Debian 7.0 (Wheezy, 64-Bit). Upgrading the product version requires to migrate the server manually (well, I waited for the Debian 7.0 option at Host Europe, and due to the OS switch I had to migrate the server anyway).

    Well, and it was time for a cleanup
    "Unter diesen schwierigen Umständen bin ich mir sicher, daß diese guten Menschen meinen augenblicklichen Bedarf an deren Gold verstehen werden." -- Connor
    NicoDE ist offline Geändert von NicoDE (19.11.2013 um 12:12 Uhr)

  16. #196 Zitieren
    Ehrengarde Avatar von Baltram
    Registriert seit
    Jun 2006
    Beiträge
    2.264
    It works again (and at the moment the performance is very satisfying). Code displayed by ViewVC looks somehow better now. And folder properties are shown, that's cool too.
    Baltram ist offline

  17. #197 Zitieren
    Ritter
    Registriert seit
    May 2009
    Beiträge
    1.688
    I have a problem constructing objects.

    In my Script for im-/exporting weather stuff i have to create eCWeatherStates and eCWeatherEnvironment objects and let the engine handle freeing them. For eCWeatherEnvironment it works but eCWeatherStates creashes the game. Turns out eCWeatherEnvironment not crashing is a bug in the engine, it's destructor isn't virtual, hiding the bug in my code.

    When i instantiate something the compiler has the great idea of creating a default constructor/vtable in my Script dll. This becomes a problem when the dll is unloaded but the objects are still alive. Now, when the engine wants to destroy them it tries to look into a vtable that's gone. For now I solved it by using eCWeatherStates::CreateObject instead of GE_NEW eCWeatherStates.

    Has anyone a idea how to force the compiler to use the exported constructors of the engine instead of creating new ones?
    [Bild: dtc_sig.jpg]

    Harald Iken: Überhaupt sollte man als Spieleentwickler das Wort "einfach" oder noch besser "mal eben" aus seinem Wortschatz streichen.
    Kuchenschlachter ist offline

  18. #198 Zitieren
    Moderator Avatar von George
    Registriert seit
    Sep 2010
    Beiträge
    684
    Zitat Zitat von Kuchenschlachter Beitrag anzeigen
    Has anyone a idea how to force the compiler to use the exported constructors of the engine instead of creating new ones?
    This post deals with your problem and offers three possible solutions.

    I successfully tested solution two. I didn't use Risen's eCWeatherStates but instead Gothic 3's, but that should not make a difference.

    Before
    Code:
    void __stdcall DoWeatherThings()
    {
        eCWeatherStates * pWeatherStates = new( 12, 0 );
        if ( pWeatherStates )
        {
            eCWeatherStates( pWeatherStates );
            *pWeatherStates = &eCWeatherStates::`local vftable';
        }
        else
        {
            pWeatherStates = 0;
        }
        eCWeatherStates::GetBlendFactor( pWeatherStates );
    }
    After
    Code:
    void __stdcall DoWeatherThings()
    {
        eCWeatherStates * pWeatherStates = new( 12, 0 );
        if ( pWeatherStates )
        {
            eCWeatherStates( pWeatherStates );
        }
        else
        {
            pWeatherStates = 0;
        }
        eCWeatherStates::GetBlendFactor( pWeatherStates );
    }
    George ist offline Geändert von George (11.10.2015 um 17:44 Uhr)

  19. #199 Zitieren
    Ritter
    Registriert seit
    May 2009
    Beiträge
    1.688
    Thank you, George. Very interesting.
    [Bild: dtc_sig.jpg]

    Harald Iken: Überhaupt sollte man als Spieleentwickler das Wort "einfach" oder noch besser "mal eben" aus seinem Wortschatz streichen.
    Kuchenschlachter ist offline

  20. #200 Zitieren
    Rookie
    Registriert seit
    Jan 2017
    Beiträge
    5
    This is my small contribution of missing classes. In case someone will ever need it. This includes:

    • eCSceneAdmin
    • gCHudModule2
    • gCHudSystem2
    • gCHUDFileManager


    https://drive.google.com/file/d/0B1Y...ew?usp=sharing
    Awakened ist offline

Seite 10 von 11 « Erste ... 367891011 Letzte »

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •