Jump to content

Anyone interested in helping a beginner write a script?


Recommended Posts

Hey LL Community!

 

I've been working on a simple armor/clothing mod for Fo4 that implements a system of mix-and-match clothing pieces. I was able to create something very basic using the different biped slots, however I feel that this system could be much more efficient and seamless for the user if the mod were able to run [what I think to be] a simple script on equipping an armor/clothing.

I do have full knowledge of the CK and understand which forms need to be created in order to make this work. And I've already written out all the conditions that this script would need to run through. I just need help from anyone that would be willing to help me translate these into papyrus. My background lies primarily in 3d modeling and texture painting, so I'm a noob when it comes to programming (like computer science 101 over here). I'm more than willing to teach myself how to write the script by backtracking through other mods, but I would love a point in the right direction from any proficient papyrus writers out there!

 

So my current version of this mod renders the full body reference from OS with all pant meshes (for users to have the option of being "shirtless" when equipping only the pants). The shirts have zapped the reference body and use a different biped slot - the mesh is simply sized up larger than the ref body to fit on top of the torso. While this certainly works, there tends to be a lot of clipping between the shirt and torso of the ref (especially when users start introducing different body sliders from BS).

In order to avoid this problem, I wanted to split the reference body into torso and legs, rendering each with their respective shirt or pants mesh. In doing so, I'd be able to utilize zap sliders in both the shirt and pant nifs and avoid clipping altogether. However, the limitation here is that if players were to unequip a shirt while wearing pants, the torso would be completely invisible until they either equipped another shirt or unequipped those pants. To stream-line this process, I thought a script would be advantageous if it's possible at all.

Here's my end goal. I'd plan on creating 3 ARMO records for each shirt: one that was simply an inventory item for equipping and unequipping (a toggle essentially), one where the full reference body from OS is rendered, and one where the legs are zapped. And same goes for the pants, with their respective zaps. I'd attach this script to the inventory item, so that when the player equips the ARMO from their inventory, a short script will run to detect what is/isn't already equipped and choose the proper version of said ARMO to render. It would additionally need to detect which items were already equipped and re-render that model with the proper zapped version if needed.

 

In tinkering around on the CreationKit website, I'm thinking this could be done with the GetWornItem function through F4SE? I've seen some similar scripting going on in @Kimy's DeviousDevices mod, so I feel like my scripting idea should be possible?

 

I'd appreciate any help I can get.

 

Thanks!

J

Link to comment
38 minutes ago, jcedrone1003 said:

In order to avoid this problem, I wanted to split the reference body into torso and legs,

This is a wrong approach. I use the body as a body, both in Skyrim (so for more than 10 years) and also in Fallout 4. And before that in Fallout 3/NV and Oblivion.


In all  games, my body is dressed in clothes - not exchanged for a nif of body and clothes. Who reads the slots correctly - top->down, in->out - also understands the meaning - unlike DD and relevant (and self-proclaimed) step-by-step sites.
If there is clipping, it's the skin - and nothing else. The cause can be the difference in size and number of polys between the body and the clothes. In this case, experience and patience is an advantage that should not be underestimated.

 

 

Here is an example of my starter equipment for Skyrim:

- Boots (as real Highhells - so stockings adapt)
- Panty
- Corset (waist gets tighter)
- Bra
- gloves
- Neck strap
- Earrings (HDT)
- headdress

And all without replacing the body. The body also has pubic hair when naked - this is replaced with the panty - simple slot rules

The advantage is - all NPCs are like that (even if they are vanilla clothes)
And that's why I can also allow myself to use uncompressed 4k textures - they are only 1x in the VRam, because there is only one body and one texture set.

 

 

Edited by Andy14
Link to comment

@Andy14

 

Thanks for the reply here! While I definitely understand where you're coming from, I'm not sure your approach works for what I'm trying to achieve.

 

The mod I'm working on is not a skimpy mod by any means. While there's advantages to utilizing different biped slots for different items and keeping the body as body, I find it quite un-immersive if equipping something from vanilla would leave items like pants and shirts still equipped. If my player is wearing jeans and a teeshirt from my mod, and then I want to equip a vaultsuit, doing so would only swap out the vaultsuit for the nude body and leave the jeans and tee worn over the vaultsuit. I don't want this to happen and don't want myself or other users to have to equip one thing and then go unequip multiple other items.

 

Additionally, I'm creating content for males here. Having a penis on the body mesh adds another dimension here as I also find it quite un-immersive if the mesh for any pants/underwear need to be shaped around the penis. Using a nevernude body mesh as a reference body rendered WITH the pants bypasses this problem.

Link to comment
59 minutes ago, jcedrone1003 said:

@Andy14

 

Thanks for the reply here! While I definitely understand where you're coming from, I'm not sure your approach works for what I'm trying to achieve.

 

The mod I'm working on is not a skimpy mod by any means. While there's advantages to utilizing different biped slots for different items and keeping the body as body, I find it quite un-immersive if equipping something from vanilla would leave items like pants and shirts still equipped. If my player is wearing jeans and a teeshirt from my mod, and then I want to equip a vaultsuit, doing so would only swap out the vaultsuit for the nude body and leave the jeans and tee worn over the vaultsuit. I don't want this to happen and don't want myself or other users to have to equip one thing and then go unequip multiple other items.

 

Additionally, I'm creating content for males here. Having a penis on the body mesh adds another dimension here as I also find it quite un-immersive if the mesh for any pants/underwear need to be shaped around the penis. Using a nevernude body mesh as a reference body rendered WITH the pants bypasses this problem.

No, that would only happen if the vault suit = the body. In my way, the Vault Suit would cover the chest and legs - as underwear. Then you can wear other things over it. I can't take screenshots of Fallout 4 right now - but trust me - it works.
It doesn't really matter if you treat a penis or pubic hair with logic and slots.

Example: Chest Primary = undershirt/bra - because you wear it first (top->down, in->out)
Chest Secondary = jacket/armour etc. because it is put on after chest primary.
In real life, the stockings are put on first and then the shoes. This is also the case in Bethesda Games - even if vanilla is very simple in this respect.

 

PS: Another tip - Don't think too statically and don't look at what others are doing. Instead look at the Armor Addon Form and then the Armor Form. I think then you understand how it works and you might see things that other people didn't see.

Edited by Andy14
Link to comment
2 hours ago, Andy14 said:

No, that would only happen if the vault suit = the body. In my way, the Vault Suit would cover the chest and legs - as underwear. Then you can wear other things over it.

Are you recreating all of the armor / armor addon records from vanilla? In vanilla Fo4, all records for underarmors (vaultsuit included) take up slot 33 and 36-40. Which by your thinking is the body - the vanilla vaultsuit armor does not include the body, the mesh of the suit replaces it. As I said, I do not want to wear things over vanilla underarmors. I want equipping my armors to remove the underarmor, which requires that they either share the same biped slot or use a script to unequip the vanilla underarmor.

 

I do fully understand the agreed upon system of treating slots as top>down, in>out. That's just not the question here.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use