Regarding flagging a cell as "illegal to sleep here"

Post » Mon Dec 06, 2010 3:59 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.
User avatar
Patrick Gordon
 
Posts: 3366
Joined: Thu May 31, 2007 5:38 am

Post » Sun Dec 05, 2010 6:49 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.

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
Daniel Lozano
 
Posts: 3452
Joined: Fri Aug 24, 2007 7:42 am

Post » Sun Dec 05, 2010 4:10 pm

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
Amelia Pritchard
 
Posts: 3445
Joined: Mon Jul 24, 2006 2:40 am

Post » Sun Dec 05, 2010 3:14 pm

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
Chloe Yarnall
 
Posts: 3461
Joined: Sun Oct 08, 2006 3:26 am

Post » Sun Dec 05, 2010 7:46 pm

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
john palmer
 
Posts: 3410
Joined: Fri Jun 22, 2007 8:07 pm

Post » Mon Dec 06, 2010 1:03 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
Lisa Robb
 
Posts: 3542
Joined: Mon Nov 27, 2006 9:13 pm

Post » Sun Dec 05, 2010 6:04 pm

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
james kite
 
Posts: 3460
Joined: Sun Jul 22, 2007 8:52 am

Post » Mon Dec 06, 2010 3:28 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
Robert DeLarosa
 
Posts: 3415
Joined: Tue Sep 04, 2007 3:43 pm

Post » Sun Dec 05, 2010 11:32 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
[ becca ]
 
Posts: 3514
Joined: Wed Jun 21, 2006 12:59 pm

Post » Sun Dec 05, 2010 6:17 pm

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
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Sun Dec 05, 2010 3:20 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
Christina Trayler
 
Posts: 3434
Joined: Tue Nov 07, 2006 3:27 am

Post » Mon Dec 06, 2010 2:40 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.
User avatar
Pete Schmitzer
 
Posts: 3387
Joined: Fri Sep 14, 2007 8:20 am

Post » Sun Dec 05, 2010 10:36 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.


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

Bad news: doesn't seem to work, either :(
User avatar
Caroline flitcroft
 
Posts: 3412
Joined: Sat Nov 25, 2006 7:05 am

Post » Sun Dec 05, 2010 3:10 pm

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

Oh crap. Well, let me do some testing.
User avatar
P PoLlo
 
Posts: 3408
Joined: Wed Oct 31, 2007 10:05 am

Post » Mon Dec 06, 2010 12:35 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
Justin Hankins
 
Posts: 3348
Joined: Fri Oct 26, 2007 12:36 pm

Post » Mon Dec 06, 2010 5:33 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?


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
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am

Post » Sun Dec 05, 2010 5:01 pm

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
Fam Mughal
 
Posts: 3468
Joined: Sat May 26, 2007 3:18 am

Post » Sun Dec 05, 2010 3:40 pm

Weiiiiiiiiird...

Let me try it again.
User avatar
Matt Bigelow
 
Posts: 3350
Joined: Sun Sep 30, 2007 6:36 pm

Post » Mon Dec 06, 2010 5:10 am

...and now it works.

I swear to Odin it wasn't the first time I tried it.
User avatar
SHAWNNA-KAY
 
Posts: 3444
Joined: Mon Dec 18, 2006 1:22 pm

Post » Sun Dec 05, 2010 7:25 pm

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
sally R
 
Posts: 3503
Joined: Mon Sep 25, 2006 10:34 pm

Post » Sun Dec 05, 2010 11:29 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
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Sun Dec 05, 2010 7:56 pm

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
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Mon Dec 06, 2010 5:06 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
Cameron Wood
 
Posts: 3384
Joined: Wed Oct 31, 2007 3:01 pm

Post » Mon Dec 06, 2010 5:37 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
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Mon Dec 06, 2010 1:10 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
M!KkI
 
Posts: 3401
Joined: Sun Jul 16, 2006 7:50 am

Next

Return to III - Morrowind