British Emplacements - Need help understanding them.
Posts: 71
I have logged quite a lot of hours in the COH tools but at best I'm still a capable novice. I'm hitting a few walls and one of them is emplacements.
My current end goal is to have a 25lb gun in the coh 1 style emplacement base.
(armies\common\structures\artillerypit\artillerypit)
I've copied the hardpoints and abilities over from the Platoon CP as that seemed the easiest method. I also copied the crew_ext over.
To be clear the weapon works but the gun it's self is invisible, as the gun can't be seen I don't know if the crew gunner/loader etc is ok or not either.
There is an animation state for weapon visibility "maingun_visibility" and I set "do_action_state_name" to on. What concerns me is the available states seem to be a carbon copy of the Platoon CP so I'm not even sure they work on the "artillerypit" entity.
I'd obviously like help getting this to work but more than that I'd like to better understand how emplacements work on a sort of step by step basis. The problem is most of the options within the modding tools I've had to work out with trial and error but there's certain aspects I find very hard and this is one of them. The problem stems for information overload and I find it hard to back track what each thing does to see cause and effect so I really could do with someone to help me understand it.
Thanks.
Posts: 817 | Subs: 5
1. The mortar pit and the bofors are one entity with the weapons included.
2. The 17 pdr consists of two entities, the gun and the pit separate.
I recommend to clone the 17pdr and start form there. Then use this model for the gun: "armies\british\weapons\25_pounder\25_pounder" and "armies\common\structures\artillerypit\artillerypit" for the pit.
The "maingun_visibility" is needed indeed and must be set in the action_apply of the gun. Then you need to replace the weapons and abilities also in the gun. The crew is the same as in the Platoon CP.
The pit doesn't need any changes, only add this to the engineers.
I hope this helps you get the first steps and just ask if you need any more help.
I think emplacements are the most complex part in the modding tools. I spend a lot of time creating new ones, but eventually it's all possible
Posts: 71
I'm still having trouble.
So I decided to start from scratch with this. So I took the 17_lb as the starting point as you suggested.
I used the crew ext from the platoon cp.
You said use the weapon "armies\british\weapons\25_pounder\25_pounder" If I add that into the hardpoint slots for the emplacement it's self the weapon just explodes when the emplacement is built so I tried another approach.
I tried changing on the on_construction squad to: "attributes\sbps\races\british\team_weapons\howitzer_25_pounder\brit_25_pounder_howitzer_squad_mp"
I'm actually using cloned replacement for the affore mentioned squad and the same with the 25lb entity in the squad_loadout.
You said "maingun_visibility" is needed indeed and must be set in the action_apply of the gun."
So I've done this for the cloned 25lb entity that I'm using, is that what you meant?
Anyway with that I have so far the gun is still not visible and doesn't work either.
This entire relationship with the emplacement, it's weapon(s) and crew still confuses me a fair bit.
Posts: 817 | Subs: 5
There are two entities, gun and pit. The pit is build by engineers and has a link to the squad through the on_construction_squad. That squad has the gun and the pit in the loadout. The gun will spawn when the pit is fully constructed.
Posts: 71
squad_loadout \\\ loadout_data = attributes\ebps\races\british\buildings\emplacements\brit_25_pounder_howitzer_mp
squad_loadout \\\ loadout_data=
attributes\ebps\races\british\buildings\emplacements\brit_17_pounder_pit_mp
I just use the stock items for simplicity but assuming the squads/entities are replaced with cloned and modded variants. That's the relationship?
I'll have another go.
Posts: 817 | Subs: 5
Posts: 71
I got the gun to show with crew but when I used the weapon it didn't elevate or turn so the round would skew off at a weird direction.
Now I don;t intend to use this gun with a barrage ability and instead wanted it to work in unison with the artillery flare or the off map ability for royal artillery commander so I decided to try and cheat so I copied the weapon hardpoints from the Platoon CP to the gun entity.
That fixed the issues with turning and elevation. The weird new issue is the guns facing direction is 180 degrees inverted so the round literally fires backwards from the direction the gun faces.
I've not touched weapon configs yet so not sure how to fix that.
Posts: 817 | Subs: 5
Posts: 71
Posts: 71
You can plainly see the gun fires backwards.
Is there some other component I'm missing here?
Posts: 817 | Subs: 5
Can you try that?
Posts: 71
That seems to have done the trick.
Posts: 71
Posts: 817 | Subs: 5
The pit needs a filter action in it's health_ext/death_actions. You can use the one from the 17 pdr. It searches for a specific type within a range of 1. That type must be added to the type_ext of the gun.
Posts: 71
I do have some more questions I hope you don't mind but you seem to know this stuff back to front. I'd love to know how you got so proficient. I'm mostly self taught with what I can do and lean on help from others where I can't work it out but in absence of any resource telling me exactly what certain values are supposed to do it's not exactly fast going.
Anyway questions mostly emplacement related.
1) I figured out how to remove...well hide the mortar in the mortar pit; but how does one do this for the bofos?
2) Is there anyway to effect a visual change on the silhouette when placing the structure. If there's no weapon in a mortar pit, then I don't want to see two mortars when I'm placing the emplacement. Image to show what I mean: https://i.imgur.com/bJTuM5N.jpg
3) Is it possible to want of a better term 'sink' the emplacement into the ground so smaller weapons can fit in and visually shoot over the emplacement side without clipping?
4) I noticed in a screenshot from your mod you made a mortar pit for the soviets using the MG nest. I tried to do this months ago but gave up because I could take the rood off with a damage_state but I couldn't put the accompanying fire out that came with said state.
5) The big question. Is there some resource or program that lets me look at the "coordinates?...markers?" of an animator. I mean how can I find out where hard points are and where to attach weapons and such. Let's say I wanted an upgrade to spawn another entity on the left of a building, how would I specify where it spawned? Same query with crew If I'm gonna for example shove a pak40 or 6lb at gun in a bofos emplacement base, how do I know what crew and sync_attach I should be spawning in crew_ext?
Posts: 817 | Subs: 5
I learned al lot from Eliw00d's videos. Bedides that, I work in software development which helps me understand the back-end and I work on my mod for over three years which was mostly try on error. I didn't have any modding experience when I started
1. The easiest solution is to set the build variable to 0.9 (after the construction is completed, otherwise it wil be overruled).
2. Sadly not, the silhouette is the blueprint of the selected model with all default settings/animations.
3. Yes, you van edit the abp file with an offset (the last three variables). This doesn't effect the build silhouette, but spawns at the right offset after positioning it on the map.
Add the simvis_attributes to the bottom of the file, the -0,45 is an example value:
simvis_attributes =
{
vehicle_physics = 0,
vehicle_width = 0,
vehicle_length = 0,
vehicle_nr_wheels = 0,
vehicle_spring_constant = 0,
vehicle_damper_constant = 0,
vehicle_wheel_travel = 0,
vehicle_acceleration_factor = 0,
vehicle_gravity = 1,
vehicle_render_offset = 0,
vehicle_debug_render = 0,
vehicle_smoothness = 3,
vehicle_render_offsetx = 0,
vehicle_render_offsety = -0.45,
vehicle_render_offsetz = 0,
}
4. The build variable must be set to 0.6 to make the roof invisible.
5. I use the NIS function in the worldbuilder to find the names of animations, including the crew. This can also be used to calculate coordinates between two models.
I hope this helps, Good luck!
Posts: 71
I vaguely remember editing an abp file once before although I can't remember why so I'll have a crack at that soon.
I use the NIS Function too, it's where I experiment with the various states but there's a method to view the crew too? Not sure how that means I can calculate coordinates between models but to be fair I am dumb as a box of rocks xD
EDIT:
Yeah I had done an abp edit before but it was different as it was a simple case of replacing a file on an identical file path. This time as I basically need to use a new .apb file for this new "bofos" so as not to effect the other one. If I create a new one lets call it "pit_small2.abp" it gives me an error about referencing a file that doesn't exist in the attribute editor.
Posts: 817 | Subs: 5
The crew in NIS is explained in chapter "2.2. Adding a Crew" in the Worldbuilder NIS Tutorial.
About the coordinates, you can look in '"position" (above animation) to find the coordinates of the selected model. Then you can calculatie the differences between two models to get the offset.
That error isn't an issue, because it doesn't search in you custom folder when you type it. It works when you build it. Don't forget to put the default bofors path in alternate_sua.
Posts: 71
Having issues with the weapons spawning outside as apposed to inside the "pits" at the moment so looking at something else will be nice. Bofos/MortarPit seem more...tedious to mod.
Posts: 817 | Subs: 5
Livestreams
106 | |||||
28 | |||||
4 | |||||
181 | |||||
56 | |||||
14 | |||||
13 | |||||
1 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.831222.789+37
- 2.35057.860+15
- 3.1110614.644+11
- 4.639230.735+2
- 5.276108.719+27
- 6.306114.729+2
- 7.921406.694-1
- 8.1047675.608+5
- 9.262137.657+3
- 10.722440.621+4
Replay highlight
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Board Info
4 posts in the last week
35 posts in the last month
Welcome our newest member, Morgenes
Most online: 2043 users on 29 Oct 2023, 01:04 AM