Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Slavos said:
1-How do i change the gate watch?There is a answer in the first page but is very out of date and i can't get it to work.

2-Is possible to add a separated reinforcement template,i want to kings have special units but if i put those units in the existing reinforcements templates all other lords you get the troop too.

Do you mean the guards at the town gate or the castle door?  You can define the various guards in the module_scripts file.  I don' think it works for the town gates though.
 
Redleg said:
Slavos said:
1-How do i change the gate watch?There is a answer in the first page but is very out of date and i can't get it to work.

2-Is possible to add a separated reinforcement template,i want to kings have special units but if i put those units in the existing reinforcements templates all other lords you get the troop too.

Do you mean the guards at the town gate or the castle door?  You can define the various guards in the module_scripts file.  I don' think it works for the town gates though.
I already manage to change the ones standing inside the castles but did not find anything related with the ones in the city gate.
 
Ulfrsson said:
jacobhinds said:
They are carried like that in nativ  (with the tip pointing away from the thumb), it's just that the pose is different. However, idle javelins use the same animation as holding nothing, so unless you want them to stand like that all the time, there isn't much you can do.

I'm not sure if I was misunderstood or not, but I'm talking about keeping them behind the shield instead of on your back. Keeping 2-3 small javelins in your shield arm. So I'm looking for a way of maybe making the quiver not static and held in your left arm, behind the shield.
Make x variants of a shield where x is how much ammo the javelin item has. Check agents with that javelin equipped and a shield, poll ammo and switch to the next variant at some interval (or ti_on_weapon_attack). Downside is their shields will have higher potential hp.
 
Hey all! Looking for a quick way to prevent a party from spawning on the map if a certain troop (the party leader) is a prisoner of the player's party.

Code:
  (5.2,
   [
	(try_begin),
   	   (neg|troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
       (call_script, "script_spawn_armies_anessa"),
   (else_try),
       (troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
	   (display_message, "@IN PRISON! anessa"),
   (try_end)	   
    ]),

The script itself works, but the condition of "(neg|troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0)," doesnt seem to, even when "(troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0)," does. Any ideas?
 
Hello, I can't seem to get the merged PBOD and Diplo to work with my module system. I've followed the readmes and installed WSE and D+PBOD successfully (it compiled without errors) but in-game there's no diplomacy or the new deployment orders.
 
This is still for your MP project, right?
You might want to edit multiplayer_server_on_agent_killed_or_wounded_common, assuming you want that to gain XP/gold/loot after you killed someone.
Take a look at store_random_in_range for lootchances if you want them to be random. XP and gold would require a little deeper knowledge of your concept, as there are countless ways you could want it to work.
 
bentguisarme said:
Hey all! Looking for a quick way to prevent a party from spawning on the map if a certain troop (the party leader) is a prisoner of the player's party.

Code:
  (5.2, [
	(try_begin),
		(neg|troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
		(call_script, "script_spawn_armies_anessa"),
	(else_try),
		(troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
		(display_message, "@IN PRISON! anessa"),
	(try_end)	   
  ]),

The script itself works, but the condition of "(neg|troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0)," doesnt seem to, even when "(troop_slot_eq, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0)," does. Any ideas?
Are you absolutely certain you're setting the slot when you imprison that troop? Native usually assumes you stay within well-defined bounds, and I sincerely doubt the quick battle troops are covered by any of them.
 
HyperCharge said:
What are these operations doing exactly ? Can someone tell me with samples ?

Code:
prop_instance_get_variation_id              = 1840  # (prop_instance_get_variation_id, <destination>, <scene_prop_id>),
                                                    # Retrieves the first variation ID number for the specified scene prop instance.
prop_instance_get_variation_id_2            = 1841  # (prop_instance_get_variation_id_2, <destination>, <scene_prop_id>),
                                                    # Retrieves the second variation ID number for the specified scene prop instance.
mission_cam_get_aperture                     = 2013  # (mission_cam_get_aperture, <destination>)
                                                     # Not documented. View angle?
mission_cam_set_aperture                     = 2014  # (mission_cam_set_aperture, <value>)
                                                     # Not documented.
mission_cam_animate_to_aperture              = 2015  # (mission_cam_animate_to_aperture, <value>, <duration-in-1/1000-seconds>, <value>)
                                                     # Not documented. if value = 0, then camera velocity will be linear. else it will be non-linear
mission_cam_animate_to_position_and_aperture = 2016  # (mission_cam_animate_to_position_and_aperture, <position_register_no>, <value>, <duration-in-1/1000-seconds>, <value>)
                                                     # Not documented. if value = 0, then camera velocity will be linear. else it will be non-linear
prop_instance_set_material                  = 2617  # (prop_instance_set_material, <prop_instance_no>, <sub_mesh_no>, <string_register>),
                                                    # Version 1.161+. 4research. give sub mesh as -1 to change all meshes' materials.

Also, is this hides the AI mesh with putting its group no in Edit Mode ?

Code:
ai_mesh_face_group_show_hide = 1805  #  (ai_mesh_face_group_show_hide, <group_no>, <value>), # 1 for enable, 0 for disable

If it does that, I am thinking very very nice things made with that.  :smile:

Thanks in advance.
 
jacobhinds said:
That won't work. The only negative function you can use before a | is neg.


Ah of course,


How about

Code:
 (5.2,
   [
	 (try_begin),
   	     (troop_slot_ge, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
             (display_message, "@IN PRISON! anessa"),
         (else_try),
             (call_script, "script_spawn_armies_anessa"),
         (try_end)	   
   ]),
 
produno said:
jacobhinds said:
That won't work. The only negative function you can use before a | is neg.


Ah of course,


How about

Code:
 (5.2,
   [
	 (try_begin),
   	     (troop_slot_ge, "trp_quick_battle_troop_2", slot_troop_prisoner_of_party, 0),
             (display_message, "@IN PRISON! anessa"),
         (else_try),
             (call_script, "script_spawn_armies_anessa"),
         (try_end)	   
   ]),

I can't believe I hadn't thought of that. My brain must be fried. I'll try this out when I get home.
 
Vorchevorsk said:
Hello, I can't seem to get the merged PBOD and Diplo to work with my module system. I've followed the readmes and installed WSE and D+PBOD successfully (it compiled without errors) but in-game there's no diplomacy or the new deployment orders.

Are you sure you compiled to the appropriate module?  Have you started a new game?  Did you correctly set up the modmerger system (if you used it to merge?).
 
Need help with something,i trying to make lords have  specific units through new templates in party_templates,the code is this one:
In module scripts at "script_cf_reinforce_party"
Code:
 #my changes
	  	 (try_begin),
	     (party_stack_get_troop_id, ":party_leader", ":party_no",0),
		 (is_between,":party_leader",npc_alt_lord_begin, npc_alt_lord_end),

		 (faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_alt_a),
		 (faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_alt_b),
		 (faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_alt_c),
	  (else_try),
	  #end of my changes
      (faction_get_slot, ":party_template_a", ":party_faction", slot_faction_reinforcements_a),
      (faction_get_slot, ":party_template_b", ":party_faction", slot_faction_reinforcements_b),
      (faction_get_slot, ":party_template_c", ":party_faction", slot_faction_reinforcements_c),
    #my changes
	(try_end),
    #end of my changes 

In module scripts at "initialize_faction_troop_types"
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_alt_a, "pt_kingdom_5_reinforcements_alt_a"),
  (faction_set_slot, ":faction_no",  slot_faction_reinforcements_alt_b, "pt_kingdom_5_reinforcements_alt_b"),
          (faction_set_slot, ":faction_no",  slot_faction_reinforcements_alt_c, "pt_kingdom_5_reinforcements_alt_c"),

In party_templates
Code:
  #my changes
  ("kingdom_5_reinforcements_alt_a", "{!}kingdom_5_reinforcements_alt_a", 0, 0, fac_commoners, 0, [(trp_veidar_marksman,0,10)]), 
  ("kingdom_5_reinforcements_alt_b", "{!}kingdom_5_reinforcements_alt_b", 0, 0, fac_commoners, 0, [(trp_veidar_marksman,0,5)]), 
  ("kingdom_5_reinforcements_alt_c", "{!}kingdom_5_reinforcements_alt_c", 0, 0, fac_commoners, 0, [(trp_veidar_marksman,5,10)]), 
  #end of my changes

In module constants
slot_faction_reinforcements_alt_a    = 900
slot_faction_reinforcements_alt_b    = 901
slot_faction_reinforcements_alt_c    = 902

npc_alt_lord_begin = "trp_knight_5_1"
npc_alt_lord_end = "trp_knight_5_20"   

Its compile without any errors but the lords are not being reinforced with that troop (veidar_marksman).Some help would be appreciated.

EDIT- I manage to make them recruit those troops,the problem now is,they are only recruiting the "veidar_marksman" unit.Any ideas?
 
Your code works fine, the problem is you've put only those troops in the new template and the else_try in the first code block means they'll get troops from the original templates. For conditional recruiting I am not a big fan of putting everything in cf_reinforce_party - try putting it in hire_men_to_kingdom_hero_party just under it instead, unless you also want centers owned by those lords to use those templates.
 
Status
Not open for further replies.
Back
Top Bottom