Skip to content

Advanced Editing

EgoLeX edited this page Jun 25, 2018 · 8 revisions

The first and easiest steps are done by editing the config.java class.
But there especially more things you can do and should do.

To work with this open the launchermain class. In there is the main code as well as layout declaration. Here is the place where you can edit and modify everything in detail. But be careful if you don't know what you are doing. If anything fails you can crash the full code!

In this guide, I'm focusing only on the important things we should have to do.

Pic1
pic1_choose_ailist

For the first, we are working with adding Items to the checkboxes in the launcher. For this have a look at the Pic1. Search for this by pressing CTRL+F while in Editor and search for something like that. If you found it, modify or edit the first line with your AILists (in this example Ailists. Works aswell with others). Be sure the config.java is aswell opened because you can only put content inside when you declared it aswell in config.java in ailist = {};

Pic2 pic2_choose_ailist

If all ailists had been added to the checkbox you need to add the action for it. For that have a look at Pic2. There are 2 examples for it. You can copy the part from else if -> outputsettext("Other Bus + Default Cars aktivated");} and add it under the existing one. Be sure to modify the if(choice_ailist.getValue().equals("MAN EN92 + Default Cars")) so that "MAN EN92 + Default Cars" is the same name as in your Choicebox in the previous."

Important Note: If you do it for the other things (parklist and repaints) make sure that the choice_ailist in if(choice_ailist.getValue().equals("MAN EN92 + Default Cars")) aswell as conf.ailist[0] in String srcDir = new File(classLoader.getResource("mapcontent"+conf.ailist[0]).getFile()).toString(); should be replaced by the correct names.

Good to know:
The [0] in conf.ailist[0] stands for the first position in the config.java. So public String[] ailist = {"\\Addons\\_special\\ailist\\MAN EN92 - Standard Autos","\\_special\\ailist\\Other Bus - Default Cars"}; the thing in the first " " is the [0] and the second " " (here "Other Bus - Default Cars") is [1].


<- Previous Step || Next Step ->

Clone this wiki locally