Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Hello,
does someone know how the crosshairs work ? I thought I would just need to edit the ui_gadgets texture, but im not sure anymore, because it just changes the colors of the crosshair.
 
It is the ui_gadgets texture, the part of the texture which contains natives crosshairs is in like the upper left section. I think you may just be getting a color change only because you have not edited the alpha map - this is the part of the texture which will define the "shape" of your crosshair - alpha textures defin what is visible and what is not

Also on a side note from me, is it possible to manually tie a village to a castle? Any help appreciated  :smile:
 
Hi people. I have question that how I add smoke animation when cannon launches and explosion animation when it hits? I do know where to add them and I know I need cannon but what lines and where I need to modify ?
 
Thanks, working now.

Next question. ^^ What did I do wrong ? I guess it has something to do with the spec map, I tried to save it as a DXT1 and DXT3, none worked.
ovj1mj8ea7bg.jpg

dy5wc8ugmjh5.jpg
 
What you see in that pic is native's mouse/cursor texture coming through, I would bet a lot of money that you have not set up your brf correctly. You must have all textures this shield uses in the same brf as the one that the shield model is in.

If your shield model has 1 material, and this material uses 2 textures, you must have this one material and two textures all in the same brf as the shield model.
 
Hi,

I am wondering whether there is way to change a troop's upgrading cost, wages and required xp for next upgrade outside of changing its level.

I'd like to make some particular units more expensive than others, without increasing drastically their level (which would make them better than intended in autocalc and longer to train).

Thanks.
 
Hello, simple question for you, great modders. How can i make the collision object of a prop disappear server-side? For now, i'm only able to hide it below the ground.
Code:
(try_begin),
			(eq, ":action",16),
			(assign,":player_no",":var1"),
			(player_get_agent_id,":agent_no",":player_no"),
			(neq,":agent_no",-1),
			(agent_is_active,":agent_no"),
			(agent_is_alive,":agent_no"),	
			(agent_equip_item, ":agent_no", "itm_ammobox",1), 
			(agent_set_wielded_item, ":agent_no", -1), #unwield the current item
			(agent_set_wielded_item, ":agent_no", "itm_ammobox"),
			(scene_prop_get_num_instances, ":end_cond", "spr_ie_rifle_ammobox"),
			(try_for_range,":cur_instance",0,":end_cond"),
				(scene_prop_get_instance, ":instance_id", "spr_ie_rifle_ammobox", ":cur_instance"),
				(prop_instance_get_position, pos1, ":instance_id"),
				
				(set_fixed_point_multiplier, 1000),
				(position_move_z, pos1, -500),
				(prop_instance_animate_to_position, ":instance_id", pos1,0),
			(try_end),
 
DanyEle said:
Hello, simple question for you, great modders. How can i make the collision object of a prop disappear server-side? For now, i'm only able to hide it below the ground.
If you're talking about de-spawning a prop, well, you can't. Hiding it below the ground (and potentially re-using it) is your only viable option.
 
One, quick question: is it possible to attach 3d object into the scene?

What I'd like to accomplish is:
I'd like to attach the same building model (watchtower, mill, enterprise, or whatever). to different scenes (using scripts), without editing these scenes, whenever I'm gonna upgrade the fief
 
There's a framework for it (that I haven't seen used) by Lav to add scene props, but you still need to modify the scene extensively to have entry points where the buildings are going to pop up (easier than hard-coding every coordinate for every scene IMO) and to make sure village/town walkers don't run into the building when the AI-mesh isn't modified.
 
Somebody said:
There's a framework for it (that I haven't seen used) by Lav to add scene props, but you still need to modify the scene extensively to have entry points where the buildings are going to pop up (easier than hard-coding every coordinate for every scene IMO) and to make sure village/town walkers don't run into the building when the AI-mesh isn't modified.
As I think I said at the time in that thread, I suggest placing all the improvement structures in the scene and mark the props for each improvement using a number in one of the editor values (set in the scene props tab of the editor window, and retrieved with prop_instance_get_variation_id or prop_instance_get_variation_id_2), then write a script called from your mission template's ti_before_mission_start that iterates over the first X thousand valid props, running replace_prop_instance with spr_empty if they are marked as an improvement that isn't built. To avoid strange issues with AI meshes, just place a few rubbish heaps or rocks inside the improvement buildings, not marked as belonging, so when not built there will still be a visible reason for bots to avoid the area.

Just a free "pet idea" of mine that has never been done since I mod multi player rather than single.
 
Hello everyone, I would like to ask two questions, which I am having problems :
1.How can I make an armor or a weapon only to be used by a certain hero troop? (like e.g. I want only Marnid to equip a sword [str 10] even when I and others have the required strength to use it).

2.I made a new skill, now how can I assign difficulties of certain weapons on that skill? (like I want to make a sword which requires 6 spirit(new skill))

Thanks in advance
 
cmpxchg8b said:
DanyEle said:
I managed to make it disappear, but its collision object is still there.
Give the sokf_moveable flag to the scene prop and the collision object will move with it. Or use prop_instance_enable_physics with 0 to disable the collision object. Or both.

I had tried prop_instance_enable_physycs, 0 , but it didn't work. Instead sofk_moveable, was exactly what i needed. Thank you!
 
DanyEle said:
I had tried prop_instance_enable_physycs, 0 , but it didn't work. Instead sofk_moveable, was exactly what i needed. Thank you!
The physics thing has to be done on both client and server I believe.
Zerilius said:
1.How can I make an armor or a weapon only to be used by a certain hero troop? (like e.g. I want only Marnid to equip a sword [str 10] even when I and others have the required strength to use it).
2.I made a new skill, now how can I assign difficulties of certain weapons on that skill? (like I want to make a sword which requires 6 spirit(new skill))
Just do a polling trigger to remove the item from the inappropriate troops. Most "restrictions" can be done from the tableaus, but note that while it can move items around, your inventory screen won't refresh properly. Call the same trigger right before a mission starts if you suspect the player of trying to work around it. Again, you'll need to soft-code the requirements into the trigger, as well as displaying that difficulty in script_game_get_item_extra_text.
Deathwhisper said:
I'd like to make some particular units more expensive than others, without increasing drastically their level (which would make them better than intended in autocalc and longer to train).
script_game_get_upgrade_xp/cost, wages should be in script_game_get_troop_wage. You can see how bandits take more xp, and mercs/mounted take more money, etc.
 
I have a very small problem that is more annoying than anything else. It has to do with AI face codes.

I went through and replaced all of the face codes at the top of
Code:
module_troops
with ones that are appropriate for what I am trying to achieve.

I then assigned the face codes to my multiplayer AI troops (as in
Code:
swadian_face_younger_1
, etc) and assumed that was all that needed to be done.

However, when spawning the multiplayer bots on both sides (with both factions having different face codes) I'll occasionally see a few bots using the opposite side's face codes.

Is this a minor bug or have I done something wrong somewhere?
 
Status
Not open for further replies.
Back
Top Bottom