This will also show what changes would be needed to the OpenXCOM itself, since the current alien mission implementation there just cannot support anything fancier than a bunch of random stuff happening randomly plus a retaliation or two. Emulates the original faithfully, great work, but the original was very limited. So it has to be extended, and it is completely unclear how.
Hm? With the current missionScripts you can have a lot more than 'random stuff happening randomly plus a retaliation or two', unless you mean some specific features that you'd like to be implemented.
void GeoscapeState::time1Month()
{
_game->getSavedGame()->addMonth();
https:// Determine alien mission for this month.
determineAlienMissions();
...
}
void GeoscapeState::determineAlienMissions()
{
...
https:// level four condition check: does random chance favour this command's execution?
if (process && RNG::percent(command->getExecutionOdds()))
{
https:// good news, little command pointer! you're FDA approved! off to the main processing facility with you!
success = processCommand(command);
}
...
}
bool GeoscapeState::processCommand(RuleMissionScript *command)
{
...
https:// more randoms here ...
...
mission->start(command->getDelay());
...
}
Yup, factions launch intercepts if you fly too slow / often near a city. Makes bulding the first base in a populated area a bad choice :)
Just this evening I made nearby craft assist each other, very hacky, but it turned the regular 'secret base' hgunship/frig/cruiser swarm from aturkey shootmegascorp hunt into an omg gtfo moment, baracudas and dragons nonwithstanding. The can't disengage if your speed is too low feature I like the most.
I'm working on UI side of this. 4x4 dogfights just might be possible without drastic changes, but i'd like to go beyond that. No idea how though.
Oh, this sounds really interesting. I suppose the alien bases could also be set to launch interceptions?
(https://dl.dropboxusercontent.com/u/18824603/screen171.png)
Each of the different letters is a type of Skynet base. Bases generate Aerial Hunter-Killers (UFOs) which perform regional missions: Supply, Retaliation, Infiltration, Research etc. Each different base type generates different missions:
* H bases generate additional bases of type B or C or Supply missions
* I generates Retaliation/Infiltration/Supply missions
* L generates Abductions/Harvest/Supply missions
Or, if there was instead an 'Interception' alienMission, it could be assigned to base type I, or a base type specifically dedicated to Interception and it would be run several times in a month, and even set specific patrol areas using missionZones.
But alien bases launching automatically interceptors works too.
I didn't start yet on how all the activity will be guided by rulesets really. Currently it's like GCI, in addition to regular missions, if the code decides you're detected, and random gods wink so an so (to be tied into craft availability), it spawns an ufo and guides it to the target, no connection to existing AlienMissions.
As it is, the only AlienMission that resembles interception a bit is the base assault, and it is so hardcoded, that it's useless as a model. So something else will emerge. Currently I'm reassigning missions from ufos to flights of ufos, so that the dogfight UI will have some uniform place to fetch info from.
Well this is great just as a difficulty option for OpenXCom: activate it and a few ufos will instead attack your craft if detected by either a base or a ufo
If the GCI option was available, then all it would require is a setting for the specific ufo type (canIntercept: true) for the ruleset so that the engine uses the detection/interception for this specific type, then it would be a matter of creating a regular alienMission of objective 0 like Alien Patrol (who just fly around and not land), assign to its waves the interceptor ufos and you could have alien bases spawning either intercept or/and patrol missions.
However, if we do that, we need also those X-Com crash sites...
It's not very elegant and would require new mechanics, but the feels when someone you thought dead suddenly shows up at your base are wonderful. :)
"Frank, you're alive!"
"Quick, shoot it you moron! That's a alien disguised as Frank!"
A possible half-assed solution would be to go the Power Dolls route: any lost crew has a chance of returning. If it happens, it happens within days or weeks, not straight away.
It's not very elegant and would require new mechanics, but the feels when someone you thought dead suddenly shows up at your base are wonderful. :)
...well, at least we recover his corpse...
Set up a transfer. Choose a base that has spare barracks space at random.
This should be easy enough to implement. Only the surprise part isn't entirely possible: even if the transfer is made to not show in transfer lists, the barrack space must be reserved. If the only base with spare space is the launching one, that'd be a clue that someone made it out. Still unknown who exactly of course.
This idea of the crew or parts of it returning after some days doesn't make much sense if you consider that if there was a crash there would be a search and rescue operation right away.
Also, why would aliens be present on a crashed xcom craft site?
The aliens could assault the crashed craft right away (and you'd be defending it, so essentially another ufo mission), but it doesn't make much sense for these sites to be present for days or weeks.
Also, Hobbes, how did you do non-stock markers for the bases?
alienDeployments:
- type: STR_SKYNET_BASE_ASSAULT_CORE
markerName: STR_SKYNET_CORE
markerIcon: 13
extraSprites:
- type: GlobeMarkers
width: 60
height: 3
subX: 3
subY: 3
files:
0: Resources/Geoscape/globe_ufo_expanded.png
I'm writing god-damned flight model for the ufos, complete with orbital insertions and reentry. Someone please stop me.
You can find the vanilla markers on \openxcom\standard\xcom1\Resources\UI\globe_ufo.png, just add to that image file the new markers (they're 3x3 in dimensions so really limited in design). You can add new markers for bases and terror sites but for everything else (UFOs, craft and waypoints) you can only replace the existing markers.
I'm not sure how much it relates to Area 51, but I'd love to hear more.
How are these extra markers numbered? In your example it's number 13, but where does it start?
Thank you. One last question, what palette does it use?Geoscape at a guess.
Geoscape at a guess.
Now, getting back on topic... I wonder how aggressive alien air force would work in the vanilla. I guess Skyranger would be too much of an iron coffin to be in use, so before you get Lighting you would be really stressed, and that would kinda suck - there's nothing you can do, you just lose your entire team sometimes. Unless you could give your Skyranger some escort, that would actually be interesting.
Speaking of formations... Yes, formations. Three planes that act like one (at least as long as all have enough fuel). Would help with managing interceptions.
And UFOs in formations? That would be so wicked. What's worse than being attacked by an alien vessel? Being attacked by two alien vessels. Want to shoot down that Terror Ship? Deal with these three Large Scouts first.
Send the Interceptor first to scout and engage possible hostile UFOs? Of course, if your Interceptors don't have range, then you either risk sending the Skyranger without protection or don't the mission at all. Or send a Darkstar or another AWACS type craft to monitor the hostile UFOs and then maneuver the Skyranger to avoid their paths. Plenty of possibilities there.
To me this feature would not require formations to work - add the ability for airborne UFOs to detect and engage XCOM craft, add a new alienMission to regularly generate Alien Patrols (in addition to specific flags for some UFOs in the vanilla mission to act as escorts) and you're all set.
Formations come from Xenonauts, and from the reviews I've read 80-95% times you simply click on the autoresolve button to skip aerial combat. Which makes sense because these game is all about tactical combat, the air combat is mainly for show.
It depends on how exactly it works, I am somewhat sceptical about the ability to outmanoeuvre UFOs on the globe, if they go for the kill. I mean they can simply ignore the Interceptor and go around it, plus keeping the Interceptor close to the much slower Skyranger would be a chore (unless X-Com craft can follow another, I never tried).Then we should add option for "follow" your crafts. After that it should be rule that if one craft is attacked and have another very close by (they could start interception) they can join fight.
It depends on how exactly it works, I am somewhat sceptical about the ability to outmanoeuvre UFOs on the globe, if they go for the kill. I mean they can simply ignore the Interceptor and go around it, plus keeping the Interceptor close to the much slower Skyranger would be a chore (unless X-Com craft can follow another, I never tried).
Well, in my opinion that was the best part of the game. :P And it was somewhat tactical, though simple.
I think another important element is that ufo should switch to "combat speed" that is slower than max speed. This will allow sometimes run away from it before ufo start chase you at max speed again.
Then we should add option for "follow" your crafts. After that it should be rule that if one craft is attacked and have another very close by (they could start interception) they can join fight.
How about adding a 'Evasive Maneuvers' button (or replacing the vanilla button to disengage) where the craft attempts at 50% chance to break off from the ufo, if successful the ufo has to reacquire your craft on radar before attacking again? This evasion chance could then increase to 75% once UFO Navigation is researched.
To me having a combat speed vs maximum speed makes perfectly sense for current human planes built to our current understanding of physics, which places limits both on the pilot and craft, but an extraterrestrial civilization capable of building craft magically moved by anti-gravity waves might not have that limitation and use its max speed whenever it wants (or as long as there's Elerium) :)
How about adding a 'Evasive Maneuvers' button (or replacing the vanilla button to disengage) where the craft attempts at 50% chance to break off from the ufo, if successful the ufo has to reacquire your craft on radar before attacking again? This evasion chance could then increase to 75% once UFO Navigation is researched.I think that current disengage will work as evasive maneuvers if click multiple times or something.
To me having a combat speed vs maximum speed makes perfectly sense for current human planes built to our current understanding of physics, which places limits both on the pilot and craft, but an extraterrestrial civilization capable of building craft magically moved by anti-gravity waves might not have that limitation and use its max speed whenever it wants (or as long as there's Elerium) :)
How your code will handle old saves? And when I save in new exe, old one could open it without crash?
What will be default behavior? UFO always attacks? Or its config that enable it?
To include to my branch (Meridian could have different criteria for his brach) I would like that overall default behavior will stay same (same time for dogfight and geoscepe is detail that can be changed).
Another thing is that save file do not change its structure, if you need add something its better if it separate node not used by normal OXC.
To include to my branch (Meridian could have different criteria for his branch) I would like that overall default behavior will stay same (same time for dogfight and geoscape is detail that can be changed).
PS: @Yankes: I hope that your new lighting changes in OXCE 3.3 will be optional too, and won't affect performance negativelyThis will depend how it will work on other people machines. First will be always enabled and I will try optimize it further if someone have bad performance.
- A disgustingly artificial limit of 4 dogfight participants per side.. but required so as to not have to design a whole new dogfight UI.
The short story: prototyping AI in C++ is masochism. Even adding trivial features like the leeroy-jenkins mode is, well.., it took way more time than expected. So..
So I wrote bits and pieces of an 'AI' (but mostly ufos moving around on a geoscape, some data structures to extend their 'awareness', pure python junk code piles). That was promising.
I then embedded a Python interpreter in the game, since the previous approach of communicating with a separate process running the alien AI was a) very high latency, slowing the game like 10+ times, b) hard to maintain api/protocol-wise.
See https://openxcom.org/forum/index.php/topic,5519.msg84269.html (https://openxcom.org/forum/index.php/topic,5519.msg84269.html)
As it says there, the UI is the hardest part in the game to control/define an exported api/this kind of thing. Still quite straightforward if a bit boring.
And it's also the first part that has to be done, since new AI requires debug (which is better done via UI) and also UI as such.
Since July I was settling in at a new job, so there wasn't any progress. I think in September there would be some.