capturing dead enemies??

Users who are viewing this thread

Dindi

Sergeant Knight
Hey there ive been modding for about a week so bear with me if i seem noobish.

I want to know if its possible to "capture" enemies killed in battle and then turn these dead enemies into either a) meat or b) a different troop type (in my case zombies), also would it be possible to make the number of zombies i get from the corpses dependant on the level of a certain skill??

thanks dindi
 
(Example; you can change brigands to undead...)

could you elaborate that? how exactly would i change brigands to undead??

like that?
upgrade(troops,"brigand","zombie")

but surely the brigand would need to get some exp before he upgrades??
 
Dindi said:
(Example; you can change brigands to undead...)

could you elaborate that? how exactly would i change brigands to undead??

like that?
upgrade(troops,"brigand","zombie")

but surely the brigand would need to get some exp before he upgrades??
Yes, you can fix it in module_troops. (on down of module_troops).
upgrade(troops,"bandit","brigand")
upgrade(troops,"manhunter","slave_driver")
You can add new upgrade form.
upgrade(troops,"river_pirate","undead")
upgrade(troops,"undead","undead_walker")
upgrade(troops,"sea_raider","undead_walker")
upgrade(troops,"undead_walker","undead_runner")
upgrade(troops,"undead_runner","undead_warrior")
...
 
hmm i know how to add upgrades thats not what i need to know, i would like to turn dead enemies into living troops and how to capture dead enemies
 
The capturing DEAD enemies is probably hardcoded.
As for switching them to living, make a trigger that when they die, they switch to TROOPNAME.
Example: Bandit dies, you capture him, he switches to a zombie.
 
Ya I would have a script that is called after each fight and the script will take a parameter of how many people died in the battle.  It will then generate a random number between 0 and the amount of killed troops + 1 (because (store_random_in_range, ":rand", 0, 10) will store a random number between 0 and 9, not 0 and 10) and then it will add that amount of zombies to the party.

Code:
#script_create_zombies:
  # INPUT: amount of troops killed
  # OUTPUT: none
  
  ("create_zombies",
    [
      (store_script_param_1, ":amount_of_killed_troops"), #stores the input
      (val_add,":amount_of_killed_troops",1), adds 1 to the input
      (store_random_in_range, ":rand", 0, ":amount_of_killed_troops"), # generates a random number from 0 to the input
      (party_get_free_companions_capacity, ":capacity", "p_main_party"),  #gets the amount of free troop space in the player's party
      (val_clamp,":rand",0, ":capacity"),   # makes sure that the amount of zombies that are going to be added to the player party doesnt go over the player's troop limit
      (party_add_members, "p_main_party", "trp_zombie", ":rand"),  # adds n zombies to the player party.
    ]
),

The player might not get any zombies if there isnt enough room for them and you dont have (val_clamp,":rand",0, ":capacity").  What that does is makes sure ":rand" doesnt go under 0 and over whatever the capacity is.
I am not sure if any of this works because I have not tested it, but it could be a start for you.
You still have to call this script from somewhere.  I havent looked to see where.
Nice idea, I think I am going to add this to my mod for if the player is a vampire.

Edit:  I am looking at ways you could use this script but I cant seem to find a way to get the total killed in a battle without changing much and editing other scripts.  Can someone else help out?  I am thinking it needs to go in game menu battle debrief and go in the block
Code:
   (try_begin),
       (eq, "$g_battle_result", 1),
       (eq, "$g_enemy_fit_for_battle", 0),
       (str_store_string, s11, "@You were victorious!"),
 
thanks grailknighthero that looks pretty awesome, also for what you said about the vampire how would it work?

would you create a new race and change one of the normal skills into one could "necromancy" for example and add a requirement in a script telling it that a certain level of necromancer is needed for this script to happen so non necromancers/vampires cant raise an army of undead.
 
Back
Top Bottom