Modding Q&A [For Quick Questions and Answers]

Users who are viewing this thread

Status
Not open for further replies.
Hi all, have question: how to cover feet if boots are attached to body armor to avoid issues like this
_QcQEmTySCo.jpg
with help of module system? (if fit model of boots to model of feets so feets will not be seen and if make feets invisible, there will be extra CPU and GPU load)
itp_covers_legs covers only hips:sad:
 
jacobhinds said:
Both meshes and polygons affect performance to a degree. However deleting invisible meshes isn't a bad idea if it will save you a few hundred/thousand polygons in a scene (like the polygon at the bottom of a blade that never gets seen). Otherwise it's not really worth the effort.
Thanks! :grin: And If I have the chance, I will measure the effect of same vertices and half of meshes, in game benchmark.
 
I'm using a slightly modified version of Xenoargh's Shotgun script.

Code:
#script_effects_shotgun
#called when blunderbusses are fired
#Inputs = none
#Outputs = none
	("effects_shotgun",
		[

			(store_trigger_param, ":agent", 1), #Get the attacker Agent for add_missile
			(store_trigger_param, ":num_shots", 2), #number of shots
			(store_trigger_param, ":item", 3), #item name
			(store_trigger_param, ":bullet_type", 4), #bullet type

			(set_fixed_point_multiplier, 100),
			(play_sound,"snd_arquebus"),

			(try_begin),
				(store_random_in_range, ":rand", 0,5),
				(eq, ":rand", 0),
				(play_sound,"snd_release_crossbow_far"),
			(try_end),

			(position_move_x,pos1,0),
			(position_move_y,pos1,150),
			(particle_system_burst,"psys_pistol_smoke",pos1,6),
			(particle_system_burst,"psys_pistol_flare",pos1,5),
			(particle_system_burst,"psys_pistol_smoke_large",pos1,5),
			(try_for_range, ":unused", 0, ":num_shots"),
				(copy_position, pos2, pos1),
				
				#Shotgun script
				#Rifle Version

				#Kludge code to fix the final angles and arrive at a satisfactory result.
				#The engine doesn't appear to use Euler angles to give perfect precision...
				#Under all circumstances, so this will be off a bit if firing way up or down.	
				(assign, ":x_fix", -350),#-3.5 degrees
				(assign, ":z_fix", 570),#5.7 degrees
				#The following line is our "choke" adjustment on the Z axis.
				#Unless you need a fan pattern, You'll want to keep the change...
				#The same for X and Z, but Z needs to be applied through the special fix below.
				(store_random_in_range, ":z_offset", -200, 201),#2 deg. of random rotation on the Z axis
				(val_add, ":z_fix", ":z_offset"),#Add offset to the Z fix
				#Fix for Z axis, using floating-point adjustment of the quaternian
				#Don't mess with the next three lines...
				#Unless you really know what's going on with the math :-)
				(position_rotate_x_floating, pos2, 9000), # change axis by rotating 90 degrees
				(position_rotate_y_floating, pos2, ":z_fix"), # rotate z floating
				(position_rotate_x_floating, pos2, -9000), # change axis back
				#Choke adjustment for the X axis.  
				#Should match the choke adjustment for the Z in most cases.
				(store_random_in_range, ":x_offset", -200, 201),#2 deg. of random rotation on the X axis
				(val_add, ":x_fix", ":x_offset"),#Add offset to the X fix
				(position_rotate_x_floating, pos2, ":x_fix"), # Final adjustment of X
				(store_random_in_range, ":ammo_speed", 7800,8200), #2 This is a random amount of speed per spawned missile, between 78 and 82 standard units

				(add_missile, ":agent", pos2, ":ammo_speed", ":item", 0, ":bullet_type", 0),
			(try_end),
			# (play_sound,"snd_gunshot_heavy"),#Firing sound
			# (position_move_y,pos1,95),#Move out along Y
			# (particle_system_burst,"psys_pistol_smoke",pos1,15),#Smoke
			# (particle_system_burst,"psys_gun_sparks",pos1,15),#Flare
		]
	),

The parameters are all fine. The problem is that when I shoot the shotgun, either 1,000 generic missiles appear, or none at all. It might have something to do with the fixed_point multiplier and its position (maybe it's screwing with the local variables) but I'm not sure how those things work.
 
Docm30 said:
You could just give them boots with an empty mesh.
Thanks! It's a good solution for bots, but not for player in my case, 'cause whole idea of adding uniform in a single mesh was to forbid player to mix uniforms of different regiments.
So there is no solution of my problem in module system?
 
Ivkolya said:
Docm30 said:
You could just give them boots with an empty mesh.
Thanks! It's a good solution for bots, but not for player in my case, 'cause whole idea of adding uniform in a single mesh was to forbid player to mix uniforms of different regiments.
So there is no solution of my problem in module system?

I'm not sure if this is possible (not too familiar with the module system yet), but could you lock the player inventory slot for boots and just permanently assign the invisible mesh?
 
wrwlf said:
Ivkolya said:
Docm30 said:
You could just give them boots with an empty mesh.
Thanks! It's a good solution for bots, but not for player in my case, 'cause whole idea of adding uniform in a single mesh was to forbid player to mix uniforms of different regiments.
So there is no solution of my problem in module system?

I'm not sure if this is possible (not too familiar with the module system yet), but could you lock the player inventory slot for boots and just permanently assign the invisible mesh?

Yep, I thought about it, but there will be issues if player would like to play nacked  :lol:
So I need something to hide feets only when cloth is on
 
Because everyone has his favorite regiment or role and so somebody wants to play as Zouave, somebody as Coldstream Guardsman, somebody as lancer etc. and somebody wants to change his uniform, so I want to leave them choice in regiments, but with no possibility of mixing uniforms of different regiments, but I don't know another variant of it, as make whole uniform as one mesh, and here comes my problem with visible feets.

If there is no solution of that, the best variant, I think, will be just making pants and boots around of feet's mesh (but so there will be 180 extra faces per mesh of uniform), but I really hope there can be another way, with module system and scripts or just another way :smile:
 
Ivkolya@
well  you could always eddit the body mesh and atach the legs to it
then give fake legs items for all armors with just hides the legs
and all sets of armors will have own legs
 
rgcotl said:
Ivkolya@
well  you could always eddit the body mesh and atach the legs to it
then give fake legs items for all armors with just hides the legs
and all sets of armors will have own legs
wow, you're genius:smile: thanks, I think it will solve all these problems:smile:
 
And I got another question, didn't want to mix it with previous one.

I want to make stand and walk animation with musket on left sholder, and fingers of left hand under musket's butt, like here.
shoulder_arms_small58.GIF
Since I have very little experience in making animations, I don't know how to attach musket to the left hand (and make musket in the right hand to disappear), flag force_attach_to_left_hand didn't help, I need musket attached to left hand only for animations of walk and stand, not for all of them. So I have idea for these two animations make musket type shield, to guaranteed attach it to left hand, and just move model in coordinates so it will be like I need (really hope I've explained it good :smile:)
So here is the question: how make this musket-"shield" to appear exactly in these two animations and how to guarantee not using it like actually shield? Or maybe there is not so difficult way to make stand and walk animations with musket on left shoulder? :smile:
 
Hi, I'm trying to make a quest but I can't seem to find a way to spawn a certain NPC in the tavern of a town. Is there a way to do this? Like through dialog in the consequences block? Any help would be appreciated. Thanks.
 
Tüfekçi Başı said:
I'm working hard on mod. I want to add spesific troops far away from main army. I can try once but I cannot sure results at once. I want to learn right way if somebody knows.  :neutral:

Modding is pretty much trial-and-error, somebody always has to experiment at some point.

EDIT: Actual question this time...
Since I am just starting the coding aspect of my mod now, I was wondering if there is any advantage to using a newer module system (1.166 or above) with WSE vs 1.153 with WSE 3.2.0? It seems to me most mods which use WSE use 3.2.0, which would mean they are based on the 1.153 MS, correct?
 
Status
Not open for further replies.
Back
Top Bottom