Monsters and AI
Posted: Fri Mar 30, 2007 12:22 pm
I have several questions / suggestions concerning monsters and AI :
I notice that there are three variables that influence the monster behavior :
1-perception
2-bravery
3-attack types
3 are used in "monster.lua" so, there's no explanation needed really, except one thing : If a monster has an "open door attack" but the door chosen cannot be broken/opened, will the monster still shoot ?
For 1 :
- how does it behave exactly ? can it be "lua-modified" ?
- Do some monsters have some qualities like :
* can see better in light than in darkness (in DM some monsters where totally blind in half-darkness, so it was possible to bypass them using the darkness spell at low power)
* can see as good in darkness as in light
* can see better in darkness / is blinded by light
* can see invisible (like Lord Chaos in O DM)
etc.
Having two types of perception instead of one can also help having very complex behaviors...
For 2 : how does it behave ? can it be "lua-modified" ?
Then suggestions :
- having an "alliance system" :
* each monster has a side (an integer)
* the party is side 0
* each monster has two tabs of booleans : 'foe', 'friend'
* a monster ignores neutrals (side field equals "nil" / "false" in 'foe')
* a monster attacks foes (side field equals "true" in 'foe')
* a monster helps friends (side field equals "true" in 'friend')
If there is a way to distinguish "nil" of "false", you can do the whole thing with one tab.
* allow adding new class of "positive attacks" called by monsters on friends.
* allow adding functions that sets the alliance status in a lua module.
I notice that there are three variables that influence the monster behavior :
1-perception
2-bravery
3-attack types
3 are used in "monster.lua" so, there's no explanation needed really, except one thing : If a monster has an "open door attack" but the door chosen cannot be broken/opened, will the monster still shoot ?
For 1 :
- how does it behave exactly ? can it be "lua-modified" ?
- Do some monsters have some qualities like :
* can see better in light than in darkness (in DM some monsters where totally blind in half-darkness, so it was possible to bypass them using the darkness spell at low power)
* can see as good in darkness as in light
* can see better in darkness / is blinded by light
* can see invisible (like Lord Chaos in O DM)
etc.
Having two types of perception instead of one can also help having very complex behaviors...
For 2 : how does it behave ? can it be "lua-modified" ?
Then suggestions :
- having an "alliance system" :
* each monster has a side (an integer)
* the party is side 0
* each monster has two tabs of booleans : 'foe', 'friend'
* a monster ignores neutrals (side field equals "nil" / "false" in 'foe')
* a monster attacks foes (side field equals "true" in 'foe')
* a monster helps friends (side field equals "true" in 'friend')
If there is a way to distinguish "nil" of "false", you can do the whole thing with one tab.
* allow adding new class of "positive attacks" called by monsters on friends.
* allow adding functions that sets the alliance status in a lua module.