RimWorld

RimWorld

Combat Extended Propellant
32 Comments
Azuraal  [author] 10 Nov, 2024 @ 2:00pm 
@5150 Something broke while processing recipe defs, so it's "mostly" harmless. It's probably due to another mod that adds CE ammo of its own. I will add appripriate null checks.
5150 10 Nov, 2024 @ 12:14pm 
https://gist.github.com/HugsLibRecordKeeper/26fa1794253f90e2d65ab6d63b231490

Error in static constructor of Propellant.AmmoProcessor: System.TypeInitializationException: The type initializer for 'Propellant.AmmoProcessor' threw an exception. ---> System.NullReferenceException: Object reference not set to an instance of an object


I’m reporting this log just in case, though it seems like a harmless error for gameplay.
Jackledead 9 Nov, 2024 @ 1:55pm 
@flamangos use Resource Dictionary mod to make it do that
Azuraal  [author] 3 Nov, 2024 @ 8:49am 
I decided to play with CE some more, so I went back to this mod and rewrote the patching in C# rather than relying on XML extensions. For now it covers (almost) everything that the previous version had.

The current plan is to:
- Add an option to automatically calculate appropriate market value based on the patched ingredient count and value.
- Add an option to adjust the factors for individual ammo set types (AP, HP, AP-I etc.)
JasonGriffin 17 Aug, 2024 @ 12:35pm 
@Azuraal would it be possible to add in the functionality from combat extended important ammo to this mod? I love that there's a slider for costs, but not a way to make it more expensive for AP vs HP ammo. I'd like to make it more difficult for better ammo
Flamangos 15 Aug, 2024 @ 10:48am 
Does this work with medieval overhauls gunpowder?
Azuraal  [author] 7 Aug, 2024 @ 6:47am 
I have not noticed that, but I generally abstained from mods that added new guns, especially multiple such mods. However, there is not much I can do about it. The patch operation doesn't try to do anything fancy, just go over every ammo recipedef and make the adjustments.

Rewriting the mod in C# rather than using XML Extensions would probably make the startup processing faster, but I no longer use CE and so lack the motivation to rewrite a mod I will not be using.
Dealer Mangan 6 Aug, 2024 @ 10:28am 
This mod increases start up time very significantly with every mod that adds more weapons to the game. The process patching adds about 50% of time compared to what combat extending patching takes.
Vikhar 10 Jul, 2024 @ 5:37am 
YOU ARE A LEGEND AND A PILLAR OF YOUR COMMUNITY.
i spent along time figuring out why it wasnt working. it was Vanilla factions expanded settlers, that is now incompatable after 1.5. i dont use it anymore but figured id let folk know
Azuraal  [author] 8 Jul, 2024 @ 6:58am 
Uh, I appreciate the enthusiasm for my mod if nothing else.
The mod is now updated, no changes were really needed, I just verified it still works as intended.
I stopped using CE a while ago, so I missed it got updated finally.
Vikhar 8 Jul, 2024 @ 1:47am 
pleeaasse update, is best mod ever bro i tellakeneticlly sukie sukie if you updater moder
Evyatar 19 Feb, 2024 @ 2:02am 
@OssomUmbra I created a patch for this mod that replaces the recipe with new recipes that use Gunpowder/FSX/Prometheum

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3163993651
Azuraal  [author] 3 Feb, 2024 @ 12:53am 
@OssomUmbra When designing this mod, I specifically did not want propellant to be made from chemfuel (If made for FSX it would be indirectly made from chemfuel) to make it so you can't fire your guns with whatever leftover organic garbage you have laying around. It has to be more intentional.

I would also like to point out that one of the primary ingredients of modern smokeless powder is still nitrocellulose, also known as guncotton.
OssomUmbra 1 Feb, 2024 @ 3:31am 
Requesting an optional setting for FSX to be used to make propellant on the machining bench, basically using it to make grains of propellant.

The reason is so that i can migrate to more modern propellant sources after i research enough :D
Asian 14 Mar, 2023 @ 4:02pm 
I am having an issue where sieges don't drop mortar shells for the raiders to use. I think it is a compatibility issue with Combat Extended Important Ammo, but I'm not 100% sure.
Azuraal  [author] 2 Jan, 2023 @ 3:03am 
@PraetorNZ It's updated now.
PraetorNZ 1 Jan, 2023 @ 10:12pm 
Getting 2 red orrors now, CE have changed their name for gunpowder research to CE_gunpowder so the research prerequisite will need to be updated in the propellant file too
PraetorNZ 14 Dec, 2022 @ 8:58am 
Yea in the Astartes mod theres a couple of plasma ammo recipes that dont use steel. ill add it to them and see what happens. cheers
Azuraal  [author] 14 Dec, 2022 @ 2:49am 
@PraetorNZ Do you use any mods that adds its own CE ammo, or mods that change CE ammo recipes?
It appears that my mod came across an ammo recipe that doesn't require steel, which is not a case in any base CE ammo, and given that amount of propellant added is dependant on that value I don't have a clean solution other than skip over such recipes.
So if it's an incompatibility I may add an appropriate logic to handle that.
PraetorNZ 13 Dec, 2022 @ 11:03pm 
Getting this error out of the ammopatch file

[Combat Extended Propellant - Start of stack trace]
XmlExtensions.CreateVariable(storeIn='SteelCount', value='Defs/RecipeDef[1442]/ingredients/li[filter/thingDefs/li/text()="Steel"]/count', value2='0.5'): Failed to find a node referenced by <value>
XmlExtensions.UseSetting(key='PropellantFactor', defaultValue='0.5'): Error in <apply> in the operation at position=1
XmlExtensions.ForEach(AmmoRecipe='Defs/RecipeDef[1442]', xpath='Defs/RecipeDef[not(@Abstract)][@ParentName="AmmoRecipeBase" or @ParentName="AdvancedAmmoRecipeBase" or @ParentName="LauncherAmmoRecipeBase"]'): Error in <apply> in the operation at position=4
[End of stack trace]
The top operation is the one that failed, the ones below it are the parents
Source file: D:\Steam\steamapps\workshop\content\294100\2809627357\Patches\AmmoPatch.xml
Azuraal  [author] 8 Dec, 2022 @ 3:04pm 
@[lol] vlad-lecteur Thanks, but for this mod I'm relying on XML Extensions alone.

Actually scaling the stocks is no issue. The problem, as well as the source of hundreds of shells being causully taken by caravan, is that heavy ammo can be generated by the standard ammo stock generator (rifle and pistol rounds, not mortar shells). I think that is a bug and I know what causes it, but fixing it causes the game to not generate HeavyAmmo stock at all.
I will need time to figure it out, or maybe somoene from the CE Team to get a look at my bug report.
lol 8 Dec, 2022 @ 1:43pm 
Combat Extended Important Ammo has some code regarding caravan stocks, could be worth a look https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2895478795

Having an options setting for stocks would be fantastic indeed
Azuraal  [author] 8 Dec, 2022 @ 12:43pm 
After having a caravan arrive carrying $70 000 worth of shells, I'm working on adding settings for managing trade stocks.
Deep♂Dark 1 Dec, 2022 @ 3:53am 
Cheer!:steamthumbsup:
Azuraal  [author] 1 Dec, 2022 @ 2:29am 
@Deep♂Dark I've been mulling over adding mod settings to adjust ammo recipes and will probably do so in the near future.
Deep♂Dark 30 Nov, 2022 @ 5:55pm 
Great mod ! CE always annoying me with their easy crafting ammo....:steamhappy:
e.g 36 metal for 200 rounds compare to yayo combat 135 metal for 200 rounds :steamsad:
Thank you !

btw. is that possible to adjust CE ammo recipe to increase metal needed ?
lol 21 Nov, 2022 @ 8:23am 
Thanks, will try.

If you haven't seen, here's another mod making similar patches, seems like not further supported: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2618721840 . In case you find any ideas interesting.
Azuraal  [author] 21 Nov, 2022 @ 8:12am 
@lol Yes, there should be no issues. Just don't add it on a save made in the middle of ammo is being crafted.
lol 21 Nov, 2022 @ 8:03am 
Hey, thanks for the mod. Is it safe to try on an ongoing game?
Mike12096 13 Aug, 2022 @ 1:38pm 
Sorry I forgot I have Combat Extended from their Github instead of here.
Azuraal  [author] 10 Aug, 2022 @ 3:09pm 
@Mike12096 No errors or warning are generated on my end, the issue has to be with your load order.
Mike12096 10 Aug, 2022 @ 2:42pm 
Hey man, love the mod but it seems like you missed two errors: XmlExtensions.PatchOperationMath(xpath='Defs/RecipeDef[1347]/workAmount', value='2'): Failed to find a node referenced by <xpath>
XmlExtensions.ForEach(AmmoRecipe='Defs/RecipeDef[1347]', xpath='Defs/RecipeDef[not(@Abstract)][@ParentName="AmmoRecipeBase" or @ParentName="AdvancedAmmoRecipeBase" or @ParentName="LauncherAmmoRecipeBase"]'): Error in <apply> in the operation at position=1

and

[Combat Extended Propellant] Patch operation XmlExtensions.ForEach failed
file: E:\Games\Steam\steamapps\workshop\content\294100\2809627357\Patches\AmmoPatch.xml