Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
ccllnply said:
1. How can I change the name of Lords and Ladys using the module system? I thought it was as simple as changing the names in module_troops but that seems to have no effect on the game.

Can you post the troop you edited?
 
Cozur said:
Can you post the troop you edited

I edited them all, except for the Khergits, but here's King Harlaus

["kingdom_1_lord",  "King Harlaus Longmire",  "Harlaus",  tf_hero, 0,reserved,  fac_kingdom_1,

I also changed "King Graveth" to "Grand Duke Graveth" but neither makes any difference after I compile it. I suspected there was another line I had to change but I'm not sure where.

MadVader said:
Use English or you'll need to update the language files for your language too, e.g. languages\de\troops.csv.

I'm using an English version of M&B Warband so that shouldn't be needed
 
It should look like this:

Code:
["kingdom_1_lord",  "King Harlaus Longmire",  "King Harlaus Longmire",  tf_hero, 0,reserved,  fac_kingdom_1,


For something completely different:

I'm trying to modify Ruthvens water travel script, to allow the player to travel on the ocean and river terrain as well. It works pretty well, except for one thing. The disembark script trigger fires like crazy when travelling on land. It happened due to the red parts in the following trigger, but the red part is also the part that allows for travel on the ocean/river terrain. Haelp.

## SEA BATTLES BEGIN
(0.1, 0, 0, [(party_get_current_terrain,":terrain","p_main_party"),
            (party_set_flags, "p_main_party", pf_is_ship, 1),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
      (neq,":terrain", :cool:,],
# 5 or whatever the number of your retextured terrain in header_terrain_types.
  [(try_begin),
      (troop_get_inventory_slot, ":cur_horse", "trp_player",:cool:, #horse slot
      (assign, ":new_icon", -1),
      (try_begin),
        (eq, "$g_player_icon_state", pis_normal),
        (try_begin),
        (ge, ":cur_horse", 0),
        (assign, ":new_icon", "icon_people_player_horseman"),
        (else_try),
        (assign, ":new_icon", "icon_people_player"),
        (try_end),
      (else_try),
        (eq, "$g_player_icon_state", pis_camping), # All of this is thanks to Lumos bein' generous, and not being as much of a lazy arse as I am
        (assign, ":new_icon", "icon_camp_tent"),
      (try_end),
    (party_set_icon, "p_main_party", ":new_icon"),
    (try_end),
]),
 

    (0.1, 0, 0, [(party_get_current_terrain,":terrain","p_main_party"),
                (party_set_flags, "p_main_party", pf_is_ship, 1),
  (this_or_next|eq, ":terrain", 0),
  (this_or_next|eq, ":terrain", 7),
  (eq, ":terrain", :cool:,],

  [(party_set_icon,"p_main_party", "icon_ship"),
#  (display_message,"@Not water"),
  ]),
 
(0.1, 0, 0.0, [],
[(try_for_parties, ":cur_party"),
  (party_get_current_terrain, ":terrain", ":cur_party"),
  (party_set_flags, "p_main_party", pf_is_ship, 1),
  (this_or_next|eq, ":terrain", 0),
  (this_or_next|eq, ":terrain", 7),
  (eq, ":terrain", :cool:,

  (party_get_template_id, ":cur_template", ":cur_party"),
(this_or_next|eq, ":cur_template", "pt_kingdom_hero_party"),
(this_or_next|eq, ":cur_template", "pt_kingdom_caravan_party"),
(this_or_next|eq, ":cur_template", "pt_manhunters_e"),
(this_or_next|eq, ":cur_template", "pt_village_farmers_e"),
(this_or_next|eq, ":cur_template", "pt_deserters"),
(this_or_next|eq, ":cur_template", "pt_looters_e"),
(this_or_next|eq, ":cur_template", "pt_forest_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_steppe_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits_r"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits"),
(this_or_next|eq, ":cur_template", "pt_hero_party"),
(this_or_next|eq, ":cur_template", "pt_brotherhood"),
(this_or_next|eq, ":cur_template", "pt_brave_companions"),
(this_or_next|eq, ":cur_template", "pt_moro"),
(this_or_next|eq, ":cur_template", "pt_pono"),
(this_or_next|eq, ":cur_template", "pt_gorg"),
(this_or_next|eq, ":cur_template", "pt_rodmar"),
(this_or_next|eq, ":cur_template", "pt_vergund"),
(this_or_next|eq, ":cur_template", "pt_house_codd"),
(this_or_next|eq, ":cur_template", "pt_stepstone_pirates"),
(this_or_next|eq, ":cur_template", "pt_slaver"),
(this_or_next|eq, ":cur_template", "pt_escaped_slaves"),
(this_or_next|eq, ":cur_template", "pt_clansmen"),
(this_or_next|eq, ":cur_template", "pt_raiders"),
(this_or_next|eq, ":cur_template", "pt_outlaws"),
(this_or_next|eq, ":cur_template", "pt_rhoyne_outlaws"),
(this_or_next|eq, ":cur_template", "pt_runaway_serfs_e"),
(this_or_next|eq, ":cur_template", "pt_taiga_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_patrol_party"),
(this_or_next|eq, ":cur_template", "pt_kingdom_caravan_party_e"),
(eq, ":cur_template", "pt_sea_raiders"),
  (party_set_icon, ":cur_party", "icon_ship"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
  (party_get_template_id, ":cur_template", ":cur_party"),
  (eq, ":cur_template", "pt_kingdom_hero_party"),
(party_set_icon,":cur_party","icon_people_flagbearer_a"),
#MULE
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_kingdom_caravan_party"),
(party_set_icon,":cur_party","icon_people_mule"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_kingdom_caravan_party_r"),
(party_set_icon,":cur_party","icon_people_mule"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_kingdom_caravan_party_e"),
(party_set_icon,":cur_party","icon_people_mule"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_merchant_caravan"),
(party_set_icon,":cur_party","icon_people_mule"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_merchant_caravan_r"),
(party_set_icon,":cur_party","icon_people_mule"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_merchant_caravan_e"),
(party_set_icon,":cur_party","icon_people_mule"),
#VAEGIR KNIGHT
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_deserters"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_raiders"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_outlaws"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_brave_companions"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_patrol_party"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_moro"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_pono"),
(party_set_icon,":cur_party","icon_people_vaegir_knight"),
#GRAY KNIGHT
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_manhunters"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_manhunters_r"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_manhunters_e"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_slaver"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_rhoyne_outlaws"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_brotherhood"),
(party_set_icon,":cur_party","icon_people_gray_knight"),
#PEASANT
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_village_farmers"),
(party_set_icon,":cur_party","icon_people_peasant"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_village_farmers_r"),
(party_set_icon,":cur_party","icon_people_peasant"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_village_farmers_e"),
(party_set_icon,":cur_party","icon_people_peasant"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_escaped_slaves"),
(party_set_icon,":cur_party","icon_people_peasant"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(this_or_next|eq, ":cur_template", "pt_looters_e"),
(this_or_next|eq, ":cur_template", "pt_forest_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_steppe_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_mountain_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_taiga_bandits_e"),
(this_or_next|eq, ":cur_template", "pt_sea_raiders_e"),
(this_or_next|eq, ":cur_template", "pt_clansmen"),
(this_or_next|eq, ":cur_template", "pt_gorg"),
(this_or_next|eq, ":cur_template", "pt_rodmar"),
(this_or_next|eq, ":cur_template", "pt_vergund"),
(this_or_next|eq, ":cur_template", "pt_house_codd"),
(this_or_next|eq, ":cur_template", "pt_stepstone_pirates"),
(this_or_next|eq, ":cur_template", "pt_aegonfrey"),
(eq, ":cur_template", "pt_sea_raiders"),
(party_set_icon,":cur_party","icon_people_axeman"),
(else_try),
  (neq,":terrain", 0),
  (neq,":terrain", 7),
  (neq,":terrain", :cool:,
(eq, ":cur_template", "pt_cattle_herd"),
(party_set_icon,":cur_party","icon_people_cattle"),
(try_end),]),
## SEA BATTLES END
 
Cozur said:
It should look like this:

Code:
["kingdom_1_lord",  "King Harlaus Longmire",  "King Harlaus Longmire",  tf_hero, 0,reserved,  fac_kingdom_1,

Hmmm, I tried that the first time and it wouldn't compile. I tried it again, it compiled but now it shows up in-game as "King King Harlaus Longmire" and "King Grand Duke Graveth"
 
ccllnply said:
Hmmm, I tried that the first time and it wouldn't compile. I tried it again, it compiled but now it shows up in-game as "King King Harlaus Longmire" and "King Grand Duke Graveth"
You've probably got some non-native code that gives king-level titles to rulers. Find the appropriate faction title and adjust it there instead. Also, you'll want to make sure the plural name doesn't have a title associated with it, since that's the string that will be appended to the title.

Cozur said:
I'm trying to modify Ruthvens water travel script, to allow the player to travel on the ocean and river terrain as well. It works pretty well, except for one thing. The disembark script trigger fires like crazy when travelling on land. It happened due to the red parts in the following trigger, but the red part is also the part that allows for travel on the ocean/river terrain. Haelp.
That code looks pretty messy. Instead of having two triggers, use the same one to reassign $g_player_icon_state using a terrain check similar to the horse check. You absolutely do not want to be calling (party_set_flags, "p_main_party", pf_is_ship, 1), randomly, since that's triggering the disembark menu. The npc party checks are also messy - nest the conditional terrain checks and merge templates with the same icons (the caravan ones).
 
ok I still haven't found out the quest thing
cwr said:
traceback (most recent call last):
  File "process_dialogs.py", line 6, in (module)
    from module_dialogs import *
  File "C:\src\module_dialogs.py, line 40952

      ^
SyntaxError: invalid syntax

WARNING: Usage of unassigned global variable $random_thing_unrelated_to_my_quest
a lot of times,

traceback (most recent call last):
  File "process_dialogs.py", line 6, in (module)
    from module_dialogs import *
  File "C:\src\module_dialogs.py, line 40952

      ^
SyntaxError: invalid syntax
(yes it says that twice)

WARNING: Global variable never used $random_thing_unrelated_to_my_quest
a bunch of times


but I also have a new question: red text shows up when starting a new game and its annoying me.

It says theres a script error in
[quote author= retarded red text]
script_give_center_to_lord

script_kingdom_hero_party
[/quote]
but nothing screws up in game.
 
I have run across a weird "bug"? or i don't know what I'd call it.
Weapons consistently deal 0 damage at full contact swings, but randomly they do deal damage etc.
I noticed this early on at the bandit encounter. Any ideas?

Edit1:
Another question,
A few years ago when playing a mod i ran across something. You could add armor to a horse and remove it when buying it from a merchant. Where can i find this? Or does anybody know about it?
 
Michadr said:
I have run across a weird "bug"? or i don't know what I'd call it.
Weapons consistently deal 0 damage at full contact swings, but randomly they do deal damage etc.
I noticed this early on at the bandit encounter. Any ideas?

Edit1:
Another question,
A few years ago when playing a mod i ran across something. You could add armor to a horse and remove it when buying it from a merchant. Where can i find this? Or does anybody know about it?

first:did you made a mod,and the 0 damage bug appeared?
second:you could make for each normal horse,an armored horse,and when you use the armor item,it will replace the normal horse with the armored horse
 
Michadr said:
I have run across a weird "bug"? or i don't know what I'd call it.
Weapons consistently deal 0 damage at full contact swings, but randomly they do deal damage etc.
I noticed this early on at the bandit encounter. Any ideas?

Have you changed any of the armor/damage modifiers in the module.ini?
 
Cozur said:
Michadr said:
I have run across a weird "bug"? or i don't know what I'd call it.
Weapons consistently deal 0 damage at full contact swings, but randomly they do deal damage etc.
I noticed this early on at the bandit encounter. Any ideas?

Have you changed any of the armor/damage modifiers in the module.ini?

yes, i do believe i have...
 
Michadr said:
Cozur said:
Michadr said:
I have run across a weird "bug"? or i don't know what I'd call it.
Weapons consistently deal 0 damage at full contact swings, but randomly they do deal damage etc.
I noticed this early on at the bandit encounter. Any ideas?

Have you changed any of the armor/damage modifiers in the module.ini?

yes, i do believe i have...

There's your answer.
 
first:did you made a mod,and the 0 damage bug appeared?
second:you could make for each normal horse,an armored horse,and when you use the armor item,it will replace the normal horse with the armored horse


yes it was after a made a mod.

There's your answer.
I'll try changing them back to natives version, but i was trying to increase them  :shock:
thank you
 
Hello , people , it is me again  :smile:
Today I have a question... How can I make it so when a specific place is conquered it gets destroyed{turns to ruins}? Like uruk hai , or orc camps in TLD?
 
phantom96 said:
Hello , people , it is me again  :smile:
Today I have a question... How can I make it so when a specific place is conquered it gets destroyed{turns to ruins}? Like uruk hai , or orc camps in TLD?

I cannot pinpoint the code but I might say that in the conquest code (script, whatever) just search if the currently conquered place is the one you want to trash, change it to "disabled" and enable a new map icon, all ruined, with the same coordinates. Also make sure the disabled place won't continue to work and produce money being still invisible (I currently have that problem).

Which gives me a great idea to add an option on destroying a specific place, not just looting it.
 
Simply disabling them and replacing them with ruin parties works well, it was done in TLD iirc. What's tricky is to put party_is_active conditions in town/center loops, or there will be trouble.
 
Thanks for your suggestions , but I see I will have to get better at coding , before I attend this matter  :smile: Thank you very much anyway!fil

Edit-- Which files would I need to edit? I have edited module parties in order to make ruined party with same coordinates... But I do not know how to disable a party when someone conquers it? And how to enable ruined one then?  :oops:
 
Recently did some heavy edits to my map.txt, in Wings3d, using the obj and map converters.

This seems to cause some people to crash to randomly, but not effecting other people, if the edited map is indeed the cause.

Is there any sort of edit that would make the map loadable, but cause crashes on certain systems when the player or a party passes over it?
 
Status
Not open for further replies.
Back
Top Bottom