Jump to content

Scripting FormLists


Recommended Posts

I just started scripting again and I am at the point to check out the PCs clothing and its sexual attraction. I am pretty sure there was some kind of introduction to formlists in the forums here, but I am to stupid to find it anymore :( . Could someone please post a link.

 

Thx in advance.

Link to comment

Thank you guys for your answers. :shy:

 

I used the geck and found quite some formlists for sexout in SCR which seem to look empty (or due to my inexperience with form list I looked them up wrong?). I think I read that they are supposed to be that way and have to be filled by the modder via script. On the other hand I am using the mod 'clothing evaluation' for ages and a lot of armors/cloth already have some checkmarks somewhere.

 

The other thing about formlists is that I wonder about is how to check for example the chest slot reference (armor/cloth) against different properties (dominant, tight, slutty and so on). Do I have to check the ref of the armor against every possible list or is there a more simple approach?

 

 

Link to comment

"addon" plugins are not supposed to directly modify lists in the GECK because doing so will overwrite the records and undo any changes in future versions of the mod. The plugins that provide the formlists may or may not have entries in them to start with.

 

You probably have to check every list yourself because any item could potentially fall into many categories. As in your example, something could be both 'dominant' and 'tight' or just one of them. This is just a guess on my part though since I don't know how any of that is used. If it's in the clothing eval, read that thread, there are probably instructions.

Link to comment

i had a look into the geck and how the form lists in 'clothing evaluation' are filled. I think I understand now how this works. Time to script it now.

 

Just one other thing: I want to check the PC (all slots where wear can be) against a lot of form lists and build a kind of score how sexy, submissive, etc. her appeal is. I also want to keep my script(s) light as my rig is not the fastest. How fast are formlists? I know, it's relative... There are two ways I am thinking to approach this:

 

1) I build up a kind of 'property scores' (dominant 5, sexy 8, science 0, etc.) for the PC which means checking every piece of equipment against every possible list (but only once except outfit changes) or

 

2) Checking for the property the NPC is interested in. This is obvious faster but I have to do it for every NPC.

 

So, which way would you experienced guys choose?

 

 

Link to comment

I'd choose the overengineered way, of course!

 

Two UDFs. One that takes a particular clothing item ref and returns a stringmap of those values you want (sexy, dominant, whatever). It can do all the heavy lifting on the formlists and later on you can change how it works without changing any of the code that uses it, if you keep the arguments and result formats the same.

 

Second is a 'helper' UDF that would take an actor (e.g. an NPC) reference instead of a clothing item, and a clothing slot value. It would get the item the actor is wearing in that slot, if any, and call the first UDF and return that result.

Link to comment

I tried around with UDFs and got some result. But I am already facing another script problem. I wanted to make an array of formlist and cycle through this array, but I always get the message that the formlists will be treated as strings. How do I get the geck to treat the formlists as refs?

scn 00RMFLSMirror

ref ClothRef 
array_var PCAppealSEX
int PCAppealSize
int Counter
int yesFlag

begin OnEquip

let PCAppealSEX := Ar_List SexoutSLClothAppearExposedCrotch, SexoutSLClothAppearExposedNipples, SexoutSLClothAppearHotPants, SexoutSLClothAppearSlutty, SexoutSLClothAppearShortSkirt, SexoutSLClothAppearShowCleavage, SexoutSLClothAppearArmorSkimpy

set PCAppealSize to Ar_Size PCAppealSEX								; get the size of the array

set counter to -1

while (Counter += 1) < PCAppealSize									; check for every formlist

	let ClothREf := player.GetEquippedObject 2						; Main Armor Ref 
	
	let yesFlag := ClothREf.isInList PCAppealSEX[Counter]				; is armor in formlist?
	
	printToConsole "List: %n - present %g" PCAppealSEX[Counter] yesFlag	; debug to console

loop

end
Link to comment

Probably can't use IsInList that way since it doesn't understand arrays, and it's probably not the function you want anyway. You probably meant to use IsRefInList. You may need to assign it to a ref first with that one as well, e.g.

let someRef := PCAppealSEX[Counter]
let yesFlag := ClothREF.IsRefInList someRef
Compiler override might fix it too but I avoid that in favor of vars unless I have no choice.
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • 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