WB Coding Questions to flags in module_troops

正在查看此主题的用户

Eärendil Ardamírë

Subforum Moderator
I have questions regarding the use of two troop flags at module_troops and would be much obliged if someone could give answers to some of them:

tf_inactive: The Ladies of the Realm have this flag. Is the effect that heroes with this flag stay always at the same place? (given their husband/father is not moving to another place)

troop_type_mask: This flag is listed between the others. What does it do?

Thanks for taking your time :grin:
 
解决方案
mmm in WB the ladies of the kingdom have the flag 'tf_unmoveable_in_party_window', the only troops that have 'tf_inactive' are the ones that have nothing to do with troops themselves, troops destined to be something else, a chest, a marker, a backup troop, a collection of strings... In a quick test, troops with this flag are not dressed, even if they have other warranty flags like 'tf_guarantee_' and have items in the inventory. I haven't noticed any other changes, apart from the fact that they appear naked even though they have items in inventory, similar to the 'tf_is_merchant' flag, but affecting from the beginning.
As for how the engine interprets the troops or objects with this flag, well, we would need to see under the hood to...
mmm in WB the ladies of the kingdom have the flag 'tf_unmoveable_in_party_window', the only troops that have 'tf_inactive' are the ones that have nothing to do with troops themselves, troops destined to be something else, a chest, a marker, a backup troop, a collection of strings... In a quick test, troops with this flag are not dressed, even if they have other warranty flags like 'tf_guarantee_' and have items in the inventory. I haven't noticed any other changes, apart from the fact that they appear naked even though they have items in inventory, similar to the 'tf_is_merchant' flag, but affecting from the beginning.
As for how the engine interprets the troops or objects with this flag, well, we would need to see under the hood to have some certainty about it, a glance would reveal so many things... there is no developer comment or operation that explicitly refers to 'tf_inactive', only the native objects that use it and that the name says 'inactive'.

About 'troop_type_mask' I can only speculate even more. Setting this flag to any troop, according to my tests, will give a screen freeze and the program will close, so it's not a flag that can be set directly to an object in module_troops. The name could give us a clue, 'type_mask'. You can do a search in your favorite web search engine and see what 'mask' means in programming language. Or maybe in the beginning the troops literally wore hidden types of masks and put them on at the feasts celebrated by Harlaus... Anyway I have no idea what it's for, for me so far it's all supposition.
 
点赞 0
解决方案
About tf_inactive, I just wonder why I thought the ladies have the flag attached to them. I must have misslooked something there in the last two days that I didn't notice it's only with chests etc. It would then also make sense to have a troop appearing with nothing at all since they mostly get replaced with scene props (in the case of chests) etc.

I will then probably just mark troop_type_mask as not useable in the documentation.

Thanks for your help :smile:
 
点赞 0
后退
顶部 底部