Allannaa Posted March 9, 2017 Posted March 9, 2017 I could swear this has been asked and answered before, but I can't find the thread. Is it possible to use a form list in a script? For instance.... I want to make it possible to give a gift to any NPC. I'd write a "quest" that is start-game enabled, and probably "run once". I'd write "player dialog" such as, "Here, this is for you" or "I want you to have this". The NPC response would be "Wow, thanks!" for people; for dogs it might be "Bark, bark"; for horses it might be "Neigh" or something (you get the idea). Then they'd be your friend -- NOT your follower, you'd just have a better relationship rank with them. The "gift of charity" buff would be added. But here's the thing -- if it's a dog (or a named dog like Stump) -- well, I don't want to give it gold or skooma, right? I want to give chicken breast, or raw rabbit leg, or something. If it's a horse, I don't want to give it gold or meat, I want to give it an apple, or a carrot. If it's a child, I want to give sweets or a dollly or a wooden sword. If it's an adult, I want to give food or a piece of armour perhaps, or a flower. So, um.... How do I proceed? This is what I *think* I should be doing: (I'm actually not even sure where this should go -- Topic Info window?? Here, this is for you -- and the response in the "Response text"; then in the Conditions window Target is dog or horse, and the "remove item" and "add item" are from the dog or horse formlist?) game.getplayer().removeitem(gold, some amount, or do I do this as a float??) (what should go here??).additem(gold) game.getplayer().removeitem(chicken breast, or could I do "FormlistDoggies" ??) (what should go here??).additem(thing from formlist??) game.getplayer().addspell (gift of charity) if akspeaker.getrelationshiprank(Game.getPlayer()) < 1 akspeaker.setrelationshiprank(Game.getPlayer(), 1) endif MiscObject Property Gold Auto Potion Property apple02 Auto Spell Property charity Auto Am I on the right track? I tried googling this, and looking in the CK Wiki, but all I got was "watch this video" bullshit -- and I don't DO video, not on rural internet, and with a hearing problem, I don't. Do I even need a formlist? Or can I just do something that opens the player's inventory and allows the player to choose what to give the dog, kid, or random citizen? Do I even need a quest to add dialog?? Pretty sure I do, even if it's just the one line "Here, this is for you." let alone the ability to actually GIVE the item. Thanks!
Lodakai Posted March 9, 2017 Posted March 9, 2017 SirSalami has a dialog set up to give a gift to any npc in his mod here http://www.nexusmods.com/skyrim/mods/63874/? You could deconstruct his method for your own situation. His dialogue introduction is constrained by the condition that you do not wear a helmet when you initiate it. So if you want to mess around with it in game.. keep that in mind. Or remove the condition from the "Greetings.." dialogue. ETA: The editor ID of the gift giving portion is held within dialog topics 02008f0C and 02008f0D and refers to script Sirsal_sf_speechcraft_gift Further ETA: I double checked that mod... source files not included.. so you would need to depex it =/ or see if you can load it in CK
Lodakai Posted March 9, 2017 Posted March 9, 2017 This may help as well... https://www.creationkit.com/index.php?title=Complete_Example_Scripts Theres a script example for feeding a pet. Just search for show gift inventory on that page or click #18 on the index
Allannaa Posted March 9, 2017 Author Posted March 9, 2017 oh, drat. I don't have a PEX un-doer that I've ever gotten to work. I did look at the beggar stuff in the CK, though, and at the wilderness stuff. Now I'm even more confused lol It seems as if this *should* be simple, but um.... wow. ETA ooh, thanks for the link, I'll go look at that.
Lodakai Posted March 9, 2017 Posted March 9, 2017 Well if anything you can use his mod to see how he initiates the dialogue portion to call the script.. if that helps. (Referring to immersive speechcraft)
Lodakai Posted March 9, 2017 Posted March 9, 2017 Aha... found one.. This author included source script files. http://www.nexusmods.com/skyrim/mods/37495/?tab=2&navtag=http%3A%2F%2Fwww.nexusmods.com%2Fskyrim%2Fajax%2Fmodfiles%2F%3Fid%3D37495&pUp=1 Just extract from BSA.
Uncle64 Posted March 9, 2017 Posted March 9, 2017 My self have used the mod give gifts to anyone for one long time. Works well to give, let me say, contraceptive for female followers, If you are using Beeing Female. Check how it is done in that mod. Lodakai did give the link to it.
Allannaa Posted March 9, 2017 Author Posted March 9, 2017 Thanks, you two. Apparently I sorta am on the right track!
Allannaa Posted March 9, 2017 Author Posted March 9, 2017 All righty, this is what I have so far. Am I on the right track here? Should the "Spell Property" actually be the Gift of Charity spell? And I need to actually create the Formlist "GoodyList" and fill it with things allowed to be given. Actor Property PlayerREF Auto FormList Property AllaGoodiesList Auto Spell Property FavorJobsBeggarsAbility Auto Function GivePresent() AddInventoryEventFilter(GoodyList) ShowGiftMenu(True, AllaGoodiesList, False, False) RemoveAllInventoryEventFilters() EndFunction ;pops up Gift Menu so player can give something Event OnItemAdded(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer) If akSourceContainer == PlayerREF RemoveItem(akBaseItem,aiItemCount) ;to give the item to the NPC or animal ? If akspeaker.GetRelationshipRank(Game.GetPlayer()) == 0 akspeaker.SetRelationshipRank(Game.GetPlayer(), 1) ;to make NPC like player EndIf EndIf EndEvent FavorJobsBeggarsAbility.Cast(Game.GetPlayer(), Game.GetPlayer()) ;to add Gift of Charity buff
Recommended Posts
Archived
This topic is now archived and is closed to further replies.