1
DF Modding / Re: [MODDING] CREATURE & ENTITY QUESTIONS THREAD
« on: March 22, 2024, 09:10:35 am »
This is my first post on the forum, I have not been able to find an answer to this or figure out an elegant solution, I hope this is the right place to ask.
Is it possible to weight the chances of a specific creature to be chosen for a civilization?
Something like:
In this fictional example, having a DESERT civilization, it could spawn as either HUMAN or TUSKEN, but HUMAN have double the chances of being selected (notice the :1 and :2 at the end of each tag).
This doesn't seem to be something that can be done, that's the question; currently the only way I can think of to "simulate" this would be to have (for this fictional case) duplicate entries of the civilizations to achieve these weighted chances, i,e:
But it looks a bit bad to do that. Is there a more elegant way to achieve this?
Is it possible to weight the chances of a specific creature to be chosen for a civilization?
Something like:
Code: [Select]
[ENTITY:DESERT]
*
*
[CREATURE:TUSKEN:1]
[CREATURE:HUMAN:2]
*
*
In this fictional example, having a DESERT civilization, it could spawn as either HUMAN or TUSKEN, but HUMAN have double the chances of being selected (notice the :1 and :2 at the end of each tag).
This doesn't seem to be something that can be done, that's the question; currently the only way I can think of to "simulate" this would be to have (for this fictional case) duplicate entries of the civilizations to achieve these weighted chances, i,e:
Code: [Select]
[ENTITY:DESERT_HUMANS1]
*
*
[CREATURE:HUMAN]
*
*
[ENTITY:DESERT_HUMANS2]
Duplicate entry of DESERT_HUMANS to double the chances of HUMAN in DESERT.
*
*
[CREATURE:HUMAN]
*
*
[ENTITY:DESERT_TUSKEN]
*
*
[CREATURE:TUSKEN]
*
*
But it looks a bit bad to do that. Is there a more elegant way to achieve this?