How not to replace things

Freeform discussion about anything related to modding Transcendence.
Post Reply
speedofsquid
Commonwealth Pilot
Commonwealth Pilot
Posts: 55
Joined: Wed Aug 27, 2008 6:30 pm
Location: USA

Is there a way to make minor changes to an entire non-player ship class without overriding it? For example, is there a way to equip a shield on every Centauri raider at/near creation, even if it was created as part of a random encounter?
sdw195
Militia Captain
Militia Captain
Posts: 779
Joined: Wed Nov 18, 2009 1:01 am
Location: Still looking for the csc Antarctica
Contact:

the easiest way would be to just overwrite the ship in code, otherwise you would be looking at lots of code i would think
Image
Image
Image
Image
"Dash_Merc - George is a genius, in that he created this game engine that is infinitely extendable"
"<@sheepluva>Good night everybody, may the source be with you." <-- FOSG dev
"You only need THREE tools in life - WD-40 to make things go, Duct Tape to make things stop And C-4 to make things go away"
RPC
Fleet Admiral
Fleet Admiral
Posts: 2876
Joined: Thu Feb 03, 2011 5:21 am
Location: Hmm... I'm confused. Anybody have a starmap to the Core?

Yes, a very complicated way.
Make a virtual station, have it check for all centauri raider ships using a recurring timer event, and equip them with something like a class I deflector.
There's a trick to have them use different weapons (I don't know it, you'll have to ask digdug for it) , and 1.06a has a bug where if you change a ship's weapon to have a different range than the previous weapon, the game crashes.
Check out Weapons Extended for an example.
Tutorial List on the Wiki and Installing Mods
Get on Discord for mod help and general chat
Image
Image
Der Tod ist der zeitlose Frieden und das leben ist der Krieg
Wir müssen wissen — wir werden wissen!
I don't want any sort of copyright on my Transcendence mods. Feel free to take/modify whatever you want.
User avatar
Song
Fleet Admiral
Fleet Admiral
Posts: 2801
Joined: Mon Aug 17, 2009 4:27 am

Yeah. There is...but I find it easier to just over-ride stuff. You can control things better and there's less to go wrong. Unless you want a random element, when it can get a little annoying.
Mischievous local moderator. She/Her pronouns.
speedofsquid
Commonwealth Pilot
Commonwealth Pilot
Posts: 55
Joined: Wed Aug 27, 2008 6:30 pm
Location: USA

Yeah, that's kind of what I was expecting. I was hoping that I overlooked something.
User avatar
digdug
Fleet Admiral
Fleet Admiral
Posts: 2620
Joined: Mon Oct 29, 2007 9:23 pm
Location: Decoding hieroglyphics on Tan-Ru-Dorem

Is there a way to make minor changes to an entire non-player ship class without overriding it? For example, is there a way to equip a shield on every Centauri raider at/near creation, even if it was created as part of a random encounter?
yeah, basically Weapons Extended does that + it randomises the shield (and weapon and ammo). Unfortunately to do that in an efficient way you need quite a bit of code.

In your case, if you just want a centauri raider with a different shield, you can create an identical centauri raider with the shield of your choice, then just overwrite the shiptable tbCentauriEncounters and add your new ship. Every time the game creates a random centauri encounter, it will interrogate that table :D
Post Reply