MOB specification clarifications

Discussion in 'General Modification' started by marc1967, Aug 20, 2014.

Remove all ads!
  1. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    673
    Likes Received:
    110
    I have some questions about MOB file specifications that are not really holding me back, but I may be misunderstanding them and doing something incorrectly. I'd rather not miss something small and have to redo 100's of MOBs if possible, so if anyone could clarify if any of this is critical it would be helpful. Thanks in advance.


    1) I notice that for every NPC MOB these five object flags are always set: OF_SEE_THROUGH, OF_SHOOT_THROUGH, OF_PROVIDES_COVER, OF_HEIGHT_SET, and OF_RADIUS_SET. This seems standard, and I happilly obey and follow along. But since these are always set for NPC MOBs, is there a reason they are not specified in the proto itself, thereby saving time checking off those flags everytime you create a new MOB?

    2) Do the Radius and 3D Render Height entries do anything, and should I follow any guidelines about what numbers go in here? I've changed them around and they don't seem to have any noticable effect, even though they seem logically set (they are usually set roughly to 15/50 for small, 25/75 for medium, and 50/100 for large NPCs).

    3) 64-bit AI flags: Bit 8 is often set to "1", other times it isn't even checked. Important?

    4) Teleport Dest X/Y: Sometimes set, sometimes not. It's usaully the same as the X/Y location, but not always. Relevant at all?

    5) When an NPC is given a bow and a sword, they always charge into melee with the sword, even when I give them an archery AI strategy. My current fix is to only give them a bow, which works. Is there a way to specify that they should use a bow, even though they are carrying a sword too?
     
  2. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    3) I wouldn't mess with them, I don't think even Ag is 100% sure what they do. Just leave as is.

    4) This is how the game does it's standpoints. You can set the XY location as one thing and the 'teleport' as you put it to another, and if the waypoint flag is set they will appear at XP and then walk to their standpoint. Generally though they will be the same and should be. Standpoints can also be drawn from jummpoint.tab. If you do standpoints for day and night on different maps, you have to add that mob to daynight.nxd to do the map transition.

    5) An NPC who is more effective with his bow should use it, if you just add equip_best_all() or whatever it is: if they have bow feats and high dex, then they will equip the bow, and if they have the strategy.tab they will use it.
     
  3. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    1. I suspect the reason is just that Troika did them at the mob level after the fact.

    2. 3D render height can affect a mob that is 'flying.' For example, a gargoyle will be elevated to whatever setting depending on the value. This can have goofy affects in-game, so be careful. Standing mobs never swing upward or downward, so a flying mob that's set too high will appear to have enemies swing at its toes (think stirges). Looks silly. There seems to be no effect on a mob that's on the ground, though I don't know what differentiates the two off the top of my head.

    Radius is important for calculating threat ranges for mobs like with AoOs. The larger the radius, the more cushion it has as you approach it. It should mostly be dependent on the relative size of the mob, and there's generally not a lot of variation in ToEE, but you'll know it's wrong if you see a mob with a mouse-over circle that's too loose looking or tight looking. There are some exceptions, like snakes that coil.
     
  4. marc1967

    marc1967 Established Member

    Joined:
    Jan 19, 2014
    Messages:
    673
    Likes Received:
    110
    Thanks again gentlemen for the responses.

    One question regarding the weapon choice for NPCs (my question 5 above). I still notice some inconsistencies with my NPC weapon selection, even using item_wield_best_all() , such as guys with BAB +5 with archery, and BAB +1 melee still using their short sword. My short term solution of only giving them bows is working just fine, and after searching threads last night I can see this was a problem about 5 years ago, which seemed to be befuddling the best of the modders.

    It was a thread called "Charging Crossbowmen", http://www.co8.org/forum/showthread.php?t=7656

    After a week or so of hot and heavy discussion and evaluation, the thread ended, and this was basically the conclusion:

    "So then, while we still don't know why this happens, and perhaps more importantly, why it's happening now and not before in some cases, we do know that the standard fix of yore was to remove the offending .mobs' daggers so they'd stick with crossbows. This solution has also worked just fine in modern testing. The only drawback I can see with it is that these .mobs won't be able to switch to a melee weapon in close quarter combat, but if we have to choose between that and them equipping daggers and rushing futilely at the party, I think no-melee is preferable."

    Do you know if this has been resolved differently? If not, I'll just go with that solution.
     
  5. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,038
    Likes Received:
    42
    That thread was from some time ago and we've learned a lot since then (though I can't say what exactly atm ;)). I seem to recall that was a 'thing' that just popped up, but then it was resolved. Don't really recall how, but I think ranged/melee combo mobs work as intended in most cases now, don't they?

    Anyway it seems like you could make a custom script to wield only the appropriate weapon by temporarily removing the weapon you don't want from inventory depending on proximity and tacking on the wield best all thing. Maybe that's what Sitra did eventually.

    The weapon switching is or may be goofy but 5 foot step always works as an AI command up front - you can even get mobs to do it when there's no good reason to.
     
Our Host!