Morferous Posted October 6, 2016 Posted October 6, 2016 Hello, everybody. I have been starting with Papyrus scripting, but I found myself hitting the wall. I think it is better to man up and ask for help than spend few more weekends staring at the wall. Background I really don't have a lot of experience using Skyrim scripts. I grasped basics from tutorials and reading through other peoples, but you can freely call me as a complete beginner. I have used scripts to mod games in the past, mainly with old Infinity engine games and Neverwinter Nights seriers. Papyrus is beast of it's own and more complex than what I have worked before. I am a kind of person, who sometimes has a hard time to get started, but I usually get in speed after that. What I am trying to do? Right now I am trying to create an adult nature scripting practice mod. I am trying to get in to speed how to target female characters according to their base clothing faction and then change their outfits. I have stared Creation Kit tutorials, mods like Clothing and Clutter Fixes and For the Masses (etc.), but the amount of scripts and MCM options has made it hard to figure out what is relevant and what is not. Current plan: Check the female sex and clothing class, like it is done in FtM: Low-Class, Armored, Beggar, Noble etc. Switch the target using CK made outfits made for those factions. I don't mind variety in already existing clothing, so I formed them in several sets of leveled lists in CK. Create few exceptions for this. For example: Adrianne and Ahlam should have their own unique outfits. Nazeem is a bit snobby snot and Ahlam always complains how males treat their females like a cattle, so... I kind of wanted to make that true in her case. I would want to make some changes to Adrianne as well, but I don't really want her working around the forge in farm clothes, so I need to make an exception there. Do you guys have any advises which scripts or tutorials I should be looking more closely, or any other scripting advice how to accomplish this? Of course I could just go and edit each character in CK, but I indeed meant this as a scripting practice.
Content Consumer Posted October 6, 2016 Posted October 6, 2016 Check the female sex and clothing class, like it is done in FtM: Low-Class, Armored, Beggar, Noble etc. Once you have a script that targets an actor (in whatever way you do that - dialogue, spell, etc) it's easy enough to do something like if (target is female) and if (target is wearing low-class clothing) then do (switch outfits) I don't know how off the top of my head to detect low-class, armored, beggar, etc. but I'd imagine it's just looking at their current outfit. Switch the target using CK made outfits made for those factions. I don't mind variety in already existing clothing, so I formed them in several sets of leveled lists in CK. The code would look like this: target.setoutfit(myoutfit) Where "target" is the NPC you're changing, and "myoutfit" is the outfit you've set up. Create few exceptions for this. if (target is adrianne) then (skip this part of code) else (do this part of code) This is all pseudocode here, so if you're looking for concrete examples it might not be much help. There might be a better way to do it than with a bunch of if/else statements, but brute-force like this works too. I can give exact examples, but not until later tonight... Do you guys have any advises which scripts or tutorials I should be looking more closely, or any other scripting advice how to accomplish this? I have a modding questions support thread going, I can add you if you'd like. Knowledge ranges from "how do you start the Creation Kit thing" to much more advanced stuff.
Morferous Posted October 6, 2016 Author Posted October 6, 2016 Check the female sex and clothing class, like it is done in FtM: Low-Class, Armored, Beggar, Noble etc. Once you have a script that targets an actor (in whatever way you do that - dialogue, spell, etc) it's easy enough to do something like if (target is female) and if (target is wearing low-class clothing) then do (switch outfits) I don't know how off the top of my head to detect low-class, armored, beggar, etc. but I'd imagine it's just looking at their current outfit. Switch the target using CK made outfits made for those factions. I don't mind variety in already existing clothing, so I formed them in several sets of leveled lists in CK. The code would look like this: target.setoutfit(myoutfit) Where "target" is the NPC you're changing, and "myoutfit" is the outfit you've set up. Create few exceptions for this. if (target is adrianne) then (skip this part of code) else (do this part of code) This is all pseudocode here, so if you're looking for concrete examples it might not be much help. There might be a better way to do it than with a bunch of if/else statements, but brute-force like this works too. I can give exact examples, but not until later tonight... Do you guys have any advises which scripts or tutorials I should be looking more closely, or any other scripting advice how to accomplish this? I have a modding questions support thread going, I can add you if you'd like. Knowledge ranges from "how do you start the Creation Kit thing" to much more advanced stuff. I could do with "if target is female", but that would mix up with base clothing. For example, Aela might walk around fighting giants and whatnot in farm clothes. Same goes for Stormcloak guards and Imperial soldiers. This is why I wanted to target female characters according to their base gear. Although, Sex+Class might work as well. Hmm... Do I need to call all outfits in a script? I picked that from Clothing and Clutter Fixes. I will try to fiddle with scripts today, but I likely would do with concrete examples. I spent time reading through Actor Scripts from CK wiki, but Papyrus is still quite alien to me. I would like to get familiar with it. If you have a thread, then I will be happy to take part. I had not noticed that.
Content Consumer Posted October 6, 2016 Posted October 6, 2016 I could do with "if target is female", but that would mix up with base clothing. You can either do something like this: If (target is female) and (target is wearing X) then (do this) Which will only do your code if both conditions are met (female and wearing X) Or this: If (target is female) if (target is wearing X) then (do this) Which does the same thing. Do I need to call all outfits in a script? If you want to change them on the fly, yes. Take a look at the coco_givebook_intro script in the Devious Manual, that gives an example. It's a main quest script, so it's chock full of stuff that doesn't matter to your situation, but the properties and lines to change outfits are in there. If you have a thread, then I will be happy to take part. I had not noticed that. I'll send you an invite.
Guest Posted October 6, 2016 Posted October 6, 2016 Check the female sex and clothing class, like it is done in FtM: Low-Class, Armored, Beggar, Noble etc. Switch the target using CK made outfits made for those factions. I don't mind variety in already existing clothing, so I formed them in several sets of leveled lists in CK. Create few exceptions for this. For example: Adrianne and Ahlam should have their own unique outfits. Nazeem is a bit snobby snot and Ahlam always complains how males treat their females like a cattle, so... I kind of wanted to make that true in her case. I would want to make some changes to Adrianne as well, but I don't really want her working around the forge in farm clothes, so I need to make an exception there. First of all, download my Papyrus guide to have a full reference of all the language. Check sex and clothing class: Outfit Property anOutfitToCheck Auto bool Function checkSexOutfit(Actor npc) if npc.getLeveledActorBase().getOutfit(false)==anOutfitToCheck && npc.getSex()==1 return true endIf return false EndFunction Outfit Property anOutfitToUse Auto Function replaceOutFit(Actor npc) npc.getLeveledActorBase().setOutfit(anOutfitToUse) ; Warning, do not use on generic actors, or all of them will get a replaced outfit. It is safe for specific actors EndFunction Actor Property svana Auto Actor Property haelga Auto Function withExceptions(Actor npc) if npc!=svana && npc!=haelga ...blah... endIf EndFunction
Morferous Posted October 6, 2016 Author Posted October 6, 2016 First of all, download my Papyrus guide to have a full reference of all the language. Thank you. I downloaded the guide and will give it a good read tonight. I also used your Notepad++ data to setup highlights there. I can't get Notepad++ to format the code (not sure if it is supposed to do that for Papyrus), but highlights do work now. That already helped a lot.
Guest Posted October 6, 2016 Posted October 6, 2016 First of all, download my Papyrus guide to have a full reference of all the language. Thank you. I downloaded the guide and will give it a good read tonight. I also used your Notepad++ data to setup highlights there. I can't get Notepad++ to format the code (not sure if it is supposed to do that for Papyrus), but highlights do work now. That already helped a lot. Never implemented a code formatter for Papyrus language in NP++, but it looks like a good idea. I will do it when I will have time.
Content Consumer Posted October 6, 2016 Posted October 6, 2016 First of all, download my Papyrus guide to have a full reference of all the language. Thank you. I downloaded the guide and will give it a good read tonight. I also used your Notepad++ data to setup highlights there. I can't get Notepad++ to format the code (not sure if it is supposed to do that for Papyrus), but highlights do work now. That already helped a lot. Never implemented a code formatter for Papyrus language in NP++, but it looks like a good idea. I will do it when I will have time. http://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup
Guest Posted October 6, 2016 Posted October 6, 2016 http://www.creationkit.com/index.php?title=Notepad%2B%2B_Setup No, thanks. My Config for NP++ for Papyrus is way more advanced. The item that is missing is an "Auto formatting" option. Like an auto indent.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.