PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : [Beta] Risen Lrent Viewer



Galrath434
07.09.2010, 21:57
This is a program which will show you the contents of the Lrent Files. These are the files where Risen stores the information about what is placed where in the world, in other words : they are the maps Risen uses.

Because this is a graphics tool there are some hardware/software requirements :
1. You will need a DirectX 9 and ShaderModel 2 graphics card aswell as Windows Vista or 7.
2. You will need the newest DirectX runtime.
3. You will need the DotNet Framework 3.5

There are two versions as of now. One stable version which should definetly work :
http://upload.worldofplayers.de/files7/SdZFIRisen_Editor.rar
Here is a beta version which has bug fixes or other improvements :
http://upload.worldofplayers.de/files7/Q9BxppV6BZyisDz4Risen_Editor.zip
I would encourage you to use the beta version. But if you have any problems, drop back to the stable one. It would of course be nice if you could post your problem, so I may fix it.

How to use it :
If you have installed Risen on you PC you don't have to do anything, if not open "Resources/Settings.ini" and change "RisenMainPath=INVALID" to your Risen path like "E:\Spiele\Risen". You will have to unpack all the Lrent files, you can do it with the build in Pak Viewer.

Hold the right mouse button and move the mouse or press w/a/s/d to move the camera.
You can move entities with the numpad or dragging the gizmo.

Shak-otay
07.09.2010, 23:00
Very nice, indeed! Welcome to "the team".;-)

NicoDE
08.09.2010, 00:04
Another hardware requirement: ShaderModel 4.0

LordOfWAR
08.09.2010, 14:59
@Galrath434: Sounds really nice, thanks §wink. But... Risen was developed using DX9, also there is many peoples who don't have Win Vista,7 or video card with DX 10 support (as me :)). So, if you will have some free time, it would be nice to see also DX9 version §wink.

Galrath434
08.09.2010, 15:51
@NicoDE
Yes you are absolutely right ShaderModel4 is required, just added it, thank you for reminding me!

@LordOfWar
For me the problem is the fact that I actually developed all the stuff with DirectX 11 and switching to DirectX 10 with this setup only takes seconds. When targetting DirectX 9 you will have to rewrite 75% of the code (plus DX 9 isn't fun to work with after all). But you are right Risen uses 9 so it would be nice. I will definetly have a go at it, but it could take some time.

NicoDE
08.09.2010, 21:36
Updated DirectX to "fix" the first crash, but I still cannot open the dynamic layers (see attached screen shot for details).

Windows 7 Ultimate x64, English with German MUI active, DirectX June 2010, dotNET 4.0.

I use the following script to extract the files:
@echo off
cd /D "%~dp0"
.\Tools\Risenaut.exe --extract-all ..\data\common\meshes.pak .\Resources\Scene\Models
.\Tools\Risenaut.exe --extract-all ..\data\compiled\animations.pak .\Resources\Scene\Models
.\Tools\Risenaut.exe --extract-all ..\data\compiled\animations.p00 .\Resources\Scene\Models
.\Tools\Risenaut.exe --extract-all ..\data\compiled\images.pak .\Resources\Scene\Materials
for /R .\Resources\Scene\Materials %%i in (*._ximg) do (
.\Tools\RisenDDS.exe "%%i"
if exist "%%~dpni.dds" erase "%%i"
)
.\Tools\Risenaut.exe --extract-all ..\data\common\projects.pak .\Projects

Fixed: Added "attrib -R /S" to the script (I had to remove the read-only flag of the files)

Galrath434
08.09.2010, 22:06
The application is crashing when you are trying to open a lrent right?
If so it is not a problem with DirectX. If you want to you can try DirectX by doing this:
Edit/EditScene, Now under the meshes Node there should be all the models from the "animations" and "models" folders. If they are not there read below. If they are, just load one of the files. I guess you are going to see a model, so DirectX is fine.

I actually have never seen this "access denied" error and I am a bit out of ideas so check this file : "Registeredpaths.txt" in the main application folder. Please post it's contents here.
Also : have you changed the Modelpath in the Settings.ini? Because normally the application wouldn't look for models outside the scene/resources/models subfolders. That seems quite strange to me. Could you please try placing the files exactly as in the readme described and also tell me the contents of the "registeredpaths.txt" files after doing so.

Edit : Is it working now? So are you able to open lrents without seeing the error?

NicoDE
08.09.2010, 22:11
Is it working now? So are you able to open lrents without seeing the error?Yes, it works like a charm.
The Viewer does not like the read-only file attribute.
You should open the files with read-only/share-read access if possible :)
(and while you are at it, please make the filter in the open dialog persistent, or make *.lrent the default filter, please :))

Galrath434
08.09.2010, 22:32
Yes I will definetly change this to Read only. Didn't think about such a problem yet.

I will try changing it to be lrent's as the first option, aswell as allowing multiselection.

Could you maybe tell me what kind of FPS(you can see them by Tools/World Info) you have. Just that I know if I can add more graphic features or if I have to optimize it better.

NicoDE
08.09.2010, 22:53
Could you maybe tell me what kind of FPS(you can see them by Tools/World Info) you have.1600x1200
Levelmesh_Dungeon_Lizard + Levelmesh_Monastery
FarDepth: 100000
DrawCalls: 430
FramesPerSecond: 25
NodesDrawn: 110
TriangleDrawn: 500000

Not bad for a non-gaming rig (E8400, NVS290).

Ihrrik
09.09.2010, 00:42
At First, the program works. At the beginning (yesterday) I had some problems with access rights and read-only folders. Fixed now.
System: Win7, Phenom II X4 965, Radeon 5770 DX11, NetFr. 4.0

i tried the same setting like nico
1600x1200
Levelmesh_Dungeon_Lizard + Levelmesh_Monastery
FarDepth: 100000
DrawCalls: 441
FramesPerSecond: 183
NodesDrawn: 116
TriangleDrawn: ~496000

I have watched almost all models in the "animation" folder and some Levels.
I have noticed strange holes in the walls. At these places there are no transitions between vertices. It seems to be a problem of textures.
z.B. blue_dungeon_02
http://upload.worldofplayers.de/files5/RViewer_hole.jpg

Most monsters are displayed correctly but with a few exceptions, the skeletons and the chicken look crazy.
http://upload.worldofplayers.de/files5/Monster.jpg



(and while you are at it, please make the filter in the open dialog persistent, or make *.lrent the default filter, please :)) PLZ! ^^

Galrath434
09.09.2010, 01:14
Concearning the gaps :
It's not a bug it's a feature. :D
The risen texture files seam to have some problems with alpha transparency. For example the spider web textures don't have any. This results in ugly scenes. To fix this I am checking if the texture is totally black and if so the pixel isn't drawn. In the case of the spider web this makes it look good. In the case of the wall where some parts are black too it results in ugly gaps.

To me it was more important to have nice spider webs. But I might add a parameter in the Settings.ini so you can decide on your own.
If someone knows why exactly spider webs have no transparency I would really be interested in a solution.

I know of the problem with these models not beeing displayed correctly. Personaly I can't change that because I didn't write the xmac importer(Baltram did). Maybe there will be a fix for that but I can't promise anything. Do you know what models exactley are affected by this? Only the mummy and the chicken or more?

P.S. For all the people who think it's pretty ugly : Set this "UseRenderingType" in Resources/settings.ini to 1. This will result in lights beeing calculated. But you will have to place them all over the place. And it will be slower then the standard rendering.
Also you can lower the "ObjectCount" value to 0 which will never fade out objects far away from the viewer.

Ihrrik
09.09.2010, 02:00
Do you know what models exactley are affected by this? Only the mummy and the chicken or more?

Models/Animations/_emfx36/..
-head/bodys
--Ani_Hero_Head_Alchemist_01 // not displayed
--Ani_Hero_Head_Normalo_01 // some missing vertices
--Ani_Hero_Head_Player_Occular // freaky distorted vertices like Skelleton
--Ani_Hero_Head_Woman_01 // not displayed
--Ani_Hero_Head_Woman_01_Ghost // not displayed

-humans/bodys
--Ani_Hero_Armor_Intro_Old // missing tex

-items/bodys
>nothing<

-mobsis/bodys // all missing tex
--Object_Interact_Animated_Chest_Medium
--Object_Interact_Animated_Chest_Rich
--Object_Interact_Animated_Chest_Sailor
--Object_Interact_Animated_Chest_Ship
--Object_Interact_Animated_Door_Breakable
--Object_Interact_Animated_Sarcophagus_Trap
--Object_Interact_Animated_SecretRing

-monster/bodys
--Ani_Chicken_Monster_Chicken // distorted vertices
--Ani_Hero_Monster_Skeleton // distorted vertices
--Ani_Hero_Monster_SwampMummy // distorted vertices
--Ani_Inferno_Monster_Inferno // not displayed
--Ani_Molerat_Monster_Stingrat // distorted vertices
--Ani_Ogre_Monster_Ogre // missing tex
--Ani_Ogre_Skeleton // not displayed
--Ani_Titan_Monster_Titan // distorted vertices

Baltram
09.09.2010, 14:25
@Ihrrik

The missing textures can't be avoided since the materials stored inside the XMACs aren't always complete / refer to the proper texture files. The materials used in the game are stored as ._xmat files which aren't read (yet) by the Risen Lrent Viewer.

The Inferno Monster XMAC doesn't contain any mesh so there isn't anything that could be displayed.

As for all the other missing/distorted meshes problems you posted: I tested them all in xmac2obj and didn't find any errors so it's probably some minor implementation problem of the Lrent Viewer Beta. I guess Galrath will fix this.

Galrath434
19.09.2010, 18:21
I have been working on the tool for quite some time in the last week and finally I have finished a new version, including some big, aswell as countless small changes.

Here are some :
-DirectX 9 support! All graphic cards supporting ShaderModel 2 can be used now. But you will still need Windows Vista or Windows 7 as operating system. This is due to some restrictions of DirectX.
- You don't need to extract anything anymore. Just copy the Risen paks and your good to go. In the readme there is a description of what to do.
-Better memory management. You should be able to import ALL risen lrent files and fly through the complete world( I saw at least a couple of places I have never been ingame).
- Not only NPCS will be imported, Monsters, too. This means you can have a look at the titan or any other monster without using the build in model viewer.
-I think I fixed all the issuses which were reported here like making "lrent" the first choice when importing.

See the first post for the new download link.

Galrath434
06.12.2010, 08:12
Currently wokring on a new version which will support trees, grass and Materials. There will be other tools included like a viewer for the pak files aswell as a texture viewer. I should be finished in the next few days. If there are some people willing to help with testing please send ma a message.

Here are some screenshots :
http://upload.worldofplayers.de/files5/Risen_Viewer_1.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_2.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_3.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_4.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_5.jpg

Galrath434
21.12.2010, 07:52
The update will take some more time, probably till after Christmans. But considering the vast amount of replys here I guess nobody really cares :D .

I started implementing moving/rotating objects and saving these changes back in the "*.lrent". So this would be the first minor step to an (tiny)editor. Also I tried adding and removing Objects from lrents but this doesn't work yet.

NicoDE
21.12.2010, 08:05
But considering the vast amount of replys here I guess nobody really cares :DWe are just waiting for your all-in-one editor suitable for every purpose :D


Also I tried adding and removing Objects from lrents but this doesn't work yet.Currently I’m analyzing the Dynamic Layer files (*.lrent). It might help you to get it working...

Best regards,
Nico

ps: My current hardware is not able to run Risen with acceptable Performance, therefore I cannot help testing your Viewer/Editor.

Galrath434
21.12.2010, 08:31
We are just waiting for your all-in-one editor suitable for every purpose :D
Well that could take some time and maybe just a few more people. :D

I'll have a look at it when I am back home :D

Aun
21.12.2010, 20:32
Currently wokring on a new version which will support trees, grass and Materials. There will be other tools included like a viewer for the pak files aswell as a texture viewer. I should be finished in the next few days. If there are some people willing to help with testing please send ma a message.

Here are some screenshots :
http://upload.worldofplayers.de/files5/Risen_Viewer_1.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_2.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_3.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_4.jpg
http://upload.worldofplayers.de/files5/Risen_Viewer_5.jpg

Alright, that looks really impressive. Does it help modding the world or is it just to make minor changes?

Galrath434
21.12.2010, 20:48
Alright, that looks really impressive. Does it help modding the world or is it just to make minor changes?

Well I hope that with the next release you could do something like this :
1. Think that you don't like where something in the World is placed, for example your favourite Tree should actually be one meter further to the left :D
2. In the Viewer than you would just have to load the lrent in which the tree is, select the tree and move it by pressing some key.
3. Save it in the Lrent.

In my current Version this actually is possible, I just don't thing this would help anybody, so I would like to do some more :
1. You think there are not enough Trees at some place.
2. So you open the right Lrent, add more trees, by selecting a model from the game plus a position.
3. Save it in the Lrent, and load it ingame.
But I can't do this yet! Maybe this could also be possible with monsters.

If this is major, minor or whatsoever I leave for you to decide. But I think it should be possible to change some things. But I have to admit nothing of this would be totally new, you can already do all of these things with the Lrenter, just without an image of how it will look later.

Aun
22.12.2010, 12:00
Well I hope that with the next release you could do something like this :
1. Think that you don't like where something in the World is placed, for example your favourite Tree should actually be one meter further to the left :D
2. In the Viewer than you would just have to load the lrent in which the tree is, select the tree and move it by pressing some key.
3. Save it in the Lrent.

In my current Version this actually is possible, I just don't thing this would help anybody, so I would like to do some more :
1. You think there are not enough Trees at some place.
2. So you open the right Lrent, add more trees, by selecting a model from the game plus a position.
3. Save it in the Lrent, and load it ingame.
But I can't do this yet! Maybe this could also be possible with monsters.

If this is major, minor or whatsoever I leave for you to decide. But I think it should be possible to change some things. But I have to admit nothing of this would be totally new, you can already do all of these things with the Lrenter, just without an image of how it will look later.

Okay, so you can´t edit the levelmesh? Well, I guess that would be too much... :D
Is a spacer like the one for Gothic 2 required to edit the mesh?

NicoDE
22.12.2010, 12:19
Okay, so you can´t edit the levelmesh?The Dynamic Layers (*.lrent) reference Mesh Resources (*._xmsh) by Property Sets (eCMesh_PS.MeshFileName and eCPortalRoom_PS.MeshFileName). The Raw files of the Level Meshes are *.bse files (3ds Max Binary Scene Export, probably with modifications by Piranha Bytes) that are referenced by gCDynamicLayer.OriginImportName.
Baltram published a Risen XMSH Builder (http://forum.worldofplayers.de/forum/showthread.php?t=751486) - but currently it does not support generating the Collision Meshes (*._xcom).

Galrath434
22.12.2010, 17:27
Okay, so you can´t edit the levelmesh? Well, I guess that would be too much... :D
Is a spacer like the one for Gothic 2 required to edit the mesh?

Well I have never used this tool so to be honest I am not shure what it does. As Nico said modifying the meshes is not that easy, but if I am successfull you should be able to do something similar. For example if you think some dungeon is not big enough, you could delete the current object and replace it with another mesh(which has to be included in Risen!) or multiple ones. But I am not shure what kind of effects this will have on for example Paths of NPC's because they could end up trying to walk through a wall which wasn't there before.

Galrath434
01.01.2011, 23:31
After a bit of work I am now able to add new Entitys to a Lrent file.
Here is an example I did in a few seconds(just pressing ctrl + c,v) :
http://upload.worldofplayers.de/files5/RisenEntAdd.jpg

Just did the test and removing entities works quite fine too.
http://upload.worldofplayers.de/files5/RisenEntRem.jpg
Poor guy :D

So just tried adding some more Monsters and well I guess the Image below says it all :D
http://upload.worldofplayers.de/files5/RisenMonsterAdd.jpg
So it should be poosible to do some small modding with the Viewer from now on.

But don't expect too much because I have no Idea what will happen if you do this not with a static entity but with a NPC.
NicoDE provided me with all the information on how to do it so a big THANKS!

Aun
02.01.2011, 18:06
But don't expect too much because I have no Idea what will happen if you do this not with a static entity but with a NPC.
NicoDE provided me with all the information on how to do it so a big THANKS!

Very nice! Good work. I think this would help Casablonga with his "The tale of Mortales" Mod-Project very, very much. If it is not too hard and time intensive to work with this tool I might try it out myself! :gratz

Galrath434
06.01.2011, 01:19
I am nearly finished with the next update and just to show you what is possible now I created a preview version. For the next real update I would like to include a few more things which I wasn't able to implement yet.
This preview is mostly for people who would like to make some small changes to Risen. If you use it please tell me(1 sentence) if it worked or if not(with your log file) so I can fix it.

Here is the new download link : http://upload.worldofplayers.de/files5/Lrent_Viewer.zip

Have fun!

Casablonga
06.01.2011, 15:30
After a bit of work I am now able to add new Entitys to a Lrent file.
Here is an example I did in a few seconds(just pressing ctrl + c,v) :
http://upload.worldofplayers.de/files5/RisenEntAdd.jpg

Just did the test and removing entities works quite fine too.
http://upload.worldofplayers.de/files5/RisenEntRem.jpg
Poor guy :D

So just tried adding some more Monsters and well I guess the Image below says it all :D
http://upload.worldofplayers.de/files5/RisenMonsterAdd.jpg
So it should be poosible to do some small modding with the Viewer from now on.

But don't expect too much because I have no Idea what will happen if you do this not with a static entity but with a NPC.
NicoDE provided me with all the information on how to do it so a big THANKS!

pretty cool:)
my question is, if it is possible to save the changings. are they savegamerelevant?

Galrath434
06.01.2011, 15:45
Not shure if I understand your question but if you copy entitys while beeing in the Viewer and then press "Save lrents" the lrents which the original entities came from will also contain the new/duplicated entities. So in other words : You could make a mod which basiclly is not more than one lrent file which will contain new things.

If you are asking what happens with copied entites after saving a game, I haven't tried it yet but I guess they should be saved if the SaveGameRelevant flag is set. You should be able to change this in the viewer.

It is not possible yet to change factions of NPCs and stuff like this. I just don't know enough about the lrent structure.

Casablonga
06.01.2011, 16:51
Not shure if I understand your question but if you copy entitys while beeing in the Viewer and then press "Save lrents" the lrents which the original entities came from will also contain the new/duplicated entities. So in other words : You could make a mod which basiclly is not more than one lrent file which will contain new things.

If you are asking what happens with copied entites after saving a game, I haven't tried it yet but I guess they should be saved if the SaveGameRelevant flag is set. You should be able to change this in the viewer.

It is not possible yet to change factions of NPCs and stuff like this. I just don't know enough about the lrent structure.

so it is possible do make things savegame relevant? e.g. if i spawn Mortares, controll him and kill the hero, thes nave the game the changes won't be gone?

Galrath434
06.01.2011, 17:18
so it is possible do make things savegame relevant? e.g. if i spawn Mortares, controll him and kill the hero, thes nave the game the changes won't be gone?
Well I thought yes, if you copied an entity which was savegame relevant the new one would be too. But after trying it out it seems to be more difficult. I copied some gnomes and killed them, then saved the game. After loading the created savegame the corpses of the gnomes were gone and new ones had spawend. I am going to have a look into this because right now creating new stuff is pretty pointless.

Baltram
06.01.2011, 17:20
so it is possible do make things savegame relevant?You can't make things savegame relevant (the ones you added in minsky mode), this property only applies to Lrents files - but I think all of them already are :dnuhr: (and anyway it would'nt have to do anything with the Viewer).
e.g. if i spawn Mortares, controll him and kill the hero, thes nave the game the changes won't be gone?Again, the objects you insert in minsky mode won't be saved for they don't belone to any lrent file. Still you can perfectly do all this if you use Shak-otay's Lrenter for inserting (I suppose the Lrent Viewer can still only clone objects) in combination with Galrath's Viewer to do the positioning.
You also might want to do kind of 'hybrid' thing: Inserting new NPCs/Objects/etc. with Lrenter & Viewer and then edit the properties (race, inventory, ...) in minsky mode. Of course then you'd have to distribute the mod AND the savegame.

EDIT:
But after trying it out it seems to be more difficult. I copied some gnomes and killed them, then saved the game. After loading the created savegame the corpses of the gnomes were gone and new ones had spawend.Could you send me an example lrent or something? I'd like to find out what goes wrong :D (I guess GUIDs).

Galrath434
06.01.2011, 17:34
Here is the lrent I was talking about : http://upload.worldofplayers.de/files5/Lrent_SaveGame_Problem.zip
I copied 4 gnomes from the monastery and moved them to the Don camp.

Baltram
06.01.2011, 17:45
Thanks! :)

Yes it was the GUIDs, they have to be unique for every entity.

Galrath434
06.01.2011, 19:10
You should be able to copy entities now and their state will be saved in the savegames.
Thank you for your help Baltram!

Another thing I totally forgot : You may have noticed that in my screenshots before there were trees and now there aren't any. This is due to the problem that the trees in Risen are generated using SpeedTree and the models are not contained in the paks. There is a way to get the models from the game but I don't know if it would be legal to publish the models here.

Aun
06.01.2011, 19:15
I made the neccessary changes and here is the new download link :
http://upload.worldofplayers.de/files6/RdC7wcYRisen_Viewer.zip
You should be able to copy entities now and their state will be saved in the savegames.
Thank you for your help Baltram!

Another thing I totally forgot : You may have noticed that in my screenshots before there were trees and now there aren't any. This is due to the problem that the trees in Risen are generated using SpeedTree and the models are not contained in the paks. There is a way to get the models from the game but I don't know if it would be legal to publish the models here.

You should definetly ask Michael Rüve! I do not think it would be a problem!

Galrath434
06.01.2011, 19:23
You should definetly ask Michael Rüve! I do not think it would be a problem!
Well my method of getting the models involves some pretty creepy method of using some DirectX debugging tool to capture the content of graphics Card memory and then using this :D
Plus the end result looks totally diffrent than ingame because Risen uses some shaders to display the SpeedTrees which I don't really understand.

So what do you think how can I get in contact with this person?

NicoDE
06.01.2011, 19:24
Hi Galrath434,

is there any chance that project is "restructured" in a way that the Viewer uses the same folder structure as the game?
E.g. extracting the Viewer into Risen’s root could be enough if .\Resources\Scene\Paks\ are loaded from data\common|compiled\, .\Resources\Scene\Materials\ (is the folder still used?) from .\data\common\materials\, and .\Resources\Scene\Models\ (is the folder still used?) from .\data\common\meshes\.

Baltram
06.01.2011, 19:26
So what do you think how can I get in contact with this person?PN (http://forum.worldofplayers.de/forum/member.php?u=53277)...

Galrath434
06.01.2011, 19:52
is there any chance that project is "restructured" in a way that the Viewer uses the same folder structure as the game?
Yes of course, I just didn't think of this. I am doing the neccessary changes right now. An even easier way would be to just use the Registry to determine where the Risen folder is located. Does anybody know if there is a Key pointing towards the Risen folder(or any other method to find the right path)? I only found one for the savegames folder.

EDIT : Ok I just found it myself, I wasn't looking at the right place :D

NicoDE
06.01.2011, 20:18
An even easier way would be to just use the Registry to determine where the Risen folder is located.I have multiple Risen folders and never used the setup (extract_all (http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/IHelpSetup_EXECmdLine.htm#wp1021833) + IsCabView (http://kb.flexerasoftware.com/doc/Helpnet/InstallShield2011/IsCabView-Viewing.htm) of an InstallShield demo version).
Therefore I’m fine with relative paths and/or a config file with Risen-like defaults :)

Galrath434
06.01.2011, 20:47
Ok now there are 4 possiblities to locate the archive files:
1. Use the registry(you don't have to unpack the folder anymore)
2. You can place the folder at this location : "RisenMainFolder/Lrent Viewer"
3. You can specify a path in the Settings.ini, this will only be used if it is diffrent then "INVALID".
4. It will be checked if there are valid files at "Resources/Scene/Paks".

I think everybod should be happy now :D

@NicoDE:
Could you have a look at the "gCInventory_PS" or/and the "gCNavigation_PS" classes? It would be very nice if it was possible to alter the contents NPC's inventorys or change the WayPoints.


\Resources\Scene\Models\ (is the folder still used?)
I use this folders for the SpeedTree models, but it could also be used for additional models which can be loaded from the "EditScene" window.

NicoDE
06.01.2011, 21:15
Could you have a look at the "gCInventory_PS" or/and the "gCNavigation_PS" classes?As soon as possible. But currently I have enough things to do at work and at home :)

Galrath434
03.02.2011, 07:50
I have spent some time adding new things to the Viewer and I made some improvements.

1. It is now possible to view and edit inventories, you can select any entity, look at it's inventory, add new items, remove some or change the amount of an item. There are still some problems with the slots(the armor, head, helmet) because I am not shure how to work with them, but I will fix this till the next release.

2. I added scripts. They are written in plain C#, compiled at runtime and you can do basiclly all you want in them. I did this so people could edit multiple entities at once. For example if you want to turn all entities upside down this can be done in just a few lines now. I chose C# because it's easy to implement and really easy to use, all people who know C++ or C should be fine with it.

Next I will have a go at Waypoints, I will try to not only display them(which should be easy) but to make them editable(which is going to be hard :D).

Is there any reason why nobody has made a small mod where the hero has to fight against "thousands" of enemys? I imagine this could be a lot of fun.
Is it because the viewer is that horrible to work with or because there are not enogh possiblities?

If somebody thinks there are features I should add please let me know because right now I will only add thing I find interesting and not what could be helpfull.

I will add some screenshots which show how easy it is to work with inventories after I get home from school :D
[Edit] Here it is :
http://upload.worldofplayers.de/files6/RV_Inventories1_small.jpg

Ihrrik
14.02.2011, 16:00
ehm.
Where can I download the latest version?
Your startpost was changed on 09.19.2010 the last time.

Galrath434
14.02.2011, 16:21
Ah nice to see that somebody is interested :)
Yeah you are right my last update was quite a while ago, thats because in the next update I want to add lots of new things and I can't really stop :D
If you would like to try it please send me a pm and I will provide you with a beta version. There you can edit inventories/modify waypoints etc. It would be a beta version because I hadn't had time to test all the new features, but it should be alright.

Ihrrik
14.02.2011, 16:30
Sounds great.
I come back to it when I've done my exams.

PowerGamer
27.03.2011, 09:39
This message is a reply to the discussion of Bruno inability to find a way through the Monastery main gate, started in RisenSDK thread (http://forum.worldofplayers.de/forum/showthread.php?p=15668218#post15668218) (figured I should move it into a more appropriate thread):

But if you know what the excat problem with the nav path is(if there is one) feel free to contact me I would be glad to help you.

Well, figuring out what causes the problem is part of the problem. :) For starters it would be nice to just check if there are any nav-paths present in the game, which lead through Monastery main gate.
I downloaded LrentViewer (found two links in this thread) but both versions crash on startup on my system. :(

Info from Windows report:
Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: risen viewer.exe
Problem Signature 02: 0.0.0.1
Problem Signature 03: 4d2612e3
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4ca2b889
Problem Signature 07: c43
Problem Signature 08: 59
Problem Signature 09: System.FormatException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1058

log.txt
-----
-----
-----
27.03.2011 11:27:47 Application was startet succesfully. Log was initialized.
27.03.2011 11:27:47 First settings were loaded.
27.03.2011 11:27:47 Device initialization started.
27.03.2011 11:27:47 Device and API_Device successfully created.
27.03.2011 11:27:47 Event ID : 0
Event Type : Message
Event message :
Feature Level : Level_11_0
DepthStencil format : D32_Float
27.03.2011 11:27:47 Core initialization finished.

Bude
27.03.2011, 09:52
i dont know whats the cause of this crash, but i know that u need shader model 4.0 and dx10.

btw. u should contact him via pm, because the version in this thread is highly outdated.

Galrath434
27.03.2011, 12:42
I downloaded LrentViewer (found two links in this thread) but both versions crash on startup on my system.
Firtly, I am sorry for that. Secondly, does startup mean right after starting the program or does it mean when loading a lrent? I am assuming the first because you seem to know c++ and know what you are talking about :)

Ok here is a guess : Your operating system has some diffrent language type than English/German. "Problem Signature 09: System.FormatException" sounds to me like string to float conversion going wrong because of "," and "." problems, this is of course just and example for formatting problems. Problem is I have no idea where this happens. So here is a Debug build which will print out the stacktrace and some descriptions. If you tell me these info I should be able to fix it.



i dont know whats the cause of this crash, but i know that u need shader model 4.0 and dx10.
Well thats alway a good guess with this program :D
But you can see from "Feature Level : Level_11_0" that DirectX chose 11 as rendering path, If you only have ShaderModel 2 this will be "Level_9_2". But a good guess anyhow :D


btw. u should contact him via pm, because the version in this thread is highly outdated.
I wouldn't directly phrase it like this,... okay well maybe I would :)

PowerGamer
27.03.2011, 13:24
Secondly, does startup mean right after starting the program or does it mean when loading a lrent? I am assuming the first because you seem to know c++ and know what you are talking about :)

Ok here is a guess : Your operating system has some diffrent language type than English/German. "Problem Signature 09: System.FormatException" sounds to me like string to float conversion going wrong because of "," and "." problems, this is of course just and example for formatting problems. Problem is I have no idea where this happens. So here is a Debug build which will print out the stacktrace and some descriptions. If you tell me these info I should be able to fix it.
http://upload.worldofplayers.de/files6/Lrent_Viewer_Debug_Build.rar
Yes, the program crashes right after startup, before displaying main window. Message box displayed the same message as in the log. I have English OS and Ukrainian locale set. "Decimal symbol" is changed to "." in Regional Settings applet in Control Panel. Here is the log:

-----
-----
-----
27.03.2011 15:11:08 Application was startet succesfully. Log was initialized.
27.03.2011 15:11:08 First settings were loaded.
27.03.2011 15:11:08 Device initialization started.
27.03.2011 15:11:08 Device and API_Device successfully created.
27.03.2011 15:11:08 Event ID : 0
Event Type : Message
Event message :
Feature Level : Level_11_0
DepthStencil format : D32_Float
27.03.2011 15:11:08 Core initialization finished.
27.03.2011 15:11:08 Event ID : 1
Event Type : Message
Event message :
Message : Input string was not in a correct format.
Stack Trace : mscorlib
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseSingle(String value, NumberStyles options, NumberFormatInfo numfmt)
at System.Single.Parse(String s, NumberStyles style, NumberFormatInfo info)
at System.Single.Parse(String s)
at Risen_Viewer.Form1.LoadSettings_After()
at Risen_Viewer.Form1..ctor()
at Risen_Viewer.Program.Main()
Method Name : StringToNumber

Galrath434
27.03.2011, 14:15
Ok well I think because of your operating system excpecting "." to be the decimal seperator, my "ObjectCount = 0,05" in "settings.ini" was killing C#. I changed the parsing method a bit and it should work now. I tried it by setting my decimal sperator in the control panel to "." and it worked. But as always with computers no guarantees :)

Could you maybe tell me if everything is working correctly so I can update the link on the first page.

PowerGamer
27.03.2011, 15:37
Could you maybe tell me if everything is working correctly so I can update the link on the first page.
It works now, a useful program indeed, thank you. :)
Well, it crashed when I tryed to do "File->Save Lrents" command, probably not fully implemented yet? Just in case here is a crash log:


************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'G:\projects\World\Cities\Monastery\Monastery_Events.lrent' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.IO.File.WriteAllBytes(String path, Byte[] bytes)
at GameLibrary.IO.StdFileReader.CloseFile(String s, Stream S)
at GameLibrary.IO.EFile.Close()
at Risen_Viewer.LrentFile.SaveFile()
at Risen_Viewer.RisenWorld.Save()
at Risen_Viewer.Form1.BTN_CLICK_Save(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Risen Viewer
Assembly Version: 0.0.0.1
Win32 Version: 0.0.0.1
CodeBase: file:///F:/Risen%20Viewer/Risen%20Viewer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
GameLibrary
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///F:/Risen%20Viewer/GameLibrary.DLL
----------------------------------------
SlimDX
Assembly Version: 2.0.10.43
Win32 Version:
CodeBase: file:///F:/Risen%20Viewer/SlimDX.DLL
----------------------------------------
msvcm90
Assembly Version: 9.0.30729.4974
Win32 Version: 9.00.30729.4974
CodeBase: file:///C:/Windows/WinSxS/x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4974_none_50940634bcb759cb/msvcm90.dll
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.5420 built by: Win7SP1
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
9lld9pwt
Assembly Version: 0.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
1x3lugd1
Assembly Version: 0.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
fcwceenb
Assembly Version: 0.0.0.0
Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
zlib.net
Assembly Version: 1.0.3.0
Win32 Version: 1.0.3.0
CodeBase: file:///F:/Risen%20Viewer/zlib.net.DLL
----------------------------------------

And log.txt:

-----
-----
-----
27.03.2011 17:30:13 Application was startet succesfully. Log was initialized.
27.03.2011 17:30:13 First settings were loaded.
27.03.2011 17:30:13 Device initialization started.
27.03.2011 17:30:13 Device and API_Device successfully created.
27.03.2011 17:30:13 Event ID : 0
Event Type : Message
Event message :
Feature Level : Level_11_0
DepthStencil format : D32_Float
27.03.2011 17:30:13 Core initialization finished.
27.03.2011 17:30:13 Second settings were loaded and rendering was started.
27.03.2011 17:30:19 Loading Lrent : G:\projects\World\Cities\Monastery\Monastery_Events.lrent
27.03.2011 17:30:37 Event ID : 1
Event Type : Message
Event message :
Message : Collection was modified; enumeration operation may not execute.
Stack Trace : mscorlib
at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
at System.Windows.Forms.Application.ExitInternal()
at System.Windows.Forms.Application.ThreadContext.OnThreadException(Exception t)
at System.Windows.Forms.Control.WndProcException(Exception e)
at System.Windows.Forms.Control.ControlNativeWindow.OnThreadException(Exception e)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Risen_Viewer.Program.Main()
Method Name : MoveNext
Also, why upon doing "File->Open Folder" command, program allows user to select a folder only inside "My Documents"?

Galrath434
27.03.2011, 16:41
Actually saving is implemented. You could move/rotate/clone/delete entities and save it all. But this isn't very usful because you won't be able to edit events etc.

Well you problems is quite interesting because on the one hand Windows tells us that the file can't be accessed :
System.UnauthorizedAccessException: Access to the path 'G:\projects\World\Cities\Monastery\Monastery_Events.lrent' is denied.
On the other hand there seems to be a problem while iterating over a list :
Collection was modified; enumeration operation may not execute.

I am not quite shure what the problem could be. Did you move any entities with the gizmo(or change anything in a way, besides the camera) or did you just open a lrent and save it?

Anyhow you could check if your user has read and write rights on the file(right click->Properties...).

PowerGamer
27.03.2011, 16:50
It seems the file I opened and tryed to save was marked as Read-Only (I unpacked all the files with Risenaut.exe). After removing the Read-Only flag saving the file works.

Galrath434
29.03.2011, 15:12
Also, why upon doing "File->Open Folder" command, program allows user to select a folder only inside "My Documents"?

Just fixed that.

Anything else I should fix?
Or any suggestions for other things to implement?

PowerGamer
29.03.2011, 21:19
Just fixed that.
Anything else I should fix?
Or any suggestions for other things to implement?
Nothing I could think of at the moment, but I'll let you know if something comes up. :)

Gonzo54
10.07.2011, 08:25
I dont have most textures. what do you do?

http://imageshack.us/photo/my-images/534/beztytuugjri.jpg/

Gonzo54
10.07.2011, 08:29
im dont have textures. what to du ?
http://imageshack.us/photo/my-images/534/beztytuugjri.jpg/

Baltram
10.07.2011, 09:43
im dont have textures. what to du ?
http://imageshack.us/photo/my-images/534/beztytuugjri.jpg/I can't see no problem. You do have textures. :dnuhr:

If you want to see the level mesh then you have to open Risen\data\common\projects\World\_Level\*.lrent.

Gonzo54
10.07.2011, 10:28
thanks

Galrath434
10.07.2011, 10:47
Is it working correctly now?

Gonzo54
10.07.2011, 11:21
yes, i opened this file does not

PowerGamer
30.07.2011, 14:52
I tried to modify some .tple files but much to my disappointment found out that those modifications have zero effect on the entities already present in the game world (i.e. inside .lrent files). So the changes need to be done in the .lrent files. I wonder if .lrent file format description is available anywhere? If not, Galrath434, maybe you can provide some useful info on that format? Thanks in advance.

Galrath434
30.07.2011, 15:37
Yes you are correct when assuming that changes have to be made in the lrent files. This is because I don't do anything with the .tple files.
Well, the lrent structure is not that easy to explain and I actually have got all my info from Nico. If you really would like to know I could probably tell what you want to know. Another option would be for you to tell me what you would like to do so I can integrate such functionality in the Lrent Viewer. This would have the additional benefit of everbody beeing able to use this new feature.

Baltram
30.07.2011, 15:41
I tried to modify some .tple files but much to my disappointment found out that those modifications have zero effect on the entities already present in the game world (i.e. inside .lrent files). So the changes need to be done in the .lrent files. I wonder if .lrent file format description is available anywhere? If not, Galrath434, maybe you can provide some useful info on that format? Thanks in advance.For information about the .lrent format use this tool (http://www.bendlins.de/nico/risen/dev/risenvim.7z) by NicoDE.

But as you're familiar with the SDK I'd recommend you to try out eCTemplateEntity::PatchInstances.

If that works and you want to save the affected .lrent files, you can use the Script_Mod_Extensions module (http://svn.nicode.net/risensdk/branches/baltram/bin/scripts/) (have a look at the .txt file before using the .dll). The command you need is "World Save", but it does not work with packed .lrent files, so unpack all of them and delete or rename projects.pak.

PowerGamer
30.07.2011, 16:09
Yes you are correct when assuming that changes have to be made in the lrent files. This is because I don't do anything with the .tple files.
Well, the lrent structure is not that easy to explain and I actually have got all my info from Nico. If you really would like to know I could probably tell what you want to know. Another option would be for you to tell me what you would like to do so I can integrate such functionality in the Lrent Viewer. This would have the additional benefit of everbody beeing able to use this new feature.

If you find it hard to explain the format maybe you can upload lrent viewer source code or its part where the structures are defined and .lrent file is loaded?

Meanwhile, I was able to successfully change some values by hex-editing .lrent file. Unfortunately, I also need to add or delete some properties (such as remove item from NPC inventory or add new item to an array, for example, add item of type "QuickUse_Player_MeleeWeapon" to Interaction array for forged swords) and that would require knowing full file format (to shift data and update all offsets properly).

Atm I understand the part of .lrent file that is described here genomfle.txt (http://www.bendlins.de/nico/risen/genomfle.txt). Also, I understand a bit of what goes between file header and 0xDEADBEEF signature. In particular there are records like this: tag (index to string table), type (index to string table), magic value (0x1E00), size, value. But what goes after the file header and before first such record for example? Also how do you find a start of the data for particular entity in the .lrent file?

Galrath434
30.07.2011, 16:18
Send me your Mail address per private message and I will send you the source code, though be warned it is C#.

Editing inventories is easy, load a lrent containing NPC's, select one, open View/Character Form. Then you will be able to add/remove items from the inventory.

Baltram
30.07.2011, 16:19
If you find it hard to explain the format maybe you can upload lrent viewer source code or its part where the structures are defined and .lrent file is loaded?

Meanwhile, I was able to successfully change some values by hex-editing .lrent file. Unfortunately, I also need to add or delete some properties (such as remove item from NPC inventory or add new item to an array, for example, add item of type "QuickUse_Player_MeleeWeapon" to Interaction array for forged swords) and that would require knowing full file format (to shift data and update all offsets properly).

Atm I understand the part of .lrent file that is described here genomfle.txt (http://www.bendlins.de/nico/risen/genomfle.txt). Also, I understand a bit of what goes between file header and 0xDEADBEEF signature. In particular there are records like this: tag (index to string table), type (index to string table), magic value (0x1E00), size, value. But what goes after the file header and before first such record for example? Also how do you find a start of the data for particular entity in the .lrent file?As I said, use risenvim (http://www.bendlins.de/nico/risen/dev/risenvim.7z) and all your questions concerning the .lrent format will be answered.

PowerGamer
30.07.2011, 20:29
For information about the .lrent format use this tool (http://www.bendlins.de/nico/risen/dev/risenvim.7z) by NicoDE.
Is there something similar for .tple format?

But as you're familiar with the SDK I'd recommend you to try out eCTemplateEntity::PatchInstances.

If that works and you want to save the affected .lrent files, you can use the Script_Mod_Extensions module (http://svn.nicode.net/risensdk/branches/baltram/bin/scripts/) (have a look at the .txt file before using the .dll). The command you need is "World Save", but it does not work with packed .lrent files, so unpack all of them and delete or rename projects.pak.

Saving .lrents as done in Script_Mod_Extensions has the following side effect: it works only while the game has been started and is running, i.e. NPCs are busy with their routines, etc. As a result saving .lrent produces different file all the time as NPC positions and probably some other data slightly change all the time as the game is running.

I tryed to do the following without starting new game/loading savegame:


gCWorld* pWorld = dynamic_cast<gCWorld*>(gCWorld::CreateObject());
pWorld->Load(bCString("E:\\Games\\Risen\\data\\common\\projects\\World\\World.wrl")))
gCSector* pSector = pWorld->GetSector("Harbour_Town_NPC_01");
pSector->Save();
Unfortunately the last call (pSector->Save()) returns false. :(

Some suggestions for Lrent Viewer improvement:
1. Ability to group or filter entities in the "EditScene" window by .lrent file they belong to.
2. Ability to see GUID of the entity in the properties panel.
3. Fix bug: "EditScene" window can be increased in size but not reduced.
4. Ability to toggle what .lrents are drawn when multiple .lrents are open.
5. Ability to close all opened .lrents.
6. Sort entities by name in the "EditScene" window.
7. Esc key should not close the program!

Also would be nice to have latest version of Lrent Viewer available for download on the first page of this topic. :)

Baltram
01.08.2011, 01:40
Is there something similar for .tple format?No. But I guess the .tple format is not too different from an entitiy's (within a .lrent file).
Saving .lrents as done in Script_Mod_Extensions has the following side effect: it works only while the game has been started and is running, i.e. NPCs are busy with their routines, etc. As a result saving .lrent produces different file all the time as NPC positions and probably some other data slightly change all the time as the game is running.You could minimize this effect by executing "timescale 0" (in fact it is still >0) while the loading screen is active and pausing the game as soon as it starts. This might be achieved by overwriting the OnGameStart script so it calls World::Pause and then starts the original (overwritten) script.

Maybe it's already sufficient to change the player's start coordinates (should be in _Intern.lrent) so there's no NPC in range.
I tryed to do the following [...]I don't know any way yet to get all the stuff loaded without starting a new game.

And I thought gCSector::Save was only for saving the .sec file...

PowerGamer
01.08.2011, 09:48
You could minimize this effect by executing "timescale 0" (in fact it is still >0) while the loading screen is active and pausing the game as soon as it starts. This might be achieved by overwriting the OnGameStart script so it calls World::Pause and then starts the original (overwritten) script.

Maybe it's already sufficient to change the player's start coordinates (should be in _Intern.lrent) so there's no NPC in range.I don't know any way yet to get all the stuff loaded without starting a new game.
Overriding OnGameStart() with world.Pause() code have not helped to produce byte identical .lrents when saving them with the "World SaveSector" command. I was saving Harbour_Town_Dyn.lrent which contains entities far away from the starting position of the player and theoretically should not contain any entity that change its properties during the game course, yet still the created file was different from the original .lrent file.

And I thought gCSector::Save was only for saving the .sec file...
I never claimed otherwise. ;)

Baltram
01.08.2011, 14:27
Overriding OnGameStart() with world.Pause() code have not helped to produce byte identical .lrents when saving them with the "World SaveSector" command. I was saving Harbour_Town_Dyn.lrent which contains entities far away from the starting position of the player and theoretically should not contain any entity that change its properties during the game course, yet still the created file was different from the original .lrent file.Galrath434 reported a similar problem today (property sets that "shrink" upon getting loaded by the engine).

I'm going to look for workarounds.
I never claimed otherwise. ;)I just didn't see what the purpose (in saving sectors) would be if it was not to save all the related .lrent files. :)

Shak-otay
01.08.2011, 20:32
No. But I guess the .tple format is not too different from an entitiy's (within a .lrent file).But the contents differs. NPC-tple inventories dont' contain weapon guids for example.

So if you spawn Domingo via tple he will have a random weapon.

The routine guids in tples are fake guids, that means they don't refer to an existing working/relaxing/sleeping point

PowerGamer
01.08.2011, 20:54
With regard to producing byte-identical data files. I experimented with manipulating .tple files using SDK. Here are results:

1. I was albe to read and save .tple file without starting new game/loading savegame.

2. Reading and saving Sergio.tple produced byte-identical file.

3. Reading and saving It_1H_Club.tple produced a file with several different bytes. Upon investigation in hex editor I found out that different bytes belong to 4 bytes _vftable pointer of bCFloatColor class that along with its 3 useful data members also saves its _vftable pointer (for performance reasons it seems). Naturally when these bytes are read back by bCFloatColor class they are overwritten with real value of _vftable pointer (I checked that code in SharedBase.dll). In other words this difference is absolutely safe to ignore.

4. Saving and writing It_2H_Steel_Sharp.tple produced a file different by size and content. New file was bigger because it had 2 new int values added: VelocityLeft and VelocityRight of class eCStrip_PS. Upon removing from the file added data belonging to these values (by manually hex-editing) new .tple file became the same size as original with only a few different bytes. I managed to find the meaning of each byte that were different. In particular several bytes where different for the same reason as in p3. The rest of the bytes belonged to offset of DEADBEEF text string section of the file and several "size" and "count" fields that took into account added values of VelocityLeft and VelocityRight of class eCStrip_PS.

5. Upon a simple search among some .tple files it appears that some of them already contain VelocityLeft and VelocityRight values, while others do not. That may mean that some .tple files where created with older version of game code (when eCStrip_PS class did not have VelocityLeft and VelocityRight members). So the presence or absence of these values is properly handled by the game and is a normal situation.

6. I was able to modify gold value of an item programmaticaly (using SDK functions) and successfully saved modified template (which was byte-identical to original except above differences that are normal and new gold value of course).

Conclusions:
1. Loading-saving .tple files using SDK may produce non-byte identical files but differences are OK and to be trusted. Obviously doing the same with .lrent files may not produce byte-identical results for the same reasons.
2. It still would be nice to find a way to load and modify .lrent files without starting new game/loading savegame (because of what we discussed earlier).
3. It seems already possible to edit .tple files in a best possible way - using game engine through SDK.

Galrath434
01.08.2011, 21:35
Respect for the great work you are doing!

After reading your description of what you have achieved I have one question : Would it be possible for me to use the SDK to create an "easy to use .tple editor"(to integrate into the Viewer)?

In other words is it possible to create a custom application totally indepentant from risen.exe. Which only uses the SDK to do the work. Because this would be neccessary for integrating it in the Viewer.

If it is possible could you maybe give me some help how I should proceed? What classes are needed to load a .tple file and modyify it?
I have nearly no excperience with the sdk so any help would be appreciated.

P.S. If it is easier for you to do, your source code would suffice too I guess.

Baltram
01.08.2011, 21:55
But the contents differs. NPC-tple inventories dont' contain weapon guids for example.

So if you spawn Domingo via tple he will have a random weapon.

The routine guids in tples are fake guids, that means they don't refer to an existing working/relaxing/sleeping pointThanks for the clarification!

I have to admit I never had a deeper look at .tple files so far.

@PowerGamer
Thank you for sharing the results of your tests. :)
2. It still would be nice to find a way to load and modify .lrent files without starting new game/loading savegame (because of what we discussed earlier).I agree. But here, the workaround (shifting start point; overriding OnGameStart) may work, if indeed getting byte-identical files isn't possible anyway.

Btw.: Did you try using eCTemplateEntity::PatchInstances and did it work for you?
(I didn't test it yet so I'm curious)

NicoDE
02.08.2011, 07:34
Upon investigation in hex editor I found out that different bytes belong to 4 bytes _vftable pointer of bCFloatColor class that along with its 3 useful data members also saves its _vftable pointer (for performance reasons it seems). Naturally when these bytes are read back by bCFloatColor class they are overwritten with real value of _vftable pointer (I checked that code in SharedBase.dll). In other words this difference is absolutely safe to ignore.This is an Engine bug. Read my notes about random bytes in the shader materials (http://forum.worldofplayers.de/forum/showpost.php?p=14645541).

ps: sorry for being absent/silent during the last months - I just returned from paternity leave and at the moment it’s crunch/release time at work.

PowerGamer
02.08.2011, 10:11
In other words is it possible to create a custom application totally indepentant from risen.exe. Which only uses the SDK to do the work. Because this would be neccessary for integrating it in the Viewer.

If it is possible could you maybe give me some help how I should proceed? What classes are needed to load a .tple file and modyify it?
I have nearly no excperience with the sdk so any help would be appreciated.

P.S. If it is easier for you to do, your source code would suffice too I guess.

For now when modifying .tple I created console command (not a standalone app that uses game engine) and modified only one simple value of template (gold cost of the item).

I think it is a bit early to speak about creating .tple editor because:
1. AFAIK no one (except I think NicoDE, maybe he will share his research on this matter with us?) tryed to create a standalone app that uses SDK.
2. A lot of classes (mostly property sets related) are still to be recreated and added to the SDK to allow for any meaningful manipulation with the content of .tple files.

BTW, Galrath434, you may want to add another definition to Lrent Viewer - a value of type bCFloatColor is stored in the Risen data files as follows: 4 unused bytes, 4 bytes float red, 4 bytes float green, 4 bytes float blue.
Also I wonder if Lrent Viewer with ability to delete NPC inventory items will be made available soon? :)


Btw.: Did you try using eCTemplateEntity::PatchInstances and did it work for you?
(I didn't test it yet so I'm curious)
Nope I didn't use PatchInstances. Some changes I wanted to make were easier to make by manually hex-editing .lrent file (only single byte was needed to be modified). The changes to NPC inventory are not related to .tple (since inventory is only stored in .lrents). And I think the changes to interactions (currently working on that) need to be done only in .tple (not .lrent). So I do not need PatchInstances atm.


This is an Engine bug. Read my notes about random bytes in the shader materials (http://forum.worldofplayers.de/forum/showpost.php?p=14645541).
I wouldn't call that a bug, it seems to be intentional feature (of dubious nature due to relience on implementation-specific language mechanics) to improve performance (see my explanation here (http://forum.worldofplayers.de/forum/showpost.php?p=16826677&postcount=19)).

NicoDE
02.08.2011, 11:36
AFAIK no one (except I think NicoDE, maybe he will share his research on this matter with us?) tryed to create a standalone app that uses SDK.Just as a side note: I’m still working on the task to get rid of the Risen.exe, but it will take time (the full list of dependencies is huge, and I have to decided what to skip to get it done in a reasonable time frame).


A lot of classes (mostly property sets related) are still to be recreated and added to the SDK to allow for any meaningful manipulation with the content of .tple files.Baltram has r/w access to the SDK. This month I will take the time to merge his branch (http://svn.nicode.net/risensdk/branches/baltram/) into the trunk (after some small code style/spacing modifications). I’m still open to requests for new user branches :)

Galrath434
02.08.2011, 23:06
For now when modifying .tple I created console command (not a standalone app that uses game engine) and modified only one simple value of template (gold cost of the item).

I think it is a bit early to speak about creating .tple editor because:
1. AFAIK no one (except I think NicoDE, maybe he will share his research on this matter with us?) tryed to create a standalone app that uses SDK.
2. A lot of classes (mostly property sets related) are still to be recreated and added to the SDK to allow for any meaningful manipulation with the content of .tple files.
Ok makes sense to me. A few months back though I was able to create a C++ dll which linked against the Risen SDK to use it's classes(side note : It was a C++/CLI 4.0 dll, quite interasting that it worked). The thing I succesfully did in the dll was tiny though : I only wrote some bytes in a stream and retrieved them. The reason why I was asking for your source code is that I thought I could try to do more. But I guess you used the Script methods, which of course I can't use.
Well maybe something like this will be possible in the future.


Just as a side note: I’m still working on the task to get rid of the Risen.exe, but it will take time (the full list of dependencies is huge, and I have to decided what to skip to get it done in a reasonable time frame).
What kind of dependencies do you mean? I of course had the problem of the engine referencing it's hundreds of dll's, but thats quite easy to solve, just copy them all over. Only annoying thing is that dvm.dll is huge which makes debugging nearly impossible because of loading times.


BTW, Galrath434, you may want to add another definition to Lrent Viewer - a value of type bCFloatColor is stored in the Risen data files as follows: 4 unused bytes, 4 bytes float red, 4 bytes float green, 4 bytes float blue.
I am on it. What would this class be necessary for?


Also I wonder if Lrent Viewer with ability to delete NPC inventory items will be made available soon?
While reading your post I remembered. And I can only say sorry! Totally forgot it. Quite busy currently with countless things. So here (http://www.file-upload.net/download-3633117/Release.zip.html) is a new version. It is a bit unsafe though. I can't remember what things I had to do before a new release so it would be great if you could tell me whether it is working :D
But there should be a bigger update soon in any way, because Baltram and I are working on some magic stuff ;)

NicoDE
03.08.2011, 08:26
What kind of dependencies do you mean?The Engine and Game code often refer to global objects like the Application singleton. If this pointer is not initialized a lot of things do not work as expected or not at all. The application class has many references/dependencies to other classes, and the decision is where to stop analyzing and starting to define dummy types.


Only annoying thing is that dvm.dll is huge which makes debugging nearly impossible because of loading times.Well, ...it isn’t much faster with clean binaries :)
(depends on the debugger or Visual Studio version you are using)

PowerGamer
03.08.2011, 17:23
I am on it. What would this class be necessary for?
Well, if you asking where it is used by the game then, for example, it is used for items (start new game, target a club on the beach and do "edit" in console, this color is in the "PropertySets->Strip->StartColor"). If you mean what you can do with it in Lrent Viewer then for starters just show those floats in the entity Properties panel on the left of the window. :)

But what I actually meant is: ideally you need to know the meaning of every byte inside .lrent file (and values of bCFloatColor class are present inside .lrents, just do a text search inside .lrents for "bCFloatColor") to ensure correct loading, modification and saving of .lrent files.


I can't remember what things I had to do before a new release so it would be great if you could tell me whether it is working :D
Seems to be working but it draws some white letters in the black part of the main window and when resizing main window properties pane on the right becomes bigger while black part (where objects are rendered) remains the same (small) size.


The Engine and Game code often refer to global objects like the Application singleton. If this pointer is not initialized a lot of things do not work as expected or not at all. The application class has many references/dependencies to other classes, and the decision is where to stop analyzing and starting to define dummy types.
Why not try if it works and continue analisys only if it don't? :)

NicoDE
04.08.2011, 07:17
Why not try if it works and continue analisys only if it don't? :)The virtual function tables must be complete and I hate committing __FIXME_0042 into the trunk :)
Anyway, I’m on the way.

PowerGamer
09.08.2011, 11:07
It is possible to load and save .lrents using SDK without starting new game/loading saved game after all. Resaving the same .lrent (I experimented with "Harbour_Town_NPC_Story_INQ.lrent") produced several byte differences in new .lrent file. I have tracked where those bytes come from (RisenVIM just skips this part of .lrent file).



class eCRigidBody_PS // ..
{
// ...
bCQuaternion m_field1;
// ...
bCQuaternion m_field2;
// ...
};

Bytes that have a different value are m_fY member of m_field1 and m_field2. I have also identified where the value of m_field1 and m_field2 is changed. Function eCRigidBody_PS::OnListenEntityEvent() sets m_field1 to what
gCGeometricEntity::GetCurrentWorldRotation() returns. gCGeometricEntity::GetCurrentWorldRotation() function returns bCQuaternion::bCQuaternion(bCMatrix& gCGeometricEntity::m_matMatrix). And that bCQuaternion constructor does some floating-point calculations which I suppose produce a slightly different result on my system (basically those float values in original .lrent and resaved .lrent differ by 1 if you view them as DWORDs which when coverted to float is an inaccuracy in the 7th digit after the decimal point).

In other words I think this difference between original and resaved .lrent is normal (due to slightly different floating-point results on different CPUs/OSes) and can be safely ignored too.

EDIT. This is how eCRigidBody_PS class of version 0x0041 saves its fields (eCRigidBody_PS class layout (http://forum.worldofplayers.de/forum/showpost.php?p=16885964&postcount=127)) into .lrent file. The data goes right after "Properties" (i.e. "tag (index to string table), type (index to string table), magic value (0x1E00), size, value" records) and before 0xDEADC0DE signature:



2 bytes: (unsigned short) class version, what eCRigidBody_PS::GetVersion() returns, currently is 0x0041
1 byte: (bool) eCRigidBody_PS::m_b1
1 byte: (bool) eCRigidBody_PS::m_b3
1 byte: (bool) eCRigidBody_PS::m_b4
12 bytes: (bCVector) eCRigidBody_PS::m_vec1
12 bytes: (bCVector) eCRigidBody_PS::m_vec2
12 bytes: (bCVector) eCRigidBody_PS::m_vec4
16 bytes: (bCQuaternion) eCRigidBody_PS::m_q2
12 bytes: (bCVector) eCRigidBody_PS::m_vec3
16 bytes: (bCQuaternion) eCRigidBody_PS::m_q1
1 byte: (bool) eCRigidBody_PS::m_b2
//0xDEADC0DE signature


EDIT2. How comes Lrent Viewer does not show Hlp_Story_* entities (like Hlp_Story_Bronco in the Monastery_Dyn.lrent, you can see them in the RisenVIM log for example)? Is this is because they do not have "visual representation" in Risen? Anyway it would be nice if Lrent Viewer showed them too (with a self defined appearence if need be).

Galrath434
09.08.2011, 14:02
In other words I think this difference between original and resaved .lrent is normal (due to slightly different floating-point results on different CPUs/OSes) and can be safely ignored too
Good, thanks for having a look at this and clearifying it!


This is how eCRigidBody_PS class of version 0x0041 saves its fields (eCRigidBody_PS class layout) into .lrent file.
Thanks for telling me about this, but I have to say that I knew about this, in fact I know every Property Set Baltram and I could find in the lrents. Baltram wrote a script which was able to extract the types which were written for each set. From this we were able to reconstruct most of the sets, in special cases Baltram had a look at the OnRead method.(Baltram did some really impressive work here!)
So if you need any other sets feel free to ask me.


Is this is because they do not have "visual representation" in Risen?
Yes it is. In the next version, there will still be no visual representation(unless you tell me what you would like :)) but you can select the entity and edit it's properties.

P.S. Baltram is on holidays so don't wonder about his silence :D

PowerGamer
12.08.2011, 12:02
I have tryed to resave another .lrent file (Dungeon_Titan_Events.lrent). But this time there were many more differences with original .lrent file. Those differences can be seen in the dump made by RisenVIM: Dungeon_Titan_Events_dump.zip (http://upload.worldofplayers.de/files7/Dungeon_Titan_Events_dump.zip). The possible place where the values that differ get recalculated is eCEntityDynamicContext::OnWrite() function. Upon testing (running in the modified level in the game) no problems were seen. Anyone have any idea about why these values are changed, what they mean and influence?

NicoDE
12.08.2011, 16:09
Well, the differences are only in the node boundaries and (more important) in one entity flag. The original has it, the new does not (e.g. the flag is obsolete or the content has been saved with different options / n a different way).

PowerGamer
12.08.2011, 16:34
Well, the differences are only in the node boundaries and (more important) in one entity flag. The original has it, the new does not (e.g. the flag is obsolete or the content has been saved with different options / n a different way).
Do you have any guess why would the boundaries change like that? Also what those boundaries influence anyway? Should there (theoretically) be any visual difference in the game between original level and new one (maybe some objects should be bigger or smaller or higher or different facing, etc)?

NicoDE
12.08.2011, 16:38
Do you have any guess why would the boundaries change like that?Besides wild guesses, no.

Galrath434
12.08.2011, 16:53
I had a look at the first 10 NodeBoundary object's but they seemed to be all right, so which one do you mean?

PowerGamer
12.08.2011, 17:16
I had a look at the first 10 NodeBoundary object's but they seemed to be all right, so which one do you mean?
If you compare .txt files I uploaded (in any text comparison utilities, for ex. DiffMerge (http://sourcegear.com/diffmerge/)) you will see which entities have differences. The question is what the values that differ mean and shall these differences be visible in the game?
BTW, I just opened both original and resaved .lrent files in Lrent Viewer at the same time and it seems that corresponding objects perfectly matched their positions.
Also, here is the resaved .lrent file: Dungeon_Titan_Events_resaved.zip (http://upload.worldofplayers.de/files7/Dungeon_Titan_Events_resaved.zip)

Galrath434
12.08.2011, 17:51
Stupid stuff one should forget :)

PowerGamer
12.08.2011, 17:59
Ok I have to add that I have pretty much rewritten the Viewer in the last week. Not exactly this part though but pretty much all the rest. So this can be because of a newer version..
The fact that the bounding volumes change could be explained by some transformation stuff I have to do because of different coordinate systems. I have no idead though why ReservedFlag1 is changing.

So I would say that this is annoying at least but currently I can't explain it. If this is still happening with the next version I will have a closer look at it though.
Sorry for the confusion but when I said I "resaved" .lrent file I meant I did that using RisenSDK, not Lrent Viewer. While being in main menu and without starting new game/loading savegame, I loaded only a single .sec/.lrent file and then saved it.

Galrath434
12.08.2011, 18:08
:D

I guess that the stuff with the bounding boxes is just a version problem like Nico said. They calculate the box for an entity differently in a newer versions. The bounding volumes are quite strange anyway. For audio emitters for example they use the range one can here the audio as the size of the box. Makes sense but you can see that the bounding volume has nothing to do with the entities model.

NicoDE
11.10.2011, 13:49
This list is obsolete - please have a look at the first post!

Since the latest version isn't linked in the first post and one can easily miss the "here" link in post #82, here is a list of versions that have been published in this thread: 2011-01-06, Lrent_Viewer.zip (http://upload.worldofplayers.de/files5/Lrent_Viewer.zip), 1330788 bytes, post #28 (http://forum.worldofplayers.de/forum/threads/874942?p=14926031#post14926031)
2011-01-06, Risen_Viewer.zip (http://upload.worldofplayers.de/files6/RdC7wcYRisen_Viewer.zip), 1331022 bytes, post #36 (http://forum.worldofplayers.de/forum/threads/874942?p=14933902#post14933902)
2011-02-15, Risen-Viewer.zip (http://www.file-upload.net/download-3218060/Risen-Viewer.zip.html), 1385148 bytes, post #1 (http://forum.worldofplayers.de/forum/threads/874942?p=13876954#post13876954) (offline)
2011-03-27, Lrent_Viewer_Debug_Build.rar (http://upload.worldofplayers.de/files6/Lrent_Viewer_Debug_Build.rar), 1153533 bytes, post #51 (http://forum.worldofplayers.de/forum/threads/874942?p=15670510#post15670510)
2011-03-27, Lrent-Viewer.zip (http://www.file-upload.net/download-3316498/Lrent-Viewer.zip.html), 1404672 bytes, post #53 (http://forum.worldofplayers.de/forum/threads/874942?p=15671456#post15671456) (offline)
2011-04-08, Lrent_Viewer.zip (http://upload.worldofplayers.de/files7/ARWNpxLrent_Viewer.zip), 1352450 bytes, post #102 (http://forum.worldofplayers.de/forum/threads/874942?p=18071459#post18071459)
2011-08-03, Release.zip (http://www.file-upload.net/download-3633117/Release.zip.html), 1433397 bytes, post #82 (http://forum.worldofplayers.de/forum/threads/874942?p=16833709#post16833709) (broken) (backup (http://upload.worldofplayers.de/files7/D5Release.zip))
2011-09-10, Risen_Editor.rar (http://upload.worldofplayers.de/files7/SdZFIRisen_Editor.rar), 1228946 bytes, post #104 (http://forum.worldofplayers.de/forum/threads/874942?p=18075994#post18075994)

Found by name on WoP-Upload: 2011-08-02, Lrent_Viewer.zip (http://upload.worldofplayers.de/files7/Lrent_Viewer.zip), 1433742 bytes
2011-09-09, Risen_Editor.rar (http://upload.worldofplayers.de/files7/Risen_Editor.rar), 1224980 bytes
2011-09-10, Risen_Editor.zip (http://upload.worldofplayers.de/files7/Risen_Editor.zip), 1571543 bytes
2011-11-08, Risen_Viewer.zip (http://upload.worldofplayers.de/files7/Risen_Viewer.zip), 1582229 bytes

Note: It seems DirectX 9 support has been dropped after 2011-08-03.

TheKampfkeks96
29.12.2011, 09:59
Pls reupload this helpful programm, because the mirror you have given is down.

edit: pls delete this

CzarnyAfgan
08.01.2012, 10:37
The download file of Lrent Viewer looks broken.

Baltram
08.01.2012, 11:59
The download file of Lrent Viewer looks broken.There are still two mirrors for the latest Release (two posts above yours).

CzarnyAfgan
08.01.2012, 12:06
I've checked them, but I get unpacking errors when the file is already downloaded and saved on my hard disk drive. There's message from winrar that the file is broken/ incomplete.

Baltram
08.01.2012, 14:24
I've checked them, but I get unpacking errors when the file is already downloaded and saved on my hard disk drive. There's message from winrar that the file is broken/ incomplete.You're right, the archive seems to be broken. I uploaded the newest version I found on my computer: http://upload.worldofplayers.de/files7/ARWNpxLrent_Viewer.zip
The file attributes say it's from April 2011.

I hope Galrath434 will reupload the August version. :)

CzarnyAfgan
08.01.2012, 19:14
Thanks a lot for uploading ;)

Kuchenschlachter
08.01.2012, 22:50
as this is the second time i was asked for "my version" and it seems galrath doesn't mind me to share it... here it is:
http://upload.worldofplayers.de/files7/SdZFIRisen_Editor.rar

to be clear, it's all galraths work, he just gave it to me a few month ago after a little discussion about features i might need and, well, he never linked it here.

NicoDE
09.01.2012, 09:19
I updated the post with the download link list (http://forum.worldofplayers.de/forum/threads/874942?p=17410275#post17410275).

I found and uploaded a backup of the version from August 2011 (post #82).

By trial 'n error I found more archives on WoP-Upload (incl. one from Nov 2011).

Galrath434
11.01.2012, 13:03
I updated the first post with new download links. Additionally I will refrain from posting any download links except in the first post. So no more confusion can arise.

At the moment the beta version has one simple bug fix : It should be possible now to correctly "batch" entities.(Thanks to CzarnyAfgan for reporting this bug!)
Also it uses a completly rewritten underlying framework. I am not yet shure if this creates any problems but it will hopefully speed up things.

NicoDE
11.01.2012, 13:36
I updated the first post with new download links.Many thanks!

Shak-otay
11.01.2012, 13:45
Many thanks!

signed!:)

CzarnyAfgan
11.01.2012, 20:54
Unfortunately still buggy... :dnuhr:

Galrath434
11.01.2012, 21:03
Could you post the last message in log.txt, this should help finding the problem.

CzarnyAfgan
11.01.2012, 21:14
Ok,

Log.txt
-----
-----
-----
2012-01-11 22:12:07 Application was startet succesfully. Log was initialized.
2012-01-11 22:12:07 Device initialization started.
2012-01-11 22:12:07 Device and API_Device successfully created.
2012-01-11 22:12:07 Core initialization finished.
2012-01-11 22:12:07 Feature Level : Level_11_0
2012-01-11 22:12:07 Core initialization finished.
2012-01-11 22:12:07 First settings were loaded.
2012-01-11 22:12:08 Second settings were loaded and rendering was started.
2012-01-11 22:13:35 Indeks wykraczał poza granice tablicy. Stack trace : w RisenEditor.Code.Renderer.ObjRenderer.DrawSubObjekt(RenderInformation RI, MeshPart M, GraphicNode GN)
w RisenEditor.Code.RenderCollection.Render(RenderInformation RI, ObjektRenderer TR)
w RisenEditor.Code.Renderer.Sorter.RenderLibrary(RenderInformation RI, ObjektRenderer TR)
w RisenEditor.Code.Renderer.ObjRenderer.RenderAll()
w GameLibrary.Rendering.ObjektRendererManager.UseAllRenderer()
w RisenEditor.App.Draw()
w GameLibrary.D3DApplication.Application_Idle(Object sender, EventArgs e)
w System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNative Methods.IMsoComponent.FDoIdle(Int32 grfidlef)
w System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNat iveMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
w System.Windows.Forms.Application.Run()
w GameLibrary.D3DApplication.Run()
w RisenEditor.Program.Main()

CzarnyAfgan
11.01.2012, 21:16
And the other one ;)

http://imageshack.us/f/809/problem2z.png/

Text in the window:

Value cannot be zero
Parameter name: key.

Galrath434
11.01.2012, 21:43
Ok next try :D

Think I fixed it now. 2nd Link on the first page.

CzarnyAfgan
11.01.2012, 21:48
You're fast...
OK :D :D :D
Am gonna try it ;) :D

Edit:
Seems to be quite stable now.
No failure ;)

STARK1LLER
22.03.2012, 15:11
When I tried to start Lrent Viewer, it crushed with this error:

Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: risen viewer.exe
Problem Signature 02: 0.0.0.1
Problem Signature 03: 4f0dffbe
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4ca2b889
Problem Signature 07: de
Problem Signature 08: 10
Problem Signature 09: System.ArgumentException
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1033

I saw a similar error in this thread, exept an error was System.FormatException instead of System.ArgumentException.
I am using Windows 7 x64.
Could someone help me with this problem?

Galrath434
23.03.2012, 07:46
Could you have a look in the log file(it is in the same directory as the exe) and post it's content. That should help me understanding what is going on here.

P.S. The System.ArgumentException just means that somewhere something has gone wrong while calling a method, nothing specific I am afraid.

STARK1LLER
23.03.2012, 13:07
Lrent Viewer Beta crushed & doesn't create log file (at least on my machine).
Lrent Viewer Stable crushed with the same error, but it creates log, here it is:

3/23/2012 2:33:06 PM Application was startet succesfully. Log was initialized.
3/23/2012 2:33:06 PM First settings were loaded.
3/23/2012 2:33:06 PM Device initialization started.
3/23/2012 2:33:06 PM Device and API_Device successfully created.
3/23/2012 2:33:07 PM Event ID : 0
Event Type : Message
Event message :
Feature Level : Level_11_0
DepthStencil format : D32_Float
3/23/2012 2:33:07 PM Core initialization finished.

Lrent Viewer Debug Build starts normal, here it's log file:

3/23/2012 2:33:47 PM Application was startet succesfully. Log was initialized.
3/23/2012 2:33:47 PM First settings were loaded.
3/23/2012 2:33:47 PM Device initialization started.
3/23/2012 2:33:47 PM Device and API_Device successfully created.
3/23/2012 2:33:47 PM Event ID : 0
Event Type : Message
Event message :
Feature Level : Level_11_0
DepthStencil format : D32_Float
3/23/2012 2:33:47 PM Core initialization finished.
3/23/2012 2:33:47 PM Second settings were loaded and rendering was started.

As you can see, difference is only in the last line, and it's hardly says too much. But maybe this means that difference in the Settings.ini is the reason that Lrent Viewer Debug Build starts normal. Here is the text from Debug Version Settings.ini:

[General]
StartLocationX=0
StartLocationY=0
WindowWidth= 1600
WindowHeight= 1000
ReverseMouseYAxis=true
RisenMainPath=D:\Risen

[Rendering]
UseRenderingType=0
FarDepth=10000
NearDepth=10
DrawMetaData = false
ShadowMapWidth=512
ShadowMapHeight=512
//This value is used like this : 1 - ObjectCount = Percantage of Objects displayed
//This will affect how soon objects will fade away when moving away from them.
ObjectCount = 0,05
DrawInformation=true

[RenderingType_0]
//Thats the fastest rendertype, it just an ambient output, no shading
//When not using textures you will onyl see white where geometry is drawn
INVALID=INVALID

[RenderingType_1]
//thats a deferred Renderer quite slow already, no shadows but Blinn Phong
//when using this you will have to manually place lights where you want to see something

//else then pitch black
SSAO = false
Shadows = true
-------------------------------------------------------------------
And this one is from the beta & stable Settings.ini:

[General]
ReverseMouseYAxis=true
RisenMainPath=D:\Risen

And here is the screen from the started debug version:
http://img851.imageshack.us/img851/5343/lrentviewerdebug.jpg
As you can see, I have some problem with displaying the text, and is this red background a normal thing?

Galrath434
23.03.2012, 14:22
To be honest I am a bit confused. Is it possible that you downloaded a very old version of the Viewer like one and a half year back and now have extracted the new archive in the same folder? Because the content of the settings.ini should look a bit different(just have a look in the rar, both ones actually).

The red background aswell as the strange text is definetly not normal, I am guessing that there is some problem with graphic card formats(maybe the endieness is getting mixed up). So what graphics card have you got?

Another strange thing : Normally when the viewer crashes there should be a message with the stack trace, aswell as the stack trace beeeing printed to the log, anthing like this happening for you?

STARK1LLER
23.03.2012, 15:55
The only version I was able to start is your old debug build, you gived it somewhere in this thread to help someone fix System.FormatException error. The screenshot & large settings.ini file that I was posted are from this version.
The other two versions, Beta & Stable? I take from the first message of this thread a few days ago. And both of it crushed with System.ArgumentException error. Only Stable version creates file log.txt, and the only info it displays I was posted before.
As for the video card, I am using GTX 560 with the newest 296 drivers.
By the way, I assume "Feature Level : Level_11_0" means program starts with DX11. Am I right? Anyway, that shouldn't be a problem.

CzarnyAfgan
24.07.2013, 22:00
Hey. It seems that I am not only person having problems with Risen Editor. :scared:

This is the up-to-date version ( with inventory bug fixed )

http://upload.worldofplayers.de/files9/mRisen_Editor.rar

Unfortunately Galrath told me, that he is probably going to abandon Risen modding §cry

The only problem I am experiencing are crashes. Editor starts up and works, but it crashes randomly from time to time when loading various LRENT files.

Here is my software/hardware specifications:

Windows 7 x64
DirectX 11 installed
.NetFramework 4.0 installed
C++ 2010 Libaries installed

Nvidia 560 SE with Shader Model 5.0 graphics card

Help what can cause the problem, do I lack anything in software specifications???

Kuchenschlachter
25.07.2013, 20:01
Galrath, please consider making the code public if you really drop risenmodding.

I hate tpledit solely because we can't fix bugs or implement new features.

CzarnyAfgan
26.07.2013, 17:06
Kuchenschlachter wrote:
"Galrath, please consider making the code public if you really drop risenmodding."

Second that! The newest version of his risen editor is awesome! It has some drawbacks and stability problems, but this is the best modding tool that was ever created for Risen :) .

The stop in development of his tool will be huge loss for the community. §cry

Galrath please please! don't abandon your work! or at least make the source code public :gratz