I’ve mostly been changing variables in the code, but I want to go a step further. I was thinking of changing the ships primary and secondary weapons with other ships. IE: An earthling cruiser that spawns crew like the mycon instead of having a point defense laser system, or a spathi that fires the Kohr spinning sawblades instead of their little plasma pellets.
How would you do this? I’ve tried switching the earthling cruisers secondary to other weapons from alien ships, but it wouldn’t work.
Logged
The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
There's no quick way to switch weapons so don't expect to edit a few lines of code to get Yehat shields on an Ur-Quan. But most of the code you need to edit is in the individual race files. The starting point that defines the weapons is the (race name)_postprocess() function located near the end of each file. For example, the Mycon, their weapons function is mycon_postprocess(). The code for their regeneration is located in this function. You will need to transfer this code, plus any other #define or functions that it depends on to the human equivalent function.
This is a little complex but I recommend that you give this a try to learn better how the code works. Just make sure you have a working copy of the code elsewhere on your computer. At the same time, you may have issues where the computer will fight as if the Cruiser has point defense equipped even though you don't.
This is a little complex but I recommend that you give this a try to learn better how the code works.
The main reason I'm trying to switch stuff around.
It was hard until you pointed me towards 'mycon_postprocess()'. Then all I did was copy/paste the function over the human_postprocess, then I renamed mycon_postprocess to human_postprocess. It worked! All I have to do now is to change the '#define's to make it like the mycon.
How hard would it be to make a third weapon? Like a Thraddash Torch with a third weapon that is the Shofixti Scout Blaze of Glory? Or a Yehat with a Spathi BUTT as a third weapon?
Logged
The only similarity between me and Kazon is the fact we both have fetid breath in the morning.
I don't know the answer to that one yet, but I would imagine you would need to edit the combat engine a bit for that so that you can add a third action button. However, you may want to look at how the Orz handles their three actions (main weapon, move turret, and space marines) and probably apply that.