How to make a spawned party win all simulated battles.

Users who are viewing this thread

Berserker Pride

Grandmaster Knight
Alright I need to make a party for my mod that can not lose a simulated battle.  This party will have few members but all will be devastating in combat.  But good old autocalc will wipe them out in the blink of an eye.
(try_begin),
            #For fighting Gutts he will win every time.
            (party_count_members_of_type,":gutts","$gutts_band_party_id","trp_npc_black_swordsman"),
            (gt,":gutts",1),
            (val_mul, ":defender_strength", 1000),
            (val_div, ":attacker_strength", 1000),
          (try_end),
This is what I have now I'm trying to copy this part of game_event_simulate_battle
(try_begin),
            #For sieges increase attacker casualties and reduce defender casualties.#KKM tweaked now.
            (this_or_next|party_slot_eq, ":root_defender_party", slot_party_type, spt_castle),
            (party_slot_eq, ":root_defender_party", slot_party_type, spt_town),
            (val_mul, ":defender_strength", 3),
            (val_div, ":defender_strength", 2),
            (val_div, ":attacker_strength", 2),
          (try_end),
 
So if i see right,youre trying to get Guts win a battle alone?Well,you COULD try to lower the morale of the opposong band,and increase Guts morale.That would work for some degree.I guess :wink:
 
Well, I'd use a party slot. Have a map trigger or something check if the Gutts party has the Black Swordsman troop (pretty much using the same method as yours, expect that the value check part should be 'gt, ":gutts", 0' because gt is greater than, use 'ge' which is greater than or equal to for this), if he does, then add the party slot 'slot_has_black_swordsman', if he doesn't, then disable it.

Then, in the menu, use something like this. This should go after it increases siege attacker casualties and reduces siege defender casualties.
Code:
		    (try_begin),
			    (party_slot_eq, ":root_defender_party", slot_has_black_swordsman, 1),
				 (val_mul, ":defender_strength", 100),
			 (else_try),
			    (party_slot_eq, ":root_attacker_party", slot_has_black_swordsman, 1),
				 (val_mul, ":attacker_strength", 100),
			 (try_end),

For the trigger, I'd do something like this.
Code:
			(0.1,
			[
			    (party_count_members_of_type, ":type", "p_main_party", "trp_npc_black_swordsman"),
				 (assign, reg1, ":type"),
				 (try_begin),
				    (gt, reg1, 0),
					 (party_set_slot, "p_main_party", slot_has_black_swordsman, 1),
				 (else_try),
				    (party_set_slot, "p_main_party", slot_has_black_swordsman, 0),
				 (try_end),
			])

Of course, in script_game_init, do 'party_set_slot, "p_main_party", slot_has_black_swordsman, 0".
 
Thank you Cdvader.  This all works perfectly.  I tested it out by letting Gutts fight a 30 man sea raider party.  First round of combat that party was dead at no casualties to Gutts. I tweaked the code you gave me so opponents of Gutts also do 100 times less damage to him.  So come time for Griffith to appear Gutts will attack any of those parties he can.
 
Back
Top Bottom