Jump to content

Comprehensive Stealth/Guerilla Warfare Mod


TeamDragonpunk

Recommended Posts

 

Ok, understood. I'll look into Grimy Loot Mod tonight and Git Gud. He has various types of legendary weapons with unique abilities assigned to each. That led me to believe that it was possible to extend a weapon while not affecting the parent weapon class or template.

What grimy does is adding new templates with abilities on game init, if we are to use a bolt on upgrade for a weapon it's gonna be hard to make it behave like a normal weapon (although not impossible) but with a lowered sound range, i've come up with some code test if we can take an instance and make that weapon to be changed.

Link to comment
Share on other sites

 

 

Ok, understood. I'll look into Grimy Loot Mod tonight and Git Gud. He has various types of legendary weapons with unique abilities assigned to each. That led me to believe that it was possible to extend a weapon while not affecting the parent weapon class or template.

What grimy does is adding new templates with abilities on game init, if we are to use a bolt on upgrade for a weapon it's gonna be hard to make it behave like a normal weapon (although not impossible) but with a lowered sound range, i've come up with some code test if we can take an instance and make that weapon to be changed.

 

 

Ok, I'll test tonight to get a better understanding. I'm not opposed to creating a new template with abilities on game init, and then doing a switch behind the scenes. I agree with you that there is likely a more elegant solution. Specifically, tonight I'm going to research how the weapon mods affect the base weapon abilities (and where). I realize nothing is ever direct in XCOM 2 coding lol, but in my mind:

 

Sound Suppressor:

3D Asset and Texture Imported via Unreal Editor from Maya/Max

Wav file overrides/replaces weapon audio on weapon fire (not for reload or other sounds)

Custom code that would either:

A. Not trigger "break concealment" event (I'll find the class tonight)

B. Break concealment but would not activate the other pods. (which is why I suggested reconcealment for a short term workaround)

Custom code that modifies the damage (may even increase accuracy)

 

 

Lastly, Alex is already downloading the basic Tier 1 rifle and working on a 3D design (at least for testing purposes). I realize this is just a small piece, but it will help me understand what exactly we can and can't do.

Link to comment
Share on other sites

IMO attacking an enemy should reveal you to them and any units within visual range, what i am trying to do is change the sound notice radius-enemies within sound range get their AI status transferred to yellow and , that makes them go on search for xcom (AFAIK) - when suppressed i want to make that var to be lower.

 

EDIT: Just as i suspected when changing a weapon template's variable it will affect all other weapons with the same template. we are either going to have to go highlander or add custom weapons with "built in" suppressors

Edited by Guest
Link to comment
Share on other sites

IMO attacking an enemy should reveal you to them and any units within visual range, what i am trying to do is change the sound notice radius-enemies within sound range get their AI status transferred to yellow and , that makes them go on search for xcom (AFAIK) - when suppressed i want to make that var to be lower.

 

Ok, far enough. It just wouldn't reveal you to any enemies except for that pod. Alex is working on the 3D model now for testing purposes.

Link to comment
Share on other sites

https://drive.google.com/folderview?id=0BxjzgsgirCIjRFZVVGNuNmNMTW8&usp=sharing

 

Current work i have on the subject, most of the ability code is copied from the main abilities but it'll be useless with the way we're going, the important ones are the ReConcealeSquad and ChangeWeaponInstance functions

Edited by Guest
Link to comment
Share on other sites

https://drive.google.com/open?id=0BxjzgsgirCIjRFZVVGNuNmNMTW8

 

Current work i have on the subject, most of the ability code is copied from the main abilities but it'll be useless with the way we're going, the important ones are the ReConcealeSquad and ChangeWeaponInstance functions

 

Get a 404 error from your link. Are permissions set to public? Well, if I'm going in the wrong direction, I apologize. Just trying to understand what works and what doesn't.

Link to comment
Share on other sites

Ok Should work now(there's a new link in the comment). You are not going in the wrong direction i am just lost right now since the only calls to the objects are for the templates which will affect every copy of the weapons we want to change.

 

Just if you can talk to alex i think it would be best to get a model of a gun with a silencer for a new template altogether

Edited by Guest
Link to comment
Share on other sites

Ok Should work now(there's a new link in the comment). You are not going in the wrong direction i am just lost right now since the only calls to the objects are for the templates which will affect every copy of the weapons we want to change.

 

Just if you can talk to alex i think it would be best to get a model of a gun with a silencer for a new template altogether

Looking at X2WeaponUpgradeTemplate.uc and inclined to agree with you. From what I'm seeing here, a weapon upgrade isn't an object really, but a static mesh and an assigned ability. It ultimately might be easier to make it a separate weapon with a CanApplyUpgradeToWeaponFn false for repeater.

Link to comment
Share on other sites

 

Ok Should work now(there's a new link in the comment). You are not going in the wrong direction i am just lost right now since the only calls to the objects are for the templates which will affect every copy of the weapons we want to change.

 

Just if you can talk to alex i think it would be best to get a model of a gun with a silencer for a new template altogether

Looking at X2WeaponUpgradeTemplate.uc and inclined to agree with you. From what I'm seeing here, a weapon upgrade isn't an object really, but a static mesh and an assigned ability. It ultimately might be easier to make it a separate weapon with a CanApplyUpgradeToWeaponFn false for repeater.

 

We could go around that and temper with the AI AlertState stats outside a certain radius (you know save each unit's current state at each turn start and change if they changed while their position is outside the radius we want them to hear) but that can lead to many AI bugs and bad behavior so i'm not so keen on that

Link to comment
Share on other sites

Ok, good news! I went ahead and asked Mr. McFall about this, and I'm incredibly glad I did! (I try not to ask anything often, as not to abuse the privilege). Here is what he said in regards to making a non highlander mod sound suppressor:

 

A weapon upgrade (sound suppressor) can specify a projectile archetype "AttachProjectileName". The projectile archetypes provides the sounds, effects, and timing. The class is X2UnifiedProjectile. A good starting point for hooks is X2Action_Fire visualization class, which is the main receiver for projectile events. There is a projectile archetype that is associated with the weapon directly, the default. Additional projectile archetypes can be added to ammo and weapon attachments. Ie. A magnetic weapon with a specific type of ammo will play 2 audio files. All the projectile audio associated with a shot are additive (they don't replace each other). Assigning a "suppressed projectile" to a sound suppressor, would therefore play 3 audio files, because It is possible to have a projectile archetype that would only add a reddish tint to the normal projectile, or one that just makes a slightly different sound. The sound radius is set by the sound resource, which in this case would be a sound cue".

 

Not to speak for him, but he said he would be willing to answer further questions about this after we've worked with it. So what I can do, is ask Max to download the audio files for the Tier 1 Rifle, and then layer a track on top of that to make it sound suppressed. We could assign that track to a suppressed projectile archetype. Alternatively, We could potentially even get away with overriding the default projectile archetype for the rifle, but we would have to have some logic that would know when the suppressor is equip to switch out the default audio with our suppressed audio.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...