understood! if you are interested in, i've resently uploaded the script including the source.
Ergebnis 181 bis 200 von 217
-
- Registriert seit
- May 2009
- Beiträge
- 1.688
[Bild: dtc_sig.jpg]
Harald Iken: Überhaupt sollte man als Spieleentwickler das Wort "einfach" oder noch besser "mal eben" aus seinem Wortschatz streichen.
-
NOMINMAX is now defined for Windows.h (to avoid conflicts with the STL and other SDKs).
You should use std::min<> and std::max<>.
-
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.
-
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.
-
- 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; }
Geändert von harry321 (30.07.2013 um 23:20 Uhr)
-
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.
-
- Registriert seit
- Jul 2013
- Beiträge
- 4
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 :/Geändert von harry321 (31.07.2013 um 09:21 Uhr)
-
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").
You need to register that script as a debug key in %localappdata%\Risen\ConfigUser.xml. (See Script_Clock.txt).
This script is supposed to be called from within dialogs ("infos" in Risen) via the info command "gCInfoCommandRunScript".
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.
Possibly this is to secure that the scripts are only registered once even if ScriptInit was to be called multipe times.
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() );
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.Geändert von Baltram (31.07.2013 um 10:02 Uhr)
-
- 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.
-
- 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.
-
- 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.
-
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
-
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
-
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?
-
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.
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 ).
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." -- ConnorGeändert von NicoDE (19.11.2013 um 12:12 Uhr)
-
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.
-
- 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.
-
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 ); }
Code:void __stdcall DoWeatherThings() { eCWeatherStates * pWeatherStates = new( 12, 0 ); if ( pWeatherStates ) { eCWeatherStates( pWeatherStates ); } else { pWeatherStates = 0; } eCWeatherStates::GetBlendFactor( pWeatherStates ); }
Geändert von George (11.10.2015 um 17:44 Uhr)
-
- 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.
-
- 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