Grow party

Users who are viewing this thread

Tooff

Squire
it's possible to creat party, that will spawn like bandits,and when they stay alive,they grow up,like "rebels",so
ex. in 1 day they grow 5 units in soldiers.
 
Was it supposed to be a question?

If so, all lord parties already works that way.

If you look at the reinforcement codes, you will see how a party regularly gets more units.
 
Sure, first add a party_template that includes the bandits.

Than add a simple trigger that activates every 24 hours.

In simple triggers do something like this:

(try_for_parties,":party_no"),
  (party_get_template_id, ":template",":party_no"),
  (eq, ":template", "pt_enter_name_here"),
  (party_add_members,":party_no","trp_bandit",10),
(try_end),

Hope this helped.
 
I think by doing this would give you the result you wanted

So. Let's say that you want to make the looters so they grow every day. And after a while they will grow so big that they will become a Rebelling Mob.
Then do like this.

Insert this into the module_simple_triggers.py
Code:
#########Growing Parties Begin#########
##Give 5 troops to the party every day
  (24,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_add_members,":party_no","trp_looter",5),
   (try_end),
    ]),




##(Assuming that the party started with 20 troops) Change the name of the party after the troop limit reached 100.
  (384,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_set_name, "p_looters", "str_reb_mob"),
   (try_end),
    ]),

#########Growing Parties end#########

Then insert this to module_strings.py
Code:
("reb_mob", "Rebelling Mob"),


That's it. All though. I haven't tested it yet. But I think it will work. Just remember to make the looters party count to be 20. Or else it will not be a rebelling mob when they are 100. Cause this is set so that they'll be a rebelling mob after 16 days.

But I havn't tested it yet so I'm not 100%
 
yeah,looks good,but they will grow forever and may millions on site,need to limit them ,say to 500.so need to stop grow up.
 
bjorne. said:
Code:
#########Growing Parties Begin#########
##Give 5 troops to the party every day
  (24,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_get_num_companions,":limit",":party_no"),
     (lt, ":limit", 200),
     (party_add_members,":party_no","trp_looter",5),
   (try_end),
    ]),




##(Assuming that the party started with 20 troops) Change the name of the party after the troop limit reached 100.
  (384,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_set_name, "p_looters", "str_reb_mob"),
   (try_end),
    ]),

#########Growing Parties end#########

Then insert this to module_strings.py
Code:
("reb_mob", "Rebelling Mob"),
That adds a bit more, thanks bjorne. For the limit, add:

(party_get_num_companions,":limit",":party_no"),
(lt, ":limit", 200),

that way they won't grow beyond 200.
 
Hello, bjorne.

As far as I can see from your trigger

bjorne. said:
##(Assuming that the party started with 20 troops) Change the name of the party after the troop limit reached 100.
  (384,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_set_name, "p_looters", "str_reb_mob"),
  (try_end),
    ]),
the change of the party name will take place after 16 (384 = 16*24) days, but not when the party will collect 100 members.
But they may simply defeat some party with prisoners, freed them and recruit. This way they may collect 100 members and more earlier than after 16 days without the change of their party name.
Am I right?
 
ArRiad said:
Hello, bjorne.

As far as I can see from your trigger

bjorne. said:
##(Assuming that the party started with 20 troops) Change the name of the party after the troop limit reached 100.
  (384,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_set_name, "p_looters", "str_reb_mob"),
  (try_end),
    ]),
the change of the party name will take place after 16 (384 = 16*24) days, but not when the party will collect 100 members.
But they may simply defeat some party with prisoners, freed them and recruit. This way they may collect 100 members and more earlier than after 16 days without the change of their party name.
Am I right?

You are right, instead you can use this:

  (92,
  [
  (try_for_parties,":party_no"),
    (party_get_template_id, ":template",":party_no"),
    (eq, ":template", "pt_looters"),
    (party_get_num_companions,":size",":party_no"),
    (ge, ":size", 100),
    (party_set_name, "p_looters", "str_reb_mob"),
  (try_end),

And bjorne: Yea I meant in the first part, I changed it in the quote-code.
    ]),
 
oh never though of that and I never knew that.

So here is the code that you wondet... ehm. who? who wanted it froom the first place? naah. I gonna use it in my mod instead.
Code:
#########Growing Parties Begin#########
##Give 5 troops to the party every day
  (24,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_get_num_companions,":limit",":party_no"),
     (lt, ":limit", 200),
     (party_add_members,":party_no","trp_looter",5),
   (try_end),
    ]),


##Making them to change their name
  (92,
   [
   (try_for_parties,":party_no"),
     (party_get_template_id, ":template",":party_no"),
     (eq, ":template", "pt_looters"),
     (party_get_num_companions,":size",":party_no"),
     (ge, ":size", 100),
     (party_set_name, "p_looters", "str_reb_mob"),
   (try_end),

#########Growing Parties End#########

Code:
("reb_mob", "Rebelling Mob"),
 
Back
Top Bottom