User talk:Haama

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

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]

  1. Remove questions
  2. Might bridge together the Mod Isolation, Connecting plug-ins and other similar articles.
  3. Write up information on how to remove/add items without causing lag.
  4. Write up new Avoiding Message Spam article, rename old one.
  5. Load definition - might split it into persistent/non-persistent and script runnings sections.
  6. Update OBSE Wishlist with String and Array functions.
  7. Look through scripting subsections.
  8. Update the Global Scripts article to include persistent activators.
  9. 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
  10. Re-categorize functions
  11. Add Actor Value code to relevant OBSE magic functions.
  12. Make a ParentRef page
  13. Figure out Tap/Disable keys for GetKeyPress and OnKeyDown
  14. 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.
  15. 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.
  16. Active Menu Function Notes
    1. GetAMFilter
      • The assumed MenuMode flag is -1, not 0 - meaning it needs to be -1 to mimic the flag not being set
    2. 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
          1. Start this quest and the TestGetActiveMenuObject quest, open the Alchemy menu
          2. 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)
    3. 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
          1. When you first start up the menu you'll see a new ID (i.e., FF00035)
          2. 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
          3. 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
    4. 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)
    5. GetAMSelection
    6. GetAlchMenuIng
      • Returns the base object ID
      • Returns the correct ID, even when GetActiveMenuMode returns 0 (see RefTypeGetActiveMenuModeScript for more info)
    7. 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[edit source]

  1. Update 'Combining mods' article with new OBSE function, mod-mod limitations.
  2. Make a beta tag, add new OBSE functions.
  3. Write up the pluggy functions.
  4. 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]

  1. Will running an object's script make it persistent?
    • No, but I need to find the notes and see what conditions I tried
  2. When will an object's script run?
  3. 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]

Template:TESNexus

Alchemical Formulas


Morrowind Ingredients