Talk:Tribes expansion: Difference between revisions
m →XML DB |
|||
Line 31: | Line 31: | ||
--[[User:Magodra|Magodra]] 19:06, 3 May 2011 (UTC) | --[[User:Magodra|Magodra]] 19:06, 3 May 2011 (UTC) | ||
I read the documentation on TribeNeedSet before writing the page. I wanted to adapt my ideas as much as I can so I can alter the existing code as little as possible. I think we will only need to add some methods on TribeNeedSet that will break more complex needs into base needs and prioritize them. (Mention: More Research on my behalf is required here) | |||
--[[User:Zee|Zee]] 21:16, 4 May 2011 (UTC) |
Revision as of 21:16, 4 May 2011
Moods
Suggest to use a operation to set the mood. E.g. <set_mood />, <set_mood random="Yes" />, or <set_mood new_mood="Lazy" />. In this way it can be done at what ever time of day you wish. To do it at the start of the day it can be in a behavior that is executed based on a time event for start of day. Night tribes might have this at the evening.
--Magodra 19:06, 3 May 2011 (UTC)
For the random behavior I suggest to look into sending them as perceptions. When the npcclient advance the the npcclient could loop over every npc that has a reaction of type mood and than check if a perception should be fired. This should include to create a general map of perception_types_by_npc to greatly improve the performance of the perception system in general in the NPCClient. Today every npc and ever reaction is checked when a perception is fired. With this map only the npcs that has a given reaction type would be iterated.
--Magodra 04:01, 4 May 2011 (UTC)
XML <-> DB
For each persistent data it should be considered if a db table can be used instead of a xml file. A db file will allow for editing through the WC. Data structures should be designed with the goal of making them possible to reload runtime. E.g. like we do with the /killnpc reload command. This will enable easy modification of the tribes on live servers.
--Magodra 19:06, 3 May 2011 (UTC)
What do you suggest we should keep in a database? (rather than in the xml) Tribes, as I see them, have a variable number of needsets, so storing them in the database will require us to serialize everything into a single column. Example: Needsets: expansionist|advanced|diplomatic
I think moods can be stored in a db, yes.
--Zee 21:11, 4 May 2011 (UTC)
Treats
The npcclient has a needset concept already. It should be evaluated if the existing need set concept is the same as the new suggested sets.
--Magodra 19:06, 3 May 2011 (UTC)
I read the documentation on TribeNeedSet before writing the page. I wanted to adapt my ideas as much as I can so I can alter the existing code as little as possible. I think we will only need to add some methods on TribeNeedSet that will break more complex needs into base needs and prioritize them. (Mention: More Research on my behalf is required here)
--Zee 21:16, 4 May 2011 (UTC)