Difference between revisions of "User talk:Haama"
imported>Haama |
imported>Haama m (→Things to do: Active Menu Function Notes) |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 44: | Line 44: | ||
#Re-categorize functions | #Re-categorize functions | ||
#Add Actor Value code to relevant OBSE magic functions. | #Add Actor Value code to relevant OBSE magic functions. | ||
#Make a ParentRef page | |||
#Figure out Tap/Disable keys for GetKeyPress and OnKeyDown | |||
#Things to add to Gotchas! | |||
#*Extra flags will cause the script to stop running (until you load another game), once it hits that function. | |||
#*A non-existent record (i.e., object removed from mod, but mod not removed) will cause the script to stop running. Don't remember if it will run on a new load (IIRC, it doesn't), but will certainly work once player exits and restarts Oblivion. | |||
#*Stuff about deleting variables and records - basically they will get a new ID, even if they have the same name. | |||
#Input guide | |||
#*When disabling a key, need to keep disabling it. No stack/registery system between mods so another mod needs to be able to disable/enable without knowing of your mod. | |||
#**No real reason to disable at this point - Is---Pressed will detect things like Activate "before they happen" (i.e., before a container is opened after Activate). Should note that this is limited to Keyboard and, if using IKP2, LMB, MMB, and RMB. | |||
#*Check TapKey and various detection functions again - probably tested in the same frame... | |||
#*Test MenuTapKey - is it obsolete? <Esc> doesn't work for sure, and requires TapKey instead. | |||
#*Note on On---Down - shouldn't keep it in a condition, as it will only reset if it runs while the player isn't holding the button. | |||
#*Detecting keys in a menu - Need to set a variable first or in the same line. GetKeyPress might work without it. | |||
#*Note the two different systems - DirectX and VK. The first seems to detect the press a frame after the second, might have faster processing. DX - IKP2, mouse keys for IKP3 and Downs, maybe GKP. | |||
#*TapKey - might not do anything while the button is being pressed. | |||
#* | |||
#Active Menu Function Notes | |||
##GetAMFilter | |||
##*The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set | |||
##GetAMMode | |||
##*The Active Menu Mode returned by this function will be assumed by the other Active Menu functions when the optional MenuMode flag isn't set | |||
##**Test | |||
##**#Start this quest and the TestGetActiveMenuObject quest, open the Alchemy menu | |||
##**#GetActiveMenuObject will return the correct potion ID only when this function returns 1040 | |||
##*Alchemy menu (1040) - Will only return 1040 while a box is highlighted (Text box, Ingredient selection, Create, Close) | |||
##*Sub-Alchemy menu for ingredients (1035) - Will only return 1035 while the mouse is over the menu, 0 otherwise (even when it's over the Alchemy menu below it) | |||
##GetAMObject | |||
##*The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set | |||
##*Alchemy | |||
##**Need to use the MenuMode flag (see GetActiveMenuMode for reason) | |||
##**It seems like Oblivion creates a new base potion ID just in case it's needed | |||
##**#When you first start up the menu you'll see a new ID (i.e., FF00035) | |||
##**#If you create a new potion (i.e., new effects and/or strength) | |||
##**#*A potion with the ObjectID will be added to the player's inventory | |||
##**#*Oblivion will make a new potion ID, and this function will return the new ID (i.e., FF00036) | |||
##**#**Even if the player doesn't increase their Alchemy and the effect strengths remain the same | |||
##**#If you create an old potion (have already created a potion with the same effects and strength in the Alchemy menu) | |||
##**#*The potion that is added to the player's inventory IS NOT the same as the ID returned by this function | |||
##**#**You will need to scan the player's inventory for the old potion - script | |||
##**#*The ID returned by this function WILL NOT CHANGE - meaning you can't use this function to detect new potions | |||
##GetAMRef | |||
##*The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set | |||
##*Returns the reference of the object in the world (container, book, etc.) | |||
##**Returns 0 if the menu was opened from an item in inventory (book) | |||
##GetAMSelection | |||
##GetAlchMenuIng | |||
##*Returns the base object ID | |||
##*Returns the correct ID, even when GetActiveMenuMode returns 0 (see RefTypeGetActiveMenuModeScript for more info) | |||
##GetAlchMenuIngCount | |||
##*Returns -1 when the Alchemy menu isn't open | |||
##*When the ingredient isn't set returns a large negative number | |||
##**This number makes testing a bit weird and both of these tested true, even though they weren't | |||
##***if ((GetAlchMenuIngredientCount WhichIng) != IngCount) | |||
##***if ((GetAlchMenuIngredientCount WhichIng) >= -1) | |||
##***Using a long instead of a short still returned the same number, never tried whether the tests would behave correctly but I would assume not | |||
##**Returns the correct quantity, even when GetActiveMenuMode returns 0 | |||
===Done=== | ===Done=== | ||
Line 115: | Line 173: | ||
\frac{2}{4}=0.5 | \frac{2}{4}=0.5 | ||
<math>\left ( \frac{1}{2} \right )</math> | |||
<math>\sqrt{2}</math> | |||
== Loaded information == | == Loaded information == | ||
Line 136: | Line 198: | ||
::Try a [[Welcome to Wiki Syntax#Reverting|Revert]]. | ::Try a [[Welcome to Wiki Syntax#Reverting|Revert]]. | ||
::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 02:53, 20 January 2008 (EST) | ::[[User:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">D</span>ragoon <span style="font-family: Oblivion, Daedric Runes; size=2;">W</span>raith]] [[User_talk:DragoonWraith|<span style="font-family: Oblivion, Daedric Runes; size=2;">TALK</span>]] 02:53, 20 January 2008 (EST) | ||
== Notes == | |||
===0'ed reference=== | |||
Using | |||
<pre>ref pMortPest | |||
ref pCont | |||
... | |||
player.RemoveItem pMortPest 1 | |||
pCont.AddItem pMortPest 1</pre> | |||
added the item back to the player, rather than doing nothing or to self (object with script was a container) | |||
== Mod link test == | |||
{{TESNexus|10147|Alchemical Formulas}} | |||
{{PES|2610|Alchemical Formulas}} | |||
{{ElricM|3743|Morrowind Ingredients}} |
Latest revision as of 02:57, 9 July 2008
Got a question? Put it here and I'll try to respond (on your page :P)[edit source]
Two questions / suggestions[edit source]
1. Would it be difficult to add one more icon to your OBSE Alchemy Sorter that allowed you to get all the ingredients that had one of the 4 effects that was a custom script?
2. Would it make sense to be able to invoke the potion making dialog directly from the alchemical sorter, so when you finish or abort one formula you're set to continue with the game still paused.
Morris 20:19, 15 January 2008 (EST)
- I'll respond here and on your page. While I appreciate the questions, they would be better suited on the Bethesda forums in the COBL thread; please ask the questions there. Also, I don't quite understand the first question; please expand on it in your post (in particular, do you mean an object script or a script on a scripted effect?).--Haama 22:44, 15 January 2008 (EST)
Hi Hamma,[edit source]
Oblivion Crazy from the forums here, I've been using the player.moveto command in my scripts from an object script using a beginning GameMode statement. Whenever I use it teleport to an interior I get a "Crash to Desktop" CTD. However when teleporting outside it seems to be ok.
Have you had any experience of this problem? --Slug 07:13, 11 January 2008 (EST)
Things to do[edit source]
- Remove questions
- Articles for Troubleshooting
- Interesting info
- Tutorial comments
- Should be on the wiki - quick answer?
- Might bridge together the Mod Isolation, Connecting plug-ins and other similar articles.
- Write up information on how to remove/add items without causing lag.
- Write up new Avoiding Message Spam article, rename old one.
- Load definition - might split it into persistent/non-persistent and script runnings sections.
- Update OBSE Wishlist with String and Array functions.
- Look through scripting subsections.
- Update the Global Scripts article to include persistent activators.
- Update Reference Variables
- More thoughts - need to reorganize the Variable section completely
- Have a variable splash page that mentions Global variables and Script variables, with a special warning on Game Settings
- Script variables - splash page with details on usage, declaration, variable indexes (including deleting and adding back a variable and adding variables in master/child situations), types (might make these into separate pages) - should include the set function as well, variables init at 0 but will stay at whatever setting when script is called again
- Re-categorize functions
- Add Actor Value code to relevant OBSE magic functions.
- Make a ParentRef page
- Figure out Tap/Disable keys for GetKeyPress and OnKeyDown
- Things to add to Gotchas!
- Extra flags will cause the script to stop running (until you load another game), once it hits that function.
- A non-existent record (i.e., object removed from mod, but mod not removed) will cause the script to stop running. Don't remember if it will run on a new load (IIRC, it doesn't), but will certainly work once player exits and restarts Oblivion.
- Stuff about deleting variables and records - basically they will get a new ID, even if they have the same name.
- Input guide
- When disabling a key, need to keep disabling it. No stack/registery system between mods so another mod needs to be able to disable/enable without knowing of your mod.
- No real reason to disable at this point - Is---Pressed will detect things like Activate "before they happen" (i.e., before a container is opened after Activate). Should note that this is limited to Keyboard and, if using IKP2, LMB, MMB, and RMB.
- Check TapKey and various detection functions again - probably tested in the same frame...
- Test MenuTapKey - is it obsolete? <Esc> doesn't work for sure, and requires TapKey instead.
- Note on On---Down - shouldn't keep it in a condition, as it will only reset if it runs while the player isn't holding the button.
- Detecting keys in a menu - Need to set a variable first or in the same line. GetKeyPress might work without it.
- Note the two different systems - DirectX and VK. The first seems to detect the press a frame after the second, might have faster processing. DX - IKP2, mouse keys for IKP3 and Downs, maybe GKP.
- TapKey - might not do anything while the button is being pressed.
- When disabling a key, need to keep disabling it. No stack/registery system between mods so another mod needs to be able to disable/enable without knowing of your mod.
- Active Menu Function Notes
- GetAMFilter
- The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set
- GetAMMode
- The Active Menu Mode returned by this function will be assumed by the other Active Menu functions when the optional MenuMode flag isn't set
- Test
- Start this quest and the TestGetActiveMenuObject quest, open the Alchemy menu
- GetActiveMenuObject will return the correct potion ID only when this function returns 1040
- Test
- Alchemy menu (1040) - Will only return 1040 while a box is highlighted (Text box, Ingredient selection, Create, Close)
- Sub-Alchemy menu for ingredients (1035) - Will only return 1035 while the mouse is over the menu, 0 otherwise (even when it's over the Alchemy menu below it)
- The Active Menu Mode returned by this function will be assumed by the other Active Menu functions when the optional MenuMode flag isn't set
- GetAMObject
- The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set
- Alchemy
- Need to use the MenuMode flag (see GetActiveMenuMode for reason)
- It seems like Oblivion creates a new base potion ID just in case it's needed
- When you first start up the menu you'll see a new ID (i.e., FF00035)
- If you create a new potion (i.e., new effects and/or strength)
- A potion with the ObjectID will be added to the player's inventory
- Oblivion will make a new potion ID, and this function will return the new ID (i.e., FF00036)
- Even if the player doesn't increase their Alchemy and the effect strengths remain the same
- If you create an old potion (have already created a potion with the same effects and strength in the Alchemy menu)
- The potion that is added to the player's inventory IS NOT the same as the ID returned by this function
- You will need to scan the player's inventory for the old potion - script
- The ID returned by this function WILL NOT CHANGE - meaning you can't use this function to detect new potions
- The potion that is added to the player's inventory IS NOT the same as the ID returned by this function
- GetAMRef
- The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set
- Returns the reference of the object in the world (container, book, etc.)
- Returns 0 if the menu was opened from an item in inventory (book)
- GetAMSelection
- GetAlchMenuIng
- Returns the base object ID
- Returns the correct ID, even when GetActiveMenuMode returns 0 (see RefTypeGetActiveMenuModeScript for more info)
- GetAlchMenuIngCount
- Returns -1 when the Alchemy menu isn't open
- When the ingredient isn't set returns a large negative number
- This number makes testing a bit weird and both of these tested true, even though they weren't
- if ((GetAlchMenuIngredientCount WhichIng) != IngCount)
- if ((GetAlchMenuIngredientCount WhichIng) >= -1)
- Using a long instead of a short still returned the same number, never tried whether the tests would behave correctly but I would assume not
- Returns the correct quantity, even when GetActiveMenuMode returns 0
- This number makes testing a bit weird and both of these tested true, even though they weren't
- GetAMFilter
Done[edit source]
- Update 'Combining mods' article with new OBSE function, mod-mod limitations.
- Make a beta tag, add new OBSE functions.
- Write up the pluggy functions.
- Add link to hrmn's thread for processing information.
AddItem[edit source]
Create a remote persistent container in the CS. Add the items to the container, and then use RemoveAllItems to move them to the player.
UnEquipItem[edit source]
Create a token item in the CS. Set it to use the desired Biped Objects you wish to unequip. Add it to the player using the method above, and force equip it on the player.
- Dragoon Wraith TALK 18:25, 30 June 2007 (EDT): Equipping items causes message spam, so that won't help.
- Haama 20:32, 30 June 2007 (EDT): That's what I was thinking, but I swear I saw Guidobot mention a method like this on the ESF. I just can't remember the details.
Game Settings[edit source]
I was doing a bunch at a time and then setting the color afterwards. Its easier to cut and paste that way. I am also going through and checking on the ones that are already in there while I am at it and changing the template as needed.
--ShadowDancer 16:41, 28 July 2007 (EDT)
No Prob. I know how it goes. I asked him if he wanted me to add in the values but didn't hear back from him about it (though he answered my other note to him) so I figured I would go ahead and do it. It needs to be done at some point anyway, so if they are all in and a different color, should make things easy. LOL Oh, and at this point the list down to where I left off is checked as far as the game settings go. There were a couple that were wrong.
--ShadowDancer 17:16, 28 July 2007 (EDT)
Stuff for FormID page, maybe[edit source]
Reference vs. Base Record FormID[edit source]
Each object has two types of FormIDs:
- Base Record - The FormID in the Object Window. This FormID signifies the
- Reference - The ReferenceID when you edit/double click an object in the Render Window.
Inventory Manipulation[edit source]
Test category within a category Moving a subsection of an inventory Also make code for RemoveAllItems2
Random notes[edit source]
Once you disable the control - will IsKeyPressed continue to work? TapControl? TapKey?
OnControlDown - If you press the keyboard key, it won't return 1 past the 1st frame, but what happens if you press the mouse button before lifting the key? Write up an example
Keychain - instead of using a spell, use the cell reference functions to scan through doors. Maybe unlock all doors in the cell when the player enters it, if they've got the key?
Thanks[edit source]
Haama, thanks for documenting the new OBSE functions on the wiki. I'm sure it's tedious work, but it's appreciated. Also, re: OnControlDown - if you press the mouse button for a control while holding down the key for the same control, the function still returns zero until both are released and one is pressed again. Scruggs 09:32, 25 November 2007 (EST)
Thanks 2.[edit source]
Thanks for the help -- though I have no clue as to how to send PMs or anything, I figured this would resemble it -- by making a seperate entry for my problem. --Hugoku 18:03, 4 December 2007 (EST)
Deleted Article[edit source]
Leon_852 Just wanted to know if you kow anything about any deleted question articles as I believe one of my questions have (How do I bring up the inventory screen.) If you do know, please get back to me.
- Leon_852 Thanks Haama. I had no idea that it had been put there! I asked DragoonWraith if he knew where it was but he never got back to me. Oh well! Thanks again!
Math Format Tests[edit source]
Base Magnitude = [(EffectiveSkillLevel + MortQuality * fPotionMortPestleMult) / (EffectBaseCost / fPotionT1MagMult)] ^ [1 / (1 + fMagicCostScale)]
\left ( \frac{a}{b} \right )
\frac{2}{4}=0.5
Loaded information[edit source]
- Will running an object's script make it persistent?
- No, but I need to find the notes and see what conditions I tried
- When will an object's script run?
- What will make an object act like it's persistent?
About Future beta functions[edit source]
Hey Haama,
In the future, you may want to make a Template for functions of a given version of OBSE, and while that version is in beta include the Beta template in that template. Put the template in each of the functions that are in that version, and then when that version goes live, change the template to remove the Beta template. That will save you having to go back through each function.
Dragoon Wraith TALK 19:17, 19 January 2008 (EST)
- Trying it out. {{Beta}} Works perfectly - thanks DW! I'll leave the Beta tag in general (good for TSFC and Pluggy), and make new tags for new OBSEs.--Haama 02:03, 20 January 2008 (EST)
- One question, though - I couldn't rollback the template because I was the only editor. What was the best way to go back to the last edit? (I just used cut and paste, but that can't be the best method).
- Try a Revert.
- Dragoon Wraith TALK 02:53, 20 January 2008 (EST)
Notes[edit source]
0'ed reference[edit source]
Using
ref pMortPest ref pCont ... player.RemoveItem pMortPest 1 pCont.AddItem pMortPest 1
added the item back to the player, rather than doing nothing or to self (object with script was a container)
Mod link test[edit source]