Quick Questions -- Quick Answers, The 26th

Post » Thu Sep 23, 2010 6:34 pm

Question Answered
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm

Post » Thu Sep 23, 2010 3:55 pm

Does anyone know where is HAV_MAT_DIRT used as a collision? Does it behave weird?
User avatar
XPidgex Jefferson
 
Posts: 3398
Joined: Fri Sep 08, 2006 4:39 pm

Post » Thu Sep 23, 2010 10:08 am

How do I set where the player starts the game off?
User avatar
Glu Glu
 
Posts: 3352
Joined: Sun Apr 01, 2007 5:39 am

Post » Thu Sep 23, 2010 9:01 am

How do you clear the ownership on an item? "SetOwnership 0" doesn't work and leaving "Owner" blank sets it to player instead.
http://cs.elderscrolls.com/constwiki/index.php/ClearOwnership :D


I have a few basic ones:

Is there any decent document online that lists ALL script functions for Oblivion? I read the UESP list but it's incomplete.

http://cs.elderscrolls.com/constwiki/index.php/Category:Functions

3: What is the function that allows me to monitor the input from a keyboard button? (example: Press H to activate)
Several, they are all OBSE functions. IsKeyPressed2/3, or OnKeyDown are the ones you're most likely to use.

4: What function do I use to delete an object permanently? I'm under the impression that Disable won't delete the reference in the save file so there will end up being references to deleted objects if I just use 'Disable'.
DeleteReference, another OBSE function, but you must first Disable it, and then expect to check for a few frames that it is registered as disabled by the engine before you can call DeleteReference.



I'm trying to figure out the obse function "SetScript". I can't get it to work. The test script I've set up is a spell effect that sets a script to the currently equipped weapon.
You should really, really find another way of doing this. Doing it by setting a script on all equipped weapons is a safe way to ensure that you break any mod (or vanilla) weapon that is scripted. Instead, try to do what you need from a general quest script without modifying the weapon.
User avatar
Beth Belcher
 
Posts: 3393
Joined: Tue Jun 13, 2006 1:39 pm

Post » Thu Sep 23, 2010 12:03 pm

Does anyone know where is HAV_MAT_DIRT used as a collision? Does it behave weird?


Only ever seen that used in landscape terrain types, but you can also use it in a standard mesh to make it sound like you're walking on dirt.
User avatar
Robert Bindley
 
Posts: 3474
Joined: Fri Aug 03, 2007 5:31 pm

Post » Thu Sep 23, 2010 10:18 am

Thanks. I have used it in house interior, but I've had some strange issues here and there with clutter objects sticking into it. It could be that I need to change some other collision settings.
User avatar
Sunnii Bebiieh
 
Posts: 3454
Joined: Wed Apr 11, 2007 7:57 pm

Post » Thu Sep 23, 2010 8:07 pm

Another quickie, what's the new function name for 'PlaceItem' ? I've tried searching many different keywords such as 'object, place, insert, create, add, item, ref, put' and none have come up with anything that simply allows me to place an object at any given x, y, z coordinates.
User avatar
Danny Warner
 
Posts: 3400
Joined: Fri Jun 01, 2007 3:26 am

Post » Thu Sep 23, 2010 3:51 pm

Another quickie, what's the new function name for 'PlaceItem' ? I've tried searching many different keywords such as 'object, place, insert, create, add, item, ref, put' and none have come up with anything that simply allows me to place an object at any given x, y, z coordinates.


http://cs.elderscrolls.com/constwiki/index.php/SetPos?
User avatar
Chris BEvan
 
Posts: 3359
Joined: Mon Jul 02, 2007 4:40 pm

Post » Thu Sep 23, 2010 1:37 pm

Is there a script function that negates the damage of falls?
Or any way to stop taking damage from falls?
User avatar
yessenia hermosillo
 
Posts: 3545
Joined: Sat Aug 18, 2007 1:31 pm

Post » Thu Sep 23, 2010 9:11 pm

Is there a script function that negates the damage of falls?
Or any way to stop taking damage from falls?

Just some suggestions. A combination of IsInAir, IsOnGround, and GetCurrentHealth/SetCurrentHealth sounds like it should be able to do what you want.
Like, perhaps, just off the top of my head:
Spoiler
If player.IsInAir    set prefallHealth to player.GetCurrentHealth    set wasFalling to 1elseif player.IsOnGround    if wasFalling        player.SetCurrentHealth prefallHealth    endif    set wasFalling to 0endif

This is untested, like I said, just off the top of my head.
Edit: requires obse. Also, this wont remove the audio of the player being hurt. Don't know how you would do that.
User avatar
Alexandra Ryan
 
Posts: 3438
Joined: Mon Jul 31, 2006 9:01 am

Post » Thu Sep 23, 2010 9:25 pm

Or any way to stop taking damage from falls?

In the CS, go to Gameplay>Settings and change fJumpFallTimeMult to 0. You will still see some motion blur and hear your character grunt in pain, but you will take no damage from falls.
User avatar
Bryanna Vacchiano
 
Posts: 3425
Joined: Wed Jan 31, 2007 9:54 pm

Post » Thu Sep 23, 2010 10:07 pm

I'm creating a creature that after getting its health to 10- it will cast a spell on itself. The creature only has one spell animation, castself. Lately with whatever I try I can't get it to cast the spell. Is there any specific things I would need to do for this?
User avatar
Fam Mughal
 
Posts: 3468
Joined: Sat May 26, 2007 3:18 am

Post » Thu Sep 23, 2010 10:50 pm

http://cs.elderscrolls.com/constwiki/index.php/SetPos?



I need to actually create the object before I can use SetPos. I know I can use "PlaceAtMe" and then use SetPos to create, then position a new object, but this adds complexity when there should just be 1 command to insert a new object in game.

For instance, when the player activates a chest, create a giant stone above the players head. The only way this can be done is by placing an object at the X,Y coordinates of the player, and at a Z coordinate of (( Player.GetPos Z ) + 600 )
User avatar
Russell Davies
 
Posts: 3429
Joined: Wed Nov 07, 2007 5:01 am

Post » Thu Sep 23, 2010 2:38 pm

Are there any known "gotcha's" with DisableLinkedPathPoints? I have a quest where a new building is contructed, and enabling the building and disabling the path grid below it still leaves NPC's trying to walk through the walls if their destination is the other side of the building. It's not obvious if they're taking a straight-line path when they get to the new "hole" in the grid, or still trying to follow the original paths.

FWIW, the building is mod-added, but the grid points underneath it are vanilla ones that have been linked to the building. Should the mod delete the vanilla grid points and replace them with its own to avoid this?

Do I need to EnableLinkedPathPoints a new path point at the door of the building to make sure any NPC emerging knows where to go, or will they find the nearest original point before navigating?
User avatar
Andrew Tarango
 
Posts: 3454
Joined: Wed Oct 17, 2007 10:07 am

Post » Thu Sep 23, 2010 1:42 pm

I played a bit with this last weekend and noticed that NPCs anolyze the path grid and determine their path when they select the AI package.
Enabling and disabling nodes after that do not affect them in any way: they continue on the 'trajectory' they originally selected.

But an EvaluatePackage forces the NPC to reevaluate the grid and the path and fixes the issue.
User avatar
Kelly John
 
Posts: 3413
Joined: Tue Jun 13, 2006 6:40 am

Post » Thu Sep 23, 2010 11:13 am

is there a comand that can read a ref pointed to by the crosshair ?
User avatar
Jacob Phillips
 
Posts: 3430
Joined: Tue Aug 14, 2007 9:46 am

Post » Thu Sep 23, 2010 11:13 pm

is there a comand that can read a ref pointed to by the crosshair ?


http://cs.elderscrolls.com/constwiki/index.php/GetCrosshairRef - it's an OBSE function.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Fri Sep 24, 2010 12:16 am

http://cs.elderscrolls.com/constwiki/index.php/GetCrosshairRef - it's an OBSE function.

Many thanks
User avatar
Leticia Hernandez
 
Posts: 3426
Joined: Tue Oct 23, 2007 9:46 am

Post » Thu Sep 23, 2010 1:44 pm

Is there any way a script can determine the phase of either moon for Lyncanthropic purposes?. Since this is determined by worldspace, I'm confining this to Tamriel, where I hope no mods are messing with the climate settings and changing the cycle length after the start.

Also is it true that the cycles for both moons have the same length?

(Edit: I discovered that the Orrery, a plug-in I don't have, is doing this, but is that accurate, or is it using its own phases that don't match the observed ones?)
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am

Post » Thu Sep 23, 2010 4:09 pm

Is there any way a script can determine the phase of either moon for Lyncanthropic purposes?. Since this is determined by worldspace, I'm confining this to Tamriel, where I hope no mods are messing with the climate settings and changing the cycle length after the start.

Also is it true that the cycles for both moons have the same length?

(Edit: I discovered that the Orrery, a plug-in I don't have, is doing this, but is that accurate, or is it using its own phases that don't match the observed ones?)


The Orrery does it manually. It just uses GameDaysPassed. It says there are eight phases of the moons (0-7). I don't know too much about the moon phases. Even though I own the plugin, I never use the darn thing once I've activated the Orrery!

Anyway it uses a variable called phasevar and the value of this variable determines which power you get when you click on the console.

Here's the calculation for phasecalc:
if ( GetStage DLCOrrery > 30 )	if ( dayspassed != GameDaysPassed )		set dayspassed to GameDaysPassed		set phasecalc to dayspassed		set calcdone to 1	endif	if ( calcdone == 1 )		if ( phasecalc == 0 )			set phasevar to 0			set calcdone to 2			set buttonvar to -1		elseif ( phasecalc < 24 )			set phasevar to ( phasecalc / 3 )			set calcdone to 2			set buttonvar to -1		elseif ( phasecalc == 24 )			set phasevar to 0			set calcdone to 2			set buttonvar to -1		else			set phasecalc to ( phasecalc - 24 )			return		endif	endifendif


Not sure if this helps much...
User avatar
Zosia Cetnar
 
Posts: 3476
Joined: Thu Aug 03, 2006 6:35 am

Post » Thu Sep 23, 2010 2:29 pm

Thanks for the script quote. It looks like the 24-day cycle is started at 0, so I should be able to compare the calculated phase with actual to see if it's "real" just by looking at Masser and the GameDaysPassed value. Since the Orrery in an interior cell, it doesn't really need to be accurate, and I could always adopt the same approach and have the related events take place indoors.
User avatar
Riky Carrasco
 
Posts: 3429
Joined: Tue Nov 06, 2007 12:17 am

Post » Thu Sep 23, 2010 4:25 pm

Is there a way to add an item to the player's inventory without having the message "Item XXXX added" appear??
This is rather inconvenient since it is a completely useless item, used for scripting purposes, and the player should not be aware of its existence at all.

Thanks.
User avatar
Ross
 
Posts: 3384
Joined: Thu Aug 10, 2006 7:22 pm

Post » Thu Sep 23, 2010 9:23 pm

Is there a way to add an item to the player's inventory without having the message "Item XXXX added" appear??

http://obse.silverlock.org/obse_command_doc.html#Spam_Blocking_Functions
User avatar
Chloe Botham
 
Posts: 3537
Joined: Wed Aug 30, 2006 12:11 am

Post » Thu Sep 23, 2010 8:44 pm

http://obse.silverlock.org/obse_command_doc.html#Spam_Blocking_Functions


Thank you !!!!! :bowdown:
User avatar
des lynam
 
Posts: 3444
Joined: Thu Jul 19, 2007 4:07 pm

Post » Thu Sep 23, 2010 1:38 pm

I have:

modA.esm
modB.esp

I want to create modC.esp that would add some levelled lists from modA.esm into modB.esp while remaining mergable into BashedPatch.
My CS crashes, so regular esmifying methods don't work.

My question is, would this work:

- copy modB.esp, rename it as modC.esp
- TES4Edit it to remove everything except for some levelled lists
- add levelled lists from modA.esm into it
- Use TESGecko to add modB.esp as master.

Would that create me a proper patch?
User avatar
Kim Bradley
 
Posts: 3427
Joined: Sat Aug 18, 2007 6:00 am

PreviousNext

Return to IV - Oblivion