Regarding flagging a cell as "illegal to sleep here"

Post » Mon Dec 05, 2011 8:26 pm

I'm curious if there's a quick and easy way to apply that setting globally rather than for each individual cell (as I'm assuming it's done).

This may be a more appropriate question for the CES forums, come to think of it.
User avatar
Stephy Beck
 
Posts: 3492
Joined: Mon Apr 16, 2007 12:33 pm

Post » Tue Dec 06, 2011 5:49 am

I'm curious if there's a quick and easy way to apply that setting globally rather than for each individual cell (as I'm assuming it's done).

This may be a more appropriate question for the CES forums, come to think of it.

not that I am aware of, when I was working on my tweaks and additions mod, I had to go through all the shipwrecks cells etc... and sort it all manually :(
User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Tue Dec 06, 2011 7:40 am

Damn.

I wonder if perhaps there's a global script, then, that could accomplish this. Something like "set all cells to can't sleep here" that runs on command.
User avatar
candice keenan
 
Posts: 3510
Joined: Tue Dec 05, 2006 10:43 pm

Post » Tue Dec 06, 2011 7:24 am

I'm curious if there's a quick and easy way to apply that setting globally rather than for each individual cell


Quick, yes. And maybe easy, depending on your point of view. http://code.google.com/p/mlox/wiki/Tes3cmd#modify_-_Powerful_batch_record_modification_via_user_code_extens is designed to help automate tasks like this. Manually changing lots of plugin records in the same fashion is drudgery that needs to be erased.

If you can tell me how to distinguish which cells you want changed, I should be able to come up with a little tes3cmd recipe to make it happen.
User avatar
no_excuse
 
Posts: 3380
Joined: Sun Jul 16, 2006 3:56 am

Post » Tue Dec 06, 2011 5:27 am

Quick, yes. And maybe easy, depending on your point of view. http://code.google.com/p/mlox/wiki/Tes3cmd#modify_-_Powerful_batch_record_modification_via_user_code_extens is designed to help automate tasks like this. Manually changing lots of plugin records in the same fashion is drudgery that needs to be erased.


But wouldn't something like this conflict with any mod that edits the same cell?

If you can tell me how to distinguish which cells you want changed, I should be able to come up with a little tes3cmd recipe to make it happen.


Honestly? I'm trying to change all of them. My mod already sort of disables sleeping in the wild by jacking up the random encounter rate, but I was just curious if there was a better way to do it.
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Tue Dec 06, 2011 9:27 am

But wouldn't something like this conflict with any mod that edits the same cell?

I think it would only conflict on the DATA sub-record in the CELL header (which contains the cell flags, interior/exterior flag, and fog density for interior cells). But that's to be expected.

Honestly? I'm trying to change all of them. My mod already sort of disables sleeping in the wild by jacking up the random encounter rate, but I was just curious if there was a better way to do it.

Well, I can add the Illegal_To_Sleep_Here flag to all cells that don't have it, if you really want that. You want MW+TB+BM? All together? Separate? Both?
User avatar
Jack Moves
 
Posts: 3367
Joined: Wed Jun 27, 2007 7:51 am

Post » Tue Dec 06, 2011 12:31 am

I think it would only conflict on the DATA sub-record in the CELL header (which contains the cell flags, interior/exterior flag, and fog density for interior cells). But that's to be expected.


I'm going to step out on a limb and say that mods generally don't edit those settings. So that combining these edits with a mod that edits the cell won't have any *real* conflicts?

Well, I can add the Illegal_To_Sleep_Here flag to all cells that don't have it, if you really want that. You want MW+TB+BM? All together? Separate? Both?


I would just say all together. I'm assuming that something like this would also affect, say, something like the Siege at Fort Firemoth plugin, which adds a landmass to a cell that technically still exists in Morrowind proper, just as a wilderness cell?
User avatar
Laura Wilson
 
Posts: 3445
Joined: Thu Oct 05, 2006 3:57 pm

Post » Tue Dec 06, 2011 10:45 am

I'm going to step out on a limb and say that mods generally don't edit those settings. So that combining these edits with a mod that edits the cell won't have any *real* conflicts?
I would be basically doing the same thing as if you did it by hand, only automatically generating a plugin that sets that flag for each cell. Conflict will be minimal, unless some other plugin also wants to set flags in a vanilla cell. But it's the same kind of conflict if you had done the change by hand or if tes3cmd does it.

I would just say all together. I'm assuming that something like this would also affect, say, something like the Siege at Fort Firemoth plugin, which adds a landmass to a cell that technically still exists in Morrowind proper, just as a wilderness cell?

Well, it would be compatible if they don't rename any external cells. Renaming external cells does lead to cell naming conflicts if you load a plugin, like the one I'm proposing, after the rename, it will revert the name of the external cell to the original.
User avatar
alyssa ALYSSA
 
Posts: 3382
Joined: Mon Sep 25, 2006 8:36 pm

Post » Mon Dec 05, 2011 6:38 pm

Well, it would be compatible if they don't rename any external cells. Renaming external cells does lead to cell naming conflicts if you load a plugin, like the one I'm proposing, after the rename, it will revert the name of the external cell to the original.


I'm going to go out on a limb and assume that most mods *don't* do that. And even if they do, it seems like the only "problem" would be that the cell's name changes back to what it was before (most likely "Wilderness").
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Tue Dec 06, 2011 8:28 am

I'm going to go out on a limb and assume that most mods *don't* do that. And even if they do, it seems like the only "problem" would be that the cell's name changes back to what it was before (most likely "Wilderness").

Most mods do not change names of external cells. But if they do, and if they have scripts that refer to that name, and if the cell name is reverted by a later plugin, a script error can occur.

But that risk should be on the shoulders of the modder that changes names of external cells, I think.

I should have a plugin for you to test fairly shortly, if you're interested.
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Mon Dec 05, 2011 8:40 pm

Most mods do not change names of external cells. But if they do, and if they have scripts that refer to that name, and if the cell name is reverted by a later plugin, a script error can occur.

But that risk should be on the shoulders of the modder that changes names of external cells, I think.

I should have a plugin for you to test fairly shortly, if you're interested.


I's definitely interested. Thank ye muchly.
User avatar
Conor Byrne
 
Posts: 3411
Joined: Wed Jul 11, 2007 3:37 pm

Post » Mon Dec 05, 2011 9:33 pm

here is your plugin for testing:
http://www.sendspace.com/file/sjylto.

Here is the first few lines of output from "tes3cmd dump sleep.esp" to show you what it looks like internally:
Spoiler
Plugin: sleep.esp

Record: TES3 "()" Flags:0x0000 ()
HEDR: Version:1.3 Is_Master:False Author:"tes3cmd"
Description:"(generated)"
N_Records:1481

Record: CELL "wilderness (23, 7)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 7) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 6)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 6) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 5)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 5) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 4)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 4) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)


Here is basically how I generated it using tes3cmd:
# first create a new plugin with all the cells that do not already have the "Illegal_To_Sleep_Here" flag:tes3cmd dump --raw-with-header sleep.esp --type cell --no-match "Flags:.*Illegal_To_Sleep" Morrowind.esm Tribunal.esm Bloodmoon.esm# Step 2, delete all object instances from cells, we just want to retain the cell header stuff:tes3cmd delete --type cell --instance-match . sleep.esp > junk.log# Step 3, delete other stuff from cell header that we don't need, such as ambient lighting settings:tes3cmd delete --sub-match "^(ambient|reference_count|region):" sleep.esp# finally, the perl voodoo to add the Illegal_To_Sleep_Here flag:# (Note, I did this command on Linux, so the quoting for the Windows command line will be different)tes3cmd modify --type cell --run "\$R->set({f=>'flags'},\$R->get('DATA','flags')|\$CELL_FLAGS{illegal_to_sleep_here});" sleep.esp


So, let me know if that works. I realize it's non-obvious solution, and I haven't actually tested it myself, but theoretically, it should work. If it doesn't, let me know and I'll try to straighten it out.
User avatar
remi lasisi
 
Posts: 3307
Joined: Sun Jul 02, 2006 2:26 pm

Post » Tue Dec 06, 2011 3:57 am

here is your plugin for testing:
http://www.sendspace.com/file/sjylto.

Here is the first few lines of output from "tes3cmd dump sleep.esp" to show you what it looks like internally:
Spoiler
Plugin: sleep.esp

Record: TES3 "()" Flags:0x0000 ()
HEDR: Version:1.3 Is_Master:False Author:"tes3cmd"
Description:"(generated)"
N_Records:1481

Record: CELL "wilderness (23, 7)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 7) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 6)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 6) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 5)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 5) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)

Record: CELL "wilderness (23, 4)" Flags:0x0000 ()
NAME: Name:
DATA: (Exterior) Coordinates: (23, 4) Flags:0x0006 (Illegal_To_Sleep_Here, Has_Water)


Here is basically how I generated it using tes3cmd:
# first create a new plugin with all the cells that do not already have the "Illegal_To_Sleep_Here" flag:tes3cmd dump --raw-with-header sleep.esp --type cell --no-match "Flags:.*Illegal_To_Sleep" Morrowind.esm Tribunal.esm Bloodmoon.esm# Step 2, delete all object instances from cells, we just want to retain the cell header stuff:tes3cmd delete --type cell --instance-match . sleep.esp > junk.log# Step 3, delete other stuff from cell header that we don't need, such as ambient lighting settings:tes3cmd delete --sub-match "^(ambient|reference_count|region):" sleep.esp# finally, the perl voodoo to add the Illegal_To_Sleep_Here flag:# (Note, I did this command on Linux, so the quoting for the Windows command line will be different)tes3cmd modify --type cell --run "\$R->set({f=>'flags'},\$R->get('DATA','flags')|\$CELL_FLAGS{illegal_to_sleep_here});" sleep.esp


So, let me know if that works. I realize it's non-obvious solution, and I haven't actually tested it myself, but theoretically, it should work. If it doesn't, let me know and I'll try to straighten it out.


Good news: doesn't conflict with anything! :)

Bad news: doesn't seem to work, either :(
User avatar
Samantha Jane Adams
 
Posts: 3433
Joined: Mon Dec 04, 2006 4:00 pm

Post » Tue Dec 06, 2011 6:01 am

Bad news: doesn't seem to work, either :(

Oh crap. Well, let me do some testing.
User avatar
SUck MYdIck
 
Posts: 3378
Joined: Fri Nov 30, 2007 6:43 am

Post » Tue Dec 06, 2011 1:16 am

Just a cursory test shows it works for me. Did you start a new game? Cells are saved in savegames, so that would override the plugin if you've been to an external cell before.

Edif: if it still doesn't work for you in a new game, can you post the cell name or location?
User avatar
Hayley Bristow
 
Posts: 3467
Joined: Tue Oct 31, 2006 12:24 am

Post » Mon Dec 05, 2011 8:26 pm

Just a cursory test shows it works for me. Did you start a new game? Cells are saved in savegames, so that would override the plugin if you've been to an external cell before.

Edif: if it still doesn't work for you in a new game, can you post the cell name or location?


I tried it in both an existing and a new game. in the new game, I tried it just outside of Seyda Neen, in front of the bandit cave (Addamsatrus, or whatever).
User avatar
Red Sauce
 
Posts: 3431
Joined: Fri Aug 04, 2006 1:35 pm

Post » Tue Dec 06, 2011 1:02 am

I tried it just outside of Seyda Neen, in front of the bandit cave (Addamsatrus, or whatever).

Don't know what to tell you. I put a new char right in front of the door to Addamasartus, press "T", and it tells me that "Camping here is illegal". Without the plugin, I can rest there.
User avatar
casey macmillan
 
Posts: 3474
Joined: Fri Feb 09, 2007 7:37 pm

Post » Tue Dec 06, 2011 5:27 am

Weiiiiiiiiird...

Let me try it again.
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm

Post » Tue Dec 06, 2011 2:09 am

...and now it works.

I swear to Odin it wasn't the first time I tried it.
User avatar
barbara belmonte
 
Posts: 3528
Joined: Fri Apr 06, 2007 6:12 pm

Post » Tue Dec 06, 2011 2:56 am

Ok, now it's not working again.

Even with a new game.

...what the hell?

EDIT:

And now it works. I think I'm figuring it out. Apparently, this data lingers around in the RAM or something, even if you start a new game. Because first, I loaded an existing game. the mod didn't work. Then, I started a new game. Mod didn't work.

I closed Morrowind and restarted it. Started a new game. Mod worked. I'm assuming that if I loaded that same old saved game, it would stop working again until I restarted Morrowind. Weird.

I also tested what happened when I went to Fort Firemoth. The mod still worked, even though the cell I was in had (apparently) been renamed to "Fort Firemoth Region" instead of "Wilderness". Or am I not understanding the concept of renaming a cell?
User avatar
Umpyre Records
 
Posts: 3436
Joined: Tue Nov 13, 2007 4:19 pm

Post » Mon Dec 05, 2011 10:31 pm

Apparently, this data lingers around in the RAM or something, even if you start a new game.

Very strange. Haven't heard of such a thing before.

I also tested what happened when I went to Fort Firemoth. The mod still worked, even though the cell I was in had (apparently) been renamed to "Fort Firemoth Region" instead of "Wilderness". Or am I not understanding the concept of renaming a cell?

The mod should work, but it reverts the name of that cell to the original name. That could affect anything that needs to refer to the cell by name. But if nothing does that, probably no harm done.
User avatar
Lizs
 
Posts: 3497
Joined: Mon Jul 17, 2006 11:45 pm

Post » Tue Dec 06, 2011 12:05 am

Very strange. Haven't heard of such a thing before.


I could try it out some more, I suppose. Or maybe you could see if the same thing happens to you?

The mod should work, but it reverts the name of that cell to the original name. That could affect anything that needs to refer to the cell by name. But if nothing does that, probably no harm done.


I guess what I'm trying to ask is, "is what is displayed on the screen to show you what area you're in the name of the cell or not?"

Because if the cell HAS been renamed to "Fort Firemoth" by the official plugin, yet my mod both works AND doesn't override, then I'd like to know why. But I think the problem is moreso that I just don't understand how the cell name data works.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Tue Dec 06, 2011 6:27 am

I could try it out some more, I suppose. Or maybe you could see if the same thing happens to you?

Ok, I misinterpreted what you said previously, but yes, I see this:
- start game with sleep.esp activated
- load save
- visit external cell, sleeping allowed == not working
- without exiting, start new game, visit same cell, sleeping allowed ... still not working.
- exit Morrowind
- start new game visit same cell, sleeping not allowed == plugin now working.

What can I say ... Morrowind is one buggy program. Maybe this is one for Hrnchamd. It really is very bad for Morrowind not to unload old data.

I guess what I'm trying to ask is, "is what is displayed on the screen to show you what area you're in the name of the cell or not?"

Sort of. Exterior cells are weird. They can have specific names, but if that is missing the region name is used as the name, but if that is missing, then it is just called "Wilderness".
In the case of "Siege at Firemoth.esp" it does not give an actual name to any of the exterior cells, although it does set the region (RGNN sub-record) to "Firemoth Region", but the NAME sub-record for the cells are all blank, just like in the sleep.esp. So there is no naming conflict with that plugin.
User avatar
Elizabeth Lysons
 
Posts: 3474
Joined: Fri Feb 02, 2007 7:16 am

Post » Tue Dec 06, 2011 5:17 am

Ok, I misinterpreted what you said previously, but yes, I see this:
- start game with sleep.esp activated
- load save
- visit external cell, sleeping allowed == not working
- without exiting, start new game, visit same cell, sleeping allowed ... still not working.
- exit Morrowind
- start new game visit same cell, sleeping not allowed == plugin now working.

What can I say ... Morrowind is one buggy program. Maybe this is one for Hrnchamd. It really is very bad for Morrowind not to unload old data.


Wow, I've really been loading that poor guy up with work lately, haven't I?


Sort of. Exterior cells are weird. They can have specific names, but if that is missing the region name is used as the name, but if that is missing, then it is just called "Wilderness".
In the case of "Siege at Firemoth.esp" it does not give an actual name to any of the exterior cells, although it does set the region (RGNN sub-record) to "Firemoth Region", but the NAME sub-record for the cells are all blank, just like in the sleep.esp. So there is no naming conflict with that plugin.


Ah, gotcha.

Well, then, I will leave you with what I have placed in the "conflicts and compatibility" portion of my readme regarding your little creation... let me know if you think it's accurate:

Also, the "Settings" plugin edits the "DATA" sub-header of every cell in the game in which it's legal to camp in order to make it illegal to camp in those cells, thus removing the ability to camp entirely. Since the legality of camping is one of the only things the "DATA" sub-header is actually used for, the potential for conflicts is very low. Any mod that renames a cell will have the new name replaced with the default name, but for any sort of a real problem to occur, a mod would need to both rename a cell and have a script that references that cell by its new name. And while there probably are mods out there that actually do this, I'm not aware of any. Furthermore, the conflict could be very easily resolved simply by manually placing the mod in question after mine in the load order.

User avatar
Danger Mouse
 
Posts: 3393
Joined: Sat Oct 07, 2006 9:55 am

Post » Tue Dec 06, 2011 10:40 am

Also, the "Settings" plugin edits the "DATA" sub-header of every cell in the game in which it's legal to camp in order to make it illegal to camp in those cells, thus removing the ability to camp entirely. Since the legality of camping is one of the only things the "DATA" sub-header is actually used for, the potential for conflicts is very low. Any mod that renames a cell will have the new name replaced with the default name, but for any sort of a real problem to occur, a mod would need to both rename a cell and have a script that references that cell by its new name. And while there probably are mods out there that actually do this, I'm not aware of any. Furthermore, the conflict could be very easily resolved simply by manually placing the mod in question after mine in the load order.


It might be a little better to change:
"will have the new name replaced with the default name"
to:
"will have the new name reverted to the original name from the Bethesda masters"

And:
"both rename a cell and have a script"
to:
"both rename a cell and have a script or dialogue"

There definitely are mods out there that rename external cells, I can think of a few. But your advice on load order covers you, I think.
User avatar
Oscar Vazquez
 
Posts: 3418
Joined: Sun Sep 30, 2007 12:08 pm

Next

Return to III - Morrowind