In particular, crashes and stuff happening since projectiles like the SSG meat hook must not be modified via any external sources. To make it easier, just about everything is going to inherit from several base classes: DE_Actor, DE_Weapon and a few others so identification is easy.ToxicFrog wrote: What specific compatibility concerns do you have? How does the akimbo weapon system work in DE4D?
Yeah, those are good ways to handle that, and indeed, DE4D will avoid using inventory items where possible because I've learned that greatly increases the tick processing on player classes when compounded. On top of that, avoiding death exit resets with upgrades is my #1 concern, which I had to introduce a massive hack in D4D (it's predecessor) that has to give all the upgrade inventory items again, but with this new way, it won't be needed since it's all maintained by a static event handler.ToxicFrog wrote:The way Bonsai works is, all the upgrades are non-actor classes; they're matched up with weapons by actor pointer and secondarily by actor type (so they can be reassigned to a new weapon of the same type if the old vanishes, e.g. if the player drops it), but don't directly modify the weapons at all. They're all carried around in a single inventory item (TFLV_PerPlayerStats) that also holds the ModifyDamage handlers and some other bookkeeping stuff. Effects trigger on damage dealt/received or on kill and are triggered by ModifyDamage or by WorldThingDamaged events captured by a StaticEventHandler.
The main issues I've seen with other mods that have upgrade systems is when the upgrade is a different actor type than the base item -- e.g. DRLA's assembles or Ashes Afterglow's upgraded weapons are different actors, so they lose all the upgrades the original had. But it sounds like that's not how DE4D handles things.
Come to think of it, having a special Service class so it can gather all the information on what to blacklist would be easier than making a parser by far. It was invented for that very reason after all.ToxicFrog wrote:All that said, I think your idea of having an lump that other mods can provide that carries compatibility information is a great one -- Bonsai doesn't currently support anything like that but it would be a good idea, both as a way for other mods to non-intrusively add compatibility tweaks and as a way for Bonsai itself to easily contain a list of such tweaks for other mods. I don't think that'll make it into 0.8.4, but it's on my TODO list now.
Off the top of my head, features it should probably have include:
- disable all upgrades for a given weapon
- disable specific upgrades for a given weapon
- treat a list of different weapons as equivalent
- force a weapon to be treated as melee/hitscan/projectile, bypassing the normal detection mechanism
- globally disable certain upgrades if a given mod is detected (e.g. Juggler is incompatible with Hellrider, so just turn it off entirely if Hellrider is loaded)
So if you create a ServiceIterator that searches for, say... "BonsaiBlacklist" named services, you could then iterate GetString until it returns an empty string and save the results. Or split it based on specific characters in a string.
So all the modder would have to do is something like this:
Code: Select all
Class DE_BonsaiBlacklistService : Service
{
override String GetString(String request, String stringArg, int index, double doubleArg, Object objectArg)
{
if (request ~== "Weapons")
{
Switch(index)
{
Default: return "";
Case 0: return "DE_AkimboSystem";
Case 1: return "DE_LegendaryShotgun";
Case 2: return "DE_LegendarySSG";
}
}
return "";
}
}
Code: Select all
Class DE_BonsaiBlacklistService : Service
{
override String GetString(String request, String stringArg, int index, double doubleArg, Object objectArg)
{
if (request ~== "Weapons")
{
return "DE_WeaponBase|parent";
}
}
}
In fact, the upgrade system in DE4D is utilizing service classes to define new upgrades similar to the idea above, but adapted a bit to also using the LANGUAGE file for easy definition and creation of upgrades.
And I look forward to letting folks try it when the time is ripe!ToxicFrog wrote:I'm also looking forward to playing DE4D! I didn't really like Doom Eternal but my complaints were mostly about the level design, not the gun mechanics.