Personal Rail Car

This is the place to request new mods or give ideas about what could be done.
Post Reply
Tinyboss
Fast Inserter
Fast Inserter
Posts: 205
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Personal Rail Car

Post 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?

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

Re: Personal Rail Car

Post 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.
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.

Tinyboss
Fast Inserter
Fast Inserter
Posts: 205
Joined: Sun Nov 16, 2014 12:11 pm
Contact:

Re: Personal Rail Car

Post 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.

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

Re: Personal Rail Car

Post 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.
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.

bobucles
Smart Inserter
Smart Inserter
Posts: 1669
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Personal Rail Car

Post 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.

Post Reply

Return to “Ideas and Requests For Mods”