Colony Builder


Build your very own colony on Nauvis. Create housing, services and recruit colonists to grow your settlement alongside your factory. Be sure to check the tips & tricks for more information on the systems and mechanics of this mod.

Overhaul
4 days ago
1.1
1.26K
Transportation Logistics Trains Combat Enemies Manufacturing

g game crash if aai vehicle kills

10 days ago

mod causes a game crash if an aai vehicle gets a kill due to there being no player in said vehicle

updating line 182 in control.lua from

if event.cause.get_driver() then

to

if event.cause.get_driver() and event.cause.get_driver().player then

fixes this by ensuring that player is not nil
i have no idea if this supports markdown, so the codeblocks i did may just not work

9 days ago
(updated 9 days ago)

Hi, I have similar problem (crash on enemy death) with a mod Legio Titanicus: https://mods.factorio.com/mod/WH40k-Titans
Basically, if I kill someone with the primary weapon - game crashes. Laser defence and stomping is OK tho o_o

Error text:

Error while running event ColonyBuilder::on_entity_died (ID 4)
ColonyBuilder/control.lua:184: bad argument #2 of 3 to 'index' (string expected, got nil)
stack traceback:
[C]: in function '__index'
__ColonyBuilder
/control.lua:184: in function <ColonyBuilder/control.lua:157>
==============================================

On the side note - there is fun (probably unintendent) feature - Colony soldiers can embark titans like APC (in the equipment grid).
I wonder:
- Why?
- Maybe you can make togglable setting to allow soldiers to embark in vanilla equipment grids and/or vehicle storage? Spidertrons/modded flyers with dropship troops - sounds cool!

4 days ago
(updated 4 days ago)

The issue should be fixed now I hope, let me know if it is not.

Regarding infantry being able to be placed in the equipment grids of Titans, that is actually a feature from that mod. It changes all turret-like equipment, which includes infantry from my mod, to be able to be placed in their grids.

3 days ago
(updated 3 days ago)

I test it in the sandbox, and this error is still there.
https://imgur.com/a/6oBrcuE

P.S. only appears in sandbox mode, in standart everything fine

3 days ago
(updated 3 days ago)

Nah in standard too
https://imgur.com/a/6oBrcuE

2 days ago
(updated 2 days ago)

I made a small hack that resolves issues with AAI, but I'm not sure how the bounty system works. So, bounties that couldn't be sent to the owner of AAI vehicles will be sent to the host instead.
Changed line 191-195 in control.lua to:

                   local playerIndex = (type(player) == "table" and rawget(player, "index")) or 1
                if ammo == "nonlethal-rounds-magazine" then
                        global.colonydata.playerdata[playerIndex].bounties[event.entity.name .. "_alive"] = 
 (global.colonydata.playerdata[playerIndex].bounties[event.entity.name .. "_alive"] or 0) + 1
                else
                    global.colonydata.playerdata[playerIndex].bounties[event.entity.name] = 
 (global.colonydata.playerdata[playerIndex].bounties[event.entity.name] or 0) + 1
                end

New response