Quick Questions -- Quick Answers, The 25th

Post » Tue May 17, 2011 2:18 pm

Previous thread : http://www.gamesas.com/index.php?/topic/1104648-quick-questions-quick-answers-the-24th/

Got a quick question? Post here for a quick response.
User avatar
K J S
 
Posts: 3326
Joined: Thu Apr 05, 2007 11:50 am

Post » Tue May 17, 2011 10:48 am

From Wiki:

As to your question about closing the book before the timer ends, that's what setting the var inside the goto loop is supposed to catch, I hope
Well how this (see wiki quote ) would stop the SCR processing / the function would go on till Need was satisfied - told you never understood Getsecs passed

Please add the debug print - this is really strange
User avatar
Austin Suggs
 
Posts: 3358
Joined: Sun Oct 07, 2007 5:35 pm

Post » Tue May 17, 2011 12:21 pm

is there any way to get rid of the "you cannot equip a clutter item" message that comes up when you equip a clutter item?
User avatar
Victor Oropeza
 
Posts: 3362
Joined: Sun Aug 12, 2007 4:23 pm

Post » Tue May 17, 2011 8:01 am

is there any way to get rid of the "you cannot equip a clutter item" message that comes up when you equip a clutter item?


The method I use for this is a few script lines in an OnEquip Player block:

Begin OnEquip player Message "  " Message "  " Do something hereEnd


The two blank messages (use two spaces for each) prevent the "You cannot equip this item" message from displaying. One potentially negative side effect is that this method prevents any non messagebox message from displaying.
User avatar
Shae Munro
 
Posts: 3443
Joined: Fri Feb 23, 2007 11:32 am

Post » Tue May 17, 2011 11:51 am

Well how this (see wiki quote ) would stop the SCR processing / the function would go on till Need was satisfied - told you never understood Getsecs passed

Please add the debug print - this is really strange

Kept hitting a block wall.

Went back to your code snippet which worked really well. And decided to add to it, one or two lines / blocks at a time, testing each as I go.
Moved the timer code inside the menumode 1026 block. Works well I think.

This is enabled at startup:
Spoiler
scn aaior01qs; This script sets up arrays and IOR Global Varsarray_var StartedToReadarray_var HasReadForarray_var BookTypearray_var Thymanededarray_var SkillTaughtarray_var EditIDshort doOnceshort NumBooksReadBegin gamemode	if doOnce == 0		let StartedTORead := ar_Construct StringMap		let HasReadFor := ar_Construct StringMap		let BookType := ar_Construct StringMap		let Thymaneded := ar_Construct StringMap		let SkillTaught := ar_Construct StringMap		let EditID := ar_Construct StringMap		printc "IOR arrays constructed."		set doOnce to 1			endif	startquest aaior02	stopquest aaior01end


and this is the monitoring script:
Spoiler
scn aaior02qsfloat Timerfloat fQuestDelayTimeref refBookshort doOnceshort doOnce2short Skillstring_var refNameBegin gamemode	set fQuestDelayTime to 1	set Timer to 0	if doOnce2		set doOnce2 to 0	endifendBegin Menumode 1026	; Open for reading	;Start tracking time while reading	set Timer to Timer + GetSecondsPassed	;Find out what player is reading	if doOnce2 == 0		set refBook to GetActiveMenuObject 1026		set refName to GetName refBook		set Skill to GetBookSkillTaught refBook		printc "Debug >> MenuMode 1026 active object: %z, FormID %i, Timer Started: %.5f" refName, refBook, Timer	;Check if reading from player's inventory. If not, it won't count so skip processing.		if Player.GetItemCount refBook == 1 && doOnce == 0			printc "Debug >> Active object is in inventory.  Begin processing."			;Check if book has been read before.			if eval ar_HasKey aaior01.StartedToRead refName				printc "Debug >> Object: '%z' was already in arrays." refName				message "I may have already read this.  Maybe I should read it again later."						else				;set common array variables 				let aaior01.StartedToRead[refName] := 1				let aaior01.Thymaneded[refName] := 1				let aaior01.SkillTaught[refName] := Skill				let aaior01.EditID[refName] := refBook				if GetBookIsScroll refBook					let aaior01.BookType[refName] := 3					printc "Debug >> Scroll: '%z' added to the arrays." refName											elseif Skill > -1					let aaior01.BookType[refName] := 2					printc "Debug >> SkillBook: '%z' added to the arrays." refName								else						let aaior01.BookType[refName] := 1					printc "Debug >> Book: '%z' added to arrays." refName				endif			endif		else;			printc "Debug >> Active object is not in inventory.  Not processed.";			message " I should pick this up and find a quiet place to read it."		endif	endif	if refBook	; if command in line 46 does not work (if I got your OBSE thread post)		set doOnce2 to 1		set refBook to 0	endif	let aaior01.HasReadFor[refName] := Timer	return	; Imortant !endbegin MenuMode	; clear temp variables after closing book	;	printc "Debug >> MenuMode (includes Console Access.)"	set Timer to 0	if doOnce2;		set refBook to 0		set doOnce2 to 0		ar_dump aaior01.StartedToRead		ar_dump aaior01.HasReadFor		ar_dump aaior01.BookType		ar_dump aaior01.Thymaneded		ar_dump aaior01.SkillTaught		ar_dump aaior01.EditID	endifend


There are probably errors as I gave up last night and haven't worked on it today as yet.
Having a problem with GetBookSkillTaught. All it seems to return is -1 or 1 depending on whether i use
GetBookSkillTaught refBook or refBook.GetBookSkillTaught.
I thought it worked before, but maybe I have the syntax wrong.
User avatar
ZzZz
 
Posts: 3396
Joined: Sat Jul 08, 2006 9:56 pm

Post » Tue May 17, 2011 12:55 pm

the last thread got closed right after i had posted my question so people couldnt see it to respond. i hope it is ok then to repost it here in the continuing thread. also, if my questions are ever too complicated for the quick answers thread let me know and i will move it to another thread. XD

original question~

washington, on 16 August 2010 - 05:27 AM, said:

They use pathgrid as it is, no need to alter anything. But if another mod changes pathgrid in same cell and loads after yours it will overwrite your changes.
Also if you delete vanilla stuff in your plug-in, use TES4Edit's Undelete & disable function to prevent bad things that could happen if another mod uses stuff you have deleted.


thanks! i will try to remember the tes4 edit thingie when i get to the point im ready for it.

for the record, i did intend on moving a lot of vanilla dungeon entrances. im thinking about doin this by disabling the door link on the entrance in the tamriel world space. example- the cave entrances are basically a huge rock with a door on them. i could disable that door then place an even bigger rock on top of it to hide the original entrance. then place a new rock with a new door relinked to the interior matching cell in the location i want it to be. is there any reason this would not work?

in the instance when an npc has programming/quest to follow and needs to walk to the dungeon entrance, as long as pathgrids are properly in place would there be any problems?

to be more clear, the locations i plan to move the dungeons are actually located in a seperate world space which would greatly expand the wilderness between cities of vanilla oblivion. is there a trick to getting the npc's to follow proper pathgrids through the gate/door link between these world spaces?

as a visual aid to what i plan to do:

chorral city - added walls and gateway halfway to the imperial city with a door linked to - new world space (dungeons moved here) - gateway with door link to original tamriel near imperial city - imperial city

for even better visual aid ( i hope) i do have a very very rough map i drew in paint (im not so good with drawing with my mouse lol) that i can upload if i can ever figure out how to upload onto this site lol. or maybe i can send it to someone upon request.

thanks for your time! XD
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Tue May 17, 2011 8:36 am

Here's a quick question. I want to modify a mod so that broken armor will be dropped from a player to the ground (as if it broke and fell off). I'd like to use the Drop or DropMe commands, but I've read that both of those commands reset an item's health. Obviously it'd be a bad thing for supposedly broken armor to go back to 100% health as soon as it's dropped!

Is there any way to get a weapon, armor, etc. to drop from the player's inventory without having the item's stats reset?
User avatar
Robert
 
Posts: 3394
Joined: Sun Sep 02, 2007 5:58 am

Post » Tue May 17, 2011 4:39 am

Hey I've got a quick question, how do I add my own bounty? Right now I've got my own world space with its own jail and prison markers, and the door leading to and exiting from this place is closely modeled off of the shivering isles door, however I don't want to use the shivering isles bounty if i disable tamriels, how can i track my own bounty and have it show up in the stats screen?
User avatar
City Swagga
 
Posts: 3498
Joined: Sat May 12, 2007 1:04 am

Post » Tue May 17, 2011 3:07 pm

How do I stop the landscape from locking up and not letting me put down textures? :(
User avatar
Code Affinity
 
Posts: 3325
Joined: Wed Jun 13, 2007 11:11 am

Post » Tue May 17, 2011 12:25 pm

Here's a quick question. I want to modify a mod so that broken armor will be dropped from a player to the ground (as if it broke and fell off). I'd like to use the Drop or DropMe commands, but I've read that both of those commands reset an item's health. Obviously it'd be a bad thing for supposedly broken armor to go back to 100% health as soon as it's dropped!

Is there any way to get a weapon, armor, etc. to drop from the player's inventory without having the item's stats reset?


How about using GetPCLastDroppedItemRef to get the reference of the thing you dropped, and SetCurrentHealth to edit the health of that reference?
User avatar
Stephy Beck
 
Posts: 3492
Joined: Mon Apr 16, 2007 12:33 pm

Post » Tue May 17, 2011 10:35 am

How about using GetPCLastDroppedItemRef to get the reference of the thing you dropped, and SetCurrentHealth to edit the health of that reference?


Brilliant! Thanks for the tip, I'll give that a try.
User avatar
Breautiful
 
Posts: 3539
Joined: Tue Jan 16, 2007 6:51 am

Post » Tue May 17, 2011 3:21 pm

How do I stop the landscape from locking up and not letting me put down textures? :(

Never did any landscape ever so just a wild guess - remove some of the textures already applied ? the question has been asked before IIRC - you have to make them visible somehow
EDIT : http://www.gamesas.com/index.php?/topic/1107157-having-problems-with-landscape-editor/page__view__findpost__p__16213528
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Tue May 17, 2011 7:28 am

This is pretty dumb, but CS won't start at all. It just says, "A problem has caused the program to stop working". I've searched on the internet for hours and it seems that I'm the only one with this problem. I'm using Vista and Oblivion runs perfectly fine. Help a noob out here? D:
User avatar
Colton Idonthavealastna
 
Posts: 3337
Joined: Sun Sep 30, 2007 2:13 am

Post » Tue May 17, 2011 9:19 am

What is the best way to determine if an actor is a companion? I know there's a GetFollowers function in OBSE, but do any of you know if this will reliably work with companions (modded or vanilla)?
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am

Post » Tue May 17, 2011 1:37 am

Is there a way to quickly view every addition/change in an .esp file?
I'm sure there was a way to do this for the Morrowind CS but i can't find an option for the Oblivion one.
Trying to fix someone elses mod but i can't really see where to start.
User avatar
Patrick Gordon
 
Posts: 3366
Joined: Thu May 31, 2007 5:38 am

Post » Tue May 17, 2011 6:47 am

Is there a way to quickly view every addition/change in an .esp file?
I'm sure there was a way to do this for the Morrowind CS but i can't find an option for the Oblivion one.
Trying to fix someone elses mod but i can't really see where to start.

the detail button on the data window - but better use TES4EDIT
User avatar
Tasha Clifford
 
Posts: 3295
Joined: Fri Jul 21, 2006 7:08 am

Post » Tue May 17, 2011 5:32 am

Is there any way modders can "protect" their mods so they cant be edited? I'm very new to the CS shennanigans, but I can load Oblivion.esm, make some changes, save it, create the new .esp no problem. Load the .esp, everything works. When I load Oblivion.esm and DLCfrostcrag.esp (Specifically frostcrag reborn) and make changes, the file wont save. It asks for a name, it creates the file, and then the word "Saving..." appears at the bottom of my screen for ever and ever (I tried waiting over night.)

The esp I'm creating usually sits at 0.00 kb, but its gone up to 3.17 once, then down to 1.7...but it usually just sits at 0.00, while the CS uses 0 CPU and memory. After waiting a decently long time, I can go to Data and open the esp I created, but it says either the header information is wrong, or something about file size being bad and I need to truncate it (Forgot to write down that error...go me)

All I'm changing is a single line in a single script. What do?
User avatar
Alan Whiston
 
Posts: 3358
Joined: Sun May 06, 2007 4:07 pm

Post » Tue May 17, 2011 3:36 am

the detail button on the data window - but better use TES4EDIT


You are a life-saver. Thank you! :goodjob:
User avatar
Nice one
 
Posts: 3473
Joined: Thu Jun 21, 2007 5:30 am

Post » Tue May 17, 2011 3:03 pm

Is there any way modders can "protect" their mods so they cant be edited? I'm very new to the CS shennanigans, but I can load Oblivion.esm, make some changes, save it, create the new .esp no problem. Load the .esp, everything works. When I load Oblivion.esm and DLCfrostcrag.esp (Specifically frostcrag reborn) and make changes, the file wont save. It asks for a name, it creates the file, and then the word "Saving..." appears at the bottom of my screen for ever and ever (I tried waiting over night.)

The esp I'm creating usually sits at 0.00 kb, but its gone up to 3.17 once, then down to 1.7...but it usually just sits at 0.00, while the CS uses 0 CPU and memory. After waiting a decently long time, I can go to Data and open the esp I created, but it says either the header information is wrong, or something about file size being bad and I need to truncate it (Forgot to write down that error...go me)

All I'm changing is a single line in a single script. What do?

No, there is no protection. That's one of the things that a lot of modders wish they could do. But that's another tale in itself.

The CS barfs when an esp is a master to another esp. The CS wants only an esm to be a master.
Use Wrye Bash to esmify the DLCFrostcrag.esp (right click and select Esmify self).
Open up the CS, make your change to Frostcrag Reborn, save it.
Open Bash and right click DLCFrostcrag and select Espify self.

Your change should now show up in-game.
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Tue May 17, 2011 12:17 pm

No, there is no protection. That's one of the things that a lot of modders wish they could do. But that's another tale in itself.

The CS barfs when an esp is a master to another esp. The CS wants only an esm to be a master.
Use Wrye Bash to esmify the DLCFrostcrag.esp (right click and select Esmify self).
Open up the CS, make your change to Frostcrag Reborn, save it.
Open Bash and right click DLCFrostcrag and select Espify self.

Your change should now show up in-game.


Welp, that didnt work...same issue, but it did lead me to the magical de-isolation tutorial, since I knew what the problem was...using TES4Edit worked, so happy days. Thanks much
User avatar
Emmie Cate
 
Posts: 3372
Joined: Sun Mar 11, 2007 12:01 am

Post » Tue May 17, 2011 9:20 am

I'm a bit confused again...
Can someone please clarify?

GetGameLoaded
Returns true if a savegame has been loaded since the function was last called.


GetGameRestarted
Returns true if it is the first time the calling script has run since the player exited and restarted Oblivion.


Is there a difference between "since the function was last called" and "if it is the first time the calling script has run"?

Would it be better to just use the following?
if GetGameLoaded || GetGameRestarted;do stuffendif


Thanks

Another question...
Is it possible to force a quest or a script to run while the game is loading from startup or a reloaded save?
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm

Post » Tue May 17, 2011 11:58 am

Is there a difference between "since the function was last called" and "if it is the first time the calling script has run"?

Would it be better to just use the following?
if GetGameLoaded || GetGameRestarted;do stuffendif

Another question...
Is it possible to force a quest or a script to run while the game is loading from startup or a reloaded save?
These are rather subtle matters - better ask in the OBSE thread - I mean I have never used the functions and know not the possible gotchas - otherwise it is rather simple : GetGameLoaded : when you load a game - the first time the script is run since reload
/ GetGameRestarted : when you start the game - the first time the script is run - once per game session.
GetGameLoaded || GetGameRestarted : may break things or be reduntant - depends on what you want to do
As per second question : http://www.gamesas.com/index.php?/topic/1109330-relz-oblivion-script-extender-obse-0018/page__view__findpost__p__16279630
User avatar
tannis
 
Posts: 3446
Joined: Sat Dec 09, 2006 11:21 pm

Post » Tue May 17, 2011 12:53 am

Is it possible to generate map from an existing worldspace? it I recall there was a 'generate map' function on the CS but it doesn't seem to do anything.
User avatar
yermom
 
Posts: 3323
Joined: Mon Oct 15, 2007 12:56 pm

Post » Tue May 17, 2011 3:10 pm

Never did any landscape ever so just a wild guess - remove some of the textures already applied ? the question has been asked before IIRC - you have to make them visible somehow
EDIT : http://www.gamesas.com/index.php?/topic/1107157-having-problems-with-landscape-editor/page__view__findpost__p__16213528

Thank you so much! I thought my CS was buggy. :] Now I can have mud in my pond.
User avatar
Vicki Blondie
 
Posts: 3408
Joined: Fri Jun 16, 2006 5:33 am

Post » Tue May 17, 2011 2:12 am

Hi!

So i recently returned from my oblivion abscence and decided to mod again. I can handle simple scripts well enough, but some of my more ambitious ideas are... Well, not working.

There are two scripts that cause some issues:

The first one is a spell;

It should increase (As in: You can attack faster with it.) the weapon speed of my current weapon when cast and once it ends it shall set it back to normal. (Since i intend to use it only for bows and those have a weapon speed of 1, i just used 1 in that case.)

Spoiler
scn Volley

ref weapon
short weaponspeed

Begin ScriptEffectStart

Set weapon to GetSelf
Set weaponspeed to 0.5
weapon.SetWeaponSpeed weaponspeed

end

Begin ScriptEffectFinish

Set weapon to GetSelf
Set weaponspeed to 1
weapon.SetWeaponSpeed weaponspeed


End


My second script is another spell-

When cast it should apply a poison to my currently equipped weapon- And the poison shall instantly be reapplied again and again whenever the player hits something (Without message box or something.). The spell should end automatically once the players magicka reaches 0 or when he casts the spell again.

I decided to govern this with queststages; But if theres another, easier, solution please tell me.

Spoiler
scn weappoisonsc

begin scripteffectstart
if questID.on == 0
set questID.on to 1
else
set questID.on to 0
endif
end


Spoiler
scn weappoisionQsc
short on
float fquestdelaytime

begin gamemode
if on == 1
set fquestdelaytime to 0.001
if player.getav magicka > 0
;HERE WILL BE THE POISON SCRIPT
player.modav magicka -1
else
set on to 0
endif
elseif on == 0
set fquestdelaytime to 5
set on to -1
endif
end


However, i have no idea how to manage that whole "Apply poison to the weapon and poison it again whenever i hit something" stuff. Could someone post an example?

I have access to obse. ;)

Thanks for your time.
User avatar
Isaiah Burdeau
 
Posts: 3431
Joined: Mon Nov 26, 2007 9:58 am

Next

Return to IV - Oblivion