View Full Version : How to save .lrent file?
CzarnyAfgan
08.01.2012, 23:56
Hey. Can anyone explain me how can I save a modified .lrent file?
I am trying to save a modified .Lrent file ( I am modifying ) monster skills/statistics. But when it's finished ( I think so ) and I try to save it, Im getting the following error:
http://imageshack.us/photo/my-images/802/errori.png/
.Net Framework version on my PC is 4.0 , Windows 7
Error content: "Access to path rejection: E:\Games\Risen#\niezbednik moddera\Risen\Risen Editor..."
Kuchenschlachter
09.01.2012, 00:18
well, maybe you forgot to remove the write protection from the extracted lrents?(afaik anything you extract from .pak, .pxx files is by default protected against write access)
CzarnyAfgan
09.01.2012, 00:40
Yeah, it was the write protection... :D
Thanks!
CzarnyAfgan
10.01.2012, 13:10
Yo. I have got another problem... with the newest Lrent Viewer from Galrath. At the beginning everything was working fine, all the stuff I modded was working in game when I played and tested it. But then I decided to reinstall Risen ( I had some problems with sound mods I am currently working on ) so when I reinstalled it I think the problems begun. When I am modding some .lrents in Lrent Viewer I see, that program saves the modified values and keeps them ( example I modify the strength of swamp mummy [ SwampMummy_Don_01 ] from [ Swamp_Outdoor_Monster_01.lrent ] file. I change it's strength value from 40 to 60, moreover I change it's inventory and then I save everything. [ File-> Save Lrents ] . Then I quit the Lrent Viever, turn it on again and I load "Swamp_Outdoor_Monster_01.lrent" file. Effect? Monster value and it's inventory is changed, everything seems fine but when save it to "projects.pak" ( Modstarter -> Tools -> RisenPAKDir ) and then I replace original projects.pak file ( data/common/projects.pak ) with the new one with modified statistics and I run Risen, there is NO effect... :/ SHIT... I am 200% sure, that I edited the right monster...
What can be wrong?
Current version: 1.2 with non official patch
Tried it with 1.10 version too, same problem.
What function have the .sec files? Because every .lrent has it's own .sec file, are those some kind of backup files?
example:
Swamp_Outdoor_Monster_01.lrent
Swamp_Outdoor_Monster_01.sec
Greetings
Just to be sure:
1) Did you delete the %LocalAppData%\Risen folder before (re)installing the game to avoid mixing content?
2) Files with the same name in different directories and/or physical files enabled/mounted?
(you can use the TestApp from the RisenSDK with [...] -messagelog to find eCVirtualFileSystem::DisplayCacheConflicts)
What function have the .sec files? Because every .lrent has it's own .sec file, are those some kind of backup files?
example:
Swamp_Outdoor_Monster_01.lrent
Swamp_Outdoor_Monster_01.sec
Sectors (.sec) are containers for (none to multiple) entity layers (*.lrent).
Open it in a hex-editor to get an idea what properties are available for sectors.
CzarnyAfgan
10.01.2012, 15:37
Just to be sure:
1) Did you delete the %LocalAppData%\Risen folder before (re)installing the game to avoid mixing content?
Ahhhh... I forgot... my bad... :dnuhr:
I am doing the clean reinstall right now.
Thanks for test application.
CzarnyAfgan
10.01.2012, 16:52
Ok, I did the clean reinstallation. It's working now... BUT... "Mod turns itself on" ( let's call it this way ) only when I start a new game. When I load a save game [any] ( saved on the newest, already reinstalled version of Risen ) the mod is invisible again... what makes it very unpractical... I have to start a new game every time to "see it". Current version is 1.10 ( with official patch ). What may be a problem?
Ok, I did the clean reinstallation. It's working now... BUT... "Mod turns itself on" ( let's call it this way ) only when I start a new game. When I load a save game [any] ( saved on the newest, already reinstalled version of Risen ) the mod is invisible again... what makes it very unpractical... I have to start a new game every time to "see it". Current version is 1.10 ( with official patch ). What may be a problem?I guess you're talking about modified .lrent files? Some of them are "save game relevant" (or "not persistable"?)*, these are only loaded once (when starting a new game) and then stored in the savegame file. For example lrents that contain NPCs or monsters. Others, like those containing (static) levelmesh entities, are not stored in savegames.
*Actually I'm not sure right now if this property really is connected with lrents or if it is with entities or layers or sectors. Maybe with all of them.
CzarnyAfgan
10.01.2012, 21:24
Don't think so... but this is still strange. It may be associated with save game files, but all the save games are new, before reinstallation I deleted all of the old ones.
Any other idea?
In this case other mods would not work with already created save game files ( created before the instalation of mods, I think "The Companion mod could be an example" ), but they do... so?
In this case other mods would not work with already created save game files ( created before the instalation of mods, I think "The Companion mod could be an example" ), but they do... so?Does the Companion Mod (or any other mod that doesn't require a new game start) involve modifications of existing entities' properties? It would surprise me if such was possible.
Did you try adding (or cloning) entities to an existing .lrent files and then loading an old save game? If this doesn't work either then your problem probabely is not connected to this "persistable"/"save game relevant" flag thing.
CzarnyAfgan
10.01.2012, 22:19
"Does the Companion Mod (or any other mod) involve modifications of existing entities' properties? It would surprise me if such was possible"
I though so... If really not, sorry my mistake. Because I thought that John/Buck were created ( based ) on already existing NPC/monster like Domingo and Rufo.
Because I thought that John/Buck were created ( based ) on already existing NPC/monster like Domingo and Rufo.If John/Buck don't replace Domingo/Rufo (or any original NPC) then they're presumably new entities with own unique GUIDs that were not part of the game or any savegame before.
Back to your problem: Can you say what exactly you want to modify? If you want to modify only some properties of existing NPCs/monsters/whatever (but not their position/orientation within the game world) then it may be possible to use the SDK to merge your modifications into existing savegames. There is a eCTemplateEntity (http://svn.nicode.net/risensdk/trunk/source/Engine/ge_templateentity.h?revision=181&view=markup) method called "PatchEntity" which might be designated for tasks like that.
CzarnyAfgan
10.01.2012, 23:06
I deleted all the save games again and it appears to work better now. Ok, one thing I just realized- when I use one version of my mod ( projects.pak with modified values ) I can start new game, then I can save it and it works. Even if I quit Risen, start it again and load the savegame created just a moment before [ before quitting Risen ] everything works fine. Only when I update mod and change values in Risen Lrent Editor ( create new version of mod ) then I save it and replace the projects.pak again then I run Risen again, it ( the update ) stops working... But only in this particular case, when I don't update my mod I can run on the old savegames. To make it work again with the new version I need to start new game, and then everything goes back to work.
Kuchenschlachter
10.01.2012, 23:19
it might be a bit far fetched but have you jet tried to use.pxx files instead of updating the .pak files?
i don'T remember these problems when i changed lrents but maybe back than i always started a new game. :dnuhr:
CzarnyAfgan
11.01.2012, 00:00
you mean .p0x files?
Kuchenschlachter
11.01.2012, 00:07
exactly, i never updated the .paks instead used .p01, .p02 and so on and i don't remember having the same issues as you.
CzarnyAfgan
11.01.2012, 00:24
Allright, I'll try it your way. ;)
[...]when I update mod and change values in Risen Lrent Editor ( create new version of mod ) then I save it and replace the projects.pak again then I run Risen again, it ( the update ) stops working...This what I would expect.
The object instances are initialized by template ones. From that point on the object values are persistent and part of the savegame (if the savegame is loaded the object properties override the template values).
CzarnyAfgan
11.01.2012, 10:11
I have just tried the .p00/.p01/.p02 instead of replacing .pak and it's everything is working fine. :)
Big THANKS for help guys! ;)
CzarnyAfgan
11.01.2012, 20:12
I must be an probematic guy to you... because I've got another problem...eeehhh...
I have an Idea to create two separate mods ( Boss Mod and Monster Ballancing Mod ) and use them simultaneously, but as it occurs one mod doesn't want to work at the same time with the other... It's weird because they contain different elements. When mods are stored together in data/common- example: mod is stored as projects.p01 and the second mod as projects.p02 - only one of them is working and the second not... :mad: ... Will I have to mix everything in one mod? ...ehhh
I am an idiot... §wall ...I know...sorry...
Galrath434
11.01.2012, 20:15
Fixed and updated. Use the link in the first post again. Was a simple bug :)
CzarnyAfgan
11.01.2012, 20:27
Galrath? You mean the second link in the first post?
Galrath434
11.01.2012, 20:33
Yes. In my opinion it is still some sort of beta because I can't be sure that it is working for everybody.
Will I have to mix everything in one mod?If they modify the same files, yes.
Imagine the archive+patches as a heap and the game "looks" top-down (...,p01,p00,pak) for the first occurrence of the file that is requested. Note that Risen's virtual file system does not really care about the directory structure while searching for files (filenames should be unique).
This results in two basic rules: 1) don't touch the original PAKs and 2) include only the modified files in patch archives (special case: or the files that are marked as "deleted").
During the development it makes your life easier to enable (mount) the physical directories of the PAKs.
CzarnyAfgan
11.01.2012, 21:27
"and 2) include only the modified files in patch archives"
Ok. I will try to pack only the modified files. Thanks for tip.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.