Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Question.  Does anyone have a link to a page that tells what the names of all the towns, villages, and castles go to which factions, and what villages go to what castles?  I tried the search, but nothing came up.  Thanks!
 
COGlory said:
Question.  Does anyone have a link to a page that tells what the names of all the towns, villages, and castles go to which factions, and what villages go to what castles?  I tried the search, but nothing came up.  Thanks!
Town and castles are assigned to factions in the game_start script (obviously in module_scripts) villages are assigned to towns/castles by mere proximity to them.
 
Ruthven said:
COGlory said:
Question.  Does anyone have a link to a page that tells what the names of all the towns, villages, and castles go to which factions, and what villages go to what castles?  I tried the search, but nothing came up.  Thanks!
Town and castles are assigned to factions in the game_start script (obviously in module_scripts) villages are assigned to towns/castles by mere proximity to them.

If I'm not mistaken priority goes to the castles first, so if the closest available village for a castle is also closer to a town it will become the castle's village instead of the closer town. After all castles have been assigned a village the rest that aren't taken will be given to towns. So you have to keep this in mind when you're dotting the map with villages.
 
amade said:
If I'm not mistaken priority goes to the castles first, so if the closest available village for a castle is also closer to a town it will become the castle's village instead of the closer town. After all castles have been assigned a village the rest that aren't taken will be given to towns. So you have to keep this in mind when you're dotting the map with villages.

Sounds about right, I've encountered castle's having a village that was closer then an other village that the town had. If castles have priority that would make sense then.
 
Follow up question.  If I move and re-name some castles and villages with Thorgrim's map editor, will that be compatible with the Module Editor?
 
COGlory said:
Follow up question.  If I move and re-name some castles and villages with Thorgrim's map editor, will that be compatible with the Module Editor?

You're talking about the module system? Well it's a question of what you do last... :wink:
You can make the map in the mapeditor and place the towns, etc. But if you compile the module system afterwards,
it will update the information of the town-places with the onces, you can set in module system.
Solve: You do everything in mapeditor, look up the positions and set them in module system module_partys.py
Or... you do everything in module system and use the map editor afterwards...

edit: with the names, it's the same.
 
Sorry if this is a bit of a noobish question but is there a mesh limit ???? if there is could someone pls tell me what it is ???

As I have been adding in some items from OSP and have got RGL error message " to many variations on mesh Full"

Thanks
  Kaltan
 
Kaltan said:
Sorry if this is a bit of a noobish question but is there a mesh limit ???? if there is could someone pls tell me what it is ???

As I have been adding in some items from OSP and have got RGL error message " to many variations on mesh Full"

Thanks
  Kaltan

Some of the OSP items don't work - which ones were you trying to use?
 
Setton said:
Kaltan said:
Sorry if this is a bit of a noobish question but is there a mesh limit ???? if there is could someone pls tell me what it is ???

As I have been adding in some items from OSP and have got RGL error message " to many variations on mesh Full"

Thanks
  Kaltan

Some of the OSP items don't work - which ones were you trying to use?


maws armor pack have only added in a few but have but in the whole brf files need to cut it all down to just relevant ones just wondering due to the mesage if there was a limit

Thanks for your answer
 
I'd advise deleting any models you aren't using anyway - it makes going through large resource files like maw's much easier  :wink:
 
I'm working on my first mod just now - I know how to add new towns and factions but can anyone tell me how to assign these towns to the new factions?
 
Is there any way to iterate through, and perform some action on, a stack of troops in your party?
I'm used to C/C++ so not being able to directly access, from what I've tried so far, a specific array index is killing me.  :evil:

This is what I've tried so far, but it doesn't work so any help would be appreciated immensely.
Code:
( "foo",
[
   ( party_get_num_companion_stacks, ":num_stacks", "p_main_party" ),                    # get how many groups of troops we have
   ( try_for_range, ":curr_stack", 0, ":num_stacks" ),                                   # iterate through the stacks
      ( party_stack_get_size, ":stack_size", "p_main_party", ":curr_stack" ),            # get size, how many troops in it, of current stack
      ( party_stack_get_troop_id, ":curr_troop_id", ":curr_stack" ),                     # get the troop id for what's in current stack
      ( try_begin ),
         ( neq|troop_is_hero, ":curr_troop_id" ),                                        # make sure these troops aren't heroes
            ( try_for_range, ":curr_stack_troop", 0, ":stack_size" ),                    # iterate through the current stack of troops
               ( eq, ":curr_troop_id", "trp_swadian_recruit" ),                          # is the current troop a swadian recruit? Used for testing
                  ( troop_clear_inventory, ":curr_troop_id" ),                           # clear the troops inventory. Used for testing
                  ( troop_add_item, ":curr_stack_troop", "itm_gold_tourney_helmet", 0 ), # give current troop a gold tourney helm. Used for testing
                 ( troop_equip_items, ":curr_troop_id" ),                                # make current troop wear it. Used for testing
            ( end_try ),                                                                 # end of second try_for_range
      ( end_try ),                                                                       # end of try_begin
   ( end_try ),                                                                          # end of first try_for_range
]),
 
Chris_B said:
Is there any way to iterate through, and perform some action on, a stack of troops in your party?
I'm used to C/C++ so not being able to directly access, from what I've tried so far, a specific array index is killing me.  :evil:

This is what I've tried so far, but it doesn't work so any help would be appreciated immensely.

( "foo",
[
  ( party_get_num_companion_stacks, ":num_stacks", "p_main_party" ),                    # get how many groups of troops we have
  ( try_for_range, ":curr_stack", 0, ":num_stacks" ),                                  # iterate through the stacks
      ( party_stack_get_size, ":stack_size", "p_main_party", ":curr_stack" ),            # get size, how many troops in it, of current stack
      ( party_stack_get_troop_id, ":curr_troop_id", ":curr_stack" ),                    # get the troop id for what's in current stack
      ( try_begin ),
        ( neq|troop_is_hero, ":curr_troop_id" ),                                        # make sure these troops aren't heroes
            ( try_for_range, ":curr_stack_troop", 0, ":stack_size" ),                    # iterate through the current stack of troops
              ( eq, ":curr_troop_id", "trp_swadian_recruit" ),                          # is the current troop a swadian recruit? Used for testing
                  ( troop_clear_inventory, ":curr_troop_id" ),                          # clear the troops inventory. Used for testing
                  ( troop_add_item, ":curr_stack_troop", "itm_gold_tourney_helmet", 0 ), # give current troop a gold tourney helm. Used for testing
                ( troop_equip_items, ":curr_troop_id" ),                                # make current troop wear it. Used for testing
            ( end_try ),                                                                # end of second try_for_range
      ( end_try ),                                                                      # end of try_begin
  ( end_try ),                                                                          # end of first try_for_range
]),

You forgot to put one of the parameters in the highlighted operation, the party ID.

I'm not quite sure what you're trying to do, but I don't think it's possible in M&B due to the way the game's set up. Iterating over every troop in a stack is pointless because they're all the same troop definition, and changing a troop definition will change every individual instance of that troop at the same time -- every troop in every stack of Swadian recruits in the game.

That's all.

Swiftly,
Winter
 
Thanks for the info. I was hoping there was a way to modify a troops equipment without needing to completely replace your current ones entirely, thereby losing any experience that had already been earned.

The idea was to go through a stack and strip the inventory of each individual soldier, give them the new items and then force them to equip everything. Looks like I'm forced to jump through hoops though. :roll:
 
Status
Not open for further replies.
Back
Top Bottom