-
Posts
65 -
Joined
-
Last visited
Everything posted by Mornedil
-
How do you properly add items to a merchant's container using papyrus scripts? What I've tried so far: I've made a script to add items to the vendor's container (and they show up when searching the chest), but as soon as I ask the vendor what's for sale, his inventory updates and the vendor's chest respawns without the added items. I've seen posts where people say you can add items to vendors like that, but it doesn't seem to work as expected. I've also read about the method to add items to LeveledItem lists with the AddForm function. However, it's hard to fully control the odds of the item appearing in the vendors stock like that, and not to mention this will add items to ALL vendors using that LeveledItem list.
-
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
I'm using it together with this code example to display a notification when the mod version updates, so I think a message might annoy the player I decided to multiply the decimal by 100 and turn it into an int, and it worked :smile: I might as well share the code, since it could be useful for any mod displaying the version number: Function ShowVersion(float fVersion) int whole = Math.Floor(fVersion) int decimal = Math.Floor((fVersion - whole) * 100) If( decimal < 10 ) Debug.Notification("MOD NAME version " + whole+".0"+decimal + " installed") Else Debug.Notification("MOD NAME version " + whole+"."+decimal + " installed") EndIf EndFunctionEDIT: Sorry cdcooley, I didn't see your anwer before I experimented it out myself, I was updating the previous page for replies. thanks though! I learned a lot from your post, it's a more versatile way of doing it that can be re-used for different things as well :> -
[LE] [Skyrim] All about Textures
Mornedil replied to Deleted133263User's topic in Skyrim's Creation Kit and Modders
I've made tons of textures for the Source engine, and I highly recommend this page for reference on different texture formats. I'm not sure if Skyrim supports all of those formats since I've never made a Skyrim texture, but that page is still useful for better understanding the difference. For example: DXT1: use this format for typical textures with no alpha channel.DXT3: use this format for typical textures with an alpha channel with sharp gradients.DXT5: use this format for typical textures with an alpha channel with smooth gradients. Then there are the BGR888 and BGRA8888 formats, which produce high-quality textures, but with huge file size. If they are even available for Skyrim, they should probably rarely (to never) be used on regular textures considering the game's medieval setting (meaning that irregularities in DXT textures caused by compression can easily be mistaken by the player as natural dirt, or not be noticed at all) -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
How do I concatenate a float into a string and only displaying 2 decimal points? For example: float pi = 3.14 Debug.Notification("Pi is equal to " + pi)And then rather than the string outputting "Pi is equal to 3.1400000" it would only be "Pi is equal to 3.14" -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
hmm, I think it's the follower who gets into the favor state, and there's no similar "isAskingForFavor" Only place I can think to look now is if there's maybe an actor value controlling it? Gonna search through it and hope for the best Edit: Well there's a "FavorActive" actor value listed under unused/obsolete, but I tried it anyway without luck -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
I have googled like crazy and haven't found anything pointing towards that either, so I'll stick to using a property. Kinda ironic though - Object oriented programming without being able to reference the object the script is placed on :laugh: -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
It does not seem to prevent it, I have "GetIsID Actor: Player == 1.00" as a conditional function for the perk owner on both perk entries. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
Thanks! I'll probably go with the TES5Edit method. Should be easy to lookup the correct path by searching in the creation kit. copy-pasting file paths does not seem to work, the box which displays a model's file path is grayed out in the editor. In the conditional function of a perk entry point, attached to the player. If you remember the 2 choice menu you helped me set up when activating an enchantment table :> I need to also to add conditional statements to those "activate" entry points. I found out that if you are in the "follower command mode", you can actually activate the choice popup menu from a distance when telling the follower to use the enchanting table (which makes you teleport to it instead). So I figured I'd have to add a conditional function to the entry points to prevent that. -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
Thanks! I thought I had caused some error, did not expect to have to edit an ini file to load an official game expansion Isn't there a way to reference the item running the script somehow? The removed item will always be the item the script is attached to. So I thought adding a property would be an extra unnecessary step when making more duplicates of the object, if it was somehow possible to look up the item the code is running on. -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
For some reason Creation Kit crashes while loading the Hearthfire master file, so can't take a look at that drafting table. But somehow using the GetItemCount condition solved it! Thanks mate Haha but the temporary item running the script is stuck in the inventory now. I've tried self.Delete() and Game.GetPlayer().RemoveItem(Self, 1, true), but the temporary item is still in the inventory. -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
I have one more question related to this: I have "fake disenchanting" recipes (basically a recipe which sets a global variable to 1). And I have conditional statements to only allow another recipe if the global variable has been set to 1. However, in order for the new recipe to appear on the workbench, I have to press Tab to exit and then press E on the workbench again. Is there a way to "refresh" the recipes that appear on the crafting menu while you're in it? Or maybe closing then quickly re-opening the menu? (which might refresh it) -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
What conditional statement should I use to detect if a player is currently giving commands to their follower? (the "command mode" you enter after you hold E on them or tell them "I need you to do something"). And anothe question: How the heck do you change the model for an item (in this case a misc item) into another default model. This bugs me to no end, the "model" field is grayed out and the only way seem to be to browse for a custom model. What bugs me even more is that when googling about it, all the results are asking about custom models rather than changing to another default model. -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
Sorry my bad, I didn't fully understand what you meant then,, it took some experimenting to figure it out. Now I finally have 2 options, one of them starts the vanilla enchantment feature, and the other activates a custom event that for now only shows a test notification. I think I'll be able to figure out the rest, but otherwise I will update this thread. Thanks for all the help :> -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
Thanks, that's a start. Found the right section in the script while searching for "PlaceAtMe"! I think I found something interesting related to the activation choice. In the perk itself (searching "glittering" in the creation kit), it has an Entry Point with the settings "Activate" and "Add activate choice". Hopefully it will lead me towards adding a new option to the enchant table -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
Found the script sources, but to be honest SPERG is way too heavyweight to find the functions I'm looking for. It feels like finding a needle in a haystack. And this is all the code for the crafting station in the Throwing Weapons Lite mod: Scriptname PRKF_000_JZBai_CraftingPerk_030FA3FA Extends Perk Hidden Function Fragment_0(ObjectReference akTargetRef, Actor akActor) CraftingStation.Activate(Game.GetPlayer()) EndFunction ObjectReference Property CraftingStation Auto But since that mod instantly crashes the creation kit, I can't see how it's used. -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
Thank you, I will check it out Edit: Well.. Throwing Weapons Lite crashes the Creation Kit, and the "edit script source" button is grayed out for the SPERG scripts. Edit2: Found script sources, they were placed in a different location -
LE Using enchanting tables to craft items?
Mornedil replied to Mornedil's topic in Skyrim's Creation Kit and Modders
I've figured out where to place the script now, so the big problem now is how to change the "Bench Type" of the enchanting table depending on a popup message with 2 choices. The Furniture Script section of the wiki is completely empty of functions. -
LE Using enchanting tables to craft items?
Mornedil posted a topic in Skyrim's Creation Kit and Modders
I'm trying to use the existing enchanting table and turn it into an item crafting station. But I obviously don't want to mess with the enchanting feature, so my idea is that when the player presses E on the enchanting table, they're given a choice to either enchant normally or craft items. I figure the steps of achieving this would be something like: 1. check if player activates an enchanting workbench 2. cancel the enchantment workshop/crafting menu so it doesn't appear 3. Display a simple message with 2 options to choose from 4. depending on choice, either re-activate the normal enchantment menu or activate a custom crafting station menu But I have no idea which events and functions to use, or where to place the script. Any ideas where to start? I've tried using the OnPlayerUseWorkBench event to check if a player uses the workbench, but it doesn't seem to work Edit: scratch that, that was the wrong event. The OnSit event worked. But I still need to figure out how to cancel the furniture's default workbench type and give the choice to the player to use a different one. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
Is it possible to add something other than weapons and armor to an enchanting table? Like charging a roll of paper (misc item) with a soul gem to make a scroll. I realize this can be done at other crafting tables with crafting recipes, but I want the feature where you can use different sized soul gems to adjust power/charges or the created item. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
I must be on a different Magic Effect page, because it's not here. This (Category:Papyrus) is the page I use for script reference (and when clicking "next page" at the bottom) and it's not there either. As he said it is listed on the Magic Effect page. More specifically, the Magic Effect Script page. There has not been a page set up for the specific function as of yet, but it is listed on the script that SKSE added the function to. Wow, that page is extremely useful and is going to solve some other problems I've had with spell effects as well. There are a lot of functions in there which I couldn't find on the papyrus category page.. Actually, I can't even figure out how to navigate to that specific page by just browsing the wiki. Is it listed on some parent page or something? I'm wondering what other pages of functions I might be missing out on. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
I must be on a different Magic Effect page, because it's not here. This (Category:Papyrus) is the page I use for script reference (and when clicking "next page" at the bottom) and it's not there either. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
How you can look at some of the utterly game-changing mods out there and declare modding limited because a single form value can't be changed on the fly without SKSE is simply bewildering to me. Sorry, my mistake, I simply meant that the creation kit as a tool is more limited than I expected in certain areas. But hey, with enough effort most games can be modded even without a creation kit. Thank you by the way! But where did you find that function? I'm using ctrl+F to search for script functions on the creation kit wiki (which seems to lists SKSE funcitons as well) but was unable to find that one. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
The only time I've encountered it in vanilla skyrim was with the vampire skills, and it was confusing and annoying. Point of modding is to make the game better, so if something is bad in vanilla we should aim to fix it! And 4 times per spell is way too often, you'll get to 100 resets like that with 25 different spells. I only started with modding a few days ago, and so far it seems more limited than I expected.. Like with this thing. I mean it's just one variable that can be between 0 and 100, there should be some way to alter it during gameplay. -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
didn't seem to work. To be honest, I'm having trouble with conditional magic effects overall. The effect they have on enemies seem to work fine depending on conditions, but other things like what graphical effects are applied don't seem to care whether a condition is true or false. I can think of a few problems that would arise with that.. Like if the player have favorited or hotkeyed the previous spell, or even has it equipped.. It would be annoying if spells randomly "reset" like that and got removed from your favorites -
[LE] Quick Questions, Quick Answers
Mornedil replied to Elias555's topic in Skyrim's Creation Kit and Modders
Any reason you can't just edit the perk directly? No no I'm talking about spells, not a perk. For example the vanilla spell Frostbite is displayed in-game as a "novice" skill level perk, which in the CK is determined by the "minimal skill level" value in the Magic Effect editor. I'm looking to modify that variable for a spell instead of creating multiple different spells with a different skill level value. It's always bothered me in the vanilla game that there are so many different spells that do pretty much the same thing (like calm and it's more powerful versions). My intention is to use only one spell and increase it's power as the player levels up. So a spell may start with 10 magnitude but eventually get a magnitude of 100. At that point it would look silly if the spell still says "novice" in-game.