Jump to content

New Mod: Make Neutralize All Enmies Objective Optional


HazyAssaulter

Recommended Posts

http://steamcommunity.com/sharedfiles/filedetails/?id=643394152

 

This mod changes Guerrilla Ops and Retaliation missions by making the Neutralize All Enemy Forces Objective Optional. This permits you to evacuate after completing your primary objective in Guerrilla Ops or after saving 6 civilians in Retaliation without failing the mission. You can still kill the aliens to get experience, loot, and corpses, but you are not required to do so to complete the mission.

The purpose of this mod is to make missions more objective oriented. As this mod makes these missions strictly easier, you may want to combine this with mods that made the game harder, or play on a harder ddifficulty.

IMPORTANT NOTE:

Retaliation missions have no interface issues. However, if you evacuate or squad wipe on a Guerrilla Op mission after completing the objective, the game will say Mission Failed. The sad music will play, your soldiers will be sad etc etc, but you will still receive all the benefits as if you had completed the mission (strategic resource, dark event countered, and new event / point of interest to scan).

Keep in mind that evacuating or squad wiping on a mission means you will not receive any alien corpses, whether or not you completed the objective.

Link to comment
Share on other sites

This is great. I was looking into the code, but I don't quite understand it. Or rather, I would like to learn from everybody if this can be done more simply. In your file TemplateExchanger.uc, I get the first 100 lines or so down through ReplaceFunctions. But, it seems that most of the rest of the file is copied out of X2StrategyElement_DefaultMissionSources.uc without modifying. Is this because there is no way to refer to non-static functions from another class? Or, are there changes I missed? I have also run into the problem that I want to modify one function of a class via template change, but then I have no way to refer to the non-static functions of the original class.

 

If you could write up a little bit about the way this file works, and any limitations you found, that would be very helpful.

Edited by davidlallen
Link to comment
Share on other sites

This is great. I was looking into the code, but I don't quite understand it. Or rather, I would like to learn from everybody if this can be done more simply. In your file TemplateExchanger.uc, I get the first 100 lines or so down through ReplaceFunctions. But, it seems that most of the rest of the file is copied out of X2StrategyElement_DefaultMissionSources.uc without modifying. Is this because there is no way to refer to non-static functions from another class? Or, are there changes I missed? I have also run into the problem that I want to modify one function of a class via template change, but then I have no way to refer to the non-static functions of the original class.

 

If you could write up a little bit about the way this file works, and any limitations you found, that would be very helpful.

 

Sure thing. Originally my mod stopped shortly after the function bool StrategyObjectivePlusSweepCompleted. When this is all I had as far as modifying templates, Retaliation missions worked perfectly. However, Guerrilla Ops remained unchanged, and I had no idea. I couldn't figure out how to change the parameters for determining if a Guerrilla Op missions succeeded or failed. So instead, I overrode the function that determines what happens if a Guerrilla Op fails. Normally, the game just checks to see if you completed the primary objective, and if you did so, you counter the dark event. I simply added parameters that say if you do complete the objective, you get the same outcome as if you had a full success.

 

However, when I only had this function, I kept getting build errors for every command or expression that wasn't referred to in my TemplateExchanger. So I had to copy these functions over from the vanilla .uc to get it to work properly.

 

Ideally, someone will be able to point out a way to successfully modify the success/fail conditions for Guerrilla Ops, because as the mod stands, I kind of had to brute force it by overriding the OnFail function, which is why while the mod works perfect, the game still displays Mission Failed, the sad music plays, etc.

 

So to answer your question directly, there may be a way to refer to non-static functions from another class without copying them over entirely, but I do not know it. I'm pretty limited in programming knowledge and had to work extensively to get this to work as it is.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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