Modding Q&A [For Quick Questions and Answers]

正在查看此主题的用户

状态
不接受进一步回复。
hello i made a new faction but when i set the realtions i see that the ladies are related to faction6 not faction 7 which i made here is the code

插入代码块:
 (assign, ":cur_lady", "trp_kingdom_6_lady_1"),
     (try_for_range, ":cur_troop", "trp_knight_6_1", "trp_kingdom_1_pretender"),
        (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),   
      (store_random_in_range, ":father_age_at_birth", 23, 26),
#      (store_random_in_range, ":mother_age_at_birth", 19, 22),
      (store_sub, ":npc_seed", ":cur_troop",  "trp_knight_6_1"),
      (assign, ":ancestor_seed", 31),
      (try_begin),

      
#-Veteranos 16
         (lt, ":npc_seed", 16), #NPC seed is the order in the faction
         (assign, ":reputation", ":npc_seed"),
         (store_random_in_range, ":age", 45, 64),
         
         (store_random_in_range, ":father", 0, 6), #six possible fathers
         (val_add, ":father", ":ancestor_seed"),
         (troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
         
         #wife
         (troop_set_slot, ":cur_troop", slot_troop_spouse, ":cur_lady"),
         (troop_set_slot, ":cur_lady", slot_troop_spouse, ":cur_troop"),
         (store_random_in_range, ":wife_reputation", 20, 26),
         (try_begin),
            (eq, ":wife_reputation", 20),
            (assign, ":wife_reputation", lrep_conventional),
         (try_end),
         (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":wife_reputation"),
         
         
         (call_script, "script_init_troop_age", ":cur_lady", 49),
         #(call_script, "script_add_lady_items", ":cur_lady"), #hispania 1200 quitar codigo damas
         
         (val_add, ":cur_lady", 1),

         #daughter
         (troop_set_slot, ":cur_lady", slot_troop_father, ":cur_troop"),
         (store_sub, ":mother", ":cur_lady", 1),
         (call_script, "script_init_troop_age", ":cur_lady", 19),
         (troop_set_slot, ":cur_lady", slot_troop_mother, ":mother"),
         (store_random_in_range, ":lady_reputation", lrep_conventional, 34), #33% chance of father-derived
         (try_begin),
            (le, ":lady_reputation", 25),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":lady_reputation"),
         (else_try),   
            (eq, ":lady_reputation", 26),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
         (else_try),   
            (eq, ":lady_reputation", 27),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
         (else_try),
            (assign, ":guardian_reputation", ":reputation"),
            (try_begin),
               (this_or_next|eq, ":guardian_reputation", lrep_martial),
                  (eq, ":guardian_reputation", 0),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
            (else_try),      
               (eq, ":guardian_reputation", lrep_quarrelsome),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_otherworldly),
            (else_try),      
               (eq, ":guardian_reputation", lrep_selfrighteous),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
            (else_try),      
               (eq, ":guardian_reputation", lrep_cunning),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
            (else_try),      
               (eq, ":guardian_reputation", lrep_goodnatured),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
            (else_try),      
               (eq, ":guardian_reputation", lrep_debauched),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
            (else_try),      
               (eq, ":guardian_reputation", lrep_upstanding),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
			   
			   (try_end),
			   
            (try_end),
         (try_end),
         
         #(call_script, "script_add_lady_items", ":cur_lady"), hispania 1200 quitar codigo dama
         (val_add, ":cur_lady", 1),
         #high renown

      (else_try),   #Older unmarried lords
#-Adultos 13
         (is_between, ":npc_seed", 16, 29),
         
         (store_random_in_range, ":age", 25, 36),         
         (store_random_in_range, ":reputation", 0, 8),         
         
         (store_random_in_range, ":sister_reputation", 20, 26),
         (try_begin),
            (eq, ":sister_reputation", 20),
            (assign, ":sister_reputation", lrep_conventional),
         (try_end),
         (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":sister_reputation"),
         
         (troop_set_slot, ":cur_lady", slot_troop_guardian, ":cur_troop"),

         (call_script, "script_init_troop_age", ":cur_lady", 21),
         #(call_script, "script_add_lady_items", ":cur_lady"), #hispania 1200 quitar codigo
         
         (val_add, ":cur_lady", 1),
         
      (else_try),   #Younger unmarried lords
#Jovenes 16
         #age is father's minus 20 to 25
         (store_sub, ":father", ":cur_troop", 29),
         (troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
         (troop_get_slot, ":mother", ":father", slot_troop_spouse),
         (troop_set_slot, ":cur_troop", slot_troop_mother, ":mother"),
         
         (troop_get_slot, ":father_age", ":father", slot_troop_age),
         (store_sub, ":age", ":father_age", ":father_age_at_birth"),

         (try_begin), #50% chance of having father's rep
            (store_random_in_range, ":reputation", 0, 16),

            (gt, ":reputation", 7),
            (troop_get_slot, ":reputation", ":father", slot_lord_reputation_type),
         (try_end),
      (try_end),
      
      (try_begin),
         (eq, ":reputation", 0),
         (assign, ":reputation", 1),
      (try_end),
      
        (troop_set_slot, ":cur_troop", slot_lord_reputation_type, ":reputation"),

      (call_script, "script_init_troop_age", ":cur_troop", ":age"),
	  
	  (assign, ":cur_lady", "trp_kingdom_7_lady_1"),
     (try_for_range, ":cur_troop", "trp_knight_6_1", "trp_knight_7_1"),
        (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),   
      (store_random_in_range, ":father_age_at_birth", 23, 26),
#      (store_random_in_range, ":mother_age_at_birth", 19, 22),
      (store_sub, ":npc_seed", ":cur_troop",  "trp_knight_7_1"),
      (assign, ":ancestor_seed", 37),
      (try_begin),
	  
     (try_end),          
	 
	 #_---------------------------------------------------------
	 
	  (assign, ":cur_lady", "trp_kingdom_7_lady_1"),
     (try_for_range, ":cur_troop", "trp_knight_6_1", "trp_knight_7_1"),
        (troop_set_slot, ":cur_troop", slot_troop_occupation, slto_kingdom_hero),   
      (store_random_in_range, ":father_age_at_birth", 23, 26),
#      (store_random_in_range, ":mother_age_at_birth", 19, 22),
      (store_sub, ":npc_seed", ":cur_troop",  "trp_knight_7_1"),
      (assign, ":ancestor_seed", 37),
      (try_begin),

      
#-Veteranos 16
         (lt, ":npc_seed", 16), #NPC seed is the order in the faction
         (assign, ":reputation", ":npc_seed"),
         (store_random_in_range, ":age", 45, 64),
         
         (store_random_in_range, ":father", 0, 6), #six possible fathers
         (val_add, ":father", ":ancestor_seed"),
         (troop_set_slot, ":cur_troop", slot_troop_father, ":father"),
         
         #wife
         (troop_set_slot, ":cur_troop", slot_troop_spouse, ":cur_lady"),
         (troop_set_slot, ":cur_lady", slot_troop_spouse, ":cur_troop"),
         (store_random_in_range, ":wife_reputation", 20, 26),
         (try_begin),
            (eq, ":wife_reputation", 20),
            (assign, ":wife_reputation", lrep_conventional),
         (try_end),
         (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":wife_reputation"),
         
         
         (call_script, "script_init_troop_age", ":cur_lady", 49),
         #(call_script, "script_add_lady_items", ":cur_lady"), #hispania 1200 quitar codigo damas
         
         (val_add, ":cur_lady", 1),

         #daughter
         (troop_set_slot, ":cur_lady", slot_troop_father, ":cur_troop"),
         (store_sub, ":mother", ":cur_lady", 1),
         (call_script, "script_init_troop_age", ":cur_lady", 19),
         (troop_set_slot, ":cur_lady", slot_troop_mother, ":mother"),
         (store_random_in_range, ":lady_reputation", lrep_conventional, 34), #33% chance of father-derived
         (try_begin),
            (le, ":lady_reputation", 25),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, ":lady_reputation"),
         (else_try),   
            (eq, ":lady_reputation", 26),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
         (else_try),   
            (eq, ":lady_reputation", 27),
            (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
         (else_try),
            (assign, ":guardian_reputation", ":reputation"),
            (try_begin),
               (this_or_next|eq, ":guardian_reputation", lrep_martial),
                  (eq, ":guardian_reputation", 0),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_conventional),
            (else_try),      
               (eq, ":guardian_reputation", lrep_quarrelsome),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_otherworldly),
            (else_try),      
               (eq, ":guardian_reputation", lrep_selfrighteous),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
            (else_try),      
               (eq, ":guardian_reputation", lrep_cunning),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
            (else_try),      
               (eq, ":guardian_reputation", lrep_goodnatured),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_adventurous),
            (else_try),      
               (eq, ":guardian_reputation", lrep_debauched),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_ambitious),
            (else_try),      
               (eq, ":guardian_reputation", lrep_upstanding),
               (troop_set_slot, ":cur_lady", slot_lord_reputation_type, lrep_moralist),
			   (assign, ":cur_lady", "trp_kingdom_7_lady_1"),
			   
     
	  
			   
			   
            (try_end),
         (try_end),
       



so what is wrong ?
 
 
插入代码块:
#Server event.
    (eq, ":event_type", multiplayer_weapon_break_event),
   (store_script_param, ":weapon", 3),
   (player_get_agent_id, ":agent", ":player_no"),
   (ge, ":agent", 0),
   (agent_play_sound, ":agent", "snd_shield_broken"),
   (agent_unequip_item, ":agent", ":weapon"),
   
    #Server event 2.
    (eq, ":event_type", multiplayer_weapon_break_event_2),
   (store_script_param, ":agent", 3),
   (store_script_param, ":weapon", 4),
   (player_get_agent_id, ":agent", ":player_no"),
   (ge, ":agent", 0),
   (agent_play_sound, ":agent", "snd_shield_broken"),
   (agent_unequip_item, ":agent", ":weapon"),

Kalarhan ,help me to put this codes in block : game_get_network_message
properly
 
zidozido 说:
so what is wrong ?

1) Fix your indentation. You can't really read and understand code like that
  -> you can use the process_line_correction.py to automagically do that. VC modsys has a nice example of this.
  -> you can also see where you have bugs with your blocks (IF-THEN-ELSE) and fix them

2) Add debug code to test your new code, that way you can see it being executed and figure out where things went wrong

3) Make sure to post the entire code of a script when asking for help (after you complete step 1). If it is too big for the forum or something, you can use https://pastebin.com/

KnightV 说:
            (agent_unequip_item, ":agent", ":weapon"),

this line is using the wrong variable. Read the code and you will see there is no ":weapon", instead it should be

插入代码块:
(agent_unequip_item, ":agent", ":wielded_item"),
 
kalarhan 说:
zidozido 说:
so what is wrong ?

1) Fix your indentation. You can't really read and understand code like that
  -> you can use the process_line_correction.py to automagically do that. VC modsys has a nice example of this.
  -> you can also see where you have bugs with your blocks (IF-THEN-ELSE) and fix them

2) Add debug code to test your new code, that way you can see it being executed and figure out where things went wrong

3) Make sure to post the entire code of a script when asking for help (after you complete step 1). If it is too big for the forum or something, you can use https://pastebin.com/



KnightV 说:
            (agent_unequip_item, ":agent", ":weapon"),

this line is using the wrong variable. Read the code and you will see there is no ":weapon", instead it should be

插入代码块:
(agent_unequip_item, ":agent", ":wielded_item"),

Ok,thanks ,but i want to Know if my code needs any "try begin,try end or else try",concretically in scripts "events .I think that codes must be implemented with others server events
 
KnightV 说:
Ok,thanks ,but i want to Know if my code needs any "try begin,try end or else try",concretically in scripts "events .I think that codes must be implemented with others server events

quotes are linked. Click the quote and see which question I was answering. Then you will see you are thinking of something else  :razz:

I was talking about your earlier question and how that mission template trigger has a bug (wrong variable name).
 
kalarhan 说:
KnightV 说:
Ok,thanks ,but i want to Know if my code needs any "try begin,try end or else try",concretically in scripts "events .I think that codes must be implemented with others server events

quotes are linked. Click the quote and see which question I was answering. Then you will see you are thinking of something else  :razz:

I was talking about your earlier question and how that mission template trigger has a bug (wrong variable name).
Kalarhan,ther is an bug all weapon after several seconds breaking.What i have did wrong&&
 
KnightV 说:
ther is an bug all weapon after several seconds breaking.What i have did wrong

no idea, as without seeing code we can't guess

if you share your code, explain what and where you changed stuff, show in-game log, etc, someone may be able to help you (seems you didn't accept the suggestion of Github)
 
kalarhan 说:
KnightV 说:
ther is an bug all weapon after several seconds breaking.What i have did wrong

no idea, as without seeing code we can't guess

if you share your code, explain what and where you changed stuff, show in-game log, etc, someone may be able to help you (seems you didn't accept the suggestion of Github)
The developer of the code is Chaalaar but i cant to send him a pm because of he is guess in the site

Becides these codes are above ,you maybe didnt saw it

I didnt changed anything
I have put two server events above the Native server events (example of it is above,too)
 
Looking for recommendations for base to use for my mods.

I started with native and have implemented a few things based on my own personal play experiences:

Added a quick garrison menu so with a single click I garrison any prisoners and take out one of three party templates Scout (when at peace and just need to be bandit proof), Patrol (field force), Assault (siege force).  The templates set from camp menu based on present party composition.

I have my own 24 NPC's with a different narrative than Rolf and company.

I was starting to unwind and understand the native AI code and it is a bit of a mystery still.  I have mostly implemented a mechanic where village looting leads to parties of regulars mustering from a center of same culture and chasing the offending lord - sort of a Princess Bride thing with "you killed my father - prepare to die".  They are a small force but I gave them a mechanism to merge and converge so those small annoying lords that seem to do nothing but burn things down will have a wake of vengeance seeking regulars.

The game presently really leans toward your player being a lord and recruiting other lords.  I wanted to flesh out a commoner path where you would be more of an honorable leader of insurrection against the nobles.  Generally recruiting any but good natured lords would be a challenge but would have a concept of garrison leadership and autonomy without lords.  Some of the Diplomacy mod capability gets there so that might be a start.  I have only dug into Native so far and unwinding that has been challenging.  I would rather stand on shoulders of giants if I can. 

Which brings me to my point.  What are the merits of starting from Native, Diplomacy, Barebones?  Others?
 
Somewhat related to my prior post...I have seen some people strip back native to be multiplayer only.  Are there similar start points stripped back to focus on single player?
 
crankyoldman 说:
Looking for recommendations for base to use for my mods.

I started with native and have implemented a few things based on my own personal play experiences:

Added a quick garrison menu so with a single click I garrison any prisoners and take out one of three party templates Scout (when at peace and just need to be bandit proof), Patrol (field force), Assault (siege force).  The templates set from camp menu based on present party composition.

I have my own 24 NPC's with a different narrative than Rolf and company.

I was starting to unwind and understand the native AI code and it is a bit of a mystery still.  I have mostly implemented a mechanic where village looting leads to parties of regulars mustering from a center of same culture and chasing the offending lord - sort of a Princess Bride thing with "you killed my father - prepare to die".  They are a small force but I gave them a mechanism to merge and converge so those small annoying lords that seem to do nothing but burn things down will have a wake of vengeance seeking regulars.

The game presently really leans toward your player being a lord and recruiting other lords.  I wanted to flesh out a commoner path where you would be more of an honorable leader of insurrection against the nobles.  Generally recruiting any but good natured lords would be a challenge but would have a concept of garrison leadership and autonomy without lords.  Some of the Diplomacy mod capability gets there so that might be a start.  I have only dug into Native so far and unwinding that has been challenging.  I would rather stand on shoulders of giants if I can. 

Which brings me to my point.  What are the merits of starting from Native, Diplomacy, Barebones?  Others?
Hello,can you share with me you codes connected with the patrols of the faction?
 
crankyoldman 说:
What are the merits of starting from Native, Diplomacy, Barebones?  Others?

regardless of your base module (Which others may offer suggestions), you should still download the biggest open source mods/games, plus give a look at the OSP forum and download any that looks interesting. You can use them as references/examples on how to implement several new features, how to adjust/tweak Native mechanics, and so on.

Few examples (full modules): Viking Conquest DLC (tons of new mechanics and re-worked Native code, and it uses the latest operations); NW (if you are doing MP); Floris (well organized and lots of plugin utilities code); Diplomacy (examples on how to add those features); Freelancer (how to add a freelancer-like mechanic if you want to);
 
KnightV 说:
crankyoldman 说:
Looking for recommendations for base to use for my mods.

I started with native and have implemented a few things based on my own personal play experiences:

Added a quick garrison menu so with a single click I garrison any prisoners and take out one of three party templates Scout (when at peace and just need to be bandit proof), Patrol (field force), Assault (siege force).  The templates set from camp menu based on present party composition.

I have my own 24 NPC's with a different narrative than Rolf and company.

I was starting to unwind and understand the native AI code and it is a bit of a mystery still.  I have mostly implemented a mechanic where village looting leads to parties of regulars mustering from a center of same culture and chasing the offending lord - sort of a Princess Bride thing with "you killed my father - prepare to die".  They are a small force but I gave them a mechanism to merge and converge so those small annoying lords that seem to do nothing but burn things down will have a wake of vengeance seeking regulars.

The game presently really leans toward your player being a lord and recruiting other lords.  I wanted to flesh out a commoner path where you would be more of an honorable leader of insurrection against the nobles.  Generally recruiting any but good natured lords would be a challenge but would have a concept of garrison leadership and autonomy without lords.  Some of the Diplomacy mod capability gets there so that might be a start.  I have only dug into Native so far and unwinding that has been challenging.  I would rather stand on shoulders of giants if I can. 

Which brings me to my point.  What are the merits of starting from Native, Diplomacy, Barebones?  Others?
Hello,can you share with me you codes connected with the patrols of the faction?

It is about 70% of the way there but I need to figure out some AI mechanics.  Some events that divert the AI sidetrack them and they go after the wrong party.

So what it does so far:
1) When a village is at the 100% loot point a "Witness" party spawns and goes to the 4th closest walled center to that village...I didn't want it too close or too far to get desired affect and there is a chance the witnesses will get killed by bandits or for future I could have a quest tied to them.
2) When they reach the center a "Montoya" party is spawned with nominally 3-5% of garrison forces from stacks of same culture as the village (the premise being the offending lord burned down their families home).
3) My AI code presently sets them to attack the looting lord party but that has failure points if that lord was defeated, captured or went into a center while the witness party was enroute.  I plan to adjust by having them go to the village in patrol around mode first and then have them go on the hunt for the lord with a bit more clever AI that won't fall into a hole.

Todo:
4) Play around with factional relations behaviors so "Montoya" party will fight the target lord without all the other parties on the map following that pattern.  Might have a set of 6 anti-factions and change to attack mode when close.
5) Smart merging or cooperation of parties chasing the same lord.  I know how I can do this by transferring all the troops from one to the other but would rather have them couple like campaign factions do with a marshal.  The problem with the later is that the mechanic of united forces seems to be timid.  The problem with the former is that if they grow they slow down collectively.
 
Hi guys, first post. I was curious if the 82 Tweaks to Text Files for Mount and Blade worked for Warrant or just the original? Thanks in advance.
 
Getting a few things in order but wondered on some information...

Got an MS going with the Diplomacy for 1.172 ...had some errors with the build_module.bat file and was told to use the build_module_lav verstion that uses WRECK....OK

Also installed the mod merge and without specifying any mods that seems to work with in same directory.

Are they actually compatible?
 
What do numbers in blocks connected with deaths animations mean?For example [5, " death", bla bla (0.5 ,0.7(0.5,0.7) ],
 
KnightV 说:
What do numbers in blocks connected with deaths animations mean?For example [5, " death", bla bla (0.5 ,0.7(0.5,0.7) ],

Every module.*.py file has a description of its tuple structure with its fields listed in order at the start of that file. Module_animations.py is no different. Check those descriptions against the code you are trying to understand.
 
NPC99 说:
KnightV 说:
What do numbers in blocks connected with deaths animations mean?For example [5, " death", bla bla (0.5 ,0.7(0.5,0.7) ],

Every module.*.py file has a description of its tuple structure with its fields listed in order at the start of that file. Module_animations.py is no different. Check those descriptions against the code you are trying to understand.
The is not description there
 
状态
不接受进一步回复。
后退
顶部 底部