Page 2 of 3

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sun Aug 14, 2016 10:34 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Mon Aug 15, 2016 8:10 am
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).

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Wed Aug 17, 2016 9:43 am
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:

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Wed Aug 17, 2016 3:47 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Aug 26, 2016 1:44 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sat Aug 27, 2016 3:33 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sat Sep 03, 2016 4:45 pm
by Adil
Hey there, I've upgraded the code, now it supports modded ammunition and works when used in vehicles.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sat Sep 03, 2016 10:12 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sun Sep 04, 2016 11:13 pm
by AutoMcD
Nice. :D
I should be able to test it out and get things updated this weekend.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Thu Sep 08, 2016 9:17 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Sep 09, 2016 8:13 am
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Sep 09, 2016 6:27 pm
by AutoMcD
Oh.. I should be able to fix this via updating the locale file then. Thanks

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Wed Sep 14, 2016 8:41 am
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?

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Sep 16, 2016 9:25 pm
by Adil
Doesn't it already do all of that?

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Wed Oct 12, 2016 11:46 pm
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".

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Thu Oct 13, 2016 4:55 pm
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. ;)

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Sat Oct 15, 2016 2:44 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Tue Jan 03, 2017 4:48 pm
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.

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Feb 17, 2017 2:27 am
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

Re: [MOD 0.13.x] Advanced Personal Defense

Posted: Fri Feb 24, 2017 10:54 am
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.