Jump to content

Papyrus: How many properties is excessive, or can I do away with them?


danah

Recommended Posts

I'm creating a craftable drink that allows you to add a perk that you normally only get by leveling, such as Strong Back. I'd prefer to have one drink with two levels of menu (via two message boxes) that allow you to choose the SPECIAL (like Strength), and then which perk (like Iron Fist) within that Strength category.


Because of that, in the script I need to reference *all* ranks of all level perks within a single script. That's 200+ properties I think.


I don't care about all the typing. My concern is the number of properties i have to declare - one for each rank of each perk.


A) is this too much - do I have to subdivide my script into several scripts and thus several consumables/potions?


B) Can I sidestep this somehow by not using properties at all and somehow just referencing the perk directly in my script?


Option A means breaking my drinks up so that I have one for strength perks, one for perception, one for endurance, etc. I don't like that since it clutters my chemistry bench menu. Any suggestions would be helpful, including if there's a way to further nest menus in the chemistry bench which would also get me what I'm after, even more elegantly perhaps.


Ideas? Thanks in advance!

Link to comment
Share on other sites

A) As far as I know, you can have as many properies as you like, there’s no limit.

 

B) You can create a magic effect script that adds a perk point when you consume (technically, equip) the drink. Add the perk music to the music stack (so it’ll play when you open the perks menu), display an “I recieved a perk point!” message, then simply choose a perk from the perks menu. And no, you can’t use the perks in a script without properties.

Link to comment
Share on other sites

Yes there is a limit on script properties per script and per mod, the creator of War Of the Commonwealth hit it if you search back;

 

Keep in mind there a 4096 bit property table limit on any one script however.

 

You can avoid creating a heap of properties by dragging all the perks into a FromList and then iterating through or get at the FormList index.

 

Say you know StrongBackLevel1 is index 25 so;

 

Perk ThisPerk = MyPerkList.GetAt(25) as Perk

If pPlayerREF.HasPerk(ThisPerk)

;dostuff

EndIf

Link to comment
Share on other sites

  • Recently Browsing   0 members

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