Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I got the answer to number 2 for you

Code:
#script_update_volunteer_troops_in_village
  # INPUT: arg1 = center_no
  # OUTPUT: none
  ("update_volunteer_troops_in_village",
    [
       (store_script_param, ":center_no", 1),
       (party_get_slot, ":player_relation", ":center_no", slot_center_player_relation),
       (party_get_slot, ":center_culture", ":center_no", slot_center_culture),
	   
	   
##	   (try_begin),
##		(eq, "$cheat_mode", 2),
##	    (str_store_party_name, s4, ":center_no"),
##	    (str_store_faction_name, s5, ":center_culture"),
##	    (display_message, "str_updating_volunteers_for_s4_faction_is_s5"),
##	   (try_end),
	   
       (faction_get_slot, ":volunteer_troop", ":center_culture", slot_faction_tier_1_troop),
       (assign, ":volunteer_troop_tier", 1),
       (store_div, ":tier_upgrades", ":player_relation", 10),
       (try_for_range, ":unused", 0, ":tier_upgrades"),
         (store_random_in_range, ":random_no", 0, 100),
         (lt, ":random_no", 10),
         (store_random_in_range, ":random_no", 0, 2),
         (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", ":random_no"),
         (try_begin),
           (le, ":upgrade_troop_no", 0),
           (troop_get_upgrade_troop, ":upgrade_troop_no", ":volunteer_troop", 0),
         (try_end),
         (gt, ":upgrade_troop_no", 0),
         (val_add, ":volunteer_troop_tier", 1),
         (assign, ":volunteer_troop", ":upgrade_troop_no"),
       (try_end),
       
       (assign, ":upper_limit", 30), #CHANGE 30 TO whatever you want the maximum possible troops to be.
       (try_begin),
         (ge, ":player_relation", 4),
         (assign, ":upper_limit", ":player_relation"),
         (val_div, ":upper_limit", 2),
         (val_add, ":upper_limit", 6),
       (else_try),
         (lt, ":player_relation", 0),
         (assign, ":upper_limit", 0),
       (try_end),

       (val_mul, ":upper_limit", 3),   
       (store_add, ":amount_random_divider", 2, ":volunteer_troop_tier"),
       (val_div, ":upper_limit", ":amount_random_divider"),
       
       (store_random_in_range, ":amount", 0, ":upper_limit"), 
       (party_set_slot, ":center_no", slot_center_volunteer_troop_type, ":volunteer_troop"),
       (party_set_slot, ":center_no", slot_center_volunteer_troop_amount, ":amount"),
     ]),
Basically , change the upper limit in the module_scripts in the script I just provided
 
Hello! I have one question. I need to edit the firearm stat, which can currently be seen, but I need to rename it to something else. Anyone know where I need to look to do so?
 
Hi.anyone can answer this question ?

I downloaded the modmerger.And i have already done the install.

But cmd is giving some errors and closing quickly before i read the error.

Thank you.(if i can't take an answer,i need open a topic.)
 
PoisonCourtesan said:
And how does one assign a specific map icon to a faction?
Assign a faction slot where you'll store some map icon (or extra icon, or whatever) associated with that faction. Native doesn't associate map icons to factions as the icon for all lord parties is determined by "pt_kingdom_hero_party" template, but there's nothing stopping you from doing so. Then, once you have a faction slot storing the associated map icon, modify the "script_create_kingdom_hero_party" (or whatever code your module uses to create lord parties) to retrieve the required map icon and assign it to the newly created party.
 
Lumos said:
Code:
[color=navy](party_set_banner_icon, ":party", 0),
(party_set_extra_icon, ":party", -1),[/color]

The banner worked, but (party_set_extra_icon, ":party", -1), gives me invalid map icon -1. If I put (party_set_extra_icon, ":party", 0), then the game crashes. I think I'll make an empty map icon and when I want to remove the extra icon, I'll set it to that empty map icon.
 
Hi.I made it modmerger.But it gives ;

VpkEOq.png
 
Hi

is it possible making one banner per one faction?
Since i added many lords an error is occured 'not enough banners for heroes'
so i mean i want all lords and kings to use their kingdom's banner
 
dlwnsdn4 said:
is it possible making one banner per one faction?
Since i added many lords an error is occured 'not enough banners for heroes'
so i mean i want all lords and kings to use their kingdom's banner
Search usually helps. You can start here: http://forums.taleworlds.com/index.php/topic,109062.msg2658633.html

Or just add enough banners for your lords, there are tutorials on this.

The_dragon said:
What is the maximum slot number (for troops, items, players, etc)? Is it MAX_INT?
MAX_INT is not defined anywhere in Python or Module System so I'm pretty sure it's not that. :smile:

Experiment, I guess. Try setting some really high slots on a test entity, save game, quit, start, load, check slot values, post results. :smile:
 
The_dragon said:
What is the maximum slot number (for troops, items, players, etc)? Is it MAX_INT?
I have it written down that the maximum number of slots is 1048576, from testing ages ago. Also, the maximum value stored and correctly retrieved was 2^64, but network message values are only signed 32 bit, as far as I remember.
 
@HyperCharge, no one is going to help you, its practically impossible for someone to help you without knowing what you have done. There is obviously some conflict with the mods you are trying to merge or you have done something wrong with the mod merger but I cant say anymore than that. You've posted the same thing 3 times now
 
La Grandmaster said:
@HyperCharge, no one is going to help you, its practically impossible for someone to help you without knowing what you have done. There is obviously some conflict with the mods you are trying to merge or you have done something wrong with the mod merger but I cant say anymore than that. You've posted the same thing 3 times now
My attention was not bad.
I was thinking nobody see my post.But i understand now.Nobody knows the answer.Thank you for your suggestion.I'll try it.
 
@HyperCharge, I would try uninstalling your modmerger and then recompile and make sure there are no errors. Have a look at the files you are trying to merge, you may be able to fix it but it may be fairly hard to do.
 
Status
Not open for further replies.
Back
Top Bottom