make parties spawn in specific places

Users who are viewing this thread

Sure. Place a marker party, use (set_spawn_radius, 0) to get rid of positioning randomization and call (spawn_around_party) to create your historical party exactly at the marker.

Or if you know the coordinates, spawn the party anywhere and immediately call (party_set_position).
 
Deutch1 said:
i sound like a noob but how sould you do that specifically

lol I asked the same question last week. Let me help you
Assume that you had already made a party template, if you haven't. Search for other tutorials.

_______________
module_parties.py
Go to the second last line, before the close-square-bracklet
add
Code:
 ("new_sp"   ,"new_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(30, -45),[(trp_looter,15,0)]),

first new_sp is the ID of the spawn point, and the second new_sp is the name of the spawn point. pf_disabled means that new_sp isn't showed in-game. Usually it won't show up. But bandit lairs like "mountain bandit cdave" will be shown. Other's IDK. fac_outlaw means bandits and such, if it's normal. Type fac_neutral. then also IDK. And (30,45) is the coordinates. 30,45 is somewhere around the borders of Swadia and Khergit.

______________
module_script.py
First, go to line 32799 (I know it's long, but the reality is this)
or you could search for keyword : (store_num_parties_of_template, ":num_parties", "pt_mountain_bandits"),

Then copy
Code:
(try_begin),
       (store_num_parties_of_template, ":num_parties", "pt_mountain_bandits"),
       (lt,":num_parties",16), #was 14 at mount&blade, 18 in warband, 16 last decision
       (store_random,":spawn_point",num_mountain_bandit_spawn_points),
       (val_add,":spawn_point","p_mountain_bandit_spawn_point"),
       (set_spawn_radius, 25),
       (spawn_around_party,":spawn_point","pt_mountain_bandits"),
(try_end),

And change parts. "pt_mountain_bandits" to "pt_your_party_name" <-- Your party name, not "your party name". BTW you need "pt_" first
Then    (lt,":num_parties",16) 16 is the number of parties will be spawned
            "num_mountain_bandit_spawn_points" This is the name of the type of spawn point. Not the number of spawn point, the no. of sp is changed in other places
            "p_mountain_bandit_spawn_point" refers to the thing you made at parties.py
            (set_spawn_radius, 25) is the thing the above guy talked about. The radius where the party will spawn. If you want it to spawn at a specific point. Change it to 1
            at last, change pt_mountain_bandits to "pt_your_party_name" <-- Your party name, not "your party name". BTW you need "pt_" first <-- Copied :smile:
           
___________________
module_constant.py
Search for keyword "num_sea_raider"
or line 1652

then after
num_sea_raider_spawn_points

add this thing "num_spawn_point), it refers to the line below, which is (again) copied.
("num_mountain_bandit_spawn_points" This is the name of the type of spawn point. Not the number of spawn point, the no. of sp is changed in other places)
____________________________________________________________________________________________________________________________
Congratz! that's all you need!!
 
i can get it to work up until the module_scripts bit i put in the name of my party and it comes up "Error Illegal identifer "pt_harold"

and i donet understant the last bit in constants
 
Deutch1 said:
i can get it to work up until the module_scripts bit i put in the name of my party and it comes up "Error Illegal identifer "pt_harold"

and i donet understant the last bit in constants

Actually I also don't understand why. But in the constant. First is the num_ thing which is from the script file. And the = 1 means how many spawn points for that party.

pt_harold is the name of the party template. Make sure all of it is the same name.
 
Deutch1 said:
i can get it to work up until the module_scripts bit i put in the name of my party and it comes up "Error Illegal identifer "pt_harold"

and i donet understant the last bit in constants
In Module System, all references must be put in quotes.

Code:
(spawn_around_party, p_looters_lair, pt_looters),
Code:
(spawn_around_party, "p_looters_lair", "pt_looters"),
Of course, both "p_looters_lair" and "pt_looters" must be defined in module_parties.py and module_party_templates.py respectively.
 
Back
Top Bottom