WFAS: Bayonet/ Reinforcements modding help?

正在查看此主题的用户

Devotion

Regular
How would one go about implementing a bayonet on a musket that can be used by the A.I. and player? Are there any meshes/models for this?
I have gone through a few searches, but haven't really found a bayonet tutorial.

Also, how would I adjust reinforcement waves? I've used the tutorials, but I can't seem too find the code that needs to be edited...the code seems different in WFaS.

 
When you say bayonet, you mean having a normal musket without a bayonet and then when the weapon is switched to melee mode the mesh is updated and a bayonet appears? This is impossible to do without scripting unfortunately. As far as NPCs are concerned, I've always had better luck just giving them 2 seperate weapons; 1 spear and one musket that both look the same, since they don't react correctly to player given orders otherwise.

You want to adjust the NPC troops involved in the waves or change the script? Captain co-op troops (I assume thats what your after) are somewhere near the bottom of module_troops.py. I haven't messed with any script concerning it though.
 
I was actually wondering same thing, But for actual player, Where you start out with a A musket, then press "X" for instance and you get a bayoneted musket, Anyone who can help, it is appreciated.
 
Bravo2255 说:
I was actually wondering same thing, But for actual player, Where you start out with a A musket, then press "X" for instance and you get a bayoneted musket, Anyone who can help, it is appreciated.
To get the "X" switch you need to add the flag itp_next_item_as_melee to the itp_type_<ranged> weapon (musket in this case) and then create a duplicate item immediately after it in the items file that is itp_type_<melee> (onehand, twohand, polearm, doesn't matter). Be sure the second duplicate, melee, item does not have the flag itp_merchandise so it doesn't show up at merchants. This will activate the "X" toggle when the player has the ranged weapon.
 
Hey Caba', sorry to keep asking questions, But how would you make the Dirt kick up, like in WFaS and Mount and Musket?
 
Bravo2255 说:
I got the Hotkey "X" to work, But when you press "X" it has same mesh, Musket without bayonet, Can you tell me what to add from this code?

插入代码块:
["wfi_charleville", "Charleville", [("charleville",0)], itp_type_musket|itp_merchandise|itp_two_handed|itp_primary|itp_next_item_as_melee|itp_has_bayonet, itcf_shoot_musket|itcf_reload_musket, 22, weight(2.25)|difficulty(0)|spd_rtng(47)|shoot_speed(50)|thrust_damage(37,pierce)|max_ammo(1), imodbits_crossbow ],
["wfi_charleville", "Charleville", [("charleville_bayonet",0)], itp_type_polearm, itc_poleaxe, 22, weight(2.25)|difficulty(0)|spd_rtng(47)|shoot_speed(50)|thrust_damage(37,pierce)|max_ammo(1), imodbits_polearm ],


The other mesh doesnt show up, one with Bayonet
The second item might also need the has_bayonet flag--I really don't know what that flag does.
Other than that, it is possible that the next_as_melee system doesn't refresh the displayed mesh at all. I don't know.

If that is the case, you'd need to throw a trigger that checks for (game_key_pressed, gk_toggle_weapon_mode) --or a different key-- and unequip/equip the agent with the different item to force the mesh to change.
 
It only refreshes with certain weapon types IIRC (throwing weapons and possibly crossbow being substituted with musket as one of them) - itp_has_bayonet allows you to play an animation while switching back and forth (the animation references are in-place, but there are no appropriate frames for it).
 
Ok, I did the code, And this is what I get, and help?

48A22B467DA78F489CAF7A938C0A67D9BDB2E2D6
 
后退
顶部 底部