[MOD 0.13.x] Advanced Personal Defense

Topics and discussion about specific mods
AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

In the future I hope to include modded ammo compatibility.
Are there any other besides the ones you listed?

In the mean time I would say just stick with the regular old piercing ammo clips.

Sorry about the ammo box incompatibility. I'll look into it but my programming experience is limited. I can't promise that I can fix that.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

I dunno, for me ammobox worked well, apart from having to add its ammo to the list of those supported by mod ( making the following entry :

Code: Select all

['piercing-bullet-ammo-box']='bullet', 
in the line 10 of control.lua).
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
DUMBHA
Inserter
Inserter
Posts: 23
Joined: Wed Mar 09, 2016 9:38 am
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by DUMBHA »

Whoops your right. I checked again with all mods turned off and it was unaffected by upgrades. Alright looks like I need to go mod hunting. gimme a bit.

[Edit] Alright found the culprit. Turns out I had installed https://mods.factorio.com/mods/Doomquil ... r%20Turret And completely forgot about it. that fact the mod made a stealth edit to the PLD so no yellow test telling me it was modified by a mod did not help either. My bad it turns out :oops:

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

That's pretty cool, I will take a peek and see if such functionality can be included. Will see if he wants to combine forces.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

.14 is out.
Modding
Added support for equipment grids in cars, tanks, locomotives, and cargo wagons.
Changed equipment grids to work as protoypes: defined and referenced by things that use them.
Changed equipment and equipment grids to have categories that define what equipment can go in what equipment grid.
Scripting
Fixed game freeze when an error was thrown during the player left game event.
Removed LuaItemStack::has_grid.
Removed LuaItemPrototype::equipment_grid_size.
Changed LauItemStack::grid to return nil if the item doesn't have a grid.
Added LuaItemPrototype::equipment_grid.
Added LuaEntity::grid read.
Added Added LuaEquipmentGridPrototype.
Added LuaEquipmentGrid::prototype read.
Added LuaEquipmentPrototype::equipment_categories read.
Added LauForce::unchart_chunk()
Well, this is going to be a major overhaul for me. :/
I might be able to make it better though.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

Mod has been updated for Factorio 0.14. Special thanks to David Merillat! :mrgreen:
Inreased gun cooldown from 2 to 3, seemed like it was shooting too fast. It's still faster than rifle by a bit.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

Hey there, I've upgraded the code, now it supports modded ammunition and works when used in vehicles.
Attachments
Advanced_Personal_Defense_0.1.4.zip
(70.39 KiB) Downloaded 118 times
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

Dammit, I keep forgetting to take out that debug portion of the code. You know, the last few lines that give you a bit of stuff at the start if the game.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

Nice. :D
I should be able to test it out and get things updated this weekend.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

I'm getting a strange thing when I test.
Unknown key error. Normally I'd look past it but there's duplicate parts with different keys showing up:
Image
This gun gobbles up ammo and works properly.


Image
This gun does not.

The gun that works, does indeed work great on equipment grids.
Sidenote: a tank with 10 shields on it is UNSTOPPABLE. :D

I'll try to chip away at this issue when I have time. Don't feel comfortable pushing the update with this duplicate part bug though.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

That's the true name of the item, the one by which the game engine knows it.
The game then takes this name and looks into locale files for what to substitute it with before showing it to the user, if it finds nothing, it shows the name itself.

The code works by creating a single equipment for each kind of ammo (the player needs to produce only one of those) and then it swaps the equipment when it should use other bullet type.
The names of those equipments are generated, locale files cannot be generated. Before, I've made the relevant entries for english locale for vanilla bullets.
Last time I've changed the pattern of generated entity names, but I guess I was too tired to change the locale.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

Oh.. I should be able to fix this via updating the locale file then. Thanks

Iorek
Inserter
Inserter
Posts: 41
Joined: Wed Sep 07, 2016 4:09 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Iorek »

Can you make it actually use the ammo type? not just consume it?


eg deal more damage with better ammo?

Also any chance you can have it draw ammo from Cargo when used on a Tank/car/train?

hehe...

and finally.... any chance you can make it use any ammo... inc modded ammo form other mods?

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

Doesn't it already do all of that?
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

ribsngibs
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Mar 28, 2016 5:42 am
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by ribsngibs »

I really like this mod - thanks!

1) It might be nice to have another tier above it with crazy high crafting requirements for the endgame scenario where you've got a really big base and tons of production and clearing out biters is no longer difficult, but turns into a tedious chore. e.g it could take 100 speed modules or something to build, but then end up firing a very powerful laser every couple few ticks so you just don't have worry about spending 10 hours running around with capsules and a flamethrower just to clear a big space. You still have to build a wall, of course, it just takes the tedium away from killing biter bases, which is already almost zero risk at the endgame, just time consuming.

2) Do you know if the AI for the these personal defense guns is available to be tweaked so that it fires on trees and rocks? Again, in that endgame megabase scenario, clearing out trees and rocks can sometimes be a hassle. I can semi-automate it with deconstruction blueprints and requesters and trains, but sometimes I wish I could just stick like a "personal debris cleanup laser" in my power armor and walk around and obliterate the "junk".

AutoMcD
Fast Inserter
Fast Inserter
Posts: 214
Joined: Wed Apr 27, 2016 5:53 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by AutoMcD »

ribsngibs wrote:I really like this mod - thanks!

1) It might be nice to have another tier above it with crazy high crafting requirements for the endgame scenario where you've got a really big base and tons of production and clearing out biters is no longer difficult, but turns into a tedious chore. e.g it could take 100 speed modules or something to build, but then end up firing a very powerful laser every couple few ticks so you just don't have worry about spending 10 hours running around with capsules and a flamethrower just to clear a big space. You still have to build a wall, of course, it just takes the tedium away from killing biter bases, which is already almost zero risk at the endgame, just time consuming.

2) Do you know if the AI for the these personal defense guns is available to be tweaked so that it fires on trees and rocks? Again, in that endgame megabase scenario, clearing out trees and rocks can sometimes be a hassle. I can semi-automate it with deconstruction blueprints and requesters and trains, but sometimes I wish I could just stick like a "personal debris cleanup laser" in my power armor and walk around and obliterate the "junk".
I honestly have no idea. It might be possible to tweak how the AI considers trees and rocks but then I think all of the turrets would shoot at them. Personally I find deconstruct to be efficient. Or the old tank plow.
If you use grids on the tank, load it up with shields and you're golden. Then a load of lasers in the armor. :)
I'd consider it a separate mod, and honestly I'm not skilled enough tinkering under the hood of this game to pull it off.

Making a super laser is a lot more "cheaty" than I'm interested in. With the current game I find it easy to install 4-6 lasers and just run through a spawn camp, maybe use a little fire on the big groups. Don't even need bot capsules!
If it seems that for balance it should be more powerful I will consider adjusting the damage up but right now it seems ok.

I think what I would suggest for you is that mod for the armor that give you a 20x20 grid. Easy to fit more lasers than you'll ever need. And multiple roboports will take deconstruct a full screen of trees in no time.
If you pop open the mod files in notepad you can edit the values, turn the damage to 500 or something that will one-shot anything. ;)

ribsngibs
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Mon Mar 28, 2016 5:42 am
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by ribsngibs »

AutoMcD wrote: If you pop open the mod files in notepad you can edit the values, turn the damage to 500 or something that will one-shot anything. ;)
What inspired me to write my post on this forum was that I had already modded your mod and cranked the damage (and lowered the fire delay, and increased the movement speed) of the laser so that it was totally cheaty god mode. :D

For balance, no I don't think it needs to be more powerful - it's just a convenience thing. At some point you can kill everything with no risk, but it still eats up a lot of time (I cleared out I think a 2x3 km rectangular block of biters and it took many hours!)

Yeah, the tree thing is also just minor convenience stuff - deconstruct is fast "enough", but my UPS are getting low enough that waiting for the ~50 bots to recharge on my personal roboport is a little painful. What I *should* do is change my supply train (which stops at every outpost in my base), so that it also picks up extra trees and alien artifacts and carts them back to main base on its route.

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

Updated code.
It wasn't generating the ammo for mod loaded after and was crashing when ammo equipment was put into trains.
Now it doesn't do that.
Attachments
Advanced_Personal_Defense_0.1.5.zip
(70.72 KiB) Downloaded 98 times
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Hyratel
Inserter
Inserter
Posts: 34
Joined: Sun May 15, 2016 10:35 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Hyratel »

is it known (or deliberate) that it doesn't load ammo when placed into a vehicle grid? I'm using both VehicleGrids and AAI programmable vehicles and it never pulls ammo from the vehicle trunk inventory to charge up

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.13.x] Advanced Personal Defense

Post by Adil »

Hyratel wrote:is it known (or deliberate) that it doesn't load ammo when placed into a vehicle grid? I'm using both VehicleGrids and AAI programmable vehicles and it never pulls ammo from the vehicle trunk inventory to charge up
It is AAI doing its thing. It works (somewhat) when not used with mods that erase entities under the hood.
I'll see into the code. Check back later this day.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

Post Reply

Return to “Mods”