Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: BookBurner on August 20, 2017, 03:54:11 AM

Title: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: BookBurner on August 20, 2017, 03:54:11 AM
ELECTRIC FENCE

Electric fences have been used as perimeter security measures during the whole span of the 20th century ranging from stun fences to lethal perimeter defense.

This mod aims to do just that :)

Electric fence is connected to you power grid and and the more power the grid has, the more damage the fence does. Injuries ranging from small burns to instant deaths with corpses set on fire by electrical currents.

mod contains:
- electric fence: works as a power conduit that tan be climbed (like sandbags) but does burn damage to anything potentially hostile that might try (animals and neutral factions included) when connected to power
- electric fence gate: gate that can be opened by anyone but that does damage to potentially hostile factions
- plasma version of the fence which has different power calculation which favours large stable power gains
- stun floor panels

mechanics:
fence does damage based on positive power gain in the power grid and on power stored in the batteries in the power grid. The more power stored in the grid, the more efficient the fence is.

Steam link:
http://steamcommunity.com/sharedfiles/filedetails/?id=1103101448

Dropbox
https://www.dropbox.com/s/pzkw3fwkpcxxfnd/ElectricFence.rar?dl=0

Known bugs
- missing dynamic pathing (enemies go directly for the gate)
- fence gate does not align with fence (sandbag problem)
- insects from infestation are not affected by the fence


DICKBUTT

dickbutt, no other explanation needed :)
advanced intelligence critter that can be found in arid, tropic and temperate biomes. Can be bought from traders and provides 200 units of meat while hunted or slaughtered.

ancient dickbutt
bigger and stronger version of dickbutt with manhunter pack possibility

pet stone
slow, eats a lot, sheds it's shell every day in form of raw limestone

both dickbutt versions lay bricks over time and can be sheared for some steel.

Steam link:
http://steamcommunity.com/sharedfiles/filedetails/?id=1128770769

Dropbox
https://www.dropbox.com/s/mdpkcjq3jwphp5i/dickbutt.rar?dl=0


CHEMICAL WASTE DISPOSAL

Break anything you don't need into chemical compounds. Can be used as a good form of waste disposal.

Produce Steel, Neutroamine, Uranium and other stuff from chemical compounds.

Contains:
- chemical power plant produces power from chemical compounds
- chemical synthesizer dissolves stuff into chemical compounds and allows producing useful resources
- chemical launcher, weapon which causes chemical burns
- chemical compound post-processing into ionic particle mass
- production of synthread, hyperweave and three new fabrics from ionic particle mass (one of the pictures shows the differences)

Steam link:
http://steamcommunity.com/sharedfiles/filedetails/?id=1121259411

Dropbox
https://www.dropbox.com/s/9tj60qe8b4is0l9/Chemical_plant.rar?dl=0
Title: Re: [a17] Simple electric fence
Post by: faltonico on August 20, 2017, 05:02:27 AM
Thank you for finally posting it here!
The dropbox link is not for the download but for dropbox's home page xD
Title: Re: [a17] Simple electric fence
Post by: Canute on August 20, 2017, 06:11:56 AM
Interesting concept, i didn't used it yet but i think it could be a bit to powerful.

How does the enemies react on these fences ? Does they try to destroy/set on fire them when no friendlies are on range, like wall/door or plants ?
Title: Re: [a17] Simple electric fence
Post by: BookBurner on August 20, 2017, 09:54:27 AM
Quote from: faltonico on August 20, 2017, 05:02:27 AM
Thank you for finally posting it here!
The dropbox link is not for the download but for dropbox's home page xD

my bad, link fixed :D
Title: Re: [a17] Simple electric fence
Post by: BookBurner on August 20, 2017, 10:00:04 AM
Quote from: Canute on August 20, 2017, 06:11:56 AM
Interesting concept, i didn't used it yet but i think it could be a bit to powerful.

How does the enemies react on these fences ? Does they try to destroy/set on fire them when no friendlies are on range, like wall/door or plants ?

I created the gate passable by anyone, so enemies and animals try to pass through it by using fence gate unless it is on fire or something. Fence itself has quite low HP and it burns.

Formula for damage can lead to instant kills if user has large power gain in the grid and more than 10k stored power. But since every hit drains maximum of 1k power from the batteries, it can deplete your power reserves quickly and then it does only limited damage based on the steady power gain. From my experience, in large raids, it kills 10 - 14 people and then they pass through relatively unharmed. Either the fence depleted my power reserves or burned itself down. (large damage done by the fence leads to fire which has to be extinguished).

Also, long fences around bases are not that practical since animals trigger it quite often, leading to constant state of empty batteries.
Title: Re: [a17] Simple electric fence
Post by: Canute on August 20, 2017, 12:24:55 PM
Quotemore than 10k stored power.
Ah ok battery.
But what happen when i don't use batteries. But got 10k surplus power ?
Unlimted dead strikes ?
Title: Re: [a17] Simple electric fence
Post by: BookBurner on August 20, 2017, 02:08:09 PM
Quote from: Canute on August 20, 2017, 12:24:55 PM
Quotemore than 10k stored power.
Ah ok battery.
But what happen when i don't use batteries. But got 10k surplus power ?
Unlimted dead strikes ?

Well, lets calculate damage for a case 10k power gain and 10k power stored, we will ignore the power gain to the batteries between hits

formula is like this:

Pg = positive gain of power in the grid
Psb = power stored in batteries

damage = (Pg/1000) * (Psb / 1000) + (Psb(max 10k power) / 100)

fence hit drains 1k battery power if it can

1. hit = 10 * 10 + 100 = 200 dmg
2. hit = 10 * 9 + 90 = 180 dmg
3. hit = 10 * 8 + 80 = 160 dmg
4. hit = 10 * 7 + 70 = 140 dmg
5. hit = 10 * 6 + 60 = 120 dmg
6. hit = 10 * 5 + 50 = 100 dmg (still enough to burn off limbs and so on)
7. hit = 10 * 4 + 40 = 80 dmg
8. hit = 10 * 3 + 30 = 60 dmg
9. hit = 10 * 2 + 20 = 40 dmg (below this the injuries are not severe enough to stop human pawn)
10. hit = 10 * 1 + 10 = 20 dmg

other hits without stored power

hit = 10 * 1 + 0 = 10 dmg
Title: Re: [a17] Simple electric fence
Post by: Canute on August 20, 2017, 03:58:37 PM
Ok, no batteries no damage. :-(

I think you should modify it a bit to take in count a power system without batteries.
damage = pg/1000 * 100  + Psb(max 1k power) / 1000 *100

no damage when pg is below 1000 and Psb is 0.
Title: Re: [a17] Simple electric fence
Post by: BookBurner on August 21, 2017, 03:58:30 AM
Well, that is doable for sure, but with the case mentioned it would do damage with ranges

100 -> 200, never going below (I used the formula you mentioned).

wouldn't that be OP?

But you gave me an idea. What about having two type of fences, one which works as designed by me, using battery power and second with different visuals which is stronger (more damage from Pg, less added damage from Psb but less power drain from batts as well) but perhaps more complicated meaning slightly less HP? Meaning more solid damage, but higher chance of fence breaking and allowing enemies to pass through during bigger raids.
Title: Re: [a17] Simple electric fence
Post by: Canute on August 21, 2017, 06:51:57 AM
Yep my formula is to bad, not balanced at last.
I just wanted create something that give a damage from the surplus power + extra damage from stored power.
200 damage is OP anyway, even the best other traps build with plasteel just  around 100 damage, which is mosttimes enough to kill normal raiders.
I don't know how expierenced you are at moding, but since you use a .dll you shouldn't be a simple xml modder ! :-)
What do you think to limit the fence damage to 100. When the surplus power isn't enough to reach the damage, it will use stored power to reach the maximum.

Title: Re: [a17] Simple electric fence
Post by: BookBurner on August 22, 2017, 01:09:03 PM
okey, new version released, with plasma fences and stun floor panels, enjoy :)
Title: Re: [a17] Not so simple electric fence
Post by: kaptain_kavern on August 22, 2017, 02:00:13 PM
Now you got me really intrigued :p

Thanks for your work
Title: Re: [a17] Not so simple electric fence
Post by: BookBurner on August 24, 2017, 04:17:45 AM
I repost the same problem I have with my mod at the moment. If anyone here has more experiences with C# coding of rimworld mods than I have :)

Hi, I am writing a trap mod which has several kinds of traps and one generic function for deciding which pawn can be hit by it or not. I have issues with method which decides this. Function is as follows.

public static bool CoreKnowsOfTrap (Pawn p, Faction f)
{
    Lord lord = p.GetLord ();
    if (p != null && p.def.race.Animal && p.Faction == Faction.OfPlayer && !p.InAggroMentalState) { // tamed animals
        return true;
    } else if (p != null && p.def.race.Animal && lord != null) { // caravan animals
        return true;
    } else if (p != null && p.def.race.Animal) {
        return false;
    }
    if (p.guest != null && lord != null && (lord.LordJob is LordJob_FormAndSendCaravan || lord.LordJob is LordJob_AssistColony || lord.LordJob is LordJob_VisitColony)) { // caravans, friendlies, visitors
        return true;
    }
    if (p.guest != null && p.guest.released) { // released prisoners
        return true;
    }
    if (p.guest != null && p.guest.IsPrisoner && !p.guest.PrisonerIsSecure && !p.guest.released) { // escaping prisoners
        return false;
    }
    if (p.Faction != null && !p.Faction.HostileTo (f)) { // non hostiles
        return true;
    }
    if (p.Faction.IsPlayer && p.RaceProps.Humanlike) { // player humanlike pawns
        return true;
    }

    return false;
}


and usage is here:

private bool KnowsOfTrapFence (Pawn p)
{
    return fenceCore.CoreKnowsOfTrap (p, base.Faction);
}



pawn is the pawn thet is on the trap, base.faction is a faction of trap (basically player faction)

I have a problem with released prisoners, they are not hostile but they are still hit by the trap and I can't wrap my head around how to differenciate released prisoner from escaped prisoner. So escaped prisoner is killed by trap but released prisoner isn't.

same thing with animals from infestations, I wasn't able to designate those as hostiles for the trap either.

Anyone solved something like this? Google is unfortunately silent... :)
Title: Re: [a17] Not so simple electric fence
Post by: BookBurner on August 29, 2017, 06:32:16 AM
updated script to allow passage for released prisoners
Title: Re: [a17] Not so simple electric fence
Post by: ColtSub on December 28, 2017, 01:10:37 AM
B18 Link - http://lttlword.ru/rimworld-mod-not-so-simple-electric-fence
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: BookBurner on January 28, 2018, 03:33:16 AM
links updated to B18 version
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: blizzardwolf420 on January 28, 2018, 04:54:59 AM
oooooo this is neat time to make a POW camp lol. illl test this with rimatomics and see just how powerfull i can make it lol.
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: Canute on February 02, 2018, 03:30:42 AM
Hi,
i finaly tryed out your chemical waste disposal mod.
For a pure XML mod, great idea.
But overall not the best solution.
- The workbench got a quality, not realy needed. And i think it should need some power need, special since it is glowing (ok it comes maybe from chemical light).
- 1 item to get 1 chemical doesn't matter if 1 piece of meat or 1 doomsday launcher.
You need to differ that more.
Food/corpse: with nutri : 5 nutri -> 1 chemical
Anorganic: with kg, 5kg -> chemical

- With B18 and chemfuel generator maybe you should remove your chemical generator and patch the chemfuel generator to use chemicals too. Or maybe improve the convert ratio of chemfuel 20 to 2 isn't worth it.

But i think some things, special the chemical production isn't easyly to improve with pure XML or would require alot of recipes.
Currently it is better to salvage/smelt stuff and convert resources into chemicals.
1 chunk give 1 chemical, 1 chunk give 20 blocks that give 20 chemical.
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: billyma6 on March 06, 2018, 12:29:48 AM
Hey, so I loaded up a world with plasma fences already set up, and this error showed up.

Could not get load IDs list. We're asking for something which was never added during LoadingVars. pathRelToParent=/testees, parent=Plasma_fence2543442
Verse.Log:Error(String)
Verse.LoadIDsWantedBank:TakeList(String, IExposable)
Verse.CrossRefHandler:TakeResolvedRefList(String, IExposable)
Verse.CrossRefHandler:TakeResolvedRefList(String)
Verse.Scribe_Collections:Look(List`1&, Boolean, String, LookMode, Object[])
Verse.Scribe_Collections:Look(List`1&, String, LookMode, Object[])
ElectricFence.Building_p_fence:ExposeData()
Verse.CrossRefHandler:ResolveAllCrossReferences()
Verse.ScribeLoader:FinalizeLoading()
Verse.Game:LoadGame()
Verse.SavedGameLoader:LoadGameFromSaveFile(String)
Verse.Root_Play:<Start>m__0()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.LongEventHandler:<UpdateCurrentAsynchronousEvent>m__1()

For some reason it won't let me publish logs so :\
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: Canute on March 06, 2018, 03:14:35 AM
billyma6,
hugslib got updated because of the publishing logs.
And there is still the original rimworld output_log.txt :-)
Title: Re: [b18] BookBurner's mods (electric fence, chemical waste disposal, dickbutt)
Post by: SunSeeker on April 24, 2019, 02:15:45 PM
I miss the eletric fence...

any chance for it get updated?