Add more people in towns?

Users who are viewing this thread

Your saying just make some ppl with different clothes? or i could edit the ones already there? and omg this page is epic, is there a easy way to find this script line, ive been scrolling for like 15 min, can anyone tell me if its like middle of page first bottom anything.
 
Lato said:
Your saying just make some ppl with different clothes? or i could edit the ones already there? and omg this page is epic, is there a easy way to find this script line, ive been scrolling for like 15 min, can anyone tell me if its like middle of page first bottom anything.
CTRL+F, and there will be a "Find Tool Dialog"
 
I tried to use it but there are so many options in it, what do i type in it, and cricle do i check in it?

(edit) I just searched the whole thing and found it, this works great! Makes it look more like a live city, I dont know why the default was so low # of ppl, thank you this is great.
 
Ok maybe a stuipd question but im going back over this and is there anyways to add this "mod" just editing the text files? I did it with the MS but i need to do it with the text files.
 
xenoargh said:
It's fairly easy to script this.

First part:  getting more people into the towns.  This part's easy- a one line change.  Find script_init_town_walkers in module_scripts.

Remove the line that reads:  (set_visitor, ":entry_no", ":walker_troop_id"), and replace it with this:  (set_visitors,":entry_no", ":walker_troop_id",5),

Here's an example, if you're confused.

Code:
          # script_init_town_walkers
          # Input: none
          # Output: none
          ("init_town_walkers",
            [
              (try_begin),
                (eq, "$town_nighttime", 0),
                (try_for_range, ":walker_no", 0, num_town_walkers),
                  (store_add, ":troop_slot", slot_center_walker_0_troop, ":walker_no"),
                  (party_get_slot, ":walker_troop_id", "$current_town", ":troop_slot"),
                  (gt, ":walker_troop_id", 0),
                  (store_add, ":entry_no", town_walker_entries_start, ":walker_no"),
		   (set_visitors,":entry_no", ":walker_troop_id",5),
                (try_end),
              (try_end),
          ]),

Now for the "hard" part:  getting those additional people to move around and look vaguely like a crowd.  Replace the entire script_set_town_walker_destination with this code.  That's it.  Now you have a lot more people, and they'll wander around randomly.

Code:
          # script_set_town_walker_destination
          # Input: arg1 = agent_no
          # Output: none
          ("set_town_walker_destination",
            [(store_script_param_1, ":agent_no"),	  
			(store_random_in_range, ":rand_dest", 1 ,12),
			
            (try_begin),
				(eq, ":rand_dest", 1),
				(assign, ":target_entry_point", 9),
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 10),
			(else_try),	
				(eq, ":rand_dest", 3),
				(assign, ":target_entry_point", 12),	
			(else_try),	
				(eq, ":rand_dest", 4),
				(assign, ":target_entry_point", 32),	
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 33),	
			(else_try),	
				(eq, ":rand_dest", 5),
				(assign, ":target_entry_point", 34),	
			(else_try),	
				(eq, ":rand_dest", 6),
				(assign, ":target_entry_point", 35),	
			(else_try),	
				(eq, ":rand_dest", 7),
				(assign, ":target_entry_point", 36),	
			(else_try),	
				(eq, ":rand_dest", 8),
				(assign, ":target_entry_point", 37),	
			(else_try),	
				(eq, ":rand_dest", 9),
				(assign, ":target_entry_point", 38),	
			(else_try),	
				(eq, ":rand_dest", 10),
				(assign, ":target_entry_point", 39),	
			(else_try),	
				(assign, ":target_entry_point", 10),					
			(try_end),
			  
              (try_begin),
                (agent_set_slot, ":agent_no", 0, ":target_entry_point"),
                (entry_point_get_position, pos1, ":target_entry_point"),
                (try_begin),
                  (init_position, pos2),
                  (position_set_y, pos2, 250),
                  (position_transform_position_to_parent, pos1, pos1, pos2),
                (try_end),
                (agent_set_scripted_destination, ":agent_no", pos1, 0),
                (agent_set_speed_limit, ":agent_no", 5),
              (try_end),
          ]),

Excuse me but, I did everything here (it all worked fine)but most of the commoners attacked me as I entered a town, and strangely they dont attack once i am in a village, what did I do wrong :eek: (WFAS modder btw)  .

Edit:

Nevermind, comparing the modi=ule of wfas and warband, they have each different texts, so i just replaced some texts with the texts  thank you :smile:. If you want to see my mod btw its name is "Thirty year conflict" check it out on moddb

and for any curious wfas modder there :wink:

do the first step in the line "# script_init_town_walkers" remove the line that reads:  (set_visitor, ":entry_no", ":walker_troop_id"), and replace it with this:  (set_visitors,":entry_no", ":walker_troop_id",5),

then find for the line that says # script_set_town_walker_destination
then replace the whole thing with this code


Code:
    # script_set_town_walker_destination
  # Input: arg1 = agent_no
  # Output: none
  ("set_town_walker_destination",
    [(store_script_param_1, ":agent_no"),
     (store_random_in_range, ":rand_dest", 1 ,12),
     (assign, reg0, 9),
     (assign, reg1, 10),
     (assign, reg2, 12),
     (assign, reg3, 32),
     (assign, reg4, 33),
     (assign, reg5, 34),
     (assign, reg6, 35),
     (assign, reg7, 36),
     (assign, reg8, 37),
     (assign, reg9, 38),
     (assign, reg10, 39),
     (try_for_agents, ":cur_agent"),
       (agent_get_troop_id, ":cur_troop", ":cur_agent"),
       (is_between, ":cur_troop", walkers_begin, walkers_end),
       (agent_get_slot, ":target_entry_point", ":cur_agent", 0),
            (try_begin),
				(eq, ":rand_dest", 1),
				(assign, ":target_entry_point", 9),
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 10),
			(else_try),	
				(eq, ":rand_dest", 3),
				(assign, ":target_entry_point", 12),	
			(else_try),	
				(eq, ":rand_dest", 4),
				(assign, ":target_entry_point", 32),	
			(else_try),	
				(eq, ":rand_dest", 2),
				(assign, ":target_entry_point", 33),	
			(else_try),	
				(eq, ":rand_dest", 5),
				(assign, ":target_entry_point", 34),	
			(else_try),	
				(eq, ":rand_dest", 6),
				(assign, ":target_entry_point", 35),	
			(else_try),	
				(eq, ":rand_dest", 7),
				(assign, ":target_entry_point", 36),	
			(else_try),	
				(eq, ":rand_dest", 8),
				(assign, ":target_entry_point", 37),	
			(else_try),	
				(eq, ":rand_dest", 9),
				(assign, ":target_entry_point", 38),	
			(else_try),	
				(eq, ":rand_dest", 10),
				(assign, ":target_entry_point", 39),	
			(else_try),	
				(assign, ":target_entry_point", 10),					
			(try_end),
			  
              (try_begin),
                (agent_set_slot, ":agent_no", 0, ":target_entry_point"),
                (entry_point_get_position, pos1, ":target_entry_point"),
                (try_begin),
                  (init_position, pos2),
                  (position_set_y, pos2, 250),
                  (position_transform_position_to_parent, pos1, pos1, pos2),
                (try_end),
                (agent_set_scripted_destination, ":agent_no", pos1, 0),
                (agent_set_speed_limit, ":agent_no", 5),
              (try_end),
          ]),
 
Back
Top Bottom