The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
August 15, 2022, 02:19:41 pm
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

+  The Ur-Quan Masters Discussion Forum
|-+  The Ur-Quan Masters Re-Release
| |-+  Technical Issues (Moderator: Death 999)
| | |-+  Switching Ship Weapons
« previous next »
Pages: [1] Print
Author Topic: Switching Ship Weapons  (Read 1504 times)
fetid_breath
Zebranky food
*
Offline Offline

Gender: Male
Posts: 29


Current Livelihood: Anyway I want. I can now code!


View Profile
Switching Ship Weapons
« on: May 02, 2005, 08:49:22 am »

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.
michael
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 200



View Profile
Re: Switching Ship Weapons
« Reply #1 on: May 02, 2005, 09:53:28 am »

I don't know if you could get the screen to show it but you might be able to get the atk itself with some work...
Logged
harth1026
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 142



View Profile WWW
Re: Switching Ship Weapons
« Reply #2 on: May 03, 2005, 02:55:14 am »

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.
Logged
fetid_breath
Zebranky food
*
Offline Offline

Gender: Male
Posts: 29


Current Livelihood: Anyway I want. I can now code!


View Profile
Re: Switching Ship Weapons
« Reply #3 on: May 03, 2005, 03:23:20 am »

Quote
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.
harth1026
*Many bubbles*
***
Offline Offline

Gender: Male
Posts: 142



View Profile WWW
Re: Switching Ship Weapons
« Reply #4 on: May 03, 2005, 05:34:37 am »

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.
Logged
Pages: [1] Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!