[A14] Skullywags Defensive mods - Shields, Fortifications, Armour, BlastCharges

Started by skullywag, June 28, 2015, 01:43:56 PM

Previous topic - Next topic

skullywag

Skullywags Defensive Mods

Here are some defensive themed mods, click the images to download from my github:


Adds defence emplacements that use personal shields to produce a larger shield that can stop incoming projectiles, changes size as power levels change.


Simple walls you can fire from within.


Craftable shields that have a chance based on melee skill to stop damage at the cost of their hitpoints, kite shield has more hitpoints but slows pawns down more than the buckler. Currently allows firing if youre carrying a valid sidearm. Melee works as well. To add a mod weapon to be used as a valid sidearm just add a weapon tag as so:
<weaponTags>
      <li>MedievalShields_ValidSidearm</li>
    </weaponTags>



A personal shield that allows firing from within, slightly slower to charge and less capacity than a normal shield. Can be repaired at the machinist table at the cost of uranium (this actually just creates a new one so you can reroll quality, this may need balancing).


Power armour that is just slightly better than the vanilla one, repairable for plasteel as per the shield above.


Allows you to repair power armour and personal shields, repairing is a reroll of quality using the item as an ingredient (its a little tricky to manage this i know), costs plasteel for the armour and uranium for the shield.

I need feedback, especially on the MedievalShields. Theres a lot I can do with them, I wont explain the algorithm just yet I want to see what people think first.

License - You may do whatever you want with the code in my mods, except for straight updating it (leave that to me please) as long as you dont use it to make money in any way shape or form. This includes taking donations. Modpack owners I require a PM to request inclusion. Art within my mods may not be used without consent, some of the art was not done by me so PM me first.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Cefwyn

I like the idea of medival shields - any way you can restrict them for use with 1h weapons only though? That might make me use pistols and such more often.

skullywag

yeah thats on my list, its doable, just not easy, as the moment you add a mod weapon I have no way of knowing it its a 1 handed or a 2 handed weapon.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

CyborgDragon

So I made a mini-mod to give these to Norbals and Pirates, and I noticed that when equipped by anyone other than colonists, they appear as magenta squares.


skullywag

reaaaaalllly...thats weird...looking into it...

Can i see the mod files, there shouldnt be anything wrong with this. you did copy the textures into your mod? got any log files?
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

CyborgDragon

The mod is just overwrites for some of the PawnKindDefs for Norbals and Pirates, adding Shield to their lists of allowed apparel, and I'm using EdB Mod Order to ensure it's loaded after both the new factions and MedievalShields. I'll try adding the textures to it, but there's no error in the log when they appear.

I've attached a zip of the mod.

Edit: Tried adding the textures, didn't work. But I found out something, if you save and reload, any dead bodies with the magenta block get the proper shield applied, but the living pawns still have the magenta block. Hope that helps some. It also doesn't appear to be linked to race, seeing as how Norbals are their own race, and Pirates are regular humans, but this bug applies to either.

[attachment deleted due to age]

Shinzy

Tried this aswell (only gave the shield some more apparel tags, spacer, pirate etc.)
spawned in some vanilla spacer mercenaries and my pirates they'd all have the pink square

but only when they spawn with it, I had one in jail equip the shield voluntarily and it showed correctly

tried to spawn some colonists with it but shields ain't made of synthread so they didn't wannoo spawn with one ::)
but it only seems to glitch out on spawn

skullywag

I cant get your mod to load, i get lots of errors in console. Do i need another mod to go with it? its moaning about pirategunner and factions...

oh derp i need pirates...
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

CyborgDragon

Well, the saving/reloading thing I did pointed something else out to me. If you save/reload, your colonists get the magenta block as well. Ordering them to drop and re-equip fixes it. I tested this with only MedievalShield enabled to confirm nothing else might've (somehow) been interfering.

And yeah, the mini-mod I attached earlier needs Norbals and Pirates.

skullywag

hmm looks as though apparel doesnt call spawnSetup if it comes in on a raid...wut! however if i just set the mat (texture) outside that I cant set the colour...or can i....*walks off muttering*
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

skullywag

ok getting somewhere, ive got it somewhat working but having some weirdness with them switching colours when others are picked up, probably left a static or something somewhere, ill try and fix it fully tomorrow afternoon.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

skullywag

Ok i fixed it this morning, as i thought i was doing something derpy. Ill get a fixed version uploaded at some point today, probably lunchtime.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

AllenWL

Uh, what do the medieval shields do exactly?
The others look pretty self-explanatory, but are the shields supposed to block attacks completely, or reduce the damage, or what?

skullywag

So.

Medieval shields block all damage first off at the cost of their own hp. These are a limited use item whereas personal shields recharge.

They currently on absorbing damage check the holders melee skill. Then they roll a random between 0-20 (need to tweak this should be 21 or something shouldnt ever be perfect) if the resulting random is under the holders melee skill another 1 in 5 chance is rolled, if its over 3 the shield absorbs the damage divided by 4. If the random is over the holders melee skill it rolls another 1-5, if its 1 it will half the damage and absorb it. Anything outisde of these parameters will get past the shield and hit the holder.

This is all placeholder but i need feedback to improve it.

For those interested:
https://github.com/Skullywag/MedievalShields/blob/master/Source/MedievalShields/Apparel_Shield.cs
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?