Company of Heroes: Eastern Front

Author Topic: Technical questions  (Read 6729 times)

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Technical questions
« on: September 30, 2014, 11:10:21 PM »
This thread is a follow-up to my 'Doctrinal buildings' one, but as the subjects are different, using the same thread wouldn't 'work'...

Anyway, based on that thread I have a few follow up questions about the feasibility of a few other ideas I had, so here goes...

1) Can you change the way a soldier uses an equipped weapon based on conditions? For example, can SMG equipped troops 'pick up' an AT gun and have their SMGs switch from full to semi-auto?

2) Can crewed weapons with non-standard crew sizes be made to maintain their crew size if said weapon is captured by the enemy? (Have the max crew size be linked to the weapon and applied regardless of faction?).
As an example, lets say you have a soviet AT with a crew of 4, its crew are killed and the Ostheer take it for themselves... Can it be made so the crew size is still a max of 4 under the new Ostheer owners?

3) Going by the Ostheer 'Opel Maultier' and the way it 'drops' Goliaths, this should be possible, but just to make sure - Can a (locked down) vehicle (or building even) be rigged to 'drop' inanimate objects (collectible weapons, LMG, AT-rifles, etc)?

Thats it for now, but there will probably be more to come as I refine my 'secret project' further...

~JD
~ MedMod Dev

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: Technical questions
« Reply #1 on: October 01, 2014, 06:35:44 AM »
Quote
1) Can you change the way a soldier uses an equipped weapon based on conditions? For example, can SMG equipped troops 'pick up' an AT gun and have their SMGs switch from full to semi-auto?
Add the actions to each entity of the squad(the one that uses that SMG weapon) to add and change the weapon(you can use only change if you already added the optional weapon by yourself in the second weapon of the hardpoint 01) if the atg entity exists(required entity) as condition or, in case you want more than one, if atg entity OR another entity OR another entity and so on. And remember to create the weapon file that has semiauto fire.

Quote
2) Can crewed weapons with non-standard crew sizes be made to maintain their crew size if said weapon is captured by the enemy? (Have the max crew size be linked to the weapon and applied regardless of faction?).
As an example, lets say you have a soviet AT with a crew of 4, its crew are killed and the Ostheer take it for themselves... Can it be made so the crew size is still a max of 4 under the new Ostheer owners?
You are looking in the wrong place for that... or at least you are looking at the half of the solution. You need to edit the right heavy weapon capture squad file to let use more or less infantry according to your needs.

Quote
3) Going by the Ostheer 'Opel Maultier' and the way it 'drops' Goliaths, this should be possible, but just to make sure - Can a (locked down) vehicle (or building even) be rigged to 'drop' inanimate objects (collectible weapons, LMG, AT-rifles, etc)?
Yes, just instead of using "spawn a squad", you would use "spawn an entity" and use the prop files for the weapons and the atg/arty ebps from their faction folders. Check the opel maultier resource drop or the airdropped medikit ability to get an idea.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #2 on: October 13, 2014, 04:33:54 AM »
I have a few more questions... Firstly, a few follow-ups:

1) So you mean 'duplicates' of the same weapon, with a hidden switch-over based on conditions? Is this still do-able for weapons that are themselves an 'upgrade' to the squad using them?

2) So its the capturing squad that needs to be edited? I don't understand... sorry...
Maybe I can make the question a bit more direct - I'm planning a possible 'light mortar squad' - 3 light mortars, manned by two men each. Could such a unit be made at all? and if so, can it be made so the weapons can be dropped and collect as though they were a single crewed weapon (with the capturing squad needing a minimum of 3 men to capture and reinforcing up to 6?)

And now a new question:

3) I'm planning a 'supply drop' command ability similar to the one used by the US Airborn tree and was wondering if it is possible for 'bonus' manpower (representing food, clothes, etc) be delivered through such a drop (randomly determined out of the 3 resource types)?

Yes yes, 'exact' unit types/names are all still secret stuff for now, but I'm very close to an on-paper 'proof of concept', so... 'soon' :P

~JD
~ MedMod Dev

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: Technical questions
« Reply #3 on: October 13, 2014, 04:45:03 AM »
1) So you mean 'duplicates' of the same weapon, with a hidden switch-over based on conditions? Is this still do-able for weapons that are themselves an 'upgrade' to the squad using them?
I'm not sure what are you referring with that, but if you are talking about creating the weapon that has semiauto fire it just means to create a weapon that does that, it would be easier if you just clone the original weapon and use it as base though.

Quote
2) So its the capturing squad that needs to be edited? I don't understand... sorry...
Maybe I can make the question a bit more direct - I'm planning a possible 'light mortar squad' - 3 light mortars, manned by two men each. Could such a unit be made at all? and if so, can it be made so the weapons can be dropped and collect as though they were a single crewed weapon (with the capturing squad needing a minimum of 3 men to capture and reinforcing up to 6?)
That's right and each weapon of that type has it's bunch of capture squads for every faction. And about your squad with three mortars, they will drop regardless of what you do one by one and they will create a new mortar squad using the assigned recrew squad. Then again, if you want these mortars to behave like that you need to change the capture squad and also the ebps of the heavy weapon to match.

Quote
3) I'm planning a 'supply drop' command ability similar to the one used by the US Airborn tree and was wondering if it is possible for 'bonus' manpower (representing food, clothes, etc) be delivered through such a drop (randomly determined out of the 3 resource types)?
Nope, that cannot be done, either you choose one or get all of them at the same time.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #4 on: October 13, 2014, 05:42:52 AM »
1) A soldier is spawned with a rifle as standard, his squad then uses an on-unit "SMG package" to give the soldier a select-fire SMG. While part of the infantry squad, he will use it at full auto, but then the squad is 'removed' by capturing an AT gun. Can the SMG equiped soldier be 'scripted' to switch to semi-auto?
Going by what you've said, the SMG would have to be exchanged via a hidden automatic function, replacing the full-auto version with a semi-auto version... Correct?

2) Hmmm... This all sounds very difficult to make work... But, given the specific light mortar in mind, which had a great performance, but was a very complicated piece of gear, there might be a workaround...
Could such a 'weapons squad' be made, with 6 men and 3 of the mortars (and appropriate mortar abilities), without having a drop-able/capture-able heavy weapon exist? (As the crew are killed off, the weapons are auto-destroyed too - with reinforcements of men including replacement weapons too?)

3) Okay, so the US airborn 'supply drops' are 'locked' in terms of what they give the moment they are spawned? I know there are two different cosmetic appearances for them, linked to whether the drop contains munitions or fuel... A manpower giving version *could* be made though. Its just that the 'random' part is determined when the drop is spawned, not when its collected, correct?
And the heavy weapons that get 'spawned' on collecting, are they also "set" by drop type? Or is that a 'separate spawn' that *can* still be randomized?
Anyway, the 'randomize on spawn' rather than 'randomize of collection' thing isn't a big issue. Its having the 'randomness' that matters, not how it's made to happen.


Thanks for all the help and quick responses by the way Blackbishop, it is highly appreciated! :D

~JD
~ MedMod Dev

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: Technical questions
« Reply #5 on: October 13, 2014, 06:16:08 AM »
1) Correct.

2) Nope, that's not possible. But if you want to self-destroy the mortar once it is abandoned, you might take a look in the abandon actions (I think that's how it is called).

3) Wrong, there is not a random element in the resource drop at all. It is a fixed effect, so either you get munitions or fuel or manpower or something else or a combination of them.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #6 on: October 15, 2014, 12:19:23 AM »
1) Resolved, thanks!

2) So squads of heavy weapons are out... okay... Pity, I was really liking the idea of a 'light mortar squad' (especially since it would have been historically accurate that way). So it has to be individual weapons (assuming you can't think of any alternative way to make the squad version work)...

The follow-on question then becomes: Is it possible to have 'heavy' crewed weapons (AT guns and Mortars specifically) that can operate with only 1 crew alive (out of the max of three)? Or is the minimum of 2 for such weapons 'hard coded'?

3) Okay, I did some more checking and stand corrected. But it *would* be possible to have a 'general supply drop' that came with a mix of all three resources in one hit right? (one suggestion that came up is that manpower can't be 'dropped' like that at all). Also, if I wanted to have the drop spawn three weapons instead of two, could that be done (Mortar, light AT, and MG for example)?

Perhaps have the one ability spawning multiple crates, but have them spread along a line (as if by a 'bombing run') - spreading them out and increasing the chance of 1 or more being 'captured' by the enemy? Each 'crate' contains a single resource and spawns a single weapon (50mp and an MG for example. But all 'set' combos, dropped in a 'set' order). To increase the 'risk', have it that you can't set a direction for the planes path, only the 'primary drop' location...?
 
« Last Edit: October 19, 2014, 08:35:37 AM by jonarus_drakus »
~ MedMod Dev

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #7 on: October 19, 2014, 09:17:22 AM »
Only bumping/doubling because of a new question:

4) Is it possible for vehicle to have a 'lock down/dig in' type ability without a way to 'un-deploy' afterwards (Effectively turning the vehicle into a permanent emplacement)?
~ MedMod Dev

Offline Hendrik 'DarcReaver' S.

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 2503
  • ...Fear my Arty...
    • View Profile
Re: Technical questions
« Reply #8 on: October 19, 2014, 12:56:27 PM »
Only bumping/doubling because of a new question:

4) Is it possible for vehicle to have a 'lock down/dig in' type ability without a way to 'un-deploy' afterwards (Effectively turning the vehicle into a permanent emplacement)?
It should be possible by making the ability permanent. You could try using a basic ability like BAR rifle supression fire and replace its modifiers with the lockdown/dig in ability modifiers and putting the duration time to 999999seconds.

Abuse is abuse and has to go.

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: Technical questions
« Reply #9 on: October 19, 2014, 11:05:08 PM »
Mmm... there is another way to do it. Take the PE SC by example, it's lock down ability is the combination of a lock down + unlock abilities, so you would only need to remove the unlock ability and it will remain locked down until it dies or the match ends.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #10 on: October 27, 2014, 06:44:23 PM »
That was my first though too Bishop - I just wasn't sure if one ability could be created without the other having to exist as well...

A few more questions, first a couple of old ones that were missed that I'd still like some feed-back on (re-numbered for simplicity):

1) So squads of heavy weapons are out... okay... Pity, I was really liking the idea of a 'light mortar squad' (especially since it would have been historically accurate that way). So it has to be individual weapons (assuming you can't think of any alternative way to make the squad version work)...

The follow-on question then becomes: Is it possible to have 'heavy' crewed weapons (AT guns and Mortars specifically) that can operate with only 1 crew alive (out of the max of three)? Or is the minimum of 2 for such weapons 'hard coded'?

2) Okay, I did some more checking and stand corrected. But it *would* be possible to have a 'general supply drop' that came with a mix of all three resources in one hit right? (one suggestion that came up is that manpower can't be 'dropped' like that at all). Also, if I wanted to have the drop spawn three weapons instead of two, could that be done (Mortar, light AT, and MG for example)?

Perhaps have the one ability spawning multiple crates, but have them spread along a line (as if by a 'bombing run') - spreading them out and increasing the chance of 1 or more being 'captured' by the enemy? Each 'crate' contains a single resource and spawns a single weapon (50mp and an MG for example. But all 'set' combos, dropped in a 'set' order). To increase the 'risk', have it that you can't set a direction for the planes path, only the 'primary drop' location...?

And a new one:

3) For command tree 'activated abilities', is it possible to have more than one resource cost?
If not, its no biggie, I just have a near-complete ability where it would make more sense (realistically speaking) for it to have both a munitions AND a fuel cost to use.

Actually, one last one, but not so much a pure technical question so much as a 'unit concept':

4) Sd.Kfz. 251/7 - "Pionierpanzerwagen"

Basically a hybrid combo of 'PE-Scoutcar', 'PE-Infantry Halftrack', and Pioneer infantry squad. In 'normal' mobile mode, the vehicle is un-armed, but can act as a mobile repair vehicle (with slightly boosted repair speed, say 125%) akin to the OH-Famo or PE-Bergetiger. But the vehicle can also 'deploy' to lock down a sector as per PE-Scoutcar. When deployed, the driver mans the otherwise un-occupied MG, giving the vehicle limited self-defense ability (in addition to its increased armour over the PE-Scoutcar). Regardless of anything else, there would be a limit of 3 (?) such vehicles (per player) on the field at any one time.

I had a couple of idea for 'extended' abilities while deployed, but these are separate, and in addition to, the base vehicle:
a) When locked down, the vehicle generates a weak 'repair aura' - basically allowing it to operate like a WM 'repair bunker', but less effectively (small 'range' to the aura, repair at slower speed).
b) Deploy Goliath mine for 150mu, (slightly more than normal yes, but the whole list has lower manpower costs but increased munitions/fuel costs).
 
« Last Edit: October 27, 2014, 06:59:43 PM by jonarus_drakus »
~ MedMod Dev

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #11 on: June 27, 2015, 06:28:18 PM »
Hello! Me again! :P

Rather than waste space with a whole new thread, I figured it would be easier to respawn this one, especially as the subject is still the same... With that, to the point:

I am 'concepting' a 5-man doctrinal US infantry squad with a rather unique weapon upgrade option - All 5 men get M12 'trench gun' shptguns (Average RoF, high 'per shot' damage, but inaccurate at anything greater than 'point blank' range). To enhance the 'specialization' factor, I wanted to give a shotgun equipped squad a unique 'sweep and clear' activated ability. It would work like a Wehrmacht stormtrooper 'grenade assault', with the restriction of only being usable on garrisoned buildings... The ability would have a 10-20sec 'run time' during which they would be immune to supression and execute an 'attack move' on the targeted building, throwing multiple grenades as they approach (max of 1 per living squad member)... The twist (and the part I am not sure is technically doable), is that once the ability time runs out, a check is performed to see if they have killed all the enemies in the targeted building, and if so, automatically garrison said building themselves... If the the building is 'upgraded' to a forward barracks (or otherwise 'owned') the instead proceed to 'de-cap' it at an increased rate (or simply keep attacking if it is a 'base building' of some kind).

At this point I'm not to worried about the 'how' part of it, just whether it would be possible at all...

~JD
~ MedMod Dev

Offline Blackbishop

  • Administrator
  • Poster of the Soviet Union
  • *
  • Posts: 12053
  • Community Manager, Programmer and Kicker
    • View Profile
Re: Technical questions
« Reply #12 on: June 27, 2015, 09:27:20 PM »
Garrisoning in the building they just cleared automatically, I'd not know how to do that. Not sure if it is possible, but it isn't at least to me.
Mors Indecepta

Might controls everything, and without strength you cannot protect anything. Let alone yourself...

Offline jonarus_drakus

  • Strelky
  • **
  • Posts: 91
  • MG42: 1200 rounds of fun for the whole family!
    • View Profile
    • Mediterranean Mod Sub-forum
Re: Technical questions
« Reply #13 on: June 28, 2015, 06:19:25 AM »
Thats the one part I was worried about...

Way I see it, the basic 'grenade assault' part will work fine even with the targeting proviso of 'garrisoned building', and there are several (also American) units with the 'fire up' anti-suppression ability. Combining those two into a more limited, situational, ability should be relatively easy... Even the boosted 'de-cap' speed should be easy enough, I'm pretty sure units already exist that decap faster than the cap, so even if that has to be applied to everything, its still a simple matter.

I guess it comes down to - Is all of that, situational as it is, enough? Is the auto-garrison feature even necessary?

~JD
~ MedMod Dev