Check player characters gender

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Ralzar
Posts: 1971
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Check player characters gender

Post by Ralzar »

After my little expedition into quest items to fix the always blue dye problem, I became aware, and very distracted by, the way clothing items are coded in quests and the inability of the quest writer to do a check of player character gender. This would be a very helpful function for quest authors to have for two reasons:

1: The ability to define specific clothing items is nearly useless when you have to either give all player male or all player female clothes. This is asking for paperdoll weirdness. Even with the most generic clothing items the size and placement is not always a good fit.

2: If quest authors could check player gender they could tailor the quest to that in how NPCs react etc.


Granted, the item generating code could just check male/female, but since the clothing enums do not match up, you would get weird results for one of the genders. So you'd have to do some kind of method that made sure if the quest asked, for example, for male boots and the player was a female, it switched to the female boots and vice-versa. Which would be a lot of hassle just to take away freedom from the quest writer.
My released mods

"I feel like Ralzar specifically wrote those mods for me and then said "Use them". Just so he could watch me die more."
-FuzzyBeanPlays

User avatar
Interkarma
Posts: 6532
Joined: Sun Mar 22, 2015 1:51 am

Re: Check player characters gender

Post by Interkarma »

My preferred solution is a new Item declaration with an optional subtype:

Code: Select all

Item <symbol> playerclothing <optionalSubtype>
This way Item code handles creating correct clothing for player gender and race, with a random variant and dye, then spits out an Item resource as normal. Declaration can optionally define a specific subtype of clothing if quest needs a shirt, cloak, etc. for the story.

Quest doesn't need to do anything special other than ask for an item of playerclothing and run as normal.

Post Reply