Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
RecursiveHarmony said:
@Mike12096
I was writing an answer and you just fixed some stuff :grin:
It looks better but with dumping some unnecessary stuff you can do this:

Firearm_sound_at_x_distance
Code:
	# script_firearm_sound_at_x_distance
	# input: 
	#		type (pistol or musket),
	#		pos2 (muzzle),
	#		pos60(mission_camera_position)
	# output: none

	("firearm_sound_at_x_distance",
	[
		(store_script_param_1, ":item_type"),
		(mission_cam_get_position, pos60),
		(get_distance_between_positions_in_meters, ":distance", pos60, pos2),
		(assign, ":sound_id", -1),
		(try_begin),
			(eq, ":item_type", itp_type_crossbow),
			(try_begin),
				(le, ":distance", 50),
				(assign, ":sound_id", "snd_release_musket"),
			(else_try),
				(le, ":distance", 200),
				(assign, ":sound_id", "snd_release_musket_medium"),
			(else_try),
				(le, ":distance", 1000),
				(assign, ":sound_id", "snd_release_musket_far"),
			(try_end),
		(else_try),
			(eq, ":item_type", itp_type_pistol),
			(try_begin),
				(le, ":distance", 200),
				(assign, ":sound_id", "snd_release_pistol_medium"),
			(else_try),
				(le, ":distance", 1000),
				(assign, ":sound_id", "snd_release_pistol_far"),
			(try_end),
		(try_end),
		(try_begin),
			(gt, ":sound_id", -1),
			(play_sound_at_position, ":sound_id", pos2),
		(try_end),
	]),

And a remainder, never leave can-fail statements out of try blocks like you did at the end. They crash the code  :dead:
Oh I'm gonna try that version thank you I also realized that in my Game_Missile_Launch script I forgot to change these bits of code with-in the particle system
Code:
					(copy_position, pos60, pos2),
					(call_script, "script_firearm_sound_at_x_distance", itp_type_pistol, "snd_release_crossbow"),
to be like this:
Code:
					(copy_position, pos60, pos2),
					(call_script, "script_firearm_sound_at_x_distance", itp_type_pistol),#was "snd_release_crossbow"

while also removing that store script param in the firearm script as it was very unnecessary.

EDIT: Works like a charm thank you RecursiveHarmony.
 
In case your sounds are in a practical order (close, medium, far), then you can just shorten the script.
Btw, your version isn't playing sounds beyond 1000 meters.
Code:
("firearm_sound_at_x_distance",
[
	(store_script_param, ":item_type", 1),

	(try_begin),
		(this_or_next|eq, ":item_type",itp_type_crossbow),
		(eq, ":item_type", itp_type_pistol),

		(mission_cam_get_position, pos60),
		(get_distance_between_positions_in_meters, ":distance", pos60, pos2),

		(try_begin),
			(lt, ":distance", 50),
			(assign, ":sound", 0),
		(else_try),
			(lt, ":distance", 200),
			(assign, ":sound", 1),
		(else_try),
			(assign, ":sound", 2),
		(try_end),

		(try_begin),
			(eq, ":item_type", itp_type_crossbow),
			(val_add, ":sound", "snd_release_musket"),
		(else_try),
			(val_add, ":sound", "snd_release_pistol"),
		(try_end),
		(play_sound_at_position, ":sound", pos2),
	(try_end),
]),
 
_Sebastian_ said:
In case your sounds are in a practical order (close, medium, far), then you can just shorten the script.
Btw, your version isn't playing sounds beyond 1000 meters.
Code:
("firearm_sound_at_x_distance",
[
	(store_script_param, ":item_type", 1),

	(try_begin),
		(this_or_next|eq, ":item_type",itp_type_crossbow),
		(eq, ":item_type", itp_type_pistol),

		(mission_cam_get_position, pos60),
		(get_distance_between_positions_in_meters, ":distance", pos60, pos2),

		(try_begin),
			(lt, ":distance", 50),
			(assign, ":sound", 0);
		(else_try),
			(lt, ":distance", 200),
			(assign, ":sound", 1);
		(else_try),
			(assign, ":sound", 2);
		(try_end),

		(try_begin),
			(eq, ":item_type", itp_type_crossbow),
			(val_add, ":sound", "snd_release_musket"),
		(else_try),
			(val_add, ":sound", "snd_release_pistol"),
		(try_end),
		(play_sound_at_position, ":sound", pos2),
	(try_end),
]),

I just tried yours. It gave me a problem with the compiler cause you had ";" instead of some commas but it works the same sort of. There is this one problem between all three of ours script but it's extremely minor and its the pistols using the muskets sound instead of the release_pistol sound that it's assigned but again it is a minor one that I doubt even anyone would care. As for why I had it not fire beyond 1000m is cause of two reasons:
1. I limited it to 1000m since I haven't addressed the other problems that's why my script is "as is".
2. Didn't think it was necessary to play a sound beyond 1000m mainly since I have no idea what an actual musket or pistol would sound 1km and over.

Anyways thank you _Sebastian_ and RecursiveHarmony, you lads have solved my number 1 nuisance in Warband and I can't thank y'all enough for this.
 
Mike12096 said:
I just tried yours. It gave me a problem with the compiler cause you had ";" instead of some commas but it works the same sort of.
Yea that happens intuitively these days...

Mike12096 said:
There is this one problem between all three of ours script but it's extremely minor and its the pistols using the muskets sound instead of the release_pistol sound that it's assigned but again it is a minor one that I doubt even anyone would care.
Check if some pistols are still crossbows and/or the script parameter you send is wrong somewhere.

Mike12096 said:
As for why I had it not fire beyond 1000m is cause of two reasons:
1. I limited it to 1000m since I haven't addressed the other problems that's why my script is "as is".
2. Didn't think it was necessary to play a sound beyond 1000m mainly since I have no idea what an actual musket or pistol would sound 1km and over.
There's no reason for that limit though, it's an unnecessary condition check.
 
@ Mike12096
It seems i missed the "snd_release_pistol" case. Also i forgot the try_begin statement at the beginning after i deleted it.  :facepalm: The try block remainder was completely unnecessary.
And you're welcome.
@ _Sebastian_
For that code to work the sound files should be in that order in the sounds.txt
Code:
snd_release_musket
snd_release_musket_medium
snd_release_musket_far
snd_release_pistol
snd_release_pistol_medium
snd_release_pistol_far
If that's the case, it's neater. Also you thought good by putting these 2 after the comparision, better performance.  :cool:
Code:
(mission_cam_get_position, pos60),
(get_distance_between_positions_in_meters, ":distance", pos60, pos2),
About sounds beyond 1000 meters, the sound should get weaker and weaker and at some point it should be inaudible. Maybe at 2000m.
Also if we are talking about realism, at 1000 meters, the sound should be heard after like 3 seconds. Though I don't think there's any operation the could delay a trigger. :sad:
 
@_Sebastian_
Yea that happens intuitively these days...
Same here hence the crappy coding on my part.

Check if some pistols are still crossbows and/or the script parameter you send is wrong somewhere.
That is the case like I have said a few posts ago hence why I have added "(eq, ":item_id", itp_type_pistol)," in
Code:
				(is_between, ":item_id", "itm_flintlock_pistol_brown", "itm_torch"),
				(assign, ":flashpan_pos_x", 2),
				(assign, ":flashpan_pos_y", 13),
				(assign, ":muzzle_pos_x", 28),
				(assign, ":muzzle_pos_y", 34),
				(eq, ":item_id", itp_type_pistol),
				(else_try),
So that way the particle effect on the pistols don't end up using the ones for the muskets.

Code:
There's no reason for that limit though, it's an unnecessary condition check.
Understood.

@RecursiveHarmony:
It seems i missed the "snd_release_pistol" case. Also i forgot the try_begin statement at the beginning after i deleted it.  :facepalm: The try block remainder was completely unnecessary.
And you're welcome.
Don't worry I noticed it and have already fixed it
Code:
	("firearm_sound_at_x_distance",
	[
		(store_script_param_1, ":item_type"),

		(mission_cam_get_position, pos60),
		(get_distance_between_positions_in_meters, ":distance", pos60, pos2),
		(assign, ":sound_id", -1),
			(try_begin),
				(eq, ":item_type", itp_type_crossbow),
				(try_begin),
					(le, ":distance", 50),
					(assign, ":sound_id", "snd_release_musket"),
				(else_try),
					(le, ":distance", 200),
					(assign, ":sound_id", "snd_release_musket_medium"),
				(else_try),
					(le, ":distance", 1000),
					(assign, ":sound_id", "snd_release_musket_far"),
				(try_end),
			(else_try),
				(eq, ":item_type", itp_type_pistol),
				(try_begin),
					(le, ":distance", 50),
					(assign, ":sound_id", "snd_release_pistol"),
				(else_try),
					(le, ":distance", 200),
					(assign, ":sound_id", "snd_release_pistol_medium"),
				(else_try),
					(le, ":distance", 1000),
					(assign, ":sound_id", "snd_release_pistol_far"),
				(try_end),
			(try_end),
		(try_begin),
			(gt, ":sound_id", -1),
			(play_sound_at_position, ":sound_id", pos2),
		(try_end),
	]),

If that's the case, it's neater. Also you thought good by putting these 2 after the comparision, better performance.
Well why not try them out you know?

About sounds beyond 1000 meters, the sound should get weaker and weaker and at some point it should be inaudible. Maybe at 2000m.
Also if we are talking about realism, at 1000 meters, the sound should be heard after like 3 seconds. Though I don't think there's any operation the could delay a trigger. :sad:
One can simply just edit the audio file to have 3 seconds of silence before the shot is heard which can be done using Audacity or similar programs.
 
RecursiveHarmony said:
Also if we are talking about realism, at 1000 meters, the sound should be heard after like 3 seconds. Though I don't think there's any operation the could delay a trigger. :sad:
I wrote a speed of sound simulation for Battle of Europe, it's pretty easy to implement;

Code:
for i in range (0, 512):
	troops += ["sound_channel_"+str(i),"0","0",0,0,0,0,[],0,0,0,0],
troops += ["sound_channels_end","0","0",0,0,0,0,[],0,0,0,0],
Code:
sound_slot_id = 0
sound_slot_time = 1
sound_slot_pos_x = 2
sound_slot_pos_y = 3
sound_slot_pos_z = 4
Code:
	(0, 0, 0, [], 
  	[
		(neg|multiplayer_is_dedicated_server),
		(store_mission_timer_a_msec, ":cur_time"),
		(set_fixed_point_multiplier, 100),
		#sound channels
		(mission_cam_get_position, pos54),
		(try_for_range, ":cur_sound_channel", "trp_sound_channel_0", "trp_sound_channels_end"),
			(troop_get_slot, ":sound_id", ":cur_sound_channel", sound_slot_id),
			
			(gt, ":sound_id", -1),
			(troop_get_slot, ":time", ":cur_sound_channel", sound_slot_time),
			(troop_get_slot, reg0, ":cur_sound_channel", sound_slot_pos_x),
			(troop_get_slot, reg1, ":cur_sound_channel", sound_slot_pos_y),
			(troop_get_slot, reg2, ":cur_sound_channel", sound_slot_pos_z),
			(position_set_x, pos53, reg0),
			(position_set_y, pos53, reg1),
			(position_set_z, pos53, reg2),

			(get_distance_between_positions, ":distance", pos53, pos54),
			(store_sub, ":elapsed_time", ":cur_time", ":time"),
			(store_mul, ":reached_distance", ":elapsed_time", 34),#340m/s at 20C

			(ge, ":reached_distance", ":distance"),
			(try_begin),#assign distant sounds
				(this_or_next|eq, ":sound_id", "snd_release_gun"),
				(eq, ":sound_id", "snd_thunder_close"),
				(try_begin),
					(eq, ":sound_id", "snd_release_gun"),
					(assign, ":dist_adder", 5000),
				(else_try),
					(assign, ":dist_adder", 100000),
				(try_end),
				(assign, ":next_sound_dist", 0),
				(assign, ":end", 3),
				(try_for_range, ":i", 1, ":end"),
					(store_mul, ":add_dist", ":dist_adder", ":i"),
					(val_add, ":next_sound_dist", ":add_dist"),
					(try_begin),
						(gt, ":distance", ":next_sound_dist"),
						(val_add, ":sound_id", 1),
					(else_try),
						(assign, ":end", -1),#break loop
					(try_end),
				(try_end),
			(try_end),
			(play_sound_at_position, ":sound_id", pos53, 0),
			(troop_set_slot, ":cur_sound_channel", sound_slot_id, -1),#clear sound channel
				
			# (eq, "$g_show_debug_messages", 1),
			# (assign, reg60, ":sound_id"),
			# (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),
			# (store_div, reg63, ":elapsed_time", 1000),
			# (store_mod, reg64, ":elapsed_time", 1000),
			# (try_begin),
			# 	(lt, reg64, 100),
			# 	(try_begin),
			# 		(lt, reg64, 10),
			# 		(str_store_string, s2, "@{reg63}.00{reg64}"),
			# 	(else_try),
			# 		(str_store_string, s2, "@{reg63}.0{reg64}"),
			# 	(try_end),
			# (else_try),
			# 	(str_store_string, s2, "@{reg63}.{reg64}"),
			# (try_end),
			# (display_message, "@[DEBUG] sound: {reg60} | distance: {s1}m | elapsed time: {s2}sec"),
		(try_end),
	])
Code:
    ("reserve_sound_channel",
    [
		(store_script_param, ":sound", 1),
		
		(set_fixed_point_multiplier, 100),
		(position_get_x, ":pos_x", pos_calc),
		(position_get_y, ":pos_y", pos_calc),
		(position_get_z, ":pos_z", pos_calc),
		
		(store_mission_timer_a_msec, ":cur_time"),
		(assign, ":end_channel", "trp_sound_channels_end"),
		(try_for_range, ":cur_sound_channel", "trp_sound_channel_0", ":end_channel"),
			(troop_slot_eq, ":cur_sound_channel", sound_slot_id, -1),
			(troop_set_slot, ":cur_sound_channel", sound_slot_id, ":sound"),
			(troop_set_slot, ":cur_sound_channel", sound_slot_time, ":cur_time"),
			(troop_set_slot, ":cur_sound_channel", sound_slot_pos_x, ":pos_x"),
			(troop_set_slot, ":cur_sound_channel", sound_slot_pos_y, ":pos_y"),
			(troop_set_slot, ":cur_sound_channel", sound_slot_pos_z, ":pos_z"),
			(assign, ":end_channel", -1),#break loop
		(try_end),
		(try_begin),
			(neq, ":end_channel", -1),
			(display_message, "@ERROR: no free sound channel found", 0xff0000),
		(try_end),
    ]),

You never play sounds directly, just call the script.
Code:
(call_script, "script_reserve_sound_channel", "snd_release_gun"),
 
_Sebastian_ said:
RecursiveHarmony said:
Also if we are talking about realism, at 1000 meters, the sound should be heard after like 3 seconds. Though I don't think there's any operation the could delay a trigger. :sad:
I wrote a speed of sound simulation for Battle of Europe, it's pretty easy to implement;
The sad face was about that there is no operation like Thread.Sleep() method in c# that delay a thread for some time. It could make what your code does in a couple lines without any problems.
Your code looks nice, but i'm not sure slots are thread-safe or not. It may cause issues.
Also why did you use that many troops (513 exactly). I think it could be done with a single one. Because of convenience, performance issues with the slots or troops don't support that many slots?
 
RecursiveHarmony said:
The sad face was about that there is no operation like Thread.Sleep() method in c# that delay a thread for some time. It could make what your code does in a couple lines without any problems.
Your code looks nice, but i'm not sure slots are thread-safe or not. It may cause issues.
Delaying the audio playback by a fixed amount of time will only give correct results if both the audio source and listener are stationary all time.
Once movement comes into play it will give false results (changing distance to the audio source while the sound wave still travels).
So periodic distance checks are necessary.
The game logic is entirely single-threaded, so you can forget about threading anyway.

RecursiveHarmony said:
Also why did you use that many troops (513 exactly). I think it could be done with a single one. Because of convenience, performance issues with the slots or troops don't support that many slots?
You need as many troops as sounds are "reserved".
So when you store a delayed sound into a troop, that troop/slot must be reserved until the sound wave reaches the audio listener and finally plays the sound and cleans up that troop/slot, during that time any other delayed sound needs a separate troop/slot.
Now imagine hundreds of musketeers on a scene shooting all day, that's why you need that many troops/slots.
And no it's 512 exactly  :cool:
 
_Sebastian_ said:
RecursiveHarmony said:
The sad face was about that there is no operation like Thread.Sleep() method in c# that delay a thread for some time. It could make what your code does in a couple lines without any problems.
Your code looks nice, but i'm not sure slots are thread-safe or not. It may cause issues.
Delaying the audio playback by a fixed amount of time will only give correct results if both the audio source and listener are stationary all time.
Once movement comes into play it will give false results (changing distance to the audio source while the sound wave still travels).
So periodic distance checks are necessary.
The game logic is entirely single-threaded, so you can forget about threading anyway.

RecursiveHarmony said:
Also why did you use that many troops (513 exactly). I think it could be done with a single one. Because of convenience, performance issues with the slots or troops don't support that many slots?
You need as many troops as sounds are "reserved".
So when you store a delayed sound into a troop, that troop/slot must be reserved until the sound wave reaches the audio listener and finally plays the sound and cleans up that troop/slot, during that time any other delayed sound needs a separate troop/slot.
Now imagine hundreds of musketeers on a scene shooting all day, that's why you need that many troops/slots.
And no it's 512 exactly  :cool:
You can check periodically while sleeping the thread on small intervals. Here some pseudocode for that
Code:
infinite loop
{
     calculate stuff and check conditions
     if its ok play the sound and break out of loop
     else sleep trigger for 10 milliseconds
}
Code like a boss :cool:
About reducing troops, i'm talking about creating 2d array from a 1d array. For example:
[0,512) for sound_slot_id
[512,1024) for sound_slot_time
[1024,1536) for sound_slot_pos_x
[1536,204:cool: for sound_slot_pos_y
[2048,2560) for sound_slot_pos_z
It makes 2d array with 512 * 5 size from 1d array with 2560 size.
You have to do more calculation cause slot positions becomes dynamic. In the end, it saves troops but reduces performance.
Also it's 513. Don't forget the poor "sound_channels_end". :grin: :cool:

idk why everyone thinks this game is single threaded man. I've had a similar discussion at another topic. I think there wouldn't be any local variable if global variables were thread-safe. Local variables are local :smile:, so they should be. Registers seem special and my experience make me think they're also thread-safe. About slots and global variables, I don't think so.
 
You can check periodically while sleeping the thread on small intervals.
Periodic checks should happen on a per-frame basis since the engine's internal update rate equals the frame rate, at least for game logic.

About reducing troops, i'm talking about creating 2d array from a 1d array.
It's not practical at all and you gain nothing.

dk why everyone thinks this game is single threaded man. I've had a similar discussion at another topic. I think there wouldn't be any local variable if global variables were thread-safe. Local variables are local :smile:, so they should be. Registers seem special and my experience make me think they're also thread-safe. About slots and global variables, I don't think so.
I didn't say the game as a whole is single threaded, but the game logic is, for sure.
Assuming that the game logic is multi-threaded by the fact that local variables are used is just bollocks, local variables are not invented for just threading.
Registers are also global, same as slots, same as global variables.
 
@ _Sebastian_
Periodic checks should happen on a per-frame basis since the engine's internal update rate equals the frame rate, at least for game logic.
Your code uses 0 as check interval in your mission template trigger. Is that runs at every frame?
It's not practical at all and you gain nothing.
I strongly agree with "not practical" part, but it saves 512 troops.  :smile:
Each dialog has a partner. Stored in 12 bits and it could be a troop or a party template. The value 4095 is reserved for a special one, "anyone".
Code:
anyone      = 0x00000fff #4095
So you can only use first 4095 troops or party templates as dialog partner. It creates a hardcoded limit for those two and your code uses more than 1/8 of it. It's ok for a multiplayer mod as they use fewer troops but for large single player mods like game of thrones ones, it may cause issues later.

I didn't say the game as a whole is single threaded, but the game logic is, for sure.
Assuming that the game logic is multi-threaded by the fact that local variables are used is just bollocks, local variables are not invented for just threading.
Registers are also global, same as slots, same as global variables.
I just mean the moddable part not the core game engine stuff.
Ruthven wrote this at another topic.
...there is no native multithreading and so your example (from a modder's standpoint) is impossible - even if you have two simple triggers firing every frame for example, they still fire in sequence and not simultaneously... Thus registers will behave as expected and contain the most recent assigned value...
You're not the only one thinks that way, so i tested global variables and registers, and they passed thread-safety test. I also wrote two simple triggers. First one sets first local variable to 5 and does nothing else. Second one sets reg0 to first local variable and prints it. As a result, second one prints 5, so local variables keep their values like registers do. They're just some unnamed global array of variables created for convenience and reusability.  :smile:

Assuming that the game logic is multi-threaded by the fact that local variables are used is just bollocks, local variables are not invented for just threading.
Dude calm down.  :grin: I know local variables have other uses as well. I just played and modded Warcraft 3 for a while. It has a great map editor. It's script editor has a GUI that helps coding with a beginner friendly interface, but it doesn't allow use of local variables. You have to use the game's scripting syntax, JASS, to use local variables and some other stuff to create thread-friendly scripts. I thought something similar for warband too, but engine-wise these tho games seem quite different.

Anyway thanks. It was quite a fruitful discussion.
 
RecursiveHarmony said:
Periodic checks should happen on a per-frame basis since the engine's internal update rate equals the frame rate, at least for game logic.
Your code uses 0 as check interval in your mission template trigger. Is that runs at every frame?
trigger timer on a scene is counted on seconds, while on the campaign is hours. So a 1 (one) is 1 second inside a scene. If you put a 0 (zero), that is telling the engine to run that as fast as possible. And the fast as possible on most old games means frame per second (which is a great way to break 90s games without forcing the frames down lol).

anyway remember you can always test stuff, as empirical evidence trumps any info that may be right or wrong (or outdated). Put a counter and print the result on a 0 trigger and see what happens  :iamamoron:
 
trigger timer on a scene is counted on seconds, while on the campaign is hours. So a 1 (one) is 1 second inside a scene. If you put a 0 (zero), that is telling the engine to run that as fast as possible. And the fast as possible on most old games means frame per second (which is a great way to break 90s games without forcing the frames down lol).

anyway remember you can always test stuff, as empirical evidence trumps any info that may be right or wrong (or outdated). Put a counter and print the result on a 0 trigger and see what happens  :iamamoron:
I tested it on the world map. Test results seem correlated to the frame rate, and not affected by the party movement or difference in time flow. It even runs when your party stops and the world map pauses. I was working on a co-op campaign mod and looking for a way to send data even when the party stops moving. This seems perfect for the job. It's such a shame that there is no info about this at the module system.  :smile: Such a useful feature.

While i'm complaning about the lack of info at the module system, let me ask you something about animation sequences. I asked this to Callum via PM and got no answer. As the way i asked him;
At the end of each animation sequence, there are:
A 32 bit unsigned integer that hold values created by pack2f and pack4f functions,
a triple floating point number tuple,
and a floating point number.
What are these things and what they do exactly?
If any of you don't get what i'm saying, i'm talking about these.
["stand", 0, amf_client_prediction,
#  [3.0, "myanim", 0, 50, arf_cyclic|arf_loop_pos_0_25],
  [3.0, "anim_human", 50, 52, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
  [3.0, "anim_human", 60, 62, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.75],
  [3.0, "anim_human", 70, 72, arf_use_stand_progress|arf_cyclic, 0, (0, 0, 0), 0.25],
  [3.0, "anim_human", 80, 82, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5],
##  [35.0, "stand_woman", 0, 1059, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5],
##  [43.0, "stand_woman_public", 0, 1313, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5],
#  [35.0, "tavern_stand", 0, 472, arf_cyclic|arf_loop_pos_0_25],
],
 
RecursiveHarmony said:
While i'm complaning about the lack of info at the module system

download WSE and give a look at the struct of entities, as it is build on top of the .exe, and you can see the metadata of the API like in

https://bitbucket.org/Ruslan_K700/warband-script-enhancer/src/1.166/WarbandLib/action.h

you may also want to go deeper and attach a C++ debugger and all that, but unless you are doing some hardcore optimization or testing that is something modders dont usually mess with
 
you may also want to go deeper and attach a C++ debugger and all that, but unless you are doing some hardcore optimization or testing that is something modders dont usually mess with
It's not about a mod actually. I'm working on a tool like Morgh's Editor but more comprehensive. Animations part is almost completed, but these undocumented stuff is causing issues all the time.
Anyway thanks.
 
RecursiveHarmony said:
While i'm complaning about the lack of info at the module system, let me ask you something about animation sequences. I asked this to Callum via PM and got no answer. As the way i asked him;
At the end of each animation sequence, there are:
A 32 bit unsigned integer that hold values created by pack2f and pack4f functions,
a triple floating point number tuple,
and a floating point number.
What are these things and what they do exactly?
Maybe these two threads are giving you additional informations about the animation sequences:
https://forums.taleworlds.com/index.php/topic,65520.0.html
https://forums.taleworlds.com/index.php/topic,152548.0.html

Also not sure why you are PMing Callum, in his case I would also not answer to you. He is busy enough at other places.
 
Is there a way to make a couchable lance also be throwable? So using X to couch while riding, and then using a different unused key to switch it to being a throwing weapon?
 
I haven't tried it with a couchable, but should work fine with the x key either way. I mean, start with a throwing spear 'mode' and when you hit x it goes to 'lance' mode and back again. It works with magic staffs, melee pistols, parrying daggers for me, so a couchable lance shouldn't be different.
 
Antonis said:
I haven't tried it with a couchable, but should work fine with the x key either way. I mean, start with a throwing spear 'mode' and when you hit x it goes to 'lance' mode and back again. It works with magic staffs, melee pistols, parrying daggers for me, so a couchable lance shouldn't be different.

But then wouldn't hitting x when it's in lance mode make it so you can't couch it as a lance by using the x key, because it'd switch back to a throwing spear? The only reason I mentioned another keybinding, is that Vikingr does this, but you have to press p to change a couchable lance to a throwing spear. I'd like to try this, but I don't know how I'd go about doing it.
 
Status
Not open for further replies.
Back
Top Bottom