Humanoid mob gender

For all talk about quest development - creation, testing, and quest system.
Post Reply
User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Humanoid mob gender

Post by Yagiza »

I'm not sure, that this is the correct place for this post, if not, I hope, moderators will move it to a correct place.

Here's an idea of a simple improvement, which will fix a lot of classic and new quests, making them more adequate.

Right now, when a foe of a humanoid class is created, the mob's gender is absolutely random. But in some quests those foes are created to represent a mobile version an NPC, which gender is known. So, we have a 50% chance that mob's gender will be an opposite to an NPC's one, which it represents.
Usually, such task is achieved by hiding an NPC and creating a foe at the same location with place foe action.
The idea is checking such a situation and generate a mob of an appropriate gender.
The algorytm is simple: when place foe action is performed and there is a hidden NPC in the specified location, the gender of the genereted mob will be the same as hidden NPC has. So, in this situation:

Code: Select all

Place _house_ local house1
Person _thief_ faction The_Thieves_Guild
Foe _thiefFoe_ is Thief

place npc _thief_ at _house_
hide npc _thief_

_S.00_ task:
	daily from 00:00 to 08:00 
	pc at _house_ set _S.01_ 

_S.01_ task:
	place foe _thiefFoe_ at _house_
will create a Thief mob at _house_ location of the same gender as _thief_ NPC has.
Of course, if hide npc, place npc and place foe are present in the same task, place foe must be evaluated after place npc and hide npc regardless of the order, so:

Code: Select all

Place _house1_ local house1
Place _house2_ local house2
Person _thief_ faction The_Thieves_Guild
Foe _thiefFoe_ is Thief

hide npc _thief_

_S.00_ task:
	daily from 00:00 to 07:59
	pc at _house1_ set _S.03_
	
_S.01_ task:
	daily from 08:00 to 15:59 
	pc at _house2_ set _S.04_ 
	
_S.02_ task:
	daily from 16:00 to 23:59 
	remove foe _thiefFoe_

_S.03_ task:
	place foe _thiefFoe_ at _house1_
	place npc _thief_ at _house1_
	
_S.04_ task:
	place foe _thiefFoe_ at _house2_
	place npc _thief_ at _house2_	
will periodically create a Thief mob at _house1_ or _house2_ location of the same gender as _thief_ NPC has.

Code: Select all

Place _temple_ remote temple
Person _priest_ factionType Temple
Foe _monk_ is Monk

place npc _priest_ at _temple_

_S.00_ task:
	clicked _priest_
	say 1040
	place foe _monk_ at _temple_	
	hide npc _priest_
will hide _priest_ NPC and create Monk mob at _temple_ location of the same gender as _priest_ NPC has.

This this simple improvement will fix strange gender mismatches between NPCs and mobs in many existing quests and will not break anything, 'cause right now mob gender is random, so quest writers could not rely on it anyway.

If there more than one hidden NPC at the location, where mob s created and they have different genders, we cannot decide, which gender should be used, so just use gender of the last placed or hidden of them.

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

Re: Humanoid mob gender

Post by Interkarma »

I have put some thought into this already. My preference is to provide the means for script author to assign an explicit link between Foe resource and a Person for these cases, rather than try to derive from a single pattern or execution order as you do above. It's just one of many things I haven't found time to add yet.

User avatar
Yagiza
Posts: 120
Joined: Wed Jul 31, 2019 5:16 pm

Re: Humanoid mob gender

Post by Yagiza »

Interkarma wrote: Mon Sep 30, 2019 8:33 pm I have put some thought into this already. My preference is to provide the means for script author to assign an explicit link between Foe resource and a Person for these cases, rather than try to derive from a single pattern or execution order as you do above. It's just one of many things I haven't found time to add yet.
Yes. That way would be better, but will need to rewrite existing quests, both standard and third party.
So, I beleive it's a good idea making that update first, to fix existing quests at once. Later, once we have spare time, add new feature to quest engine and ask quest writers to update existing quests.

User avatar
haloterm
Posts: 391
Joined: Sat Feb 16, 2019 5:21 am

Re: Humanoid mob gender

Post by haloterm »

I assume this feature request is still open? :)

I would love to be able to use a syntax like

Foe _EvilWizard_ is 1 male Mage

User avatar
harbinger451
Posts: 183
Joined: Mon Apr 13, 2020 4:08 pm
Contact:

Re: Humanoid mob gender

Post by harbinger451 »

Was this ever resolved? Would love to be able to just say something like "Foe _thief_ is Thief male" for example. Would be very useful.
Image

Post Reply