Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
I'm having more problems with this item. imodbits_none seems to be giving me the cloth modifiers, and my sword is showing up in armor shops instead of weapon shops.
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 ],
I'm also having an issue on which the sword is appearing as the scabbard and not being drawn when I use the weapon.

Edit: Changing the code to this fixed the graphical bug. I don't know if it will resolve the other issues or not.
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_sword_high ],
 
Specialist said:
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?

send a message to the server first on the key press trigger,
then when the server receives the message, relay it to all clients.

read Yoshiboy's tutorial.
 
SonKidd said:
Specialist said:
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?
send a message to the server first on the key press trigger,
then when the server receives the message, relay it to all clients.
You only need the first part, sending a message from the client after a key press: if you run the agent_set_animation operation on the server, all clients will see it. The agent_play_sound operation works the same way: just run it on the server.
 
I've got a problem... The health bars have vanished. Both the player's and the horse's. I thought it might be because I was using a customized user_inetrface_b.brf, but I replaced it with the original one - to no avail. The bars were still missing. Does anyone know what might be causing this? I'd really like them to be back. :smile:

Could the problem be casued by a running on-screen presentation?
 
If you find out how you did it....I want to know. :smile:
I could definitely use a new "Ironman mod" without a healthbar. :wink: (I still remember that from the days of pe .960)
 
Maybe this is a longshot... but if I were to make an invisible texture and set it to the crosshairs, the healthbar, the shields, etc, then would they in turn not be able to be seen?
 
just change the values is game variables.txt specialist, change it's position to outside the screen

Zamensis, there is something like that in Custom Commander:
Code:
missile_distance_trigger = [
	(ti_on_missile_hit,[
		(store_trigger_param_1, ":shooter_agent"),
		(eq, "$g_report_shot_distance", 1),
		(get_player_agent_no, ":player_agent"),
		(try_begin),
			(eq, ":shooter_agent", ":player_agent"),
			(agent_get_position, pos2, ":shooter_agent"),
			(agent_get_horse, ":horse_agent", ":player_agent"),
			(try_begin),
				(gt, ":horse_agent", -1),
				(position_move_z, pos2, 220),
			(else_try),
				(position_move_z, pos2, 150),
			(try_end),
			(get_distance_between_positions, ":distance", pos1, pos2),
			(store_div, reg61, ":distance", 100),
			(store_mod, reg62, ":distance", 100),
			(try_begin),
				(lt, reg62, 10),
				(str_store_string, s1, "@{reg61}.0{reg62}"),
			(else_try),
				(str_store_string, s1, "@{reg61}.{reg62}"),
			(try_end),
			(display_message, "@Shot distance: {s1} meters.", 0xCCCCCC),
		(try_end),
    ]),
	]
 
Gah, I am still trying to solve my problem. Right. Here is the script.

Code:
("get_centering_amount", [
	(store_script_param, ":troop_formation", 1),
	(store_script_param, ":num_troops", 2),
	(store_script_param, ":extra_spacing", 3),
	(store_script_param, ":sd_type", 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, ":sd_type", sdt_archer),
      (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),
		(eq, ":troop_formation", formation_square),
		(convert_to_fixed_point, ":num_troops"),
		(store_sqrt, reg0, ":num_troops"),
		(val_mul, reg0, ":troop_space"),
		(convert_from_fixed_point, reg0),
		(val_sub, reg0, ":troop_space"),
	(else_try),

etc

here is how I am calling it, either

Code:
(call_script, "script_get_centering_amount", ":fformation", ":num_troops", ":formation_extra_spacing", sdt_archer),

or when it isn't an archer

Code:
(call_script, "script_get_centering_amount", formation_default, ":num_troops", ":formation_extra_spacing", 0),
(I sort of assumed I could just throw a null thingy in there.

And the error I am getting is still
Code:
SCRIPT ERROR ON OPCODE23: INVALID SCRIPT PARAMETER ID: 3; LINE NO; 3
At script get centering amount

Which is odd because the parameter I added was parameter 4
 
Somebody said:
You probably modified game_variables.txt
Strange... The file wasn't there. I copied it from Native, and still the healthbars were gone. The interesting thing is that in Native, the healthbars are there.

EDIT: ****. Could someone please upload a clean, CommonRes version of user_interface_b? I seem to have screwed mine up...
 
No! Don't upload anything. The problem was that I am an idiot and had placed the 1.011 user_interface_b.dds texture in my mod's Textures folder. Must have done that when I copied stuff from my 1.011 version. Fixed now, all is ok.
 
Anyone here who could tell me how to check in headquarters/conquest mode what team holds what flag? I need to cycle thorugh all flags and spawn bots there depending on the faction. That last thing would be no problem, spawning the bots. But ciycling the flags... How would I do that?
 
Status
Not open for further replies.
Back
Top Bottom