Hard(er) Science Total Conversion

Freeform discussion about anything related to modding Transcendence.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

Yes, indeed. I have no clue what you're apologizing for, dvlenk (and I apparently missed this random apology the first time around)...

Anyhow, I fixed my XML problem (turns out it was that now I can't even have the file OPEN in my text editor for the game to use it...belated thanks George in the other thread) and .98 is out so I'm resuming work on this mod.

Those of you with programming experience, I have another question:

So, about lasers. Lasers are great, but they are inefficient and generate a lot of heat. This is fine if you have radiators, but the problem is you can't armor radiators.

You can, however, retract them. So, I'm thinking that you should be able to "retract" your radiators (which are actually represented by the laser weapon being vulnerable to damage like a patch spider) by "U'sing your laser weapon, This will change your "radiators extendend" laser weapon unto a "radiators retracted" weapon which will gain heat as you fire it (and not lose it until you extend the radiators again).

So I can do that, it's simple enough, but I don't want the player to be able to 'reset' the heat by just toggling on and off the radiators, so is there a way to either set a timer on the switch or have the heat carry over during the switch?

There's another way to get rid of heat as well- transfer it to something (gas) and throw that something out the airlock. This means that you can have a laser with no vulnerable radiators, but a limited supply of "ammo" (because you can only vent so much gas".
User avatar
dvlenk6
Militia Captain
Militia Captain
Posts: 519
Joined: Sun Mar 05, 2006 6:56 am
Location: Sanctuary and beyond
Contact:

I don't remember about the apology. Actually, I don't even remember making that post... :?

I don't know about the timer on the laser.
"War is hell."
-William Tecumseh Sherman
http://dvlenk6.blackraven3d.com/transgals.html
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

OddBob wrote:So I can do that, it's simple enough, but I don't want the player to be able to 'reset' the heat by just toggling on and off the radiators, so is there a way to either set a timer on the switch or have the heat carry over during the switch?
The correct way to do this would be to record the heat to gPlayerShip with objSet data, then set a timer to let the heat dissipate with sysAddObjTimerEvent, and finally reset the heat with objSetData (minus x for partial dissipation).

Of course, that isn't possible as heat doesn't have a getter and setter that I am aware of.
Sponge
Militia Commander
Militia Commander
Posts: 250
Joined: Sun Jan 28, 2007 7:51 pm

As an easier workaround, you could simply make lasers eat up a bunch of powered when fired, fire slowly, and be mounted externally. The only problem is that you're not planning on having shields, so they will always be 'down', and so you have the constant threat of someone coming in and blasting your laser away. I suppose you could also mod in some method of repairing items or something. Maybe at a cost of ore.

The advantage of having a laser would have to be clear, and worth the penalty. Maybe you could ensure that most of the armor you create is fairly weak against lasers, so getting your hands on a laser would really be a good idea.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

The only problem is that you're not planning on having shields, so they will always be 'down',
The game will not be able to tell the difference between the extra armor layer /defense system that replaces shields and actual shields (they are shields technically, I'm just making them not regenerate and calling them something else) , so it really will not be vulnerable while you still have them: however: ablative armor will go fast and be expensive to replace and defense systems can't stop all weapons (basically it will be like a Trenton that lets lasers through)

I think that just leaving the "bug" in would be fine, I don't particularly care if it gets taken advantage of, you don't have to unless you want to play "right" (and I do).
Sponge
Militia Commander
Militia Commander
Posts: 250
Joined: Sun Jan 28, 2007 7:51 pm

Ah, I see what you're doing. I thought you were just going to make a new list of armors that are balanced differently with weapons. The non-regenerating shields will work much better.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

Been using this page for reference, it's pretty neat (many good links as well).
http://www.projectrho.com/rocket/rocket3x.html
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

Okay, when I said I could handle the radiators retracting, I lied.

I need it to not be able to do anything when the weapon is not installed, and I don't know how.

Would someone who knows what they are doing help me out here?
What it needs to do is, when you use the weapon, it uninstalls the current weapon and installs another one, but it only works when the first weapon is installed.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Try this. Make the Laser cannon two parts in the xml. The first part is the weapon that you install and the second is the weapon the ship uses. Basically, you set them up like this:

1.) name: Laser cannon, UNID: &LaserCannonController, function: Retracts and extends radiators when used and represents the weapon to the player.

2.) name: (blank), UNID: &LaserCannonWeapon, virtual=true, slots=0, external = true, function: this is the actual weapon in the game. When the Controller is 'u'sed, the Weapon is created and installed, and a reoccurring event is triggered to damage the controller if the weapon is damaged.
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

After a little work, here's a prototype. 'U'se the laser cannon controller to enable the laser cannon weapon. I've included a ship to try it out with.

Download here
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Another version is available now (Download Here). This version has all the features of the original, in addition, it prevents the weapon from being activated when the controller is damaged, carries over damage from the weapon to the controller and stores the level of enhancement the weapon has.
OddBob
Militia Captain
Militia Captain
Posts: 505
Joined: Sun Mar 05, 2006 6:05 pm

Thanks a lot Burzmali, that will work nicely, I think.

General question for anybody: would it work to leave Transcendence XML as it is (save for the system topology part and encounters) and do this entire thing with extensions? This would cut down on a lot of the XML cleaning hassle if I could leave it in...
Post Reply