Possibility to add victory/defeat conditions?

Started by Deer87, January 03, 2018, 06:55:59 AM

Previous topic - Next topic

Deer87

As the Headline indicates, Im trying to figure out if it is possible to write additional defeat conditions.

To be specific:
Im working on a scenario where a group of soldiers are being tasked with establishing a new radio outpost.
The plan is to implement  two warring factions, and a new object - The comms tower.

My idea is, that the tower somehow becomes a crucial object, so that the player have 5 or 10 days to establish operations (builing the tower, a coms console, and sufficient power supply).

After that, a countdown should start everytime the tower is rendered inoperable, due to power shortage, short circuits, or destruction by the enemy. (due to solar flares the countdown need to be at least a few days).

If the count down reaches zero its game over (or at least a notice that the team faild their mission)

Is this possible within the programming of the game?
If so, can anyone help me with how to approach it?

Additionally i would like to make the tower a favored taget for the enemy faction during raids and sieges.

BrokenValkyrie

This one outside my expertise. There hasn't been an answer for some time though.

Given the available tools, certainly possible to code albeit difficult to implement.

How much experience do you have with programming? Your proposal goes beyond xml and right into assembly territory. You will need to code in c#.

The closest thing to your idea within the game code is AI ship escape, where you assaulted by wave of enemy until the ship can take off. It has assault wave and timer element. I would start by looking at that code. I would also look at how the game handle ship escape and colony wipe.

As for starting point, the first thing to do is create a custom event, make it short and make it message a defeat message(don't implement defeat screen at this stage) when it times out. Then create the comm tower, hook that comm tower to the custom event. Do not worry about power at this stage, all that happens at this stage is when the tower is hooked to the event and is currently existing is that there is separate victory timer that counts down. When this victory timer reaches 0 it should message the player they achieved victory(don't implement victory screen this stage).

You can get around solar flare by simply disabling it in the scenario.

I would not bother making tower a favored target, that would require far too much effort and will involve the use of harmony.

I can't write all the step involve, the post will be too long. If you decide to go ahead and code, you're welcome to come back and ask for help.