Strategy.tab

Discussion in 'General Modification' started by Ranth, Jan 27, 2009.

Remove all ads!
  1. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Is there a tutorial anywhere for the strategy.tab file? I could not find one in a search, only that Liv has worked on it.

    I am having some issues in a fight I am modding. Apparently one of my archers does not like to shoot his bow like the other archers. His AI type is Sniper like all of the others, so I am a little lost and would like to know how to mod the strategy.tab file. He is the speaker for the group, and has a magic bow and arrows, does this cause known problems?
     
  2. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    Update: Half of my normal archers shoot their arrows at me, and the other half charge at my party without swords, and their archer leader sits there and does nothing (I even gave him normal arrows in case the magic ones were the problem). They are all the same faction, so the leader should be fighting me, but he doesn't.

    It seems the Sniper AI has some problems. Is there another good AI type for an archer?

    Update 2: I tried the 'Orc Sniper' AI which is used by the orc archers in the cave. This caused even more problems. It is so strange that I spawn 4 archers with the same protos and inventory, and 2 will shoot arrows and 2 will charge me with their fists.

    Update 3: I was able to make the archers stop charging my party by removing their sans_start_combat and sans_enter_combat tags (from 2 0 0 0 0), though this only worked the first time, and not for the leader. I have no idea what is going on.
     
    Last edited: Jan 28, 2009
  3. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    I am noticing that after combat skips the leaders turn, he is green to me when I mouse over him until I attack him. Something is making all of his faction attack me, except him, even though he gives the command in dialogue to attack.

    Code:
    {200}{Attack!}{ To Arms!}{}{}{}{}
    {201}{[Attack]}{}{1}{}{}{npc.attack(pc)}
    
    The npc.attack(pc) command should force him to attack me correct? Is there any type of command or script that I need in the leaders py file to make him attack?
     
  4. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    No, that should work. Sometimes monsters take a moment or need a nudge. No idea why, but it certainly happens :shrug:

    And no, there is no tutorial for strategy tab atm. Regarding 'sniper', though, they are probably charging because the command 'partial charge' is in there, or 'approach'. Stay away from them with archers. (I once asked Liv what partial charge did and she couldn't find a use for it, other than to ruin a perfectly good archer strategy). Stay away from 'sniper' in general.

    A good archer strategy would say something like


    5 foot step
    Use Potion (will only be triggered if they have potions, will do buffs immediately and heals as necessary, but can be left in)
    Reload
    Clear Target
    Target xxxx
    Target xxxx
    Target xxxx (order of targets by preference, will target first one in order that fits)
    Attack
     
  5. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    That is a pretty good tutorial Ted. Thanks :)

    I figured out the problem regarding the leader not attacking, I am actually kind of embarrassed. The script that spawned my foes did not have a return on it. I figured it did not need it because I took the script from the ambush and modified it, and that script does not have a return at the end of the function.

    I thought returns were only if I needed to return a variable, but I guess they are always needed.
     
  6. Shiningted

    Shiningted I changed this damn title, finally! Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,743
    Likes Received:
    374
    Well I always use them as a habit: Cerulean used to tell me I was wasting my time. There you go.
     
  7. Ranth

    Ranth Established Member

    Joined:
    Jan 26, 2008
    Messages:
    829
    Likes Received:
    1
    I also recommend looking at this file in MS Excel. It makes it a lot easier to edit.
     
Our Host!