Recent content by diegoami

  1. diegoami

    Resolved Town Governors don't stay in town

    Yeah still happening here
  2. diegoami

    Need More Info Prisoner in town can't be moved between party and dungeon

    I have exactly the same issue. I have uploaded a file where this happens, in the town Vostrum

    City Info
    Dungeon view

    One reason why it might happen is when I peace out an enemy and their troops are still in my dungeon.
    Edit: verified, it doesn't matter, I have uploaded another save file before peace having the same problem.
  3. diegoami

    Diplomacy for 1.174

    Artam said:
    Edit: OK, I know how I broke Diplomacy Prefernces.  It was working before (I put Combat Interface options after cheat mode.) but right now not, because I've changed the order of options. Almost all options are not working properly at this time. The code is as follows. (I deleted all commented out lines for easy reading.)

    I had a similar problem, that is why I put my new options at the end of Preferences just not to have to deal with this issue. I think it might have to do with the internal order or variables that may not compatible in this case between two versions. I think there is a kind of hack to deal with this, but I do not know it.
  4. diegoami

    PYTHON SCRIPT/SCHEME EXCHANGE

    Dj_FRedy said:
    Tired of crossing the hall so there's no interesting character to talk to?
    Something similar happened to me and I wrote this script, feel free to use it.
    To insert in menu "town" with the string {s16}
    Code:
    			#Who's in the hall? {s16} + Dj_FRedy
    			(call_script, "script_whos_in_the_hall", "$current_town"),
    			#Who's in the hall? - Dj_FRedy

    Nice script. You have also to add {s16} to the town heading, I guess.
    Code:
    (
        "town",mnf_enable_hot_keys|mnf_scale_picture,
        "{s10} {s14}^{s11}{s12}{s13} {s16}",
        "none",
    In Diplomacy it looks like that

    20191012104713_1.jpg
  5. diegoami

    Diplomacy for 1.174

    Artam said:
    I couldn't decide whether to ask for help here or "Modding Q&A". But since I tried to add a feature to Diplomacy mod, I decided to ask for help here. I hope I'm not doing anything wrong.

    I am trying to add option to turn on/off via "Diplomacy Preferences" presentation of below code.
    ...
    As you can see in the screenshot#2 I managed to add Combat UI options. But problem is that when I turn off them and exit it doesn't save my choices and when I go back to "Diplomacy Preferences", they all seem selected.

    As for me I do not see anything wrong with the general approach. It is likely to be a clerical error - you should post the full code, if you haven't fixed it yet.
    I managed to add this feature to my (yet another) Diplomacy Mod, the changes are here, mixed with some other code layout change (sorry) - although I merged the three options in one.
    The only issue is that if you accidentally press the Quest button in battle, the minimap disappears.

    You can see it in action here. It can be turned on and off .



    Great feature btw, thank you for sharing. We should do that more often.
  6. diegoami

    Diplomacy for 1.174

    Somebody said:
    There already is a debug menu you can access to swap out slot values. You can access the endpoints through the character report (automatically goes to last talked troop), and the export/import for companions, and just enabling the cheatmenu ctrl+shift+` shortcut while inside a scene.
    The printout is supposed to be there but I forgot to add the cheat mode requirement for it. Also, if you access the character screen/quest while in the middle of a dialog (by clicking on their face or pressint tab), if any registers are shared they can get broken between the various dialog options.

    Thank you, that is a very useful feature to know, I will make use of it.
    I was not aware that you can break stuff that easily with shared registry variables -  what were they thinking ?
  7. diegoami

    Diplomacy for 1.174

    Dj_FRedy said:
    If you'll allow me to criticize.
    Why use an editor when we have the operations necessary to make the changes?
    Set the values you need and create a menu to execute them.
    The editors, most of the time, not contemplating all the variables of the mod, the only thing they do is to break the save...
    It's a tip that I give you, since you are already modifying the files from the Modsys.

    Thank you for the tip - I guess that I usually would have to do. In this particular case I think it worked right and did not break anything, as only those two slots were affected, but next time sure, I will use a game menu to be safe.
  8. diegoami

    [Fix] Lord return from exile

    Ah ok, playing on it did not turn out to be an issue - but I did find out ladies that "had left the realm" when there were no relatives left in Calradia. Not sure what happens to them when and if their relatives get pardoned, but they seem to reappear as well after all.
  9. diegoami

    Diplomacy for 1.174

    Hmm... it seems to me that the feature to delegate a quest to a companion does not work. I have tried it in my walkthrough. Here I delegate a quest to Matheld to ransom a girl, but an ominous debug screen appears and Matheld actually stays in the party, as can be seen later on. After some days I check on her and her whereabouts are unknown, while she is actually still in the party. The option to ask her a question is missing, as the game thinks she is about to start off on a quest. Here is the save file, although I don"t think it is going to help.

    For all I could see, this feature seems actually unimplemented. Using a save editor I had to set back Matheld's slot_troop_current_mission and slot_troop_mission_object back to 0, to get her back as a full member. And I decided to hide that menu option - it seemed too good to be true.
  10. diegoami

    [Fix] Lord return from exile

    By the way, do ladies return from exile? With this fix late game Diplomacy seems to turn into a sausage fest - is this taken care of in Floris?
  11. diegoami

    Diplomacy for 1.174

    A bug that has been in Diplomacy for a while, also in older versions - if you replace the minister of your kingdom, a "resolve dispute" quest can be aborted even if you hadn't accepted it in the first place ! This causes a loss of relations and right to rule. The fix would be in "module_dialogs.py"

    [anyone, "minister_replace_confirm",
    [
    (troop_slot_eq, "$g_talk_troop", slot_troop_occupation, slto_player_companion),
    ], "Very good. {s9} is your new minister. I shall make ready to rejoin you.", "close_window",
    [
    (str_store_troop_name, s9, "$g_player_minister"),
    (party_add_members, "p_main_party", "$g_talk_troop", 1),
    (assign, "$g_leave_encounter", 1),
    (try_begin),
    (main_party_has_troop, "$g_player_minister"),
    (party_remove_members, "p_main_party", "$g_player_minister", 1),
    (try_end),

    (try_for_range, ":minister_quest", all_quests_begin, all_quests_end),
    (quest_slot_eq, ":minister_quest", slot_quest_giver_troop, "$g_talk_troop"),
    (check_quest_active, ":minister_quest"), #DA: make sure that the quest has actually been accepted by the player !
    (call_script, "script_abort_quest", ":minister_quest", 0),
    (try_end),
    ]],

    It seems to me that script_abort_quest should always check whether a quest is active before aborting it, but I do not know if there would be side effects in other places.
  12. diegoami

    Diplomacy for 1.174

    Corbul said:
    By the way, I found some old quests in the game files (save lady from besieged town/ castle; deliver supplies to besieged town/ castle; rescue lords from revolting peasants; etc.). Would you happen to know how I can reactivate them successfully? I've dug around, removed the ## from the entries, compiled. Some compile no problem, but don't see to be active in the game. Others (rescue lady) give error.

    I would assume they have been commented out for a reason and are probably not working, unfinished, unbalanced or buggy. I would not touch them, unless you have an idea on how they are supposed to work or could work.
  13. diegoami

    Diplomacy for 1.174

    Corbul said:
    Are these changes already included into the source? If so, which individual files do I download? Because I've made several changes to my source and don't want to start over.

    They are probably not - you can apply these changes directly to your source, if you want them.
    However, I would suggest that you keep two separate directories, one for your source and one for the base mod - so in case the base mod gets updated, you can use tools like (win)diff to see what has changed and can be integrated into your source. Or you can do it like me and use a version control system like git, and keep the base mod in a separate branch.
  14. diegoami

    Diplomacy for 1.174

    Occasionally I find that the traveller does not know where the ransom brokers are. The new script to find tavern travelers (script_list_known_taverngoers ) relies on the troops' slots. However, they are not set in update_ransom_brokers, unlike in similar scripts like update_booksellers.

    Here is a fix in "module_scripts.py"

      #script_update_ransom_brokers
      # INPUT: none
      # OUTPUT: none
      ("update_ransom_brokers",
        [(try_for_range, ":town_no", towns_begin, towns_end),
          (party_set_slot, ":town_no", slot_center_ransom_broker, 0),
        (try_end),

        (try_for_range, ":troop_no", ransom_brokers_begin, ransom_brokers_end),
          #SB : random-brokers prefer towns with actual prisoners
          (assign, ":limit", 20),
          (try_for_range, ":unused", 0, ":limit"), #also exclude Tihr since it has Ramun
              (store_random_in_range, ":town_no", towns_begin, towns_end),
              (neq, ":town_no", "p_town_2"),
              #also exclude centers under siege
              (neg|party_slot_ge, ":town_no", slot_center_is_besieged_by, 1),
              (party_get_num_prisoners, ":prisoner_count", ":town_no"),
              (gt, ":prisoner_count", 0),
              (party_set_slot, ":town_no", slot_center_ransom_broker, ":troop_no"),
              (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"), #DA: necessary for travellers to know about it
              (assign, ":limit", 0), #loop breaker
          (try_end),
          (eq, ":limit", 20), #none found
          (store_random_in_range, ":town_no", towns_begin, towns_end),
          (party_set_slot, ":town_no", slot_center_ransom_broker, ":troop_no"),
          (troop_set_slot, ":troop_no", slot_troop_cur_center, ":town_no"), #DA: necessary for travellers to know about it
        (try_end),

        (party_set_slot,"p_town_2",slot_center_ransom_broker,"trp_ramun_the_slave_trader"),
        ]),
  15. diegoami

    Diplomacy for 1.174

    Another small thing, when sending companions to spy in towns that are owned by the player, the town and the kingdom's name are not shown correctly.
    Here is a fix in "module_dialogs.py"

    #SB : prohibit intel-gathering in own faction
    [anyone,"member_intelgathering_1", [
    (troop_get_slot, ":town_with_contacts", "$g_talk_troop", slot_troop_town_with_contacts),
    (store_faction_of_party, ":contact_town_faction", ":town_with_contacts"),
    (is_between, "$players_kingdom", kingdoms_begin, kingdoms_end),
    (eq, ":contact_town_faction", "$players_kingdom"), #own faction


      # (str_store_party_name, s17, ":contact_town_faction"),
      (str_store_party_name, s17, ":town_with_contacts"),

    (party_get_slot, ":town_ruler", ":town_with_contacts", slot_town_lord),
    (try_begin),
      (is_between, ":town_ruler", heroes_begin, heroes_end),
      (assign, reg18, 1),
      (str_store_troop_name, s18, ":town_ruler"),
    (else_try), #own city, unassigned, etc instead of defaulting to ruler
      (assign, reg18, 0),
    (try_end),

    #use cached instability value
    (faction_get_slot, ":instability", ":contact_town_faction", slot_faction_instability), #0 to 100
    (val_min, ":instability", 60), #no descriptor past that point
    (val_div, ":instability", 20), #3 to 0
    (store_sub, ":string", "str_the_s12_is_a_rock_of_stability_politically_speaking_whatever_the_lords_may_think_of_each_other_they_fight_as_one_against_the_common_foe", ":instability"),

    # (str_store_string, s12, "@our realm") # it ends up being "The our realm"
    (str_store_faction_name, s12, ":contact_town_faction"),

    (str_store_string, s19, ":string"),
    (call_script, "script_dplmc_print_subordinate_says_sir_madame_to_s0"),
    ], "Aye, {s0}, I do have some friends back in {s17}... However, I do not believe {reg18?{s18} would take kindly to this sort of skullduggery:the political landscape is changing so drastically}. It is common knowledge that {s19}", "do_member_trade",[
    #SB : initialize global
    (assign, "$lord_selected", -1),
    ]],
Back
Top Bottom