Search results

  1. SP Dark Ages Viking Conquest - Family Edition [OSP]

    This OSP main objective was adding missing family relations to VC. It does a few tweaks on the side that are easy to pick apart. Every lord that should have a family now has it, including kings. Some kings are related to each other through in-laws. I also changed the name of a few lords that I...
  2. Modding Q&A [For Quick Questions and Answers]

    Figured out what was the problem. If anyone has this doubt in the future, just search for this section in module_script.py and change all instances of lords_begin to kings_begin.

    Code:
     #Family notes
          (try_begin),
            (this_or_next|is_between, ":troop_no", lords_begin, kingdom_ladies_end),
            (eq, ":troop_no", "trp_player"),
            (neg|is_between, ":troop_no", pretenders_begin, pretenders_end),
            (assign, ":num_relations", 0),
    
            (try_begin),
              (call_script, "script_troop_get_family_relation_to_troop", "trp_player", ":troop_no"),
              (gt, reg0, 0),
              (val_add, ":num_relations", 1),
            (try_end),
            (try_for_range, ":aristocrat", lords_begin, kingdom_ladies_end),
              (call_script, "script_troop_get_family_relation_to_troop", ":aristocrat", ":troop_no"),
              (gt, reg0, 0),
              (val_add, ":num_relations", 1),
            (try_end),
            (try_begin),
              (gt, ":num_relations", 0),
              (try_begin),
                (eq, ":troop_no", "trp_player"),
                (str_store_string, s49, "str__family_"),
              (else_try),
                (troop_get_slot, reg1, ":troop_no", slot_troop_age),
                (str_store_string, s49, "str__age_reg1_family_"),
              (try_end),
              (try_begin),
                (call_script, "script_troop_get_family_relation_to_troop", "trp_player", ":troop_no"),
                (gt, reg0, 0),
                (str_store_troop_name_link, s12, "trp_player"),
                (val_sub, ":num_relations", 1),
                (try_begin),
                  (eq, ":num_relations", 0),
                  (str_store_string, s49, "str_s49_s12_s11_end"),
                (else_try),
                  (str_store_string, s49, "str_s49_s12_s11"),
                (try_end),
              (try_end),
              (try_for_range, ":aristocrat", lords_begin, kingdom_ladies_end),
                (call_script, "script_troop_get_family_relation_to_troop", ":aristocrat", ":troop_no"),
                (gt, reg0, 0),
                (try_begin),
                  (neg|is_between, ":aristocrat", kingdom_ladies_begin, kingdom_ladies_end),
                  (eq, "$cheat_mode", 1),
                  (str_store_troop_name_link, s12, ":aristocrat"),
                  (call_script, "script_troop_get_relation_with_troop", ":aristocrat", ":troop_no"),
                  (str_store_string, s49, "str_s49_s12_s11_rel_reg0"),
                (else_try),
                  (str_store_troop_name_link, s12, ":aristocrat"),
                  (val_sub, ":num_relations", 1),
                  (try_begin),
                    (eq, ":num_relations", 0),
                    (str_store_string, s49, "str_s49_s12_s11_end"),
                  (else_try),
                    (str_store_string, s49, "str_s49_s12_s11"),
                  (try_end),
                (try_end),
              (try_end),
            (try_end),
          (try_end),
  3. Modding Q&A [For Quick Questions and Answers]

    Hi all,

    I've been trying to add family relations to kings but so far it hasn't been successful. The game ignores children, spouses and any family relation. I can't actually figure out why, as I thought the kings were treated as troops like the other lords. What gives? Is this hardcoded?
  4. Modding Q&A [For Quick Questions and Answers]

    zakarum said:
    Hi,

    Can anyone tell me how to have 5 lords that have a mother but no father be brothers? slot_troop_guardian only supports at max 3 brothers. Alternatively, could I make a father for the 5 lords but one that doesn't exist in the map - isn't a lord, doesn't have troops or retinues?

    Thanks
    I think I managed to find a solution.

    While perusing the modules_script.py to understand them better and implement what motomataru suggested, I stumbled over this:

    Code:
    (else_try),
            (gt, ":father_of_1", -1), #necessary, as some lords do not have the father registered
            (eq, ":father_of_1", ":father_of_2"),
            (assign, ":relation_strength", 10),
            (try_begin),
              (eq, ":gender_1", 1),
              (str_store_string, s11, "str_sister"),
            (else_try),
              (str_store_string, s11, "str_brother"),
            (try_end),

    The code seemed to imply it would build the brother/sister relationship in the absence of a father, but it didn't. Because it needed the father for it, I think. I changed the references from father to mother (mother_of_1 and mother_of_2) and now the 4 Ragnar sons are recognized as brothers. I will add Aslaug as a mother to Halfdan and this should include him as a brother too. I don't know if it will break something or if this will carry the relationship bonus/penalties and quests for being siblings, but I hope it does. Posting this here in case anyone has any trouble with this in the future.
  5. Modding VC: basic tutorials and Q&A thread

    Maybe a modder with some experience, as I'm struggling to convert the VC sourcecode to WRECK even with the WRECKER hahahaha
    I supposed I will try to do it now that you gave some hints on how to do it, but I'm guessing it will be a trainwreck if I try to change module_simple_triggers and module_scripts at the same time to add it.

    EDIT:
    Managed to find a solution that doesn't go over slot_troop_guardian or slot_troop_sibling. I think.
    While perusing the modules_script.py to understand them better and implement what motomataru suggested, I stumbled over this:

    Code:
    (else_try),
            (gt, ":father_of_1", -1), #necessary, as some lords do not have the father registered
            (eq, ":father_of_1", ":father_of_2"),
            (assign, ":relation_strength", 10),
            (try_begin),
              (eq, ":gender_1", 1),
              (str_store_string, s11, "str_sister"),
            (else_try),
              (str_store_string, s11, "str_brother"),
            (try_end),

    The code seemed to imply it would build the brother/sister relationship in the absence of a father, but it didn't. Because it needed the father for it, I think. I changed the references from father to mother (mother_of_1 and mother_of_2) and now the 4 Ragnar sons are recognized as brothers. I will add Aslaug as a mother to Halfdan and this should include him as a brother too. I don't know if it will break something or if this will carry the relationship bonus/penalties and quests for being siblings, but I hope it does. Posting this here in case anyone has any trouble with this in the future.
  6. Modding Q&A [For Quick Questions and Answers]

    Hi,

    Can anyone tell me how to have 5 lords that have a mother but no father be brothers? slot_troop_guardian only supports at max 3 brothers. Alternatively, could I make a father for the 5 lords but one that doesn't exist in the map - isn't a lord, doesn't have troops or retinues?

    Thanks
  7. Modding VC: basic tutorials and Q&A thread

    Oh, I get it now. You are telling me a troop can only have one guardian. That means that A can be brother of B and B can be brother of C and C can be brother of D, but in this scheme C wouldn't be brother of A and D wouldn't be brother of B because they have their slots filled. The guardian-brother system would support at max 3 fatherless or motherless siblings. I just tested what you said and it's unfortunately true, using this I can only make 3 siblings but I have 5, which means the only way I can get everyone relations right in this case would be making a lord that is the father of them all. I will ask on the forge if I can make an invisible lord or a dead lord for this, thank you very much for all the help and thank you for the tip on the WRECKER tool.
  8. Modding VC: basic tutorials and Q&A thread

    Well I tried the "unique-identifier" format before, which looked like this

    Code:
     #Sigurd brother relations
    	  (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_14"), #Ubba
          (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
          (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
    	  #Ubba brother relations
          (troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
          (troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
    	  #Rathbarth brother relations
          (troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson

    The result is the same - only Ivar has brothers. I also tried adding the 3 different brothers to each brother entry. Same result. I understand what you are saying but I'm still at a loss as why only Ivar has brothers. While it's usually used for the relation between a lord and a maiden, the code says that
    #Usually siblings are identified by a common parent.This is used for brothers if the father is not an active npc. At some point we might introduce geneologies
    . There's also a slot_troop_sibling that seems deprecated and no mods uses it, so I didn't try using it.
    The easier alternative would be to put a father for the troops since it seems they all recognize their sister because they have a mother but not each other because they don't have a father, but the father's dead and I don't suppose there's a way to add a dead actor - one that gives them the bound but doesn't appear on the map.

    I guess I will try to change VC to WRECK format, it would be the alternative with the most benefits I guess, though I'm fairly new so "not hard" would fall on "hard" to me, considering I can't even get some siblings to identify each other.

    Thanks for the help.

    EDIT:

    Maybe VC to WRECK isn't as easy as I thought.

    Code:
    Loading module... FAILED.
    MODULE `scripts` ERROR:
    Traceback (most recent call last):
      File "compile.py", line 109, in <module>
        from module_scripts import *
      File "C:\Users\x\Desktop\VC WRECK\integrated_ms\module_scripts.py", line 15, in <module>
        from module_items import items
      File "C:\Users\x\Desktop\VC WRECK\integrated_ms\module_items.py", line 3714, in <module>
        append_noswing_items(items)
      File "C:\Users\x\Desktop\VC WRECK\integrated_ms\headers\header_items.py", line 410, in append_noswing_items
        add_item = deepcopy(items)
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 237, in _deepcopy_tuple
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 230, in _deepcopy_list
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 237, in _deepcopy_tuple
        y.append(deepcopy(a, memo))
      File "C:\PYTHON26\LIB\copy.py", line 190, in deepcopy
        y = _reconstruct(x, rv, 1, memo)
      File "C:\PYTHON26\LIB\copy.py", line 334, in _reconstruct
        state = deepcopy(state, memo)
      File "C:\PYTHON26\LIB\copy.py", line 163, in deepcopy
        y = copier(x, memo)
      File "C:\PYTHON26\LIB\copy.py", line 257, in _deepcopy_dict
        y[deepcopy(key, memo)] = deepcopy(value, memo)
      File "C:\PYTHON26\LIB\copy.py", line 174, in deepcopy
        y = copier(memo)
    TypeError: __call__() takes exactly 4 arguments (2 given)
    
    
    COMPILATION FAILED.

    It's python 2.7 despite being in the 2.6 folder. I can't figure out what arguments are missing from deepcopy and why it would work in the normal compiler and not in WRECK.
  9. Modding VC: basic tutorials and Q&A thread

    A few questions:

    1. I've been trying to add all missing family relations to the game, but I run in a problem right at the start. The code I'm using is
    Code:
    #Sigurd brother relations
    	  (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_14"), #Ubba
    	  (troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_1_5"), #Ubba
          (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
    	  (troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_1_5"), #Rathbarth
          (troop_set_slot, "trp_knight_1_5", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
    	  (troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_1_5"), #Ivar the Boneless Ragnarsson
    	  #Ubba brother relations
          (troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_2"), #Rathbarth
    	  (troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_14"), #Rathbarth
          (troop_set_slot, "trp_knight_8_14", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
    	  (troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_8_14"), #Ivar the Boneless Ragnarsson
    	  #Rathbarth brother relations
          (troop_set_slot, "trp_knight_8_2", slot_troop_guardian, "trp_knight_8_13"), #Ivar the Boneless Ragnarsson
    	  (troop_set_slot, "trp_knight_8_13", slot_troop_guardian, "trp_knight_8_2"), #Ivar the Boneless Ragnarsson
    I used several variations and this one is the latest where I'm trying to use the back-and-forth logic of spouses. However, no matter how I format the code, only Ivar has all his siblings - and his siblings have him as a brother, but don't have each other. So Rathbarth isn't recognized as Sigurd's brother, but he recognizes Ivar as a brother, just like Sigurd recognize only Ivar as a brother. What's wrong with my usage of "slot_troop_guardian"?

    2. So far I refrained from adding Halfdan's family relations. How catastrophic would be for the ruler of a faction to have a family? Why they don't have any as a rule?

    3. I'd like to integrate the mods from http://forums.taleworlds.com/index.php/topic,328368.msg7758570.html, more specifically Kalarhan MapNode and WorldMap by Rubik, as I like to at a glance know how's the political situation (also knowing what's the lord personality type helps when picking up lords that you want to get high relations with). Problem is, it's designed for WRECK (which comes with a  bunch of vanilla stuff for the full install and doesn't support plugins for the drag and drop install) and it's outdated. I'm assuming the latter won't be much of a problem but could I integrate the mapmod and the AI Lord personality info directly in the basic VC compiler, without WRECK, and how would I approach this?

    Thanks for any help.
  10. Viking Conquest: Patch to 2.025 UPDATE: Released!

    Thanks a lot for the patch.
Top Bottom