Page 1 of 1
Personal Rail Car
Posted: Fri Aug 14, 2015 8:25 pm
by Tinyboss
For players with large rail networks, it's common to carry a locomotive around in case we need to take a train somewhere. Fuel is a constant annoyance, though: it takes an extra inventory slot, and several extra steps to insert it, every time we use the train. To streamline the process, it would be great to have a "personal rail car", which would basically be a locomotive that can't haul cargo cars and is powered from the player's armor. Ideally still with the ability to tell it to travel to a particular station.
If it's faster than a standard train, that's a bonus, too. Maybe it could have normal train speed at 75kw (one fusion reactor) and a maximum of double that with 150kw. It could be much smaller than a locomotive or cargo car, unless Factorio's engine doesn't permit different sized rail vehicles.
Is this something that's possible, and that other people would like?
Re: Personal Rail Car
Posted: Sat Aug 15, 2015 3:49 am
by Adil
Yes it's possible (not the altered locomotive size).
But for me for example, going through the full modding hurdles would be too much of a hassle considering how specific the problem is.
Especially considering that the following would be enough to streamline things a bit:
Code: Select all
game.on_event(defines.events.on_built_entity,
function(event)
if event.created_entity.name=='diesel-locomotive' then
local coal_count=game.players[event.player_index].get_item_count('coal')
if coal_count>50 then
coal_count=50
end
event.created_entity.insert{name='coal', count=coal_count}
game.players[event.player_index].remove_item{name='coal', count=coal_count}
end
end)
Or in a console ready form:
Code: Select all
/c game.on_event(defines.events.on_built_entity,function(event) if event.created_entity.name=='diesel-locomotive' then local coal_count=game.players[event.player_index].get_item_count('coal'); if coal_count>50 then coal_count=50; end; event.created_entity.insert{name='coal',count=coal_count}; game.players[event.player_index].remove_item{name='coal', count=coal_count}; end; end)
Surelly, it's not the occupied extra slot that bothers you most.
Re: Personal Rail Car
Posted: Sat Aug 15, 2015 4:01 am
by Tinyboss
I thought about coding that up myself. Thanks for saving me the trouble!
That takes care of most of the problem. The personal car sure would be cool, though.
Re: Personal Rail Car
Posted: Sat Aug 15, 2015 5:09 am
by Adil
Surely it would be nice to have.
Surely, most of the functionality can be done. (Though I now remember I've failed to create nonconnectable locomotives before.)
I've just dumped all the work I'd be willing to invest into the cause in case it was helpful until someone does better (thinking that most suggesters can't code).
I've ended up using exploitish aircrafts most of the time myself. Or simply mot putting my personal transport in pocket without the need. A brief delay in cargo train movement is hardly lethal and designing unjammable rail network is the part of the game challenge after all.
Re: Personal Rail Car
Posted: Sun Aug 16, 2015 1:46 am
by bobucles
Is this something where a player has "skates" that allow him to ride the rail system, or is it a special type of vehicle that basically has infinite fuel? Another possibility is to have an armor module that automatically loads or spawns fuel while inside a train.