Modding VC: basic tutorials and Q&A thread

Users who are viewing this thread

lol one of these operations even has an alternate spelling just to mess with us



So I think this should work:
      #Rebellion changes begin:
      (try_begin),
        (eq, ":party_type", spt_kingdom_hero_party),
        (party_stack_get_troop_id, ":leader", ":party_no"),
        (store_troop_faction, ":party_faction", ":leader"),
      (try_end),
      #Rebellion changes end
     
      (try_begin),
        (eq, ":party_no", "p_main_party"),
        (try_begin),
          (is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
          (assign, ":party_faction", "$players_kingdom"),
        (else_try),
          (assign, ":party_faction", "fac_player_supporters_faction"),
        (try_end),
       
      (else_try),
        (eq, ":party_faction", "fac_player_supporters_faction"),
        (is_between, ":party_no", walled_centers_begin, walled_centers_end),
        (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
        (try_begin),
          (gt, ":town_lord", 0),
          (store_troop_faction, ":party_faction", ":town_lord"),
        (else_try),
          (store_faction_of_party, ":party_faction", ":party_no"),
        (try_end),
      (try_end),


But I'm rusty at this so not sure at all. Also remember if it does work it won't change the existing troops, just the new ones that are added from then on.
 
kraggrim ?️ said:
lol one of these operations even has an alternate spelling just to mess with us



So I think this should work:
      #Rebellion changes begin:
      (try_begin),
        (eq, ":party_type", spt_kingdom_hero_party),
        (party_stack_get_troop_id, ":leader", ":party_no"),
        (store_troop_faction, ":party_faction", ":leader"),
      (try_end),
      #Rebellion changes end
     
      (try_begin),
        (eq, ":party_no", "p_main_party"),
        (try_begin),
          (is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
          (assign, ":party_faction", "$players_kingdom"),
        (else_try),
          (assign, ":party_faction", "fac_player_supporters_faction"),
        (try_end),
       
      (else_try),
        (eq, ":party_faction", "fac_player_supporters_faction"),
        (is_between, ":party_no", walled_centers_begin, walled_centers_end),
        (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
        (try_begin),
          (gt, ":town_lord", 0),
          (store_troop_faction, ":party_faction", ":town_lord"),
        (else_try),
          (store_faction_of_party, ":party_faction", ":party_no"),
        (try_end),
      (try_end),


But I'm rusty at this so not sure at all. Also remember if it does work it won't change the existing troops, just the new ones that are added from then on.

Just the new troops is exactly what I was aiming for. I'll give it a try when I get home later.

Another quick question, I would like to get the "meet the mayor" and "talk to the village elder" options available in the town/village menus without having talked to them previously. I tried to search but couldn't find an answer to this.
 
It'll be in module_game_menus. Search for the text for those options you want to change and work backwards from there.
 
kraggrim ?️ said:
It'll be in module_game_menus. Search for the text for those options you want to change and work backwards from there.

Searching for "meet the mayor", I could find

# ("town_mayor",#4.1#disabled(VC-2663)
      # [(val_add, "$curr_menu_slot", 1),(quest_slot_ge, "qst_vc_menu", "$curr_menu_slot", 1),
      # ],"Meet the mayor.",
      # [(call_script, "script_execute_town_menu_cosequence", slot_quest_menu_4 + 1),]),

So, it's in scripts. Still not figuring out what to add/delete here:

    (try_begin),
        # ("town_mayor",#4.1
        (val_add, "$curr_menu_slot", 1), #vc_menu
        (neg | party_slot_ge, "$current_town", slot_party_looted_left_days, 1),
        (neg | is_currently_night),
        (party_slot_eq, "$current_town", slot_party_type, spt_town),
        (this_or_next | eq,"$entry_to_town_forbidden",0),
        (eq, "$sneaked_into_town",1),
        (party_get_slot, ":mayor", "$current_town", slot_town_elder),
        (troop_get_slot, ":met", ":mayor", slot_troop_met),
        (ge, ":met", 1),
       
        (quest_set_slot, "qst_vc_menu", "$curr_menu_slot", 1), #vc_menu
        (str_store_string, "$curr_menu_slot", "@Meet the mayor."), #vc_menu
      (end_try),
      ###
 
kraggrim ?️ said:
lol one of these operations even has an alternate spelling just to mess with us



So I think this should work:
      #Rebellion changes begin:
      (try_begin),
        (eq, ":party_type", spt_kingdom_hero_party),
        (party_stack_get_troop_id, ":leader", ":party_no"),
        (store_troop_faction, ":party_faction", ":leader"),
      (try_end),
      #Rebellion changes end
     
      (try_begin),
        (eq, ":party_no", "p_main_party"),
        (try_begin),
          (is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
          (assign, ":party_faction", "$players_kingdom"),
        (else_try),
          (assign, ":party_faction", "fac_player_supporters_faction"),
        (try_end),
       
      (else_try),
        (eq, ":party_faction", "fac_player_supporters_faction"),
        (is_between, ":party_no", walled_centers_begin, walled_centers_end),
        (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
        (try_begin),
          (gt, ":town_lord", 0),
          (store_troop_faction, ":party_faction", ":town_lord"),
        (else_try),
          (store_faction_of_party, ":party_faction", ":party_no"),
        (try_end),
      (try_end),


But I'm rusty at this so not sure at all. Also remember if it does work it won't change the existing troops, just the new ones that are added from then on.

Thanks, I've implemented it and no new errors were found in rgl_log. Have yet to be seen if it actually works :smile:
 
    (try_begin),
        # ("town_mayor",#4.1
        (val_add, "$curr_menu_slot", 1), #vc_menu
        (neg | party_slot_ge, "$current_town", slot_party_looted_left_days, 1),
        (neg | is_currently_night),
        (party_slot_eq, "$current_town", slot_party_type, spt_town),
        (this_or_next | eq,"$entry_to_town_forbidden",0),
        (eq, "$sneaked_into_town",1),
        (party_get_slot, ":mayor", "$current_town", slot_town_elder),
        (troop_get_slot, ":met", ":mayor", slot_troop_met),
        (ge, ":met", 1),
       
        (quest_set_slot, "qst_vc_menu", "$curr_menu_slot", 1), #vc_menu
        (str_store_string, "$curr_menu_slot", "@Meet the mayor."), #vc_menu
      (end_try),
      ###

Hmm, try setting this to 0.
 
This will be less of a "how to" question as I already know how to implement it if it exists.
Does anyone know if someone has made a mod to VC where they have added new face textures?
 
kraggrim ?️ said:
lol one of these operations even has an alternate spelling just to mess with us



So I think this should work:
      #Rebellion changes begin:
      (try_begin),
        (eq, ":party_type", spt_kingdom_hero_party),
        (party_stack_get_troop_id, ":leader", ":party_no"),
        (store_troop_faction, ":party_faction", ":leader"),
      (try_end),
      #Rebellion changes end
     
      (try_begin),
        (eq, ":party_no", "p_main_party"),
        (try_begin),
          (is_between, "$players_kingdom", npc_kingdoms_begin, npc_kingdoms_end),
          (assign, ":party_faction", "$players_kingdom"),
        (else_try),
          (assign, ":party_faction", "fac_player_supporters_faction"),
        (try_end),
       
      (else_try),
        (eq, ":party_faction", "fac_player_supporters_faction"),
        (is_between, ":party_no", walled_centers_begin, walled_centers_end),
        (party_get_slot, ":town_lord", ":party_no", slot_town_lord),
        (try_begin),
          (gt, ":town_lord", 0),
          (store_troop_faction, ":party_faction", ":town_lord"),
        (else_try),
          (store_faction_of_party, ":party_faction", ":party_no"),
        (try_end),
      (try_end),


But I'm rusty at this so not sure at all. Also remember if it does work it won't change the existing troops, just the new ones that are added from then on.

Could this possibly be the cause of the following errors?

SCRIPT ERROR ON OPCODE 2204: Invalid Party ID: 17697; LINE NO: 4:
At Simple trigger trigger no: 109. At Simple trigger trigger no: 109.

SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help. SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help.

I didn't get these until I became king and had a lord defect to me.
 
Huh, maybe some scripts don't work with the player faction, which they're now using instead of his original faction. Could be. When are these messages coming up? When he ask you to join? Still happening once he's properly joined your faction?
 
They happened just after he had joined. I kept playing for maybe a week game time, but he still had zero troops after that one week. So I started testing, I just used cheat mode to conquer a bunch of castles and gave them to my companions. Waited for about another week game time. None of my companion lords had any troops and the lord who had defected still had zero troops.

Hmm, maybe there's a way to make this script not count for player faction? I'm only going to accept Norse lords anyway.

I don't understand how the code works exactly but it does contain "$players_kingdom" and "fac_player_supporters_faction"
 
There might be an alternative solution in simple_triggers

#Auto-indictment or defection
        (try_begin),
          (neq, "$campaign_type", camp_storyline), #disable both auto-defection and auto-indictment completely in storyline mode, only let for sandbox mode chief.

Where it says (neq, "$campaign_type", camp_storyline), could it be possible to put something like (neq, "$campaign_type", camp_storyline, camp_sandbox)?
 
King Yngvar said:
put something like (neq, "$campaign_type", camp_storyline, camp_sandbox)?

just remove the code for it, no code, no feature. And edit your last post instead of double posting.

for basic questions you should visit the Forge.
 
King Yngvar said:
Could this possibly be the cause of the following errors?

SCRIPT ERROR ON OPCODE 2204: Invalid Party ID: 17697; LINE NO: 4:
At Simple trigger trigger no: 109. At Simple trigger trigger no: 109.

SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help. SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help.

I didn't get these until I became king and had a lord defect to me.
The first one says that somehow a lord is leading a party that no longer exists. The second, possibly related, says that there is no party led by the lord one is having a dialog with.

Would you mind seeing if you get those errors with straight VC 2.032? If so, please post in support with defected lord save game. It would be helpful in that case if you remember the lord involved and his history. Thx.
 
motomataru said:
King Yngvar said:
Could this possibly be the cause of the following errors?

SCRIPT ERROR ON OPCODE 2204: Invalid Party ID: 17697; LINE NO: 4:
At Simple trigger trigger no: 109. At Simple trigger trigger no: 109.

SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help. SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help.

I didn't get these until I became king and had a lord defect to me.
The first one says that somehow a lord is leading a party that no longer exists. The second, possibly related, says that there is no party led by the lord one is having a dialog with.

Would you mind seeing if you get those errors with straight VC 2.032? If so, please post in support with defected lord save game. It would be helpful in that case if you remember the lord involved and his history. Thx.

The problem disappeared after I reverted the edit in scripts. He even has an army now.

When he defected to me his party had somehow been reduced to zero troops. I looked him up in an earlier save where he was leading 200 Irish troops (as a defected Norseman), so the script works, just not for the player's supporters faction.
 
Alright, so I downloaded the awesome Dark Age mod for Viking Conquest. Pretty badass mod, feels like a return to Brytenwalda's overall feel. However, I didn't like the look of a couple armors - specifically the bare Picts (I'm not really a fan of the diaper-over-trousers look).

I've spent the last couple days learning how to edit armor/weapons etc through openBRF and Morghs to change them, but I've ran into an issue - https://steamuserimages-a.akamaihd.net/ugc/833581111265578862/71F290E6C8BCBA61EFC7BDD61A33E8161606534C/ As you can see, the chest shows up as a missing texture (I'm assuming that's what the white body/invisibility cloak signify, correct me if I'm wrong). I've ensured that all the proper textures are in the proper location and when I use openBRF, the armor displays as it should, but nothing I've done solves the issue once I actually run the game.

Looking further through openBRF and Morghs, I've run into this: http://i.imgur.com/GT0YWWw.png, the mesh, and http://i.imgur.com/lBt9pE1.png, the texture/material. Why isn't it reading that it's being used? Is it something to do with module.ini or scripts?
 
King Yngvar said:
Could this possibly be the cause of the following errors?

SCRIPT ERROR ON OPCODE 2204: Invalid Party ID: 17697; LINE NO: 4:
At Simple trigger trigger no: 109. At Simple trigger trigger no: 109.

SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help. SCRIPT ERROR ON OPCODE 1694: Invalid Party ID: -1; LINE NO: 7:
At dialog condition: dlga_lord_talk:lord_request_help. At dialog condition: dlga_lord_talk:lord_request_help.

I didn't get these until I became king and had a lord defect to me.

I've had that error too, I think I know why. When a lord defects/get indicted to your faction it spawns a copy of them in your castle, but their real selves are still in the field somewhere.
So when a lord get indicted he loses his army and it treats him as though he has beed defeated, therefore he dissapears. So when he joins your faction it spawns a copy of him, you then talk to him and accept him, if you talk to him again there it will throw up this error because he hasn't spawned back in the game world yet.
Atleast i believe thats what happenes.
 
Back
Top Bottom