Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Sounds great, though I believe it would take me ages to create a set of believable field scenes  :smile:

by the way, those scenes are made using the "terrain" button in edit mode, right? If so, how do I turn the generated code into an actual scene file?
 
You take the code (alternatively use this site) and put it somewhere in module_scenes.py as something like this:

Code:
  
("whatever",sf_generate,"none", "none", (0,0),(120,120),-100,"terrain code goes here", 
    [],[], "outer_terrain_plain"),

It has to be referenced to be accessed though, so unless you want to enter the world map and cycle through scenes, it's more convenient to use this quick scene chooser.
 
Ikaguia said:
is there a way to change agent's armor in-battle? it seems like agent_(un)equip_item operations only work for weapons, I remember seeing sth about it in WSE...
http://forums.taleworlds.com/index.php/topic,215558.msg5151682.html#msg5151682
 
Ikaguia said:
thank you very much vorne, seems like I'm gonna have to do sth else then, can't rely on clientside stuff for a native-compatible module :grin:
Don't see a problem: you're only relying on client for visual stuff here. Sure client can ignore the armor change message, but that's not going to affect anyone but himself.
 
Hey guys, im kinda new with this, working on a multiplayer mod.
Is there anyway to get a troop by his id on module_troops? like - "trp_swadian_crossbowman_multiplayer" ?
if not, then how can i get it then? so i can change his name and stats when a player joins the server.
 
This sure has been asked before,but...
How do I increase the max skill level of-for example- Ironflesh?
I know about this
header_skills said:
knows_ironflesh_1 = 22300745198530623141535718272648361505980416
knows_ironflesh_2 = 44601490397061246283071436545296723011960832
knows_ironflesh_3 = 66902235595591869424607154817945084517941248
knows_ironflesh_4 = 89202980794122492566142873090593446023921664
knows_ironflesh_5 = 111503725992653115707678591363241807529902080
knows_ironflesh_6 = 133804471191183738849214309635890169035882496
knows_ironflesh_7 = 156105216389714361990750027908538530541862912
knows_ironflesh_8 = 178405961588244985132285746181186892047843328
knows_ironflesh_9 = 200706706786775608273821464453835253553823744
knows_ironflesh_10 = 223007451985306231415357182726483615059804160
But how do I add higer ones?
 
You turn on agent_set_no_death_knock_down_only when they spawn and turn it off at some point inside ti_on_agent_knocked_down (check their hp to make sure it's not just random blunt damage/horse trample). This can be the nth time they've been knocked down, or even one hit depending on how tough/lucky you want the troop to be. You then turn off the invulnerability and kill it normally, or deliver a blunt source of damage to knock them unconscious arbitrarily.

So, how to deliver a blunt damage to an agent ?
tried with agent_deliver_damage_to_agent  but he's still killed  :???:
 
SnRolls said:
Hey guys, im kinda new with this, working on a multiplayer mod.
Is there anyway to get a troop by his id on module_troops? like - "trp_swadian_crossbowman_multiplayer" ?
if not, then how can i get it then? so i can change his name and stats when a player joins the server.
In multiplayer mods with unique stats for individual players you create one "troop" for each player slot your mod will have then modify it when a player loads into the server.
Namakan said:
This sure has been asked before,but...
How do I increase the max skill level of-for example- Ironflesh?
It can goes up to 15 - define it first in module_skills. Then define the following in either the header or module_troops.
Code:
knows_ironflesh_11 = knows_ironflesh_10 + knows_ironflesh_1
knows_ironflesh_12 = knows_ironflesh_10 + knows_ironflesh_2
knows_ironflesh_13 = knows_ironflesh_10 + knows_ironflesh_3
knows_ironflesh_14 = knows_ironflesh_10 + knows_ironflesh_4
knows_ironflesh_15 = knows_ironflesh_10 + knows_ironflesh_5
fladin said:
tried with agent_deliver_damage_to_agent  but he's still killed  :???:
Check the parameters in header_operations regarding weapon used.
 
Check the parameters in header_operations regarding weapon used.
Already tried that  :sad:
eg with :
(agent_deliver_damage_to_agent, ":attacker", ":agent", 20, "itm_mace_2"),
but it  still kill him anyway
I don't know what I  have did wrong  :oops:
any idea ?

 
Have you seen this work?
knows_ironflesh_11 = knows_ironflesh_10 + knows_ironflesh_1
knows_ironflesh_12 = knows_ironflesh_10 + knows_ironflesh_2
knows_ironflesh_13 = knows_ironflesh_10 + knows_ironflesh_3
knows_ironflesh_14 = knows_ironflesh_10 + knows_ironflesh_4
knows_ironflesh_15 = knows_ironflesh_10 + knows_ironflesh_5

I spent the weekend trying to increase them through this approach:
knows_inventory_management_10 = 2814749767106560
knows_inventory_management_11 = 2814749767106561
knows_inventory_management_12 = 2814749767106562
knows_inventory_management_13 = 2814749767106563
knows_inventory_management_14 = 2814749767106564
knows_inventory_management_15 = 2814749767106565

I can't seem to figure out if it does anything; a few numbers change when I use this weak toolhttps://www.diffchecker.com/

What is the tool you use to compare a new compilation with an old one?
How about a tool to insert the change into an already refined mod?
I'm just tweaking things in VConquest based on Warband.
 
gdwitt said:
I spent the weekend trying to increase them through this approach:
knows_inventory_management_10 = 2814749767106560
knows_inventory_management_11 = 2814749767106561
knows_inventory_management_12 = 2814749767106562
knows_inventory_management_13 = 2814749767106563
knows_inventory_management_14 = 2814749767106564
knows_inventory_management_15 = 2814749767106565
Those flags are definitions for skills for use in compiling troop skill sets in the field along with the rest of their attributes. Note how they are actually used - with the bitwise | (or) operation. Your definitions instead will give your troop additional trade skill instead - knows_inventory_management_11 = 2814749767106561 = knows_inventory_management_10|knows_trade_1.
Code:
knows_trade_1 = 1
knows_trade_2 = 2
knows_trade_3 = 3
knows_trade_4 = 4
knows_trade_5 = 5
knows_trade_6 = 6
knows_trade_7 = 7
knows_trade_8 = 8
knows_trade_9 = 9
knows_trade_10 = 10
knows_leadership_1 = 16
knows_leadership_2 = 32
knows_leadership_3 = 48
knows_leadership_4 = 64
knows_leadership_5 = 80
knows_leadership_6 = 96
knows_leadership_7 = 112
knows_leadership_8 = 128
knows_leadership_9 = 144
knows_leadership_10 = 160
...
For trade we can see how the difference between each point is only 1. However, for leadership we go up by steps of 16, because any intermediate value would indicate a trade skill in conjunction with the next lowest leadership skill. Don't increment by one, increment by 281474976710656 instead (which is what is defined as knows_inventory_management_1). For usage in other mods this isn't really applicable, as these are only ever used when compiling the troops text files. For usage in-game make use of
Code:
troop_raise_skill
.
 
Hi guys, a quick question: I made an Oracle NPC, with the dialogs and all. When compiling it gives me only one error in the dialogs:
Code:
ERROR: Output token not found: oracle

What does it mea? I'm sure I used all the constants and the troop right(it doesn;t give me any other error).
Thanks!
 
@antonis check this example:
[trp_oracle|plyr ,"start", [],  "Hi,", "flower", []], 
[trp_oracle ,"flower", [],  "hi,", "oracle", []], 
check next dialog, it must start "oracle" look like
[trp_oracle|plyr ,"oracle", [],  "see you,", "close_window", []],


edit:xf-mad:Antonis
"I don't worship the Twelve Gods of Olympus, but I can learn if you help me.", "oracle", []],
change the "oracle" with "close_window" or" oracle_help"
 
Hey, thanks for the reply! I checked and I couldn't find anything wrong. This is the code, can you help :
Code:
#Antonis oracle dialogs
  [anyone, "start", [(is_between, "$g_talk_troop", oracle_begin, oracle_end),
                     ],
   "Blessings of Delphios Appolon, {my lord/my lady}. I am Pythia, the Oracle. I can read it in you soul that you are a servant of Appolon and the Olympians.", "oracle_talk", []],
  [anyone, "oracle_pretalk", [],
   "May the God of the Sun guard you, {playername}. Have you come to seek the aid of Appolon and learn your future?", "oracle_talk", []],
  [anyone|plyr,"oracle_talk", [(neg|main_party_has_troop, "$g_talk_troop")],
   "I don't believe in the Olympians, crow. Those who do are sheep. I worship Ahura Mazda, and I love war.", "oracle_angry",[]],
  [anyone,"oracle_angry", [],
   "Then I shall tell you your fate, {playername}. You will find neither happiness nor glory and wherever you go, people in this state will hate you.", "close_window", [
            (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", -9),
]],
  [anyone|plyr, "oracle_talk", [],
   "I worship the Olympians, my lady. I need Appolon's divine guidance. Tell me, what the Three Weavers of Fate have in their webs for me?", "oracle_help", []],
  [anyone|plyr, "oracle_talk", [],
   "I don't worship the Twelve Gods of Olympus, but I can learn if you help me.", "oracle", []],
  [anyone|plyr, "oracle_talk", [],
   "No thanks. I have other matters to attend to.", "close_window", []],

  [anyone, "oracle_help", [],
   "I see your fate clearly, mighty servant of Appolon and it is a glorious one. You are blessed and bathed in the God's Divine White Light. I am here to help you, {playername},\
but you must gift something to the God, too. I can help by praying for you and your men and asking Appolon to forgive your sins.\
But you need to donate 500 drachmas. Or I can make ensure the God's divine blessing and assurance that people in this state know of the generosity of {playername}, but you need to donate 2000 drachmas.", "oracle_help2", []],

  [anyone|plyr,"oracle_help2",
   [], "Thank you, kind Oracle. We need Appolon to forgive ours sins - I will donate 500 drachmas.", "oracle_pretalk",
   [
       (troop_remove_gold, "trp_player", 500),
      (call_script, "script_change_player_party_morale", 2),
      (call_script, "script_change_player_honor", 2),
       ]],
  
  [anyone|plyr,"oracle_help2",
   [], "Thank you, mighty Pythia. I want this state and Appolon to look at me favourably. I will donate 2000 drachmas.", "oracle_pretalk",
   [
       (troop_remove_gold, "trp_player", 2000),
       (call_script, "script_change_player_relation_with_faction_ex", "$g_talk_troop_faction", 5),
       ]],

  [anyone|plyr,"oracle_help2", [], "Are you selling your Divine gift? You bring disgrace to Applon. May He strike you down with his golden bow!", "oracle_angry",[]],

  [anyone|plyr,"oracle_help2", [], "Thank you, oracle. That was all I needed to know.", "oracle_pretalk",[]],

#Antonis oracle end


  [anyone|auto_proceed,"start", [
  (is_between,"$g_talk_troop","trp_town_1_master_craftsman", "trp_zendar_chest"),
  (party_get_slot, ":days_until_complete", "$g_encountered_party", slot_center_player_enterprise_days_until_complete),
  (ge, ":days_until_complete", 2),
  (assign, reg4, ":days_until_complete"),
  ],
   "{!}.", "start_craftsman_soon",[]],

  [anyone,"start_craftsman_soon", [
  ],
   "Good day, my {lord/lady}. We hope to begin production in about {reg4} days", "close_window",[]],
   
etc. Native stuff

The first part is the new code, the other are native stuff.
 
Antonis said:
Hey, thanks for the reply! I checked and I couldn't find anything wrong. This is the code, can you help:
Here it is:
Code:
  [anyone|plyr, "oracle_talk", [],
   "I don't worship the Twelve Gods of Olympus, but I can learn if you help me.", "oracle", []],
 
Status
Not open for further replies.
Back
Top Bottom