1
Modding / Help modifying, not creating.
« on: January 12, 2023, 11:23:33 PM »
I am attempting to increase the spawn rate of asteroids in combat, and I have found what I believe to be the bit of code which will allow me to do so (the loaders which spawn asteroids in BattleCreationPluginImpl.java), however, I am at a loss on how precisely to modify that code through a mod.
I have looked at other mods which modify already-existing things, such as rebalances, and they seem to make a copy of the path and file of the data they wish to modify, and then simply write the code, for instance for a weapon, using the same name and ID and such, and then changing up some of the stats. I suppose that mods are loaded after vanilla data, which then allows the mods to overwrite anything that needs to be overwritten?
Do I do the same if I wish to change the BattleCreationPluginImpl.java file? Would I for instance write in "loader.addAsteroidField(0, 0, random.nextFloat() * 360f, width, 20f, 70f, numAsteroids);" with "* 10" added after "numAsteroids", into a file named "BattleCreationPluginImpl.java", which is held in the same folder path as the original?
I am not very experienced with programming as you all can probably tell, but after looking through the tutorials on how to do even more advanced modding, I am still confused as to how to go about modding vanilla mechanics.
I have looked at other mods which modify already-existing things, such as rebalances, and they seem to make a copy of the path and file of the data they wish to modify, and then simply write the code, for instance for a weapon, using the same name and ID and such, and then changing up some of the stats. I suppose that mods are loaded after vanilla data, which then allows the mods to overwrite anything that needs to be overwritten?
Do I do the same if I wish to change the BattleCreationPluginImpl.java file? Would I for instance write in "loader.addAsteroidField(0, 0, random.nextFloat() * 360f, width, 20f, 70f, numAsteroids);" with "* 10" added after "numAsteroids", into a file named "BattleCreationPluginImpl.java", which is held in the same folder path as the original?
I am not very experienced with programming as you all can probably tell, but after looking through the tutorials on how to do even more advanced modding, I am still confused as to how to go about modding vanilla mechanics.