Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Question.  Is there a way to find out with Thorgrims map editor, where a position on the x/y axis would be, so I could then place cities and towns there via module_parties.py

Thanks!
 
can some one help me with this script ?? i tried changing the custom banner in game and made the check to be visible in camp menu everything works except the moment i hit accept button my banner never changes.

This is the script.


Code:
###################################################################################
# Banner Selection
###################################################################################
("Banner_selection",
	[],
	"Select your kingdom banner.",
	[
			(start_presentation, "prsnt_banner_selection"),
			(start_presentation, "prsnt_custom_banner"),
			(else_try),
			(change_screen_return, 0),
			(try_end),
			(set_show_messages, 1),
			]),

I got everything to work correctly except the last part.

 
COGlory said:
Question.  Is there a way to find out with Thorgrims map editor, where a position on the x/y axis would be, so I could then place cities and towns there via module_parties.py

Thanks!

If you look in the map editor help I think you can hold down the Z key or something like that to see the coordinates.  However, you don't need to do that.  Just make all your changes in the map editor, save it so it updates your parties.txt, and then use one of the programs below to copy the coordinates back to your python code.

HokieBT's UpdateModuleParties - http://forums.taleworlds.com/index.php/topic,45772.0.html
kt0's Party Script - http://forums.taleworlds.com/index.php/topic,61873.0.html
 
Hallo all, I made a 'new' falchion by using the falchion blade on the bastard_sword_b handle and then adjusting the blade, making it longer and a different shape, but now it seems I can not actually draw my weapon when in-game. OpenBRF also asked if I wanted to merge the two meshes when I imported it as well. I obviously did that, but that shouldn't even have been necessary because it already WAS one mesh in Wings3D.

How can I get it so I can draw it from the holster? :???:

eDIT; I now seem to have one working version. At the moment I've got the original I posted about, a multi-meshing one that only appears without the handle and another one which is actually the multi-mesh one but combined. The original was also a multi-mesh like that, combined, so I don't really see why that didn't work. I forgot to give the three versions different names.
Edit 2:
Odd thing is, the original (falchionb) does not work at all, I can't draw it from the holster, I can kill with it, but I can't see it, and the second multi-meshed-but-combined version, (falchionxx) DOES work, but only if I've got falchionx, the one that'd show up without handle in another weapon slot.



Can anyone more skilled with modding help me with either or both of these issues?
 
Is there a way to determine the body armour of a troop's currently equipped armour? Furthermore, is it possible to check if an agent has a shield equipped? Not a specific shield - just any shield, in general. Furthermore, has anyone figured out how armor affects damage? I'm trying to get it to apply to area damage.
 
Is tf_mounted enough to make a troop move with riding instead of athletics on the world map, or is tf_guarantee_horse required too?

What gives a troop a cavalry upkeep: a horse, tf_mounted or tf_guarantee_horse?
 
feuerzeuge said:
Is there a way to determine the body armour of a troop's currently equipped armour? Furthermore, is it possible to check if an agent has a shield equipped? Not a specific shield - just any shield, in general. Furthermore, has anyone figured out how armor affects damage? I'm trying to get it to apply to area damage.

For the shield; there are two operations you can use: agent_has_item_equiped (something like that) and agent_get_wielded_item (something like that)
get_wielded is for the actual stuff inhand, whereas the first operation will be true even if you dont have the actual item in your hands (but for example your shield on your back). If you use value 1 (left hand) in agent_get_wielded_item and check what is in the left hand and store it to, say ":shieldwielded", you can then go

(try_for_range, ":shield", shieldbegin, shieldend),

here shieldbegin is the first shield item and shield end is the last. You'll have to check items.py for that. Then you compare them:

(eq, ":shieldwielded", ":shield")

To see if any of the shield items are currently in the left hand.


Not sure about the rest.
 
Highelf said:
feuerzeuge said:
Is there a way to determine the body armour of a troop's currently equipped armour? Furthermore, is it possible to check if an agent has a shield equipped? Not a specific shield - just any shield, in general. Furthermore, has anyone figured out how armor affects damage? I'm trying to get it to apply to area damage.

For the shield; there are two operations you can use: agent_has_item_equiped (something like that) and agent_get_wielded_item (something like that)
get_wielded is for the actual stuff inhand, whereas the first operation will be true even if you dont have the actual item in your hands (but for example your shield on your back). If you use value 1 (left hand) in agent_get_wielded_item and check what is in the left hand and store it to, say ":shieldwielded", you can then go

(try_for_range, ":shield", shieldbegin, shieldend),

here shieldbegin is the first shield item and shield end is the last. You'll have to check items.py for that. Then you compare them:

(eq, ":shieldwielded", ":shield")

To see if any of the shield items are currently in the left hand.


Not sure about the rest.

Thank you very much. On the same note, is it possible to check whether an agent is wearing armour? I have a script to check the body armour of targets of area fire, but it returns an error (and conveniently sets the variable to zero) when no body armour is equipped. This works, of course, but I'd rather avoid having that in on release day.
 
feuerzeuge said:
Thank you very much. On the same note, is it possible to check whether an agent is wearing armour? I have a script to check the body armour of targets of area fire, but it returns an error (and conveniently sets the variable to zero) when no body armour is equipped. This works, of course, but I'd rather avoid having that in on release day.

Checking body armour, take a look here :
dunde said:
We can't change Armour and helmet in battle, so it's safe to check what agent wear from troop.
Code:
   (agent_get_troop_id, ":troop_id", ":agent"),
   (troop_get_inventory_slot, ":armor",":troop_id", ek_body),
   ..... work with item (improved autoloot source by rubik provide a way to set armor value to a slot)
I use the improved autoloot  source here

About the shield, I agree to use
  (agent_get_wielded_item,":left_hand",":agent",1),
  (item_get_type,":type",":left_hand"),
  (eq, ":type", itp_type_shield),
 
My game is crashing at new game loading, last text I can see is "Loading Map File". There are no build_module errors, no error message and I did not touch any map file. Last I edited was module_troops.

Does anyone have a clue?
 
dunde said:
feuerzeuge said:
Thank you very much. On the same note, is it possible to check whether an agent is wearing armour? I have a script to check the body armour of targets of area fire, but it returns an error (and conveniently sets the variable to zero) when no body armour is equipped. This works, of course, but I'd rather avoid having that in on release day.

Checking body armour, take a look here :
dunde said:
We can't change Armour and helmet in battle, so it's safe to check what agent wear from troop.
Code:
   (agent_get_troop_id, ":troop_id", ":agent"),
   (troop_get_inventory_slot, ":armor",":troop_id", ek_body),
   ..... work with item (improved autoloot source by rubik provide a way to set armor value to a slot)
I use the improved autoloot  source here

About the shield, I agree to use
  (agent_get_wielded_item,":left_hand",":agent",1),
  (item_get_type,":type",":left_hand"),
  (eq, ":type", itp_type_shield),

Thank you, but I've already implemented that. :razz:
It's what's causing the error.
 
Cumandante said:
My game is crashing at new game loading, last text I can see is "Loading Map File". There are no build_module errors, no error message and I did not touch any map file. Last I edited was module_troops.

Does anyone have a clue?

I've had that tonnes of times. Removing a few weapons from the longest troop tuple tended to fix it. It seems there's a limit to the variation one troop type can carry.
 
Status
Not open for further replies.
Back
Top Bottom