[A15] Firefoam Mortar v1.6 - Extinguish fires from afar! (08-09-2016)

Started by Master Bucketsmith, August 11, 2016, 11:20:59 AM

Previous topic - Next topic

Master Bucketsmith



Download link: https://www.dropbox.com/s/1qgtqlgnnnnpvvs/A15%20MBS%20Firefoam%20Solutions%20v1.6.7z?dl=1
Steam Workshop link: http://steamcommunity.com/sharedfiles/filedetails/?id=742216502

Description:
Adds a mannable mortar that requires craftable foam shell ammo and extinguishes fires from afar.
Upon detonation of the shell, it extinguishes fire in a medium radius.

Mortar:   
Required research: Mortars, Firefoam
Cost to make: 250 stuff, 100 steel, 5 components

Foam shells (bill at machining table):
Required research: Machining
Cost to make 1 shell: 10 steel

Compatibility:
Should have no compatibility issues with savegames and other mods.

Current issues:
- Targeting logic of a vanilla mortar is still in place. If you have a pawn still manning this mortar, it will target and fire at hostile creatures and pawns. I am not skilled in C# to change that behavior, I'm afraid. On the other hand, I wouldn't expect any player to use this mortar during raids unless they specifically want to put out a fire with it.
Alternatively, if you're also firing incendiary mortar shells at a target, this one could instantly take out the fire right after.

Credits:
- Ludeon Studios for the game and assets on which this mod is based
- Seikikai for making his thread. I didn't use his code, but I did use his wonderful idea and started work on his request!
- Reviire for making the code for the projectile and important advice

Short version of license:

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
"You can do nearly everything you want, but must credit the original author and redistribute it under the same license."
I'd totally wanna know what you made and how my work might have helped you! ;D

Changelog:
Version 1.6
   - Removed CCL dependancy & features (shellmaking no longer requires firefoam researched)
   - Reverted stuff cost to allow players different options in resources (250 stuff, 100 steel, 5 components)
   - Removed fixed UI icon to easily show which material is selected (this is why it only shows the base)
   - Various small tweaks and fixes
Version 1.5
   - Removed stuff cost to mortar, now costs 350 steel instead of 100 stuff + 250 steel (plus 5 components)
   - Added custom texture for the mortar base
   - Fixed minor glitch on the shell texture
   - Added icon for the architect bar
Version 1.4
   - Defined base Defs where needed. I learned something! :D
Version 1.3
   - Tweaked some values, changed colour scheme to something more fitting a fire extenguisher. Silly me! ;D
Version 1.2
   - Added craftable shells, imagery and uploaded to Steam Workshop
Version 1.1
   - Minor bug fixes and added custom texture for turret
Version 1.0
   - Initial release

Screenshots:


Master Bucketsmith

#1
To-Do:

- My first mod attempt! ;D ;D
  Please provide feedback! If it works for you, if it doesn't work for you. If you feel it is too costly, or too cheap. Or if you feel it fires too quickly or the radius of extinguish is too large. Any feedback is appreciated!

- Find out if it would be possible to make a more expensive automated version!

- Look at options for fire extinguishers and a 'sprinkler' system

Etherdreamer

I think 5 components it´s to much cause other more complicated stuff it´s just 1-3 components, unless you know, the mortar it´s automatic.

Also some screenshots or videos can help people watch how useful this can be.

Jdalt40

8 components in Rimworld is used to make a tv, so I don't think it is too much

Master Bucketsmith

Screenshots are coming! I was fiendishly working on the ammunition, am having some issues getting it craftable on the machining table.

The cost is actually 100 stuff, 250 steel, 5 components for the mortar.
I didn't figure out why it would cost 350 steel in-game until I realised it has a part stuff cost.
No idea if using other stuff changes important values to the firing mechanism or just cosmetics/fire resistance/market value etc.

The mortar resembles a very easy and no-risk way of extinguishing those big fires anywhere on the map. Even though the mortar (and shells in the near future) are really simple tech, they significantly alter the risk management of dealing with fire.
So I thought those 5 components for the mortar feels like a decent way to make the mortar not too easily available early and midgame, yet not too expensive.
The requirement of making and using the shells will also change how that feels, so I'll need feedback on that once it's done. :)

SpaceDorf

Awesome Idea.

Its always the hardest thing, to come up with a simple, userfriendly and logic solution to a problem :)

Now your next project should be a small fire-foam turret for indoors :)
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

Brrainz


Justas love

Wow, any way for you to make a fire extinguisher and make this into a mod list?

Master Bucketsmith

#8
Quote from: SpaceDorf on August 13, 2016, 08:58:12 AM
Awesome Idea.

Its always the hardest thing, to come up with a simple, userfriendly and logic solution to a problem :)

Now your next project should be a small fire-foam turret for indoors :)
Well, I've had an idea like this way back during A9/A10 when firefoam wasn't even a thing, but I didn't think it up this time. As my credits tell, I simply put in some of the work. :) Thank you though!

Quote from: pardeike on August 13, 2016, 09:02:28 AM
Awesome mod!!
Thanks man :)

Quote from: Justas love on August 13, 2016, 01:01:30 PM
Wow, any way for you to make a fire extinguisher and make this into a mod list?
You mean a short range weapon that would make beating fires out less of a danger?
I'd have to look into that. I think that requires some C# magic, which I'm not trained in. :D

P.S.: I've got an update coming in.

chaotix14

Quote from: Bucketsmith on August 13, 2016, 01:54:51 PM
Quote from: Justas love on August 13, 2016, 01:01:30 PM
Wow, any way for you to make a fire extinguisher and make this into a mod list?
You mean a short range weapon that would make beating fires out less of a danger?
I'd have to look into that. I think that requires some C# magic, which I'm not trained in. :D

P.S.: I've got an update coming in.

Just use one of the launchers or perhaps even just the grenade as a base for the weapon and give it's projectile a downscaled version of your explosion. That should do the trick in making a handheld version. I would make it for my own mod, but I don't like stealing ideas and it would fit better in your mod.

Master Bucketsmith

Quote from: chaotix14 on August 13, 2016, 02:35:50 PM
Just use one of the launchers or perhaps even just the grenade as a base for the weapon and give it's projectile a downscaled version of your explosion. That should do the trick in making a handheld version. I would make it for my own mod, but I don't like stealing ideas and it would fit better in your mod.
There's already some mods out there like that. Most are outdated. Though I'm sure I've seen firefoam grenades somewhere...
The main problem I can think of is how are you going to make your pawns switch to that fire extinguisher 'weapon' when they go on their fire-beating job?

I've pushed my update, btw. Nice red & white colour scheme now. :D I had made a texture for the base, but the game adds a weird darkening effect to mortar and turret bases so that it would always come out a dark red and dull grey. I can't find a way to get rid of it.

Justas love

there is a mod, it has a fire extinguisher and an ice turret that extinguishes fires. im pretty sure you can use the code because it's outdated

https://ludeon.com/forums/index.php?topic=11988.0

chaotix14

Quote from: Bucketsmith on August 13, 2016, 04:58:18 PM
There's already some mods out there like that. Most are outdated. Though I'm sure I've seen firefoam grenades somewhere...
The main problem I can think of is how are you going to make your pawns switch to that fire extinguisher 'weapon' when they go on their fire-beating job?

I've pushed my update, btw. Nice red & white colour scheme now. :D I had made a texture for the base, but the game adds a weird darkening effect to mortar and turret bases so that it would always come out a dark red and dull grey. I can't find a way to get rid of it.

Yeah, making them automatically use the fire extinguisher when fire fighting would most likely require C# coding, but you can always use it manually like the mortar.

Master Bucketsmith

Quote from: Justas love on August 13, 2016, 05:35:32 PM
there is a mod, it has a fire extinguisher and an ice turret that extinguishes fires. im pretty sure you can use the code because it's outdated

https://ludeon.com/forums/index.php?topic=11988.0
What exactly are you guys looking for? The extinguisher and/or the extinguishing turret?

The turret/pump sounds kind of OP. The vanilla Firefoam popper is a similar solution to that. You need to manually trigger it or let it explode.
If I were to look for a more automated system I'd think of a more complex thing; a sprinkler system with firefoam. XD
'Course, that would require a lot more magic voodoo. ::)

Master Bucketsmith

Quick update. Learned that any place that references "parentName=X" requires the parent to be defined within the mod somewhere. Even if it's vanilla stuff.
Apparently even if your mod runs fine, not defining parents can cause a lot of trouble for other mods or the core game in general.
So with this update, it should cause less trouble if there was any, it might solve some issues in some cases.

I can't imagine any of the updates I've done so far to be savegame breaking, but let me know if you have a suspicion my mod is wonky!