Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Master Bucketsmith on August 11, 2016, 11:20:59 AM

Title: [A15] Firefoam Mortar v1.6 - Extinguish fires from afar! (08-09-2016)
Post by: Master Bucketsmith on August 11, 2016, 11:20:59 AM
(http://i.imgur.com/hc3OoPF.png)

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 (https://ludeon.com/forums/index.php?action=profile;u=56838) for making his thread. (https://ludeon.com/forums/index.php?topic=23232.0) I didn't use his code, but I did use his wonderful idea and started work on his request!
- Reviire (https://ludeon.com/forums/index.php?action=profile;u=51767) for making the code for the projectile and important advice

Short version of license:
(https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png) (http://creativecommons.org/licenses/by-nc-sa/4.0/)
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. (http://creativecommons.org/licenses/by-nc-sa/4.0/)
"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 (https://www.dropbox.com/s/1qgtqlgnnnnpvvs/A15%20MBS%20Firefoam%20Solutions%20v1.6.7z?dl=1)
   - 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 (https://www.dropbox.com/s/i17ild1hvj9co1t/A14%20Firefoam%20Mortar%20v1.5.7z?dl=1)
   - 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 (https://www.dropbox.com/s/b4w968gsp233d46/A14%20Firefoam%20Mortar%20v1.4.7z?dl=1)
   - Defined base Defs where needed. I learned something! :D
Version 1.3 (https://www.dropbox.com/s/xao4xo3m03q8svb/A14%20Firefoam%20Mortar%20v1.3.7z?dl=1)
   - Tweaked some values, changed colour scheme to something more fitting a fire extenguisher. Silly me! ;D
Version 1.2 (https://www.dropbox.com/s/ta2gokqyqmps8af/A14%20Firefoam%20Mortar%20v1.2.7z?dl=1)
   - Added craftable shells, imagery and uploaded to Steam Workshop
Version 1.1 (https://www.dropbox.com/s/q2wzo7e95135ja1/A14%20Firefoam%20Mortar%20v1.1.7z?dl=1)
   - Minor bug fixes and added custom texture for turret
Version 1.0 (https://www.dropbox.com/s/g47cifdakzi3mmz/A14%20Firefoam%20Mortar%20v1.0.7z?dl=1)
   - Initial release

Screenshots:
(http://i.imgur.com/r4fhIOo.jpg) (http://i.imgur.com/r4fhIOo.jpg)(http://i.imgur.com/TPMpn2z.jpg) (http://i.imgur.com/TPMpn2z.jpg)
(http://i.imgur.com/fdOWzEj.jpg) (http://i.imgur.com/fdOWzEj.jpg)(http://i.imgur.com/bfrR3cT.jpg) (http://i.imgur.com/bfrR3cT.jpg)
Title: Re: [A14] Firefoam Mortar v1.2
Post by: Master Bucketsmith on August 11, 2016, 11:21:59 AM
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
Title: Re: [A14] Firefoam Mortar
Post by: Etherdreamer on August 11, 2016, 11:26:36 PM
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.
Title: Re: [A14] Firefoam Mortar
Post by: Jdalt40 on August 12, 2016, 02:22:17 AM
8 components in Rimworld is used to make a tv, so I don't think it is too much
Title: Re: [A14] Firefoam Mortar
Post by: Master Bucketsmith on August 12, 2016, 03:03:27 AM
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. :)
Title: Re: [A14] Firefoam Mortar v1.2
Post by: 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 :)
Title: Re: [A14] Firefoam Mortar v1.2
Post by: Brrainz on August 13, 2016, 09:02:28 AM
Awesome mod!!
Title: Re: [A14] Firefoam Mortar v1.2
Post by: 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?
Title: Re: [A14] Firefoam Mortar v1.2
Post by: Master Bucketsmith on August 13, 2016, 01:54:51 PM
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.
Title: Re: [A14] Firefoam Mortar v1.2
Post by: chaotix14 on August 13, 2016, 02:35:50 PM
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.
Title: Re: [A14] Firefoam Mortar v1.2
Post by: Master Bucketsmith on August 13, 2016, 04:58:18 PM
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.
Title: Re: [A14] Firefoam Mortar v1.3
Post by: 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
Title: Re: [A14] Firefoam Mortar v1.2
Post by: chaotix14 on August 13, 2016, 05:35:57 PM
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.
Title: Re: [A14] Firefoam Mortar v1.3
Post by: Master Bucketsmith on August 13, 2016, 05:53:22 PM
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. ::)
Title: Re: [A14] Firefoam Mortar v1.4
Post by: Master Bucketsmith on August 14, 2016, 10:47:22 AM
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!
Title: Re: [A14] Firefoam Mortar v1.4 - Extinguish fires from afar!
Post by: Master Bucketsmith on August 25, 2016, 03:28:00 PM
Updated to v1.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

Apparently the stuff cost was what was causing issues with the texture for the base. In hindsight very logical, for being able to build it out of different stuff also changes the colour. I had mistaken the steel variation for a default colour. (The vanilla base texture is a tad lighter than it is for even vanilla mortars in-game!)
I came across this bug whilst trying to apply the vanilla mortar base to an iteration of the flare mortar mod, where I was granted a similar mod by someone else to toy with.
I couldn't figure out why it was LIGHTER in-game, whilst the bases for vanilla mortars and turrets is DARKER than what the source file is. Apparently that's just the steel colour variant of the base and having no stuff count shows the actual source file. (It just looks lighter in-game, I think.)

EDIT: Whoops, forgot to add the icon to the architect bar when I wrapped up and uploaded. I need to remember to check EVERYTHING before updating my posts. :)
If you've downloaded v1.5 since it went up and reading this update, and you want the updated icon, just redownload.
Title: Re: [A15] Firefoam Mortar v1.6 - Extinguish fires from afar!
Post by: Master Bucketsmith on September 09, 2016, 08:46:37 AM
Updated to A15 of the game and v1.6 of the mod
Version 1.6 (https://www.dropbox.com/s/1qgtqlgnnnnpvvs/A15%20MBS%20Firefoam%20Solutions%20v1.6.7z?dl=1)
   - 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

Although I learned where the 'issue' with the graphic comes from, I've decided to bring back the stuff cost so that you have more choice in what you build it from.
Subsequently, to allow easier spotting of which material is currently selected in the architect bar, I removed the custom UI icon that would not show those changes.

EDIT: Forgot to mention; dropped requirement/dependency of CCL. I like the features it brings, but I don't like the long wait times on their updates.
Title: Re: [A15] Firefoam Mortar v1.6 - Extinguish fires from afar! (08-09-2016)
Post by: tonsrd on August 08, 2017, 12:29:00 AM
can you update to a17 ?
Title: Re: [A15] Firefoam Mortar v1.6 - Extinguish fires from afar! (08-09-2016)
Post by: LiteEmUp on August 08, 2017, 02:33:04 AM
i have a request if possible: instead of this mortar nothing more than a long range fire extinguisher, give this a secondary ability so it would also be useful in combat...

give this also the option that enemies caught on that foam has movement penalty(maybe 30%) & accuracy penalty(maybe 20%)...


at least this mortar is not about damage, but rather about utility in combat..
Title: Re: [A15] Firefoam Mortar v1.6 - Extinguish fires from afar! (08-09-2016)
Post by: sidfu on September 13, 2017, 10:22:11 PM
here a updated verson that woork with a17.

@ mod author if u dont want to update it ill take over the mod for u.

[attachment deleted by admin: too old]