Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I found the problem. A new item about five lines from the end of the file had an unclosed set of brackets, and it screwed up the rich_viking_tunic item. Everything should work fine now.

Is this the proper code for a sword with no scabbard that gets carried at the waist?
Code:
["anduril", "Anduril", [("narsil",0)], itp_type_two_handed_wpn|itp_merchandise| itp_primary, itc_bastardsword|itcf_carry_sword_left_hip|itcf_show_holster_when_drawn,
 1200 , weight(2.25)|difficulty(11)|spd_rtng(100) | weapon_length(112)|swing_damage(45 , cut) | thrust_damage(31 ,  pierce),imodbits_none ],
 
So like this?
Code:
["anduril", "Anduril", [("narsil",0),("narsil", ixmesh_carry)], itp_type_two_handed_wpn|itp_merchandise| itp_primary, itc_bastardsword|itcf_carry_sword_left_hip,
 1200 , weight(2.25)|difficulty(11)|spd_rtng(100) | weapon_length(112)|swing_damage(45 , cut) | thrust_damage(31 ,  pierce),imodbits_none ],
Also, I take it you have to start a new game to see the effects of changing an npc's clothing?
 
How would I make an animation able to be played on the server and client of MP?
I'm adding an option to "Take cover" behind walls, rocks, tanks, etc with a new animation....but the animation doesn't play on the server. :sad:

Can someone point me to the codes to make that? Has someone done it yet with new animations?
 
Specialist said:
How would I make an animation able to be played on the server and client of MP?
I'm adding an option to "Take cover" behind walls, rocks, tanks, etc with a new animation....but the animation doesn't play on the server. :sad:

Can someone point me to the codes to make that? Has someone done it yet with new animations?

It doesn't play on the server?? or the client??

For the client, send a message to all clients from server,

http://forums.taleworlds.com/index.php/topic,94854.0.html
 
Well...it plays on one client. (The one that presses the button) but the server won't tell the other clients to play it.
That's for sounds.... does anyone know how the kick animation works? That way I can use that kind of code for animations?

And would the sound script work for this?
 
Can anyone give me a paw with this code?

Code:
("get_centering_amount", [
	(store_script_param, ":troop_formation", 1),
	(store_script_param, ":num_troops", 2),
	(store_script_param, ":troop_type", 3),
	(store_script_param, ":extra_spacing", 4,),
	(store_mul, ":troop_space", ":extra_spacing", 50),
	(val_add, ":troop_space", formation_minimum_spacing),
	(assign, reg0, 0),
	(try_begin),
      (eq, ":troop_formation", formation_wedge),
      (eq, ":troop_type", grc_archers),
      (val_add, ":troop_space", 500),
      (store_mul, reg0, ":num_troops", ":troop_space"),
      (val_div, reg0, 2), #archers in 2 ranks
      (val_sub, reg0, ":troop_space"),
   (else_try),

In-game I get an error about parameter ID 3 being invalid. I haven't the foggiest why.
 
Oops I got it wrong. It is archers group because I thought it was a troop.
So are you sure you are passing correct parameters from where you call this script.

Edit
( s t o r e _ s c r i p t _ p a r am , " : e x t r a _ s p a c i n g " , 4 , ) ,

remove comma after 4
 
Hi! Is there a way, to make factions prefer certain types of units? let's say, that I want Swadians to use way more men at arms instead of infantrymen, Khergits use more HA than lancers and such. Is there an easy way to do so?
 
( s t o r e _ s c r i p t _ p a r am , " : e x t r a _ s p a c i n g " , 4 , ) ,

While that was a silly mistake, still getting the error.. it's unfortunate as this script failing causes troops to run to the edge of the map!

Ok, while I'm here, is it possible to get an agent by troop name? Or do I have to hack something using troop has item equipped?
 
Ok, that sounds reasonable. I'll look into it once I fix this daft problem.

So something like this:

(agent_is_alive, ":agent"),
      (agent_is_non_player, ":agent"),
      (agent_get_troop_id, ":troop", ":agent"),
      (eq, ":troop", "trp_YOUR_TROOP"),
(this_or_next|eq, ":troop", "trp_YOUR_TROOP"),
 
something like this:

Code:
(agent_is_active, ":agent"),
      (agent_is_alive, ":agent"),
      (agent_get_troop_id, ":troop", ":agent"),
      (this_or_next|eq, ":troop", "trp_YOUR_TROOP"), 
      (eq, ":troop", "trp_YOUR_TROOP"),
and replacing the trp_your troop
 
I was referring to this:

Dain Ironfoot said:
Can anyone give me a paw with this code?

Code:
("get_centering_amount", [
	(store_script_param, ":troop_formation", 1),
	(store_script_param, ":num_troops", 2),
	(store_script_param, ":troop_type", 3),
	(store_script_param, ":extra_spacing", 4),
	(store_mul, ":troop_space", ":extra_spacing", 50),
	(val_add, ":troop_space", formation_minimum_spacing),
	(assign, reg0, 0),
	(try_begin),
      (eq, ":troop_formation", formation_wedge),
      (eq, ":troop_type", grc_archers),
      (val_add, ":troop_space", 500),
      (store_mul, reg0, ":num_troops", ":troop_space"),
      (val_div, reg0, 2), #archers in 2 ranks
      (val_sub, reg0, ":troop_space"),
   (else_try),

In-game I get an error about parameter ID 3 being invalid. I haven't the foggiest why.
 
Status
Not open for further replies.
Back
Top Bottom