+100 party size for Player's Faction

Users who are viewing this thread

How would I make it so that a player's party size limit will increase by 100 if he is the King/Ruler of a faction.

(Posted here so 'Somebody' can be reminded :grin:)

Somebody said:
Make a post somewhere around here to remind me and I'll post the code once I finish writing it.

Thanks alot Somebody :grin:
 
Took longer to look up vaguely historical titles than I expected.
Code:
  ("game_get_party_companion_limit",
    [
      (assign, ":troop_no", "trp_player"),

      (store_add, ":limit", 30, "$player_right_to_rule"),
      (store_skill_level, ":skill", "skl_leadership", ":troop_no"),
      (store_attribute_level, ":charisma", ":troop_no", ca_charisma),
      (val_mul, ":skill", 5),
      (val_add, ":limit", ":skill"),
      (val_add, ":limit", ":charisma"),

      (try_begin),
        (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end),
        #if this party is faction leader it takes additional 100 limit
        (try_begin),
          (faction_slot_eq, "$players_kingdom", slot_faction_leader, ":troop_no"),
          (val_add, ":limit", 100),
        (try_end),

        #if this party is faction marshall it takes additional 20 limit        
        (try_begin),
          (faction_slot_eq, "$players_kingdom", slot_faction_marshall, ":troop_no"),
          (val_add, ":limit", 20),
        (try_end),
      (try_end),

      (troop_get_slot, ":troop_renown", ":troop_no", slot_troop_renown),
      (store_div, ":renown_bonus", ":troop_renown", 25),
      (val_add, ":limit", ":renown_bonus"),

      (assign, reg0, ":limit"),
      (set_trigger_result, reg0),
  ]),
Code:
kingdom_titles_marshall_begin= "str_faction_title_marshall_player"
Code:
  ("faction_title_marshall_player", "Marshal"),
  ("faction_title_marshall_1", "Field-Marshal"),
  ("faction_title_marshall_2", "Voivode"),
  ("faction_title_marshall_3", "Bahadur"),
  ("faction_title_marshall_4", "Hirdmann"),
  ("faction_title_marshall_5", "Captain-General"),
  ("faction_title_marshall_6", "Sardar"),
Code:
  ("party_size_report",0,
   "Current party size limit is {reg5}.^Current party size modifiers are:^^ 30 (Base size)\
{reg1?^+{reg1} (Leadership):}\
{reg2?^+{reg2} (Charisma):}\
{reg3^+{reg3} (Renown):}\
{reg4^+{reg4} (Right to Rule):}\
{reg5^+{reg5} (as {s50}):}",
   "none",
   [(call_script, "script_game_get_party_companion_limit", "trp_player"),
    (assign, ":party_size_limit", reg0),

    (store_skill_level, ":leadership", "skl_leadership", "trp_player"),
    (val_mul, ":leadership", 10),
    (store_attribute_level, ":charisma", "trp_player", ca_charisma),

    (troop_get_slot, ":renown", "trp_player", slot_troop_renown),
    (val_div, ":renown", 25),
    
    (try_begin),
      (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end),
      (store_sub, ":faction_offset", "$players_kingdom", kingdoms_begin),
      (str_clear, s50),
      (assign, reg5, 0),
      (try_begin), #to be honest, this should probably be reflected with player_right_to_rule
        (faction_slot_eq, "$players_kingdom", slot_faction_leader, "trp_player"),
        (val_add, reg5, 100),
        (try_begin),
          (eq, "$character_gender", tf_female),
          (assign, ":string_new", "str_queen"),
        (else_try),
          (assign, ":string_new", "str_king"),
        (try_end),
        (str_store_string, s50, ":string_new"),
      (try_end),
      (try_begin),
        (faction_slot_eq, "$players_kingdom", slot_faction_marshall, "trp_player"),
        (val_add, reg5, 20),
        (store_add, ":string_new", ":faction_offset", kingdom_titles_marshall_begin),
        (try_begin),
          (neg|str_is_empty, s50),
          (str_store_string, s51, ":string_new"),
          (str_store_string, s50, "str_s50_and_s51"),
        (else_try),
          (str_store_string, s50, ":string_new"),
        (try_end),
      (try_end),
    (try_end),

    (assign, reg5, ":party_size_limit"),
    (assign, reg1, ":leadership"),
    (assign, reg2, ":charisma"),
    (assign, reg3, ":renown"),
    (assign, reg4, "$player_right_to_rule"),
    # (assign, reg5, ":rank"),
    ],
    [
      ("continue",[],"Continue...",
       [(jump_to_menu, "mnu_reports"),
        ]
       ),
      ]),
EDIT: Might as well make some cosmetic changes
Code:
  [anyone|plyr,"member_talk", [
    (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end),
    (faction_slot_eq,  "$players_kingdom", slot_faction_marshall, "trp_player"),
    (store_sub, ":string", "$players_kingdom", kingdoms_begin),
    (val_add, ":string", kingdom_titles_marshall_begin),
    (str_store_string, s57, ":string"),
  ], "As the {s57}, I wish you to send a message to the vassals of the realm.", "member_direct_campaign",[]],


  [anyone|plyr|repeat_for_troops,"lord_talk_ask_location_2", [(store_repeat_object, ":troop_no"),
                                                              (neq, "$g_talk_troop", ":troop_no"),
                                                              (is_between, ":troop_no", active_npcs_begin, kingdom_ladies_end),
                                                              (neq, ":troop_no", "trp_player"),
                                                              (this_or_next|troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
                                                                (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_kingdom_lady),
                                                              (store_troop_faction, ":faction_no", ":troop_no"),
                                                              (eq, "$g_encountered_party_faction", ":faction_no"),
                                                              (str_store_troop_name, s1, ":troop_no"),
                                                              (try_begin),
                                                                (faction_slot_eq, "$players_kingdom", slot_faction_marshall, ":troop_no"),
                                                                (store_sub, ":string", "$g_encountered_party_faction", kingdoms_begin),
                                                                (val_add, ":string", kingdom_titles_marshall_begin),
                                                                (str_store_string, s2, ":string"),
                                                                (str_store_string, s1, "@Our {s2}, {s1}"),
                                                              (try_end),

  [anyone,"lord_talk_ask_about_strategy", [
    (eq, "$players_kingdom", "$g_talk_troop_faction"),
    (faction_slot_eq, "$g_talk_troop_faction", slot_faction_marshall, "trp_player"),
    (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_ai_state, sfai_feast),
    (store_sub, ":string", "$g_talk_troop_faction", kingdoms_begin),
    (val_add, ":string", kingdom_titles_marshall_begin),
    (str_store_string, s57, ":string"),
  ],
   "You should decide that, as you are the {s57}.", "lord_pretalk",[]],

  [anyone|plyr, "lord_strategy_follow_up", [
  (eq, "$g_talk_troop_disagrees_with_marshal", 1),
  (neg|faction_slot_eq, "$g_talk_troop_faction", slot_faction_leader, "$g_talk_troop"),
  (faction_get_slot, ":faction_marshal", "$g_talk_troop_faction", slot_faction_marshall),
  (is_between, ":faction_marshal", active_npcs_begin, active_npcs_end),
  (str_store_troop_name, s4, ":faction_marshal"),
  (store_sub, ":string", "$g_talk_troop_faction", kingdoms_begin),
  (val_add, ":string", kingdom_titles_marshall_begin),
  (str_store_string, s57, ":string"),
  ],
   "Would you say, then, that {s4} should no longer be {s57}?",
   "lord_talk_replace_marshal",[]],

  [anyone, "lord_strategy_why_not_reason",
  [
    (assign, ":selected_center", "$temp"),
    (faction_get_slot, ":faction_marshal", "$g_talk_troop_faction", slot_faction_marshall),

    (faction_get_slot, ":faction_ai_object", "$g_talk_troop_faction", slot_faction_ai_object),

    (call_script, "script_npc_decision_checklist_evaluate_enemy_center_for_attack", ":faction_marshal", ":faction_ai_object", 1, 0),
    (assign, "$g_faction_object_score", reg0),

    # (assign, "$g_do_not_skip_other_than_current_ai_object", 1),
    (call_script, "script_npc_decision_checklist_evaluate_enemy_center_for_attack", ":faction_marshal", ":selected_center", 1, 0, 1),
    # (assign, "$g_do_not_skip_other_than_current_ai_object", 0),

    (lt, reg0, 0),
    (assign, ":explainer_string", reg1),
    (try_begin),
      (eq, "$g_use_current_ai_object_as_s8", 0),
      (str_store_party_name, s8, ":selected_center"),
    (else_try),
      (str_store_party_name, s8, ":faction_ai_object"),
    (try_end),
    (str_store_string, s9, ":explainer_string"),
    (str_clear, s10),
    (str_store_troop_name, s11, ":faction_marshal"),
    #s10 will say that
    (store_sub, ":string", "$g_talk_troop_faction", kingdoms_begin),
    (val_add, ":string", kingdom_titles_marshall_begin),
    (str_store_string, s57, ":string"),
  ],
   "Our {s57} {s11} believes that {s8} {s9}{s10}",
   "lord_talk_why_not_repeat",[]],
 
THANKS ALOT SOMEBODY!!:grin:

Awesome :grin: I don't get it why we don't get the +100 party size anyway :razz:

Thanks again :grin:

MadVader said:
Players who want custom cheats should not be encouraged to post here, they don't contribute in any way.

I made a thread in Technical Support but Somebody was replying to me and told me to post it here too; so he could easily be reminded of it when he has free time :grin:
 
MadVader said:
Players who want custom cheats should not be encouraged to post here, they don't contribute in any way.

If he wants to cheat in his own game that he paid for with his own money, what difference does it make to you
 
ccllnply said:
MadVader said:
Players who want custom cheats should not be encouraged to post here, they don't contribute in any way.

If he wants to cheat in his own game that he paid for with his own money, what difference does it make to you
Read it again, silly keyboard warrior:
they don't contribute in any way.
This is a modding board for mod making, not for random player requests that benefit only a single person.
 
How does that post make him a 'keyboard warrior'?

The only reason I posted the topic in this section was because 'Somebody' (the user) was helping me out on a different thread and he asked me to post it here so he will see it later in the day and be reminded off it.
 
I don't agree with that. There are players trying only to leech tweaks and cheats off modders for personal use and nothing else. I sometimes get PMs with such requests and the Forge is frequently spammed by threads like that.
The point is, they are almost always useless and not something you would put in a mod.
For example, this +100 cheat severely unbalances the game. It's a novelty cheat with no gameplay value.

My wish is to keep the Forge clean for more serious modding efforts, not random player whims and useless threads, for the sake of everybody who browses the Forge regularly.

My original post was more directed to Somebody than anyone else, not to bring players in here.
 
You are wrong assuming I'm posting only because I dislike cheating - that's a personal choice.

My motivation is not to have to click on useless Forge threads started by players which are as useless to other modders as well. How many people will use Somebody's code up there? Probably not even the OP.
If I'm at fault it's because of the elitism. I really wish there are two Forge boards - one for casual tweakers and newbies who can't even install Python, and one for serious modders.
By the way, it's disappointing to see baiting and straw man arguments in your post, I'm not going to respond to those.
 
MadVader said:
I dislike cheating - that's a personal choice.

Fine, dislike it, no one cares. If he wants to cheat then that is his personal choice. If you are going to refund him the money he paid for the game, then you can decide if he cheats or not. I can't believe you're calling me a "Keyboard warrior" when you're on some sort of personal crusade against people who cheat in their single player games, when really it's none of your business.

At the moment you're representing everything that is bad in gaming communities. "Hey I don't like what this guy is doing, no one help him!". This is a free forum for a game he purchased so he has every right to ask for help regardless of whether you think it's useless. If you don't like it, just don't help him. Don't encourage other people not to help him and act like a jerk. It's pretty poor piss form from you, especially, considering by the prior posts, you're an experienced modder

 
Hi, maybe I shouldn't interfere here, 'cause it's my first day on the job, i.e. I registered today in this forum, and I just stumbled accidentally into this thread.

I recently opened another thread with a kind of noob question and I'm glad someone provided me with a quick answer and an apparently good solution. Maybe this kind of help will result in a mod for the public someday, or maybe not.

I agree totally with your point of view, ccllnply, "At the moment you're representing everything that is bad in gaming communities." I was a bit shocked by the statement of MadVader, 'cause I think this kind of attitude sounds very arrogant. Or do people need a certificate as a public benefactor to ask for help in a forum? For me, this kind of questions are very useful, because I can learn from the answers.

So thanks from my part, too, to IrishGaming2011 for providing the question and to Somebody for the answer  :mrgreen:

Saludos.
 
ccllnply said:
MadVader said:
I dislike cheating - that's a personal choice.

Fine, dislike it, no one cares. If he wants to cheat then that is his personal choice. If you are going to refund him the money he paid for the game, then you can decide if he cheats or not. I can't believe you're calling me a "Keyboard warrior" when you're on some sort of personal crusade against people who cheat in their single player games, when really it's none of your business.
READ AGAIN please:
MadVader said:
that's a personal choice.
Failure to understand what people are saying and rushing in to post righteous rants is what keyboard warriors do.

ccllnply said:
At the moment you're representing everything that is bad in gaming communities. "Hey I don't like what this guy is doing, no one help him!". This is a free forum for a game he purchased so he has every right to ask for help regardless of whether you think it's useless. If you don't like it, just don't help him. Don't encourage other people not to help him and act like a jerk. It's pretty poor piss form from you, especially, considering by the prior posts, you're an experienced modder
I don't like spam on this board, that's all. If you are using it every day, you'll see why. But you aren't and still have an opinion about it.
Would you like your email inbox to be filled with 10 times more spam than actual messages? It's the same situation here in the Forge. Put yourself in the position of modders looking for actually useful information.
 
MadVader said:
Players who want custom cheats should not be encouraged to post here, they don't contribute in any way.

Honestly, MadVader, I understand where you're coming from with saying what you've said. I know personally that I am easily annoyed when I see posts like "Help with uber haxorz plox", but this seems rather beneficial anyway. Plus, how is it a cheat to want a boost in party size when you're a king? It may be custom, but not a cheat. I don't see this as the "useless spam and junk" that infests the board at times, but rather a helpful code that anyone can use in a private or public mod.

I can respect your opinion though, as it does make sense, but those are my two cents on the matter.

And yes ccllnply, you do fit the standard description of a keyboard warrior...no offense.
 
MadVader said:
Failure to understand what people are saying and rushing in to post righteous rants is what keyboard warriors do.

Failure to realise what you are posting seems more likely. You're telling people not to help him because he's asking for a "cheat" which you're claiming is useless, that's why I brought it to attention

I don't like spam on this board, that's all. If you are using it every day, you'll see why. But you aren't and still have an opinion about it.
Would you like your email inbox to be filled with 10 times more spam than actual messages? It's the same situation here in the Forge. Put yourself in the position of modders looking for actually useful information.

Firstly to point out, I use the Forge basically every other day to check for new OSPs, to put that straight. Secondly, he's just asking a question. Something that's not useful to you can still be useful to others. Where does it say that this forum is only for asking major coding questions for publically released mods?

And thirdly, you can quit this crap with spam. Spam is spam. If someone is asking a question about modding M&B and they are genuinely interested in the answer, that is NOT spam. You may not be interested in it but you don't have to open the thread, the thread title is clearly stated. I honestly don't see what your big problem is with having to scroll a little further down on the main forum page or spent a minute or two looking at a thread you find useless. If your on this forum every day it's hardly a massive drain on time.

Anyway, all this started when you decide to tell everyone not to help the OP who is just some guy with little modding experience asking a simple question and looking for a simple answer. To be honest, that's just plain arrogant and pretty disgraceful from an experienced modder
 
I'm done with this thread. Good luck, warrior, and may the mods watch over your forum adventures. Always meet injustice with swift keyboard strokes as the fate of our community depends on it.

@Specialist: Yeah, I see your point, but slightly disagree. I can go into a longish post why +100 is a worthless cheat, but can't be bothered with it anymore.
 
The only thing that the fate of this forum depends on is keeping toxic people confined to their own boards.



Anyway, thanks to the OP and "Somebody" for this. Will make a fine addition to my module. :smile:
 
Hello, just wanted to say those custom marshal titles are cool. Are they only for dialogue or do the show up on the world map, or when you see that individual in a scene? If this is explained better in the script, I apologize, I'm reading this from a phone.
 
Just a bunch of common places I've replaced them in, like when you ask for where the lords of a kingdom are. In general I try not to rename troops too often since they already have some starting "ranks" that I'm too lazy to restore from another slot. Just grab the marshal string, and the PLURAL name and rename the marshal when appointed, restore the title when dismissed. To make it show up on the world map is also trivial, you could use party_set_extra_text (coincidentally located after party_set_marshall) or just do the first part, and then fix the party name when you get the leaded party.

Here's some random code to also make them show up on the troop notes page (the code that's not indented with tabs are the additions). The player-faction could have its own marshal name, but you'd need to modify the code (first conditional block checks for player faction, THEN ruler, THEN marshal. Add another custom title before the ones for the first npc kingdom.
Code:
(try_begin),
		  (eq, ":note_index", 0),
		  (faction_get_slot, ":faction_leader", ":troop_faction", slot_faction_leader),
		  (str_store_troop_name_link, s55, ":faction_leader"),
		  (str_store_faction_name_link, s56, ":troop_faction"),
		  (assign, ":troop_is_player_faction", 0),
		  (assign, ":troop_is_faction_leader", 0),
		  (assign, ":troop_is_faction_marshall", 0),
		  (try_begin),
			(eq, ":troop_faction", "fac_player_faction"),
			(assign, ":troop_is_player_faction", 1),
		  (else_try),
			(eq, ":faction_leader", ":troop_no"),
			(assign, ":troop_is_faction_leader", 1),
          (else_try), #leader CAN be marshal, but sovereignty is more important
            (faction_slot_eq, ":troop_faction", slot_faction_marshall, ":troop_no"),
            (store_sub, ":troop_is_faction_marshall", ":troop_faction", kingdoms_begin),
            (val_add, ":troop_is_faction_marshall", kingdom_titles_marshall_begin),
		  (try_end),
		  (assign, ":num_centers", 0),
		  # (str_store_string, s58, "@nowhere"),
		  (try_for_range_backwards, ":cur_center", centers_begin, centers_end),
			(party_slot_eq, ":cur_center", slot_town_lord, ":troop_no"),
			(try_begin),
			  (eq, ":num_centers", 0),
			  (str_store_party_name_link, s51, ":cur_center"),
			(else_try),
			  (eq, ":num_centers", 1),
			  (str_store_party_name_link, s50, ":cur_center"),
			  (str_store_string, s51, "str_s50_comma_s51"),
			(else_try),
			  (str_store_party_name_link, s50, ":cur_center"),
			  (str_store_string, s51, "str_s50_and_s51"),
			(try_end),
			(val_add, ":num_centers", 1),
		  (try_end),
		  (troop_get_type, reg3, ":troop_no"),
		  (troop_get_slot, reg5, ":troop_no", slot_troop_renown),
		  (troop_get_slot, reg15, ":troop_no", slot_troop_controversy),
		  (str_clear, s59),
		  (try_begin),
			(call_script, "script_troop_get_player_relation", ":troop_no"),
			(assign, ":relation", reg0),
			(store_add, ":normalized_relation", ":relation", 100),
			(val_add, ":normalized_relation", 5),
			(store_div, ":str_offset", ":normalized_relation", 10),
			(val_clamp, ":str_offset", 0, 20),
			(store_add, ":str_id", "str_relation_mnus_100_ns",  ":str_offset"),
			(neq, ":str_id", "str_relation_plus_0_ns"),
			# (str_store_string, s60, "@{reg3?She:He}"),
			(str_store_string, s59, ":str_id"),
			(str_store_string, s59, "@{!}^{s59}"),
		  (try_end),
		  #lord recruitment changes begin
		  #This sends a bunch of political information to s47.

		  #refresh registers
		  (assign, reg9, ":num_centers"),
		  (troop_get_type, reg3, ":troop_no"),
		  (troop_get_slot, reg5, ":troop_no", slot_troop_renown),
		  (assign, reg4, ":troop_is_faction_leader"),
		  (assign, reg6, ":troop_is_player_faction"),
		  (assign, reg7, ":troop_is_faction_marshall"),
          (str_store_string, s57, ":troop_is_faction_marshall"),

		  (troop_get_slot, reg17, ":troop_no", slot_troop_wealth), #DEBUGS
		  (str_store_string, s0, "str_lord_info_string", 0),
		  #lord recruitment changes end
		  (add_troop_note_tableau_mesh, ":troop_no", "tableau_troop_note_mesh"),
		  (set_trigger_result, 1),
		(try_end),
Code:
("lord_info_string", "{reg6?:{reg4?{s54} is the ruler of {s56}.^:{s54} is{reg7?the {s57}: a vassal} of {s55} of {s56}.^}}Renown: {reg5}. Controversy: {reg15}.^{reg9?{reg3?She:He} is the {reg3?lady:lord} of {s51}.:{reg3?She:He} has no fiefs.}{s59}^{s49}"),
 
Back
Top Bottom