Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
I'm starting to wonder if maybe I'm being served an older version of the mod from the steam workshop, as looking at Building_Shield.cs I see no mention of drop pods, DropPodIncoming, or any way the code would affect them.
Double edit:
found where the code is supposed to affect the SkyFallers in the Harmony patches. I'm wondering if the utter lack of effect the shields have is an incompatibility with another mod. That said, checking for incoming drop pods (and a timer that keeps the shields up 15 ticks after whatever turned them on has passed) utterly cover the issues with the shield activation through drop pod attacks.
For proper function, either the method of interception needs to be changed or some changes need to be made to the detection of drop pod raids. I'd suggest the former, as the current method also provides no feedback that a raid is occurring or that a drop pod was successfully blocked beyond shield depletion.
Honestly, looking at the implementation of other shield mods I'm not sure the point of the drop-pod process being hooked was a wise choice. Hooking into the process at spawnsetup means you're interrupting the creation process of the pods, which means they never come into being if the shield is capable of stopping them. Which unfortunately messes with raid instantiation and alerts, and causes shields to erase pods from existence rather than block them.
This is also the root of the issue with drop pod raids not being intercepted - the raid doesn't start until the pods are placed, so if the shield turns on in response to the raid it will *never* turn on in time as once they're spawned the shield can't touch them. Looking at other shield mods, it looks like they patch the Tick function for the drop pod that updates their motion and height so that it checks if they're in a shield's zone when they reach a certain height and performs the interaction then. This seems like a sensible way to do things, so I'm having a go at putting together a method like this for my own satisfaction. If there's any interest in merging this into the actual mod (or just having someone more familiar with rimworld glance at my code and steal all the good bits) please contact me and I'll be happy to share.
I literally can't help myself. I have modded pretty much every game I've ever played, maybe this will be one of the tiny handful where my effort goes to some greater use.
It correctly lets pods spawn (and so not interrupting the raid setup so you get a notification), checks them when they get to a certain height, deals damage to the shield, kills the occupants and deletes their inventory, and *then* destroys the pod. I'm working on an IFF check (looping through the pod and checking if any of the contained pawns count as active threats) so you can drop through your own shields and they won't vapourise friendly faction drop pod backup.
I'll also look at some audiovisual feedback and maybe a UI message.
It might be a good idea to have someone else try this out to make sure I'm not ignoring anything. Drop me a message and I'll shoot you a compiled version of the changed code.
If you wanted to take it to the next level, theoretically a shield generator field would interrupt light from the sun, so crops within an activated generator field wouldn't grow as quickly as they are not getting the same light energy as they would be without a generator field - but this is just way out there though and besides the point.
I'm not experienced, but I don't think forcing the drop pods outside of the radius of the generator would be as hard as you make it seem.
Honestly, compared to the implementation that already exists it just sounds painful to create and maintain, and doesn't seem to offer much.
It's not about forcing them outside the radius, and if I were to do that this isn't how I'd do it because working round the issue in XML like that is always going to be slower than doing it in code, it'd be much easier to just scan the radius around the shield generator when it's on and move any incoming pods away rather than messing around with fake roofs. The way they're set up at the moment; however, is that they're supposed to destroy incoming pods the same way they do incoming munitions and I don't want to change that.
This also maintains the game mechanics and balance, shields aren't an "I win" button against drop pod raids jumping into your base, they're a way to mitigate the power of these raids by thinning them out without removing them entirely. The raid still happens, though if you've invested inordinate resources in defending exactly the right point it can be stopped quite quickly.
Shields are only on during raids, unless you're being raided for a week at a time and have the power supply to keep your shields up that whole time (and also don't just turn them off) it'd never be an issue.
Besides, I've already got it written the neat C#-only way now and I'm 99% sure it works consistently like it was originally intended, which was my aim.
Okay, i'm just concerned that mod devs focused on writing new mods, and that can take a while...guess i'm just will use Frontier Shields