Who is Who?

正在查看此主题的用户

I am trying to use a code. Basically I have captured, for example, Lord Aeric, and am talkin to him as my prisoner. I am trying to use the code: (party_ignore_player,"x",720), but I am unsure of how to get Lord Aeric's party into "x" from talking to Lord Aeric as my prisoner.
 
May be you can define aditional slot for kingdom heroes, slot_troop_last_leaded_party, assigned to the party leaded by just before take the hero as prisoner. It could be on module_dialogs.py, search for "You're not going anywhere. You 'll be my prisoner now!"
 
If Just after you encountered the lord party, The party ID is stored in "$g_encountered_party".

(party_ignore_player, "$g_encountered_party", 720),
 
Ruchi's code would be awesome, But I have edited the dialog for when you are talking to him as your prisoner, and I want to make it so that you can cut a deal with him. One of the options is that he will ignore you...

Actually, now that I think about it, where are the parties for kingdom lords? They arn't actually under the "parties" list at all...
 
If you had already taken the lord as prisoner, There is no party of the lord.

but I am unsure of how to get Lord Aeric's party into "x" from talking to Lord Aeric as my prisoner.

It is self-evident that it is impossible to get the party ID that do not exist.
 
True, But would it be possibe that we can test to see who it is we are talking to? If so I would be able to make, in this case "Lord Aeric" equal to the party id through alot of tests and equals and stuff, thus when I input the code for ignoring the player it just gets the "Lord Aeric" constant (aka the party ID). Would take forever but I like my idea for ignoring the player party so I would do the work...
 
Party was defeat and When the Lord made a own new party, the party has a new party ID. Party ID is not constant. (But IDs of villages and towns and castles are constant)

Troop has Constant ID. When the Lord made a new own party, the party ID sets in slot_troop_leaded_party.
After he made a party, you can get a new party ID.
 
Sample script:
(assign, ":cur_troop", <ID of lord Aeric>),
(neg|party_slot_ge, ":cur_troop", slot_troop_prisoner_of_party, 0), # the troop did not take as prisoner.
(party_get_slot, ":leaded_party", ":cur_troop", slot_troop_leaded_party),
(gt, ":leaded_party", 0),
(party_is_active, ":leaded_party"),
 
eagles_rule_der 说:
Would it be possible to test for what party the troop id is in?

I'm sure it's very possible. Assumed that troop_id is hero.
# input    : troop_id
# output : reg0 as party contained troop_id (-1 if not found)

插入代码块:
  ("troop_get_party",
    [(store_script_param_1, ":troop_id"),
      (assign, ":found",0),
      (assign, reg0, -1),
      (try_for_parties, ":party_no"),
       (eq, ":found", 0),
       (party_get_num_companion_stacks, ":num_stack", ":party_no"),
       (try_for_range, ":stack_no", 0, ":num_stack"),
            (eq, ":found", 0),
            (party_stack_get_troop_id, ":troop_no", ":party_no", ":stack_no"),
            (eq, ":troop_id", ":troop_no"),
            (assign, ":found", 1),
            (assign, reg0, ":party_no"),
       (try_end),
   (try_end),
   ]),

But in native, this code isn't useful, because every kingdom hero always lead his own party, and all companion only can be hired by player. This code will be useful for modules that let AI heroes hire companions or let multiple kingdom heroes in one party.
If you look for party that has troop id as prisoner, then slot_troop_prisoner_of_party is enough.
 
后退
顶部 底部