Login

russian armor

British Emplacements - Need help understanding them.

13 Jan 2018, 07:07 AM
#1
avatar of Moocats

Posts: 71

Hi guys,

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.
13 Jan 2018, 11:07 AM
#2
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

There are two types of emplacements:
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 :)
13 Jan 2018, 12:55 PM
#3
avatar of Moocats

Posts: 71

I really appreciate you taking the time to help SneakEye thank you.

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.
13 Jan 2018, 14:41 PM
#4
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

That the weapon explodes happend to me a lot. It's caused by invalid links between the entities and the squad.

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.
13 Jan 2018, 15:54 PM
#5
avatar of Moocats

Posts: 71

on_construction_squad = attributes\sbps\races\british\team_weapons\howitzer_25_pounder\brit_25_pounder_howitzer_squad_mp


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.
13 Jan 2018, 16:35 PM
#6
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

Yes that should be it.
13 Jan 2018, 17:28 PM
#7
avatar of Moocats

Posts: 71

Made some progress.

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.
13 Jan 2018, 18:41 PM
#8
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

The artillery_attack in the barrage ability has a setting "face_to_target". This should be set to true.
13 Jan 2018, 20:10 PM
#9
avatar of Moocats

Posts: 71

Hmm still shooting backwards even after cloning the ability and changing that value to true.
14 Jan 2018, 10:42 AM
#10
avatar of Moocats

Posts: 71

I don't get it. Here's a couple of pictures of just the gun without any emplacement. It's using a custom version of the barrage ability; the only change is "FACE_TO_TARGET" has been set to true.

You can plainly see the gun fires backwards.





Is there some other component I'm missing here?
14 Jan 2018, 12:15 PM
#11
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

I looked into my files and noticed that two values are changed compared to the base gun. In weapon/tracking, pivot_only is: true and pivot_end_time: 2.

Can you try that?
14 Jan 2018, 13:02 PM
#12
avatar of Moocats

Posts: 71

Ah thanks for the reply. What I actually did was replace the weapon on the entities hard-points with the variants from the base guns instead.

That seems to have done the trick.



14 Jan 2018, 14:38 PM
#13
avatar of Moocats

Posts: 71

Really close to having this the way I want it. Found another problem though in that when the emplacement dies, the gun remains operational and crewed without the emplacement. Even worse is the gun is indestructible.
14 Jan 2018, 17:52 PM
#14
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

It's good that the gun is indestructible, the pit is the only entity that can be attacked. The pit needs to kill the gun when he dies.

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.
15 Jan 2018, 10:40 AM
#15
avatar of Moocats

Posts: 71

SneakEye your help has been amazing I don't think I'd have got that working without your help. I've got it perfect to how I want it now and I'm so pleased with it so t hank you very much.

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?
15 Jan 2018, 11:28 AM
#16
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

Nice work! I'm glad that I could help :)

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!
15 Jan 2018, 11:53 AM
#17
avatar of Moocats

Posts: 71

Sorry for asking but what do you mean by build variable? I can't say I've seen that before.

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.
15 Jan 2018, 13:58 PM
#18
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

The build variable can be set in the action "animator_set_variable". "variable_value" gets the value between 0 and 1. "variable_name" must set to "build". All other settings are default.

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.
16 Jan 2018, 07:01 AM
#19
avatar of Moocats

Posts: 71

Going to take some time to explore the WB Tutorials I didn't know about those so that's great.

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.

16 Jan 2018, 07:37 AM
#20
avatar of SneakEye
Senior Modmaker Badge

Posts: 813 | Subs: 5

The weapons that are spawn outside the pit are caused by the impass. There is an setting somewhere to allow the squad to ignore the impass, I think it's in construction_ext.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

566 users are online: 566 guests
18 posts in the last 24h
50 posts in the last week
105 posts in the last month
Registered members: 44659
Welcome our newest member, Yourcounselling
Most online: 2043 users on 29 Oct 2023, 01:04 AM