搜索结果: *

  1. Noob needs tips/help regarding the distribution of skill points in the party.

    For me, it depends on the companions I am using for that current game.  I used to use the non-noble party a lot and distributed various party skills among them.

    These days, I mostly use the noble party. 

    I use Borcha as the scout for pathfinding, tracking, and spotting.

    Artemener gets engineering and tactics.

    I don't find it a big deal if either gets knocked out, since they will revivie quickly enough.

    The six noble comapanions (Firentis, Alayen, Matheld, Rolf, Bahestur, and Lezalit) all get trained as warriors and trainers.  If I decide to turn them into Lords when I start my own faction, I will give them some Leadership skills.

    I put all the medical skills on me, so I don't have to worry about anybody getting knocked out.  Also the trading skill, since I am leveling up Charisma on my character anyway.
  2. Someone please help me update some old tweaks for warband

    HK40 说:
    Sorry, kinda new to editing the game.  Where do I go to look at the python scripts?
    Is there a built in editor?  How do I use that?

    Well, you can download the current mod system from the bottom of the download page here: http://www.taleworlds.com/main.aspx

    The forum for modding is here: http://forums.taleworlds.com/index.php/board,64.0.html

    Basically, you make changes in the mod system's python scripts and then proccess them to generate the text files used by the game.  Always, of course, make a mod folder and make changes there, rather than changing Native directly.  Anyway(s), there are some old, but still useful tutorials there to get you started with it.
  3. Endless waves of assassins.

    Just checking through the scripts, there are a couple of global flags set and I can't find where they are set, most likely they are hardcoded, or I just looked in the wrong place.

    One determines whether the drunk will attack or not.  The other checks if he should be an assassin instead.  Probably it is based on renown.  They go through stages.  With little renown, they always attack, with average renown, you have the option of saying "Do you know who I am?".  I guess the third stage is, they don't attack at all.  So either it is planned behaviour for them to be unfightable at a certain point, or, the flag for not fighting is set after you once talk them out of it and never gets reset, thus producing a glitch making that particular drunk unfightable.  Either way, effectively the same.  Once you hit a high enough renown, you can't fight them any more.

    It may just be that they switch to assassins after a certain level or renown, to make it a more challenging encounter.  I can't really say.  It's easy to see "patterns" in random behaviour that aren't really there.  My experience so far is, once the option to talk them out of the fight occurs, they soon after stop confronting you.  I haven't tried instigating the fight at that stage, but I will next time I see one.

    I don't tend to make enemies of Lords in my games, and hardly ever run into assassins.  When I do, I'm at a high level, have high renown, and have a very few inevitable enemies.  Anyway, just my random observation of the encounters so far.  I can't really say what the underlying mechanism is without some real testing.
  4. A question about horseflesh...

    I'm the doctor and usually stop at 5(+2) WT, so effectively 7.  Some horses heal overnight, while others take weeks.  They all eventually heal, but it does seem that the ones which take weeks are taking longer than they would if it was just a matter of regaining hitpoints at a set rate per WT skill.  I can't verify that at all, it just seems that way.

    I'm patient though.  I just check them after resting and distribute them to companions when they are healed.  I don't mind if it takes a while.
  5. A question about horseflesh...

    Fearghus The Killer 说:
    Recently a fellow poster told me he sometimes buys lame horses cheap and heals them up with wound treatment skills. I tried it out myself...bought a lame horse to heal but ended up dragging him around with me way too long. However, lame horses I've picked up on battlefield do heal up and rather quickly. Is there a lameness slider on these beasts? Are some more lame than others, but lame all the same ? (like all the Rhodok lords in this game)

    Another question (because I'm too lazy to experiment), do you get a better price selling a Steppe or Desert Horse in places which don't normally have them, like Wercheg or Praven?

    I haven't noticed any price changes for horses in different towns.  As for the wound treatment, it may just be a random chance for healing, because I've kept horses with me a long time without healing.  Long enough to have healed them if it was just a matter of hitpoint recovery.  Not really positive, but it at least seems that way.
  6. Endless waves of assassins.

    I think (not sure at all), that it has to do with making enemies of other lords.  I believe having very negative relationship with another lord will trigger him a chance to hire an assassin.  Have to look through the scripts to see if that is the case.
  7. Slaver Chiefs FTW!

    So...playing around with the new patch.  In the early going I rescued some manhunters and added them to the party just as temporary cavalry until I got ready to join a faction.  I've always ignored that line of troops in previous games, but this time I decided to keep them around for the bandit...
  8. -- Official Unofficial 'Ask Questions About Warband Singleplayer Here' Thread --

    Ilwuen 说:
    How did you make the assumptions that I haven't given them melee weapons? I specifically mention otherwise :razz:.

    He means if you want them to act like horse archers and shoot, instead of switching to melee, you have to not give them melee weapons.  But then you will have the issues he describes.

    I think you're pretty much stuck with that choice.  Give them melee weapons and they'll switch weapons on their own, not always how you would like.  Or, take the melee weapons away from them and force them to only use ranged weapons, making them vulnerable when they get put in a melee situation.
  9. Best looking lady

    I just go for Tonju's daughter, ol'what's-her-name, because he always owns Ichamur, and if I decide to take Tulga and oust the Khan, I want a chance to take Ichamur without a fight.  He's easy to make friends with as well.  Just keep doing the bandit-lair quest for him and he'll love you.

    I just make political marriages, depending on what faction I'm playing.  I don't care what they look like.  I've always got Matheld along as a campfire buddy, anyway.  :mrgreen: 
  10. Leadership skill

    I've been tinkering with the AI side of battle tactics, and I'm considering adding the Tactics skill to the equation.  In my case, though, the skill would affect which battle tactic he uses.  i.e.  A better general would choose better tactics.

    I hadn't considered using the Leadership skill to determine how well troops obeyed orders, but it's a nice idea.  You would have to do a check for each order issued to determine if it was obeyed, so it might add more scripting than it is worth.  I don't know.  Right now they are constantly checking if they should run away or not, so you might be able to incorperate the checks there without too much overhead.  Something worth experimenting with, at any rate. 

    I always have those one or two cavalry who dismount because they all spawn right up each other's butt.  Maybe if I shoot one, the rest will get back on the damn horse?  And stop cutting off my charges?!  I'm at the point where I'm ready to just shoot anybody who gets in my way or gets out of line.  Maybe using the Leadership skill instead would be nicer... :grin:
  11. Someone please help me update some old tweaks for warband

    HK40 说:
    what mod system are you talking about?  or just a specific mod?

    I mean just the game's mod system.  I do a lot of tinkering and the python scripts are human readable, so they are easier to work with.

    The elder/guildmaster menu tweak involves adding to the town menu, so it's a little more involved than assigning a value to a variable, like the companion tweak is.  Hopefully TweakMB will update soon for you guys.  This patch changed a lot, so you'll have to have some patience, I think.  :smile:
  12. Best looking lady

    Unless it has changed in the last patch, the only thing that is random is which lords are brothers.  The father-son, father-daughter, and brother-sister relationships are static.

    I've always noticed the same faces for the nobility characters.  The lord's ages are randomized a bit, and the sliders change a bit with the age, but that's it as far as I know.
  13. Marrying the children of Kings...

    Kings don't have any marriable daughters in-game.  Well, except that one chick... :wink:
  14. Someone please help me update some old tweaks for warband

    Hmm.  I use the mod system and not text file tweaks, so you'll have to test this yourself.  Comparing the script.py with scripts.txt, it appears changing this line would disable companion complaints.  I guess the global variable number changed:

    2133 2 144115188075856787 0

    Change the 0 to a 1.

    It should be near the top of the text file, about line 7 in my notepad.  I have a lot of other tinkering and testing going on, and I don't use this tweak, so you'll have to try it.  Should work though.  Not really sure about the village elder menu.

    Also, it appears, you'll have to start a new game to try it, or follow magelord's advice in that thread and add it to your existing game.  Hope that helps.

    Edit:  I looked at the village elder menu change.  It's a bit more involved than I want to mess with, adding menus.  Probably best to wait for an update to TweakMB on that one.
  15. Surrendering is stupid-heres why

    What is this "surrender" you speak of?  :wink:
  16. Some clarification about troop classes?

    The test for the team method worked out pretty well.  Units can be assigned to new teams and then used in the tactical scripts as if they were classes.  I get an "invalid agent ID" message in battle, but it doesn't seem to affect anything.  Probably just sloppiness in my scripting (I hope).  It's just a rough test, and there may still be issues, but it does seem to work.

    Looking at team assignments for field battles, the player will be either team 0 or team 1, the enemy will be 1 or 0, and the player's allies will be equal to player team +2.  I decided to use +2 for my new team assignments.  So enemy AI skirmishers will be enemy team +2, and allied skirmishers will be allied team +2.  For more classes then, I would use +4, +6, etc.  Anyway, the test:

    This is my script for pulling out AI skirmishers and assigning them to teams.  Added to the bottom of module_scripts:

    插入代码块:
      #grouptest
      #script_agent_reassign_aux_team
      # INPUT: arg1 = agent_no
      # OUTPUT: none
      ("agent_reassign_aux_team",
        [
          (store_script_param, ":agent_no", 1),
          (get_player_agent_no, ":player_agent"),
          (try_begin),
            (ge, ":player_agent", 0),
            (agent_is_human, ":agent_no"),
            (agent_get_team, ":player_team", ":player_agent"),
            (agent_get_team, ":agent_team", ":agent_no"),  
            (neq, ":agent_team", ":player_team"),
            (agent_get_troop_id, ":agent_troop_id", ":agent_no"),
            (eq, ":agent_troop_id", 64), #khergit skirmisher
            (val_add, ":agent_team", 2),
            (agent_set_team, ":agent_no", ":agent_team"),
          (try_end),

    To test whether they would recieve orders independently, I modified the battle_tactic_init_aux script like so:

    插入代码块:
      # script_battle_tactic_init_aux
      # Input: team_no, battle_tactic
      # Output: none
      ("battle_tactic_init_aux",
        [
          (store_script_param, ":team_no", 1),
          (store_script_param, ":battle_tactic", 2),
          (team_get_leader, ":ai_leader", ":team_no"),
    
          #grouptest
          (assign, ":aux_team", ":team_no"), 
          (val_add, ":aux_team", 2),
          (team_set_leader, ":aux_team", ":ai_leader"),
          (team_give_order, ":aux_team", grc_everyone, mordr_hold),
          (team_give_order, ":aux_team", grc_everyone, mordr_dismount),
          #grouptest
    
          (try_begin),etc.

    That script returns the "invalid agent id" message.  The team_set_leader line doesn't seem to be neccessary.  They obeyed the orders either way.

    Now, in the mision_templates, I added some lines to the "lead charge" mission.

    Under the before mission start trigger, I added my new team relationships to what was there:

    插入代码块:
          (ti_before_mission_start, 0, 0, [],
           [
             (team_set_relation, 0, 2, 1),
             (team_set_relation, 1, 3, 1),
    
            #grouptest
             (team_set_relation, 0, 4, 1),
             (team_set_relation, 2, 4, 1),
             (team_set_relation, 1, 5, 1),
             (team_set_relation, 3, 5, 1),
             #grouptest end

    And, under the agent spawn trigger, I added a call to the new team reassignment script underneath theirs.  Their script goes through and checks if the player is in control of allied forces and reassigns teams accordingly, so it should run first:

    插入代码块:
          (ti_on_agent_spawn, 0, 0, [],
           [
             (store_trigger_param_1, ":agent_no"),
             (call_script, "script_agent_reassign_team", ":agent_no"),
    
             (call_script, "script_agent_reassign_aux_team", ":agent_no"),#grouptest

    That's pretty much it.  I went and picked a fight with a Khergit lord, rode around behind his army, and his skirmishers were dismounted and holding position.  My skirmishers were left alone by the script and remained under my control.  His skirmishers didn't respond to any more of his orders because I hadn't scripted any more in for them.  So, other than the error message, everything went as scripted.


  17. Some clarification about troop classes?

    xenoargh 说:
    So, basically, we could make this work, if we were allowed to change the base class?

    Perhaps then we just need to look at tf_guarantee_ranged, etc., because that's how the class value is set.  Then troops might get set to the correct values from the start.  OFC, they'd still be put into "Un-named Group" because that CSV isn't in the /data directory, but that's not the end of the world.

    Being able to set the class via script would be great.  Although, now that I've looked at it more, it would have to be in a way independent of the players groupings to be able to use it consistently.  I'm not sure how we could manipulate the flags to get the classes we want.  Unless we had more flags, for spears, skirmishers, two flags for horse archers, etc.  The way it looks now, even if we could manipulate the flags, the player can still overwrite the classes from the party menu anyway.


    Somebody 说:
    Language folders were supported way before data folders in Warband, so just plug and play into your module folder.
    Anyways, try using agent_get_division instead of troop_get_class to see if it gets you the same result.
    Another way I thought of would be to preprocess the troops, and assign a slot to each troop in python. You then fetch that slot and then apply specific tactics to them, by using agent_set_group or agent_get_team. But then like you said, they still wouldn't obey the player's orders for that team, but theoretically setting team relations to 1 and team_set_leader to player should work. You can then use class_is_listening_order to get the order for the player's subgroup (although none of them will be displayed in the presentation, but we could probably work around that by using our slots instead of troop_get_class), and then use team_get_xxx_order for the subgroup and then apply it to your new group via team_give_order. And in case the player switches the troop's class in the party menu, we can use a trigger to refresh the slots via troop_get_class and comparing it to our slot value.

    That, I think, leads us to the solution, pending some testing. 

    Looking at the mission templates, the first thing an agent does when it spawns is go through the agent_reassign_team script, which assigns him a team depending on if he is under the player's control, an ally, or an enemy.  We could use that script to pull out any special classes we want and assign them to new teams (one for enemies and one for allies), then put those new teams under the allied leader and the enemy leader control.  Any units already under the player control can be ignored.  Then the tactical scripts would have to be re-written to include this secondary team for each AI leader. 

    You could, for example, pull out spearmen, skirmishers, and horse archers; assign them to the secondary team and issue AI  orders to them as infantry, archers, and cavalry.  That way, the AI can operate independent of the player's groupings. 

    You would have to keep track of the player's groupings and accomodate any changes so that you could be sure you were issuing orders to the right classes.  During the team assignment script, you could just get the current class of the units and send that to the tactical scripts to have orders issued to, instead of using constants like grc_archers.

    In this case, it would be better if the player's groupings weren't global.  For example, he may have infantry, spearmen, and skirmishers all in the infantry group.  If you want your AI to handle spearmen and skirmishers as seperate classes, then you would have to assign two new teams for each AI side to work around his groupings.  The setting teams script will have to be pretty flexible.

    Another possibility might be to just assign special classes their own team from the start and then issue orders to that team using grc_everyone.  In fact, that's probably the better solution.  That way it will be consistent and won't require a bunch of checks and adjustments.

    The agent_get_divison does seem to return the new groupings, so that will save us having to return classes using the troop id.  I haven't tested it yet, but that's how it seems looking at how it is used in the scripts.

    I think the only reason global player groupings haven't broken the game so far is because the vanilla AI is so basic.  It only ever issues orders to archers and everyone.  It can pretty well be summed up as:

    CHARGE!, or

    Hold then CHARGE!, or

    Follow me then CHARGE!, or

    if all else fails...

    CHARGE!

    xenoargh 说:
    Hrmm.

    Just looking over  the output for this, it apparently assigns the slot via the guarantee value of 0,2,4 for that value.  Stands to reason that if tf_guarantee_horse overrides tf_guarantee_ranged (which it does) then it may in fact be possible to write new categories by altering the header, which would auto-put troops into certain categories.  This could probably be confirmed by doing some savegame spelunking, since the hex value of the troop group assignment should be seen to shift if you change it.

    Brings me right back to my Module System request that we be allowed to flat-out declare this stuff, tho.

    Does anybody know what troop_type_mask does?  I can't find any reference to it other than the header.

    That's in my module system request too.  Another one I have now is the ability to set simple behaviours.  I'm curious what effect aisb_ranged_horseback and aisb_maneuver_horseback have on a unit.  I'm not sure what troop_type_mask does.  I think troop type has to to do with gender although I wouldn't swear to it.

    Anyway, didn't intend for this to become such a long friggin' post.  The team idea looks promising and I'm off to experiment. 
  18. Khergits in 1.125 on High difficulty settings

    Changelog here:  http://forums.taleworlds.com/index.php/topic,123231.30.html (don't know where they got it from).  Khergits have been tweaked a bit.

    Also, for those interested, making some progress here towards making some basic AI skirmishing tactics.  Can at least seperate the AI units into seperate groups by exploiting the player's party screen group selections.  We'll see how well they take seperate orders. 
    http://forums.taleworlds.com/index.php/topic,123208.0.html
  19. Some clarification about troop classes?

    ...and here are the results.

    Here is my testing code, added to battle_tactic_init:

    插入代码块:
      # script_battle_tactic_init
      # Input: none
      # Output: none
      ("battle_tactic_init",
        [
          (call_script, "script_battle_tactic_init_aux", "$ai_team_1", "$ai_team_1_battle_tactic"),
          (try_begin),
            (ge, "$ai_team_2", 0),
            (call_script, "script_battle_tactic_init_aux", "$ai_team_2", "$ai_team_2_battle_tactic"),
          (try_end),
    
        #grouptest
          (try_for_agents, ":cur_agent"),
             (agent_get_troop_id, ":troop_id", ":cur_agent"),
              (eq, ":troop_id", 64), #khergit skirmisher
              (agent_set_group, ":cur_agent", 6),
          (try_end),    
          (try_for_agents, ":cur_agent"),
              (agent_get_troop_id, ":troop_id", ":cur_agent"),
              (troop_get_class, ":troop_class", ":troop_id"),
              (try_begin),
                  (eq, ":troop_class", 6),
                  (str_store_class_name, s1, ":troop_class"),
              (display_message, "@Skirmisher found, troop class is: {s1}"),
              (try_end),
          (try_end),
        #end grouptest
    
          (try_for_agents, ":cur_agent"),
            (agent_set_slot, ":cur_agent",  slot_agent_is_running_away, 0), #initially nobody is running away.
          (try_end),
      ]),

    The agent_set_group didn't work for setting the class.  My test unit was the khergit skirmisher.  I got no messages when I attacked a khergit army with skirmishers in it.

    However, I went and recruited some khergits, trained them up to skirmishers, and then set them to group 6 in the party screen.  That worked well.  The party screen does change the class globally.  When I attacked a khergit army with them, I got 22 messages.  19 for his skirmishers and 3 for mine.  The message was : "Skirmisher found, troop class is: unnamed group 4"

    My skirmishers ignored my commands completely, even when I selected "all".  I think agent_set_group must set "teams" rather than classes.  They were not following my orders and must be why they showed up in the message list, since that is strictly an AI script, as far as I know.  That part of the code should be removed if you still want to command them and test this out.  :smile:

    One note, if you want to test this, groups start counting at 0 in the scripts, so to set your units to group 6, you need to set them to the 7th group in the party screen list, unamed group 4.*

    The bottom line is, I didn't find a way to set their group by scripting, but you can set their group manually in the party screen and then order them through scripts after they have been set that way.  At least that's the way it appears from this test.

    For a tactical mod then, I guess an entry area where you are given a troop of each type, select their group in the party screen, and then have the troops removed and start the module proper would work, assuming we won't be given a script command to set a troop or agents class in a future patch.

    Tomorrow, I'll try putting in some AI orders for group 6 and see what comes of it. 

    *Just for clarification:
    party screen label = constant = value = keyboard number

    infantry = grc_infantry = 0 (keyboard 1 selects them in the battle screen)
    archers = grc_archers = 1 (kb2)
    cavalry = grc_cavalry = 2 (kb3)
    unnamed group 1 = grc_heroes = 3 (kb4) ( a legacy constant, I assume)
    unnamed group 2 =undefined constant = 4 (kb5)
    etc
    all = grc_everyone = 9 (kb0)
  20. Some clarification about troop classes?

    Thanks for the input guys.  Here are a few more things I've found digging around.

    There are some constants declared in header_common for multiplayer classes, including horse archers:

    插入代码块:
    multi_troop_class_other = 0
    multi_troop_class_infantry = 1
    multi_troop_class_spearman = 2
    multi_troop_class_cavalry = 3
    multi_troop_class_archer = 4
    multi_troop_class_crossbowman = 5
    multi_troop_class_mounted_archer = 6
    multi_troop_class_mounted_crossbowman = 7

    The way they check for them is by checking for a specific unit type like so, from the script "multiplayer_get_troop_class"

    插入代码块:
         (else_try),
           (eq, ":troop_no", "trp_khergit_veteran_horse_archer_multiplayer"),
           (assign, ":troop_class", multi_troop_class_mounted_archer),

    This is just used for equipment options in a later script and I don't see it being set permanently or being used in any AI scripts, so probably not very useful to us.

    Like Somebody said, the troop_get_class operator does seem to use the groupings rather than the hardwired classes, which is good.  Also, looking through the presentations, operators such as team_give_order, team_set_order_position, etc. appear to work with groups as well.

    插入代码块:
             (try_begin),
                (eq, "$g_formation_group5_selected", 1),
                (team_give_order, ":player_team", 5, mordr_hold),
                (team_set_order_position, ":player_team", 5, pos3),
              (try_end),

    The main tactical scripts for field battles appear to be "battle_tactic_init" and "battle_tactic_apply" along with their aux scripts.  These do make use of the gfc_classes, but, they are using the same team_give_order operator, so presumably, if we can find a way to change a units group through scripting, then we can rework those scripts to include custom classes for the AI.

    插入代码块:
      ("battle_tactic_init_aux",
        [
          (store_script_param, ":team_no", 1),
          (store_script_param, ":battle_tactic", 2),
          (team_get_leader, ":ai_leader", ":team_no"),
          (try_begin),
            (eq, ":battle_tactic", btactic_hold),
            (agent_get_position, pos1, ":ai_leader"),
            (call_script, "script_find_high_ground_around_pos1", ":team_no", 30),
            (copy_position, pos1, pos52),
            (call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point.
            (copy_position, pos1, pos52),
            (call_script, "script_find_high_ground_around_pos1", ":team_no", 30), # call again just in case we are not at peak point.
            (team_give_order, ":team_no", grc_everyone, mordr_hold),
            (team_set_order_position, ":team_no", grc_everyone, pos52),
            (team_give_order, ":team_no", grc_archers, mordr_advance),
            (team_give_order, ":team_no", grc_archers, mordr_advance),
          (else_try),
            (eq, ":battle_tactic", btactic_follow_leader),
            (team_get_leader, ":ai_leader", ":team_no"),
            (ge, ":ai_leader", 0),
            (agent_set_speed_limit, ":ai_leader", 8),
            (agent_get_position, pos60, ":ai_leader"),
            (team_give_order, ":team_no", grc_everyone, mordr_hold),
            (team_set_order_position, ":team_no", grc_everyone, pos60),
          (try_end),
      ]),

    The only operator I've seen that looks promising is agent_set_group.  I don't see any more set operators that seem applicable, and it's not clear to me if it will set a group that can then be returned by troop_get_class or used by team_give_order.  So, I'll do a test and cycle through the agents during the "battle_tactic_init" script and set horse archers to group 6, then I'll set some obvious commands for group 6 in the "battle_tactic_init_aux" script and see if they follow the new scripted orders on the battlefield.

    I'm not the best scripter, so I'll post what I try here and whatever results I get.  I guess a better test would be to cycle through a party and use agent_set_group on the horse archers and then cycle through it again using troop_get_class to print the results to a debug message or a log.  I may try that first if I can work out an easy way to set it up with this python mess.  Did I mention I'm not the best scripter?  :oops:
后退
顶部 底部