Brand new to coding and I'm tired of banging my into a wall so I'm just going to

正在查看此主题的用户

td_klondike

Knight
bite the bullet and ask:

  ("special_bandits","Special Bandits",  icon_axeman|pf_always_visible|pf_label_large, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(60, 45),[(trp_sea_raider,50),(trp_swadian_footman,4,pmf_is_prisoner)]),


Why don't they show up as "Special Bandits" on the map, why isn't the label any larger when I put in pf_label_large, and why do I get error messages when I add the swadian prisoners?

Oh, one more: why do I get dialogue about starting a fight, why doesn't it go straight to a battle?

Any help is appreciated.
 
You added that in module_parties.py, didn't you?
While you might think that's the right place to put it, it should actually be in module_party_templates.py, since the game will spawn one or more of the parties from the template instead of directly from module_parties.py.
If you look at the other looter/bandit entries in module_parties.py, you'll see that they're actually spawn points.
Add this to module_party_templates.py
插入代码块:
("special_bandits","Special Bandits",icon_axeman|carries_goods(2),0,fac_outlaws,bandit_personality,[(trp_sea_raider,50,50),(trp_swadian_footman,4,4,pmf_is_prisoner)]),
BTW, you need both a lower bound and an upper bound for a range of values when the party template spawns.

Now copy a spawnpoint from module_parties.py and rename it, something like
插入代码块:
("special_bandit_spawn_point"   ,"looter_sp",pf_disabled|pf_is_static, no_menu, pt_none, fac_outlaws,0,ai_bhvr_hold,0,(26, 77),[(trp_looter,15,0)]),
The coordinates (26,77) are where your bandits will spawn from on the map.

Now go to module_constants.py, and find num_sea_raider_spawn_points = 2
below that add num_special_bandit_spawn_points = 1, which defines there being only one spawn point for your bandit.
Now go to module_scripts.py, and find script_spawn_bandits.
Inside the (try_begin) loop, add
插入代码块:
     (try_begin),
       (store_num_parties_of_template, ":num_parties", "pt_special_bandits"),
       (lt,":num_parties",1),
       (store_random,":spawn_point",num_special_bandit_spawn_points),
       (val_add,":spawn_point","p_special_bandit_spawn_point"),
       (spawn_around_party,":spawn_point","pt_special_bandits"),
     (try_end),
This way, the game will spawn your bandit party whenever there are less 1 party remaining. As to the dialogue, go to module_dialogs.py, and look for the entry there.
 
Thanks, guys.  I originally started tampering with the party templates tuples, but the list of errors was quite impressive.  I thought I would be better off trying something simple, like just creating a party that I could add variables to.  As an exercise, you know?  Just practice.  I'm nowhere near ready to start modding for real.  I'll try what you've done, and experiment from there.

Thanks again.
 
后退
顶部 底部