Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: overlapping SAM site coverage
New feature: overlapping SAM site coverage[message #347188]
||Thu, 06 October 2016 00:33 |
||As a result of a recent discussion, I've changed the way SAM site sector coverage works. Basically, a sector can be covered by multiple SAM sites at the same time.
First of all, there are now 2 different airspace displays (pressing the Airspace button toggles them).
In this display, airspace that you control is green, airspace that the enemy controls is red, airspace that both sides control is yellow and airspace that isn't covered by any SAM is uncoloured. Not that different from previous iterations.
This display is a bit different. A sector is coloured depending on what SAMs cover it currently. So red is SAM 1, green is SAM 2, blue is SAM 3, yellow is SAM 4, pink is SAM 1 and 3... I hoep you get the idea. See SamSites.xml for more details (honestly, seeing it will likely clear any questions).
Additionally, SAM sites can now be hacked. In order to do so, have a hacker hack a SAM command console:
If your hacker is good enough, he/she can alter a SAM's hack status. This is a new value normally at 100. If lower than 100, this lowers the radius of the SAM (which is derived from the max distance to any sector it covers). A SAM sites' status will also affect the distance.
As a result, the SAM radius will be lowered. Note that status/hack status are now displayed in the sector description.
If you hack a SAM while there is an enemy in the sector, the game assumes you want to hack it. If you hack while no enemies are present, it assumes you want to undo any previous hacks - if your hacking skill is higher than that of the guy who previously hacked it, you will repair it.
For details on how this is set up, once again see HandleInteractiveActionResult(...) in Overhead.lua. There are also 3 new lua functions for this:
As a result, you could also set the status in any other SAM script. So you could have a custom quest that shuts down all SAMs for a limited amount if time, for example.
- NumNonPlayerTeamInSector(sSectorX, sSectorY, team) returns the number of team members (non-player-team-only) in a sector.
- GetSamSiteHackStatus(sSectorX, sSectorY) returns the hack status of a SAM in a sector (if there is no SAM, return 0).
- SetSamSiteHackStatus(sSectorX, sSectorY, status) sets the hack status of a SAM.
As SAM site repair costs quite a bit of time and money, this could be a viable alternative in shutting down enemy air defense without taking the SAM by force. Coupled with covert operations, this allows you to once more play James Bond, I guess.
This feature is not optional. I refuse to add a secondary xml just for that. If you want the old system, it's still in the xml, just comment the old settings in and the new ones out.
This does not break savegame compatibility.
This has been added to the trunk in r8309 & GameDir r2343.
[Updated on: Thu, 06 October 2016 01:04]
“What are you doing?” Joffrey interrupted him.
“… can’t a man give a few last words for his son to carry?”
“…Who told you your son was making it out of this field alive?”
If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.
Current Time: Mon Aug 20 06:36:35 EEST 2018
Total time taken to generate the page: 0.01211 seconds