In the last developer conference we've talked about a possible creation of “dev teams” focused on certain parts of the mod.
Since that conference i “joined” the “Livery Team” currently leaded by @Blockhead. The livery customization and in general the artistic part is the weak part of this mod, but things might change.
I have some ideas to implement this, one of them is the Train Painter Tool.
What does this item have?
Well you have 2 possible type of customization, the first being the Simple Configuration (SC), and the second being the Advanced Configuration (AC).
What changes between SC and AC?
The Simple configuration is the one that we currently have on the painter tool of the Bike mod. The advanced configuration is completely new and it will allow you to choose from various skins (inspired by the ones of the real companies like DB, FS, OBB etc) through a list that will show you the prewiew of the skins applied to the locomotive or wagon.
Ok but the skins? How do i tell the tool that those are the skins for that locomotive?
All the skins for a certain loco are going to be on the “textures” folder of the locomotive mod. In the painter tool code there will be a list for that locomotive where we are going to write the name of the file of the skin.
OK nice but how can i integrate my own skins for that wagon/loco?
You'll need to put the skin file in the “textures” folder and insert the name of the file of the skin inside the list.
Do you have an image of the new painter tool?
Yes i do, we all have the formspec of the SC and i made a prototype of the AC:
Each livery mod comes with its own modus operandi and assumptions. The 3 significantly different mods I considered are:
As complicated or featureful as Multi-Component is, it's not suitable for all applications. For instance, in order to paint wagons like DlxTrains, one would need to make each different livery a different 'component', and promise not to color it with anything except 100% white, and promise not to paint multiple components.
I do not believe it is the role of the advtrains core to dictate how liveries are formatted, calculated and applied. There are simply too many ways to do it, none of which could suit everybody. I do believe however that going forward we should have:
The formspec on_submit is again handled by the wagon mod to allow it to work its own magic. The train painter simply shows what the wagon mod has registered will be shown by calling into the wagon mod's code. Wagons that want the same painting methods can use library functions from e.g. a future version of multi_component_liveries. Other wagons that want to do their own thing can do so.
Load/Save will act like the train copy tool: it will save the livery info onto the stack metadata, and allow it to be restored onto the same type of wagon (or compatible other wagons). It will give an error for incompatible wagons.
… Further discussion to take place at the conference (soon TM)
I propose that first, we begin by copying the bikes tool to stop forcing people who wish to colour their trains to have to install another mod which is unrelated to what they want to do.
Then, as time progresses, Blockhead's proposal is implemented.
Then, as even more time progresses, all systems are merged into one:
When these systems are merged, it makes future livery additions easier as they can fit with a paradigm instead of inventing their own.
Below is a sketch of the formspec:
One can clearly see how it is arranged. The left controls the colour, the centre the component the colour is applied to (Listed are wheels, body and doors, but the specific components can change) and on the right some presets (pictured are those suitable for replicating the london underground).
Also, there is a save button which can save the livery to a slot, and adds the livery to presets.
Any region can be greyed out or reduced to one item. For DLXtrains, maybe only the preset is enabled, and for the E231, only the Colour is applied.
The method of applications are as such:
Method | Description | Usecase |
---|---|---|
/colour <train ID> command | brings up the formspec. Either owning the train or colour_train privelages are required to be able to run the command | Remotely changing an entire train's colour |
Paintbrush | an inventory item which can be used to paint a train through right-clicking, saves between uses | For when you want to colour a specific carriage |
Train right-click menu | As above, does not save | When you cannot use a paintbrush |
LuaATC | A series of commands which let you do various editing | Automatically colouring trains |
Also, and i know this is a stretch, but the livery painter should work on LuaATC controlling elements the same way it does to the E231. This helps prevent confusion with nearby LuaATC controlling elements.
An API to change the colour of the LuaATC controller from within is also a good idea, which allows it to give live information on state (red means a train is now approaching a station, pink it has stopped, and red that a train is departing, and then blue when it has no control of a train event.ID == nil
).