Quick Questions -- Quick Answers, The 22nd

Post » Wed Jul 21, 2010 9:08 pm

Is there any way, given a ref to a bed, to find out whether any NPC currently sleeps in that bed? Putting a script on the bed is not an option, it must be from a general quest script.
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm

Post » Thu Jul 22, 2010 10:22 am

Is there any way, given a ref to a bed, to find out whether any NPC currently sleeps in that bed? Putting a script on the bed is not an option, it must be from a general quest script.
I've found ref. walking for sleeping NPCs that are as close as 15 units to the bed to be reasonably accurate.
User avatar
FITTAS
 
Posts: 3381
Joined: Sat Jan 13, 2007 4:53 pm

Post » Thu Jul 22, 2010 10:01 am

I've found ref. walking for sleeping NPCs that are as close as 15 units to the bed to be reasonably accurate.

Yes, something like that should work. In Real Sleep Extended the player can pick up bedrolls, but shouldn't be able to do so if an NPC sleeps there - it has been reported to crash the game as well, which I assume is because the engine keeps a reference to the now-deleted bed in order for the NPC to wake up properly. So only enabling the "pick up" menu if no NPC is closer than 15 units should be a good improvement.
User avatar
Richard Dixon
 
Posts: 3461
Joined: Thu Jun 07, 2007 1:29 pm

Post » Thu Jul 22, 2010 3:55 am

If you're updating Real Sleep Extended, would you consider an override to the timescale settings for when you're waiting and watching an NPC?

I like to play with a low timescale, but some of the sillier quests, like where you're following Thoronir around pretty much require bumping it back to 30 for a short time.
User avatar
RObert loVes MOmmy
 
Posts: 3432
Joined: Fri Dec 08, 2006 10:12 am

Post » Thu Jul 22, 2010 8:12 am

Thanks !
Is rContainerRef.GetItemCount objectID not a valid syntax (rContainerRef being a ref variable set to a container/actor/theplayer) ?
if not how would I go about it ?

This appears to have been overlooked.

Yes, it's valid, but the container ref must be a RefID, not a BaseID, or you get the wrong answer. You want the current value for this container, not the initial one for any container of that type. Conversely, the objectID is a BaseID. A lot of functions will just fail if the wrong kind of ref is provided, but IIRC this one might not.
User avatar
Jason Rice
 
Posts: 3445
Joined: Thu Aug 16, 2007 3:42 pm

Post » Wed Jul 21, 2010 9:21 pm

Anyone happen to know how to to a "fade to black" effect in the game? Something that would be suitable to simulate the player getting knocked out and waking up later?
User avatar
Karl harris
 
Posts: 3423
Joined: Thu May 17, 2007 3:17 pm

Post » Thu Jul 22, 2010 4:13 am

Easily accomplished with a full screen shader.
User avatar
lucy chadwick
 
Posts: 3412
Joined: Mon Jul 10, 2006 2:43 am

Post » Thu Jul 22, 2010 3:13 am

Perhaps I should have been more clear. How would I do that without forcing dependency on OBGE or is my Google Fu not up to the task today?
User avatar
cosmo valerga
 
Posts: 3477
Joined: Sat Oct 13, 2007 10:21 am

Post » Thu Jul 22, 2010 10:31 am

Perhaps I should have been more clear. How would I do that without forcing dependency on OBGE or is my Google Fu not up to the task today?
Well, you could modify the game's gamma levels to do just the same. Either use that console command or setNumericINISetting.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Thu Jul 22, 2010 12:37 am

This appears to have been overlooked.

Yes, it's valid, but the container ref must be a RefID, not a BaseID, or you get the wrong answer. You want the current value for this container, not the initial one for any container of that type. Conversely, the objectID is a BaseID. A lot of functions will just fail if the wrong kind of ref is provided, but IIRC this one might not.
Thank you very much :)
The real pain is the container not been loaded in memory - haven't found a workaround for this (if the RefID is persistent fine - if not :thumbsdown: )
User avatar
[ becca ]
 
Posts: 3514
Joined: Wed Jun 21, 2006 12:59 pm

Post » Thu Jul 22, 2010 6:18 am

on script processing :whistling:
I have this script on a book - I use a book which is a persistent reference - the script sets 2 variables on my quest script
scn UDUNobjectSCRBegin gameMode	set UDUNcTQUEST.container to GetContainer	set UDUNcTQUEST.cell to getParentCellend

I have the quest script to print in game mode :
printc "cell : %i" cellprintc "container : %i" container
When I put the book in a container it prints smth like :
cell : 00005E3D
container : 000C08E1
I then I move to another (interior) cell and call pcb. The quest script prints :
cell : 00000000
container : 00000000
why ?
I know the ref to the book gets unloaded from memory, but why (when) does it report its cell and container as 0 ?
User avatar
Michelle davies
 
Posts: 3509
Joined: Wed Sep 27, 2006 3:59 am

Post » Thu Jul 22, 2010 2:04 am

Two (or more) Questions:

1. Is it possible to script a Soul Gem (custom one) to collect only NPC souls? And if so, how?

2. Is it possible to script an Azura's Star type Soul Gem that will collect any soul (including that of an NPC)? And if so, how?
User avatar
Marcus Jordan
 
Posts: 3474
Joined: Fri Jun 29, 2007 1:16 am

Post » Thu Jul 22, 2010 4:01 am

Not at a machine where I can look at present, but I suspect the selection of the gem would all be in an Effect script for the Soul Trap spell. If that is the case, then then you should be able to provide a replacement bit of logic to prefer your special gems. Someone else may be able to confirm that before I can.
User avatar
Oceavision
 
Posts: 3414
Joined: Thu May 03, 2007 10:52 am

Post » Thu Jul 22, 2010 3:18 am

Okay...real soon I am going to be starting a big project and I want to make sure I got all the right knowledge and resources ready before beginning. One thing I am very unfamiliar with is scripting/making quests. I use to know it pretty well at one point in time, but then I left the Oblivion modding community for nearly a year and that knowledge was replaced with mathematical functions, history of America, Chemistry, and other school-worthy subjects.

Now, the CS Wiki's have never really done me much good, but right now, I suppose it is better than nothing. So if someone could point me in the direction of a few guides on creating quests and creating the scripts for quests, that would be great. Or, if you have a huge heart (and a lot of time...) and feel you could give me better knowledge than those ol' Wiki's (since they do a bad job of staying in my head) and wish to take the time to write a more appropriate guide then feel free to do that, I would most certainly give you a lot of praise in the credits of the mod if that amounts to any value to you.

But I am sure my best bet would be the Wiki's so, I am sure if I have a couple of different quest-making guides I could learn pretty efficiently. If one doesn't word something right, then I can look at the other.
Also, another thing that would be very helpful, but not required, would be a good, stable quest mod with an obvious beginning and end, so I can look at it's script and the way it was made as an example. I was thinking I could use Malevolent but, then again, it has so many different paths and outcomes I think it would be hard to get the ONE thing I need out of the many possible. So I would prefer something a little more linear.

anyways, thank you much :)
User avatar
Harry Leon
 
Posts: 3381
Joined: Tue Jun 12, 2007 3:53 am

Post » Wed Jul 21, 2010 11:27 pm

Not at a machine where I can look at present, but I suspect the selection of the gem would all be in an Effect script for the Soul Trap spell. If that is the case, then then you should be able to provide a replacement bit of logic to prefer your special gems. Someone else may be able to confirm that before I can.

Thanks, but I'm only slightly brighter than a black hole when it comes to scripting, so I'm not so sure what you mean here.

Okay...real soon I am going to be starting a big project and I want to make sure I got all the right knowledge and resources ready before beginning. One thing I am very unfamiliar with is scripting/making quests. I use to know it pretty well at one point in time, but then I left the Oblivion modding community for nearly a year and that knowledge was replaced with mathematical functions, history of America, Chemistry, and other school-worthy subjects.

Now, the CS Wiki's have never really done me much good, but right now, I suppose it is better than nothing. So if someone could point me in the direction of a few guides on creating quests and creating the scripts for quests, that would be great. Or, if you have a huge heart (and a lot of time...) and feel you could give me better knowledge than those ol' Wiki's (since they do a bad job of staying in my head) and wish to take the time to write a more appropriate guide then feel free to do that, I would most certainly give you a lot of praise in the credits of the mod if that amounts to any value to you.

But I am sure my best bet would be the Wiki's so, I am sure if I have a couple of different quest-making guides I could learn pretty efficiently. If one doesn't word something right, then I can look at the other.
Also, another thing that would be very helpful, but not required, would be a good, stable quest mod with an obvious beginning and end, so I can look at it's script and the way it was made as an example. I was thinking I could use Malevolent but, then again, it has so many different paths and outcomes I think it would be hard to get the ONE thing I need out of the many possible. So I would prefer something a little more linear.

anyways, thank you much :)

Actually, http://www.tesalliance.org/ is a good place to ask. They have the first (and to my knowledge, only) TES modding school. There are experts you can ask about scripting in particular (WillieSea comes to mind). I usually ask my scripting questions here and there to make sure all my bases are covered.
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Thu Jul 22, 2010 12:14 am

To reiterate a question I posed a while ago, I'm teleporting the PC to another worldspace on a ship, and I'd like a good bit of time (3 days) to pass when this happens. Any thoughts on how to do it? SetPCSleepHours doesn't seem to do what I'd like it to do, which is to say that it isn't doing anything at all.

Ntom:

Other people more in tune with the tutorial scene can probably help you more, but in addition to the CS Wiki tutorials, you might try the various http://www.invision.tesalliance.org/forums/index.php?/forum/82-esiv-oblivion-classes/, which have some degree of good accumulated wisdom in them.

Speaking for myself, I learned mostly through dissection. Vanilla quests are generally fairly well written, and have the advantage of being right there for you to dig through, plus you probably know what many of them do. Most of the MSxx series are great examples of fairly simple "Go from point A to point B" quests.

As far as scripting goes, once you know the basics (what blocktypes are, basic variables, || and &&, various forms of ==, if/else/elseif/endif, and the difference between magic effect, object, and quest scripts), most if it boils down to simply knowing which blocktypes/functions you need to accomplish any given task, and that pretty much involves sitting down with the CS Wiki and hunting through the http://cs.elderscrolls.com/constwiki/index.php/Category:Functions_%28CS%29 and http://cs.elderscrolls.com/constwiki/index.php/Category:Blocktypes until you find what you're after.

I'm probably being pretty unclear, but I hope that helps a little.
User avatar
James Hate
 
Posts: 3531
Joined: Sun Jun 24, 2007 5:55 am

Post » Thu Jul 22, 2010 5:10 am

heh heh, oh I am familiar with TESA, sorry, that is not my place to be.
I was thinking perhaps Vanilla quests, but then I remember I tried that once and it was a whole bunch of convoluted lines of pointless information that made no sense not even when broken down into seperate blocks. I suppose I might have been examining the wrong quest, however my ability to read and understand is a bit lacking, so then again, I was reading essentially a different language making my poor reading comprehension skill worse.

I guess I will take another look at your recommended quest recommendation(s) and see if it is any better or if my knowledge of scripting has changed enough where it doesn't look like just a bunch of jibberish scribbled down in a nonsensical pattern.

however, I do not know | |, &&, and == very well. I know the doonce command uses == but, essentially all I am doing when I make a script that uses the doonce command I am just regurgitating the knowledge that was shoved into my brain without explanation. So, in other words, I have do not know the "why" and "when" for the "==", I just know it is used in a simple command like "doonce". as for | | and && I have not even seen those.
User avatar
Tracey Duncan
 
Posts: 3299
Joined: Wed Apr 18, 2007 9:32 am

Post » Thu Jul 22, 2010 5:23 am

[edit] Moved discussion http://www.gamesas.com/index.php?/topic/1090125-dwips-guide-to-scripting/ to avoid cluttering this thread. [/edit]
User avatar
Courtney Foren
 
Posts: 3418
Joined: Sun Mar 11, 2007 6:49 am

Post » Thu Jul 22, 2010 12:21 am

@Dwip: Wouldn't your 3 days passing be as simple as:

set gameday to gameday + 3

?
User avatar
joeK
 
Posts: 3370
Joined: Tue Jul 10, 2007 10:22 am

Post » Wed Jul 21, 2010 9:53 pm

I seem to remember from somewhere that this sets the day right, but doesn't do any of the other stuff associated with moving time forward, like sleeping or resetting spawns or making you hungry or whatever. I may be wrong. I know this topic has been discussed before, but I can't now remember what was said.
User avatar
Franko AlVarado
 
Posts: 3473
Joined: Sun Nov 18, 2007 7:49 pm

Post » Wed Jul 21, 2010 9:28 pm

Any way to find out whether a reference is a horse? Not last ridden horse etc, just horse. It can be any ridable creature if that matters. Preferably without using OBSE.
User avatar
kennedy
 
Posts: 3299
Joined: Mon Oct 16, 2006 1:53 am

Post » Thu Jul 22, 2010 6:55 am

It should reset spawns, I don't see why it wouldn't, the game would have no real way to know you cheated on the advancement of time.

My own recent experiments with SetPCSleepHours indicate to me that does absolutely nothing useful other than VERY briefly flash a black screen at you.

If all else fails, you could see what effect setting the Timescale higher would have on things, as long as you grab the value it's currently set to before setting a new one so you can remember what to reset it to later.
User avatar
how solid
 
Posts: 3434
Joined: Mon Apr 23, 2007 5:27 am

Post » Thu Jul 22, 2010 9:03 am

I'm having trouble with Blender. Whenever I try to import an Oblivion object, the console comes up with "AttributeError: NiTriStrips object has no attribute "isSkin"."
I've heard it's because the script is set up to import Morrowind NIFs but not Oblivion NIFs. I can't seem to figure out how to change that.

Anyone know what I can do?


EDIT: Got it working. Got all confused about the scripts that had be installed.
User avatar
Rozlyn Robinson
 
Posts: 3528
Joined: Wed Jun 21, 2006 1:25 am

Post » Thu Jul 22, 2010 11:40 am

Any way to find out whether a reference is a horse? Not last ridden horse etc, just horse. It can be any ridable creature if that matters. Preferably without using OBSE.

With OBSE: http://cs.elderscrolls.com/constwiki/index.php/IsCreature + http://cs.elderscrolls.com/constwiki/index.php/GetCreatureType (type 4 is horse)

Without OBSE, all I can think of is checking if the base object is one of the vanilla horses (about 50). Of course, this method won't detect modded horses.
User avatar
Shannon Marie Jones
 
Posts: 3391
Joined: Sun Nov 12, 2006 3:19 pm

Post » Wed Jul 21, 2010 9:36 pm

I'm wondering how possible it is for me to tweak a summon spell, so instead of summoning a Mountain Lion, it uses the Wild Pahmer model from MMM. I've had a poke around in the CS, finding the summon version of the Lion, and took note of the various nifs it points to. But was a little wary about going further without getting advice first. Would it be a simple case of pointing this bit to the nifs of the Pahmer, rather than the Lion? Would it also require me to fire up both the Oblivion and MMM esms in the CS so the Pahmer nifs are available? Are there any pitfalls or potential issues I should be aware of?

Sorry, wasn't quite as quick a question as I'd planned, but thanks in advance for any advice. :)
User avatar
gary lee
 
Posts: 3436
Joined: Tue Jul 03, 2007 7:49 pm

PreviousNext

Return to IV - Oblivion