Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
How do I make my scene size larger in the scene editor?

Seems that the custom maps are only of a medium size, whereas I want something much larger.
 
I have a question about porting my mod for 1.143 to 1.551. It´ll be enough to only update .header files or it´ll be necessary to update everything?

Note that it´s a multiplayer mod.

Thanks.
 
When I try to compile my mod, I get this:

  File "process_game_menus.py", line 47, in <module>
    save_game_menus(variables,variable_uses,tag_uses,quick_strings)
  File "process_game_menus.py", line 31, in save_game_menus
    save_game_menu_item(ofile,variable_list,variable_uses,menu_item,tag_uses,qui
ck_strings)
  File "process_game_menus.py", line 12, in save_game_menu_item
    save_statement_block(ofile,0, 1, menu_item[1], variable_list, variable_uses,
tag_uses,quick_strings)
  File "C:\Users\Josh\Documents\M+BModule\Module_system 1.143\process_operations
.py", line 449, in save_statement_block
    save_statement(ofile,opcode,no_variables,statement,variable_list,variable_us
es,local_vars, local_var_uses,tag_uses,quick_strings)
  File "C:\Users\Josh\Documents\M+BModule\Module_system 1.143\process_operations
.py", line 398, in save_statement
    ofile.write("%d %d "%(opcode, lenstatement))
TypeError: int argument required
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: g_enemy_surrenders
WARNING: Global variable never used: g_player_surrenders
WARNING: Global variable never used: g_private_battle_with_troop
WARNING: Global variable never used: cant_leave_encounter
WARNING: Global variable never used: g_leave_town_outside
WARNING: Global variable never used: character_gender
WARNING: Global variable never used: g_player_troop
WARNING: Global variable never used: g_camp_mode
WARNING: Global variable never used: g_prisoner_recruit_troop_id
WARNING: Global variable never used: g_prisoner_recruit_last_time
WARNING: Global variable never used: playerparty_postbattle_regulars
WARNING: Global variable never used: routed_party_added
WARNING: Global variable never used: thanked_by_ally_leader
WARNING: Global variable never used: last_freed_hero
WARNING: Global variable never used: capture_screen_shown
WARNING: Global variable never used: g_prison_heroes
WARNING: Global variable never used: g_siege_force_wait
WARNING: Global variable never used: g_siege_sallied_out_once
WARNING: Global variable never used: g_siege_join
WARNING: Global variable never used: qst_train_peasants_against_bandits_currentl
y_training
WARNING: Global variable never used: qst_eliminate_bandits_infesting_village_num
_villagers
WARNING: Global variable never used: g_player_raid_complete
WARNING: Global variable never used: quest_auto_menu
WARNING: Global variable never used: g_tournament_player_team_won
WARNING: Global variable never used: g_tournament_bet_placed
WARNING: Global variable never used: g_tournament_bet_win_amount
WARNING: Global variable never used: g_tournament_last_bet_tier
WARNING: Global variable never used: g_last_assassination_attempt_time
WARNING: Global variable never used: g_last_rest_payment_until
WARNING: Global variable never used: g_train_peasants_against_bandits_num_peasan
ts
WARNING: Global variable never used: last_sneak_attempt_town
WARNING: Global variable never used: last_sneak_attempt_time
WARNING: Global variable never used: g_training_ground_training_count
WARNING: Global variable never used: g_presentation_marshall_selection_max_renow
n_2
WARNING: Global variable never used: g_tutorial_entered
WARNING: Global variable never used: g_dont_give_marshalship_to_player_days
Exporting postfx_params...

Any ideas here? What does this mean?
 
You've made a mistake in module_game_menus. Where the compiler is looking for a simple integer--specifically an operation--it is getting something else. Could be a missing ( or comma...
Are there any error lines above where your copy-paste started? Otherwise, just look back over your game_menu edits and see what went wrong.
 
CTCCoco said:
I have a question about porting my mod for 1.143 to 1.551. It´ll be enough to only update .header files or it´ll be necessary to update everything?

Note that it´s a multiplayer mod.

Thanks.
There are some troop/item balances that you might want to address.
If you want presentation compatibility for game controllers, you'll probably want to do presentations, too.
 
What is the easiest way of getting a default module_game_menus so I can start again?

EDIT: I still had the module system zip. Open and pasted. Duh.
 
How do I change the colors of factions in WB? I tried using hexadecimal codes but they changed the colors to weird, different colors that I did not want. I also want to change the picture in the launcher.
 
Okay, the mod compiles but when I load up my save it says:
RGL ERROR
load error: number of triggers in file: 31, exceeds 25


(Also, I forgot to say "thanks Caba'drin")
 
Hello

I'm trying to add a town-specific mercenary company in the tavern

I added fac_kingdom8 mercenary unit into troops.py (where all the mercenaries are)

I am trying to edit the Tavern menu script for mercenaries. I added this

(store_faction_of_troop, ":faction", ":mercenary_troop"),
  (eq, ":faction", "$g_encountered_party_faction"),
(set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
(else_try),
(eq, ":faction", "fac_commoners"),
    (set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
This compiles fine, but it really seems to just gives a game a choice of which mercenary to place.

It seems like the game picks the mercenary troop first and since there are far more fac_commoners mercenaries my town specific mercenary may be seen very rarely. Is there a way to force the faction mercenary to appear in faction town? Or even 1 town specifically?

Thanks
 
WarGamer12 said:
How do I change the colors of factions in WB? I tried using hexadecimal codes but they changed the colors to weird, different colors that I did not want. I also want to change the picture in the launcher.
Your color codes must be wrong. See module_factions.py and change these values:
  ("kingdom_1",  "Kingdom of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xEE7744),

0x means hex, the rest are hex numbers meaning red (EE), green (77) and blue (44).
See this for a list of colors with hex codes: http://cloford.com/resources/colours/500col.htm

BuddhistJihad said:
Okay, the mod compiles but when I load up my save it says:
RGL ERROR
load error: number of triggers in file: 31, exceeds 25
Don't load an old game, start a new one.

JuJu70 said:
Hello

I'm trying to add a town-specific mercenary company in the tavern

I added fac_kingdom8 mercenary unit into troops.py (where all the mercenaries are)

I am trying to edit the Tavern menu script for mercenaries. I added this

(store_faction_of_troop, ":faction", ":mercenary_troop"),
  (eq, ":faction", "$g_encountered_party_faction"),
(set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
(else_try),
(eq, ":faction", "fac_commoners"),
    (set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
This compiles fine, but it really seems to just gives a game a choice of which mercenary to place.

It seems like the game picks the mercenary troop first and since there are far more fac_commoners mercenaries my town specific mercenary may be seen very rarely. Is there a way to force the faction mercenary to appear in faction town? Or even 1 town specifically?

Thanks

Yes, but you don't need to use the randomly generated ":mercenary_troop", use the troop you want. Or you choose a random faction merc.
Here is a Swadia-specific merc and a Praven-specific merc:

            (party_get_slot, ":mercenary_troop", "$current_town", slot_center_mercenary_troop_type),
            (party_get_slot, ":mercenary_amount", "$current_town", slot_center_mercenary_troop_amount),

            (try_begin),
              (gt, ":mercenary_troop", 0), #so mercs won't be always there
              (eq, "$current_town", "p_town_6"), #Praven
              (assign, ":mercenary_troop", "trp_praven_merc"),
              (assign, ":mercenary_amount", 5),
            (else_try),
              (gt, ":mercenary_troop", 0), #so mercs won't be always there
              (eq, "$g_encountered_party_faction", "fac_kingdom_1"), #Swadia
              (assign, ":mercenary_troop", "trp_swadia_merc"),
              (assign, ":mercenary_amount", 5),
            (try_end),


            (try_begin),
              (gt, ":mercenary_troop", 0),
              (gt, ":mercenary_amount", 0),
              (set_visitor, ":cur_entry", ":mercenary_troop"),
              (val_add, ":cur_entry", 1),
            (try_end),
 
Hello everyone,

I've also a couple of questions.
First, I've downloaded a HorsePack mod for more heavy cavalry. Everything works fine, but the new horses are only sold in the cities of Swadia. How can I chance that, so they will be sold in every city? Also, the horse merchant sells only five horses, how can I increase that amount?

Second, I need some help with a little plan. I was wondering if it is possible to add a new shop. Of course that's possible, but that's not the issue. I want to add a new shop for Light Armor and other clothings. Heavy armor must only be sold in the Armor Shop. So, you have two shops, one for light en clothings, and one for heavy...
Hope someone can help me  :smile:

Greetings,
Dennie

 
Hi,

Well, there are a few things to change if you want to make that happen.

First, Get Python and the module system...
At this link:
http://forums.taleworlds.com/index.php/topic,6575.0.html
you can find a lot of help starting with modding.
I don't know a lot about modding, but i think you first need to know the basics of the module system before you can make this work...

Oh, and for the record, "everything is possible, if you've got enough time." :smile:

have a nice day,
Ton
 
MadVader said:
WarGamer12 said:
How do I change the colors of factions in WB? I tried using hexadecimal codes but they changed the colors to weird, different colors that I did not want. I also want to change the picture in the launcher.
Your color codes must be wrong. See module_factions.py and change these values:
  ("kingdom_1",  "Kingdom of Swadia", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xEE7744),

0x means hex, the rest are hex numbers meaning red (EE), green (77) and blue (44).
See this for a list of colors with hex codes: http://cloford.com/resources/colours/500col.htm

BuddhistJihad said:
Okay, the mod compiles but when I load up my save it says:
RGL ERROR
load error: number of triggers in file: 31, exceeds 25
Don't load an old game, start a new one.

JuJu70 said:
Hello

I'm trying to add a town-specific mercenary company in the tavern

I added fac_kingdom8 mercenary unit into troops.py (where all the mercenaries are)

I am trying to edit the Tavern menu script for mercenaries. I added this

(store_faction_of_troop, ":faction", ":mercenary_troop"),
  (eq, ":faction", "$g_encountered_party_faction"),
(set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
(else_try),
(eq, ":faction", "fac_commoners"),
    (set_visitor, ":cur_entry", ":mercenary_troop"),
(val_add, ":cur_entry", 1),
This compiles fine, but it really seems to just gives a game a choice of which mercenary to place.

It seems like the game picks the mercenary troop first and since there are far more fac_commoners mercenaries my town specific mercenary may be seen very rarely. Is there a way to force the faction mercenary to appear in faction town? Or even 1 town specifically?

Thanks

Yes, but you don't need to use the randomly generated ":mercenary_troop", use the troop you want. Or you choose a random faction merc.
Here is a Swadia-specific merc and a Praven-specific merc:

            (party_get_slot, ":mercenary_troop", "$current_town", slot_center_mercenary_troop_type),
            (party_get_slot, ":mercenary_amount", "$current_town", slot_center_mercenary_troop_amount),

            (try_begin),
              (gt, ":mercenary_troop", 0), #so mercs won't be always there
              (eq, "$current_town", "p_town_6"), #Praven
              (assign, ":mercenary_troop", "trp_praven_merc"),
              (assign, ":mercenary_amount", 5),
            (else_try),
              (gt, ":mercenary_troop", 0), #so mercs won't be always there
              (eq, "$g_encountered_party_faction", "fac_kingdom_1"), #Swadia
              (assign, ":mercenary_troop", "trp_swadia_merc"),
              (assign, ":mercenary_amount", 5),
            (try_end),


            (try_begin),
              (gt, ":mercenary_troop", 0),
              (gt, ":mercenary_amount", 0),
              (set_visitor, ":cur_entry", ":mercenary_troop"),
              (val_add, ":cur_entry", 1),
            (try_end),

Thanks! I will try that

EDIT That doesn't work. They show up in my city correctly but when I hire them they turn into something else inside my party.
 
Dennie said:
I've also a couple of questions.
First, I've downloaded a HorsePack mod for more heavy cavalry. Everything works fine, but the new horses are only sold in the cities of Swadia. How can I chance that, so they will be sold in every city?
The last part of an item's definition is a list of factions where the item is offered. Leave that list empty and it will be offered everywhere, otherwise you need to add every faction to the list. You can do this by module system or using a .txt editor like Morgh's Editor.

Dennie said:
Also, the horse merchant sells only five horses, how can I increase that amount?
In module_scripts, the script refresh_center_stables

Dennie said:
Second, I need some help with a little plan. I was wondering if it is possible to add a new shop. Of course that's possible, but that's not the issue. I want to add a new shop for Light Armor and other clothings. Heavy armor must only be sold in the Armor Shop. So, you have two shops, one for light en clothings, and one for heavy...
You would need a new troop for every town, to edit the game_menu for trade to have a new option to trade with that troop, and the "walk around the streets" menu option to spawn a new agent AND a new set of dialogs if you want to interact with him in scene. And then you'll need a new script refresh_center_X to add the items to your new merchant (and to call that script from a simple trigger). Or you could just add that to the script_refresh_center_armorer that exists already and make it pull double-duty.

All of this stuff isn't particularly hard--a lot of copy/paste from an already-existing merchant and renaming it for your merchant--but you need to get familiar with module system code to do so comfortably.
 
JuJu70 said:
EDIT That doesn't work. They show up in my city correctly but when I hire them they turn into something else inside my party.
No need to quote everything. Just replace (party_get_slot, ":mercenary_troop", "$g_encountered_party", slot_center_mercenary_troop_type), with (assign, ":mercenary_troop", "$g_talk_troop"), in module_dialogs.
 
Well Caba'drin, I've always worked with Morgh's .txt editor, but I never noticed the list with all the factions  :oops:

I think the second armor shop have to wait for a while. About a few weeks I have a holiday, so I think that's the right moment to put some time in this.

But you've helped me a lot, so, many thanks, maybe you will see me again, with some other questions  :grin:
 
I have a question that I believe isnt here yet.
How much faces should a weopen model have? in my case we are looking at a gun model
at the moment it has like 6k faces and 12k lines or something. what are the amounts I should go for?
 
Status
Not open for further replies.
Back
Top Bottom