Replaceweapon Coding Help
I want my 15 rapid-fire quantum torpedo launchers Uber-Defiant now! - Get help from modders. Share your work. Discuss modifications.
posted on June 14th, 2012, 10:54 pm
Hey guys, I am a bit rusty on my replaceweapon commands. I need a couple quick replaceweapons and hopefully someone here can help.
I need a replaceweapon that has no button that fires within say a range of 600 that will replace an object. Basically, I need it to "fire" a replaceweapon at an enemy.
I know its possible, but I need to know if it replaces the object at the root of the owner ship, or at the hardpoint specified.
I also need a simple replace weapon that replaces a defined object(ship) to a specified point.(target location) It should require a button.
I normally don't ask for these kinds of things, but I don't want to have to dig through my old things on my old laptop to figure it out again.
Thanks in advance to anyone who can help!
I need a replaceweapon that has no button that fires within say a range of 600 that will replace an object. Basically, I need it to "fire" a replaceweapon at an enemy.


I also need a simple replace weapon that replaces a defined object(ship) to a specified point.(target location) It should require a button.

I normally don't ask for these kinds of things, but I don't want to have to dig through my old things on my old laptop to figure it out again.

posted on June 15th, 2012, 1:56 pm
Did I mention that if you help you earn a permanent spot in my credits for my BSG mod?
(shameless bump
)

(shameless bump

posted on June 15th, 2012, 2:28 pm
We would help and be punished for the afford?
>:D

posted on June 15th, 2012, 3:09 pm
How is being credited for your work a punishment? 

posted on June 15th, 2012, 3:54 pm
So what your going to need actualy is an extraweapon. Like the tueto ability. And for the replace weapon use the commands
Replacmentinstantai
Replacmentinstantplayer
(double check the spelling)
As for haveing the button... just don't put a tech tree entry for the replace weapon and the above commands should override it, as only the button of a replaceweapon obeys the tech tree (naughty).
if you want some examples, the klingon miner dispatch is a casted extra weapon replaceweapon. Its chain is started from the Kli_effects odf and model.
And if there is anything else.. i don't have much time, but i will post in detail if you still need it later. as i can only pos off the top of my head now
Replacmentinstantai
Replacmentinstantplayer
(double check the spelling)
As for haveing the button... just don't put a tech tree entry for the replace weapon and the above commands should override it, as only the button of a replaceweapon obeys the tech tree (naughty).

if you want some examples, the klingon miner dispatch is a casted extra weapon replaceweapon. Its chain is started from the Kli_effects odf and model.

And if there is anything else.. i don't have much time, but i will post in detail if you still need it later. as i can only pos off the top of my head now

posted on June 15th, 2012, 4:33 pm
Huh. I"m not entirely sure what you are talking about.
As far as I know, extra weapons are what the borg used in stock a2 for the special weapon copying beam.
As for the instant player/ai I don't think that they are needed. I"m prerry sure there is a way you can use a cannonimp to fire a replaceweapon, but I will just have to check.
I"ll take a look at the klingon miner thing though, maybe it will help me understand what you are talking about.

As for the instant player/ai I don't think that they are needed. I"m prerry sure there is a way you can use a cannonimp to fire a replaceweapon, but I will just have to check.

I"ll take a look at the klingon miner thing though, maybe it will help me understand what you are talking about.

posted on June 15th, 2012, 6:00 pm
yeah in FO, extraweapons is a unibeam odrnance command set that allows you to project weapons on to stuff for a temporary ammount of time, weither it be your self or others.. Think of it as a teporary technogly projector than a tech assimilator
http://guide.fleetops.net/guide/modding ... xtraWeapon
To be clear, its my understanding that this is how cannonimp fires replaceweapons. as this is the command set that defines what weapons are fired.
http://guide.fleetops.net/guide/modding ... xtraWeapon
To be clear, its my understanding that this is how cannonimp fires replaceweapons. as this is the command set that defines what weapons are fired.
posted on June 15th, 2012, 6:18 pm
Ah, I see what you are talking about. Well, that seems like it would work to make an object appear at a location, but I thought there was an easier way.
posted on June 15th, 2012, 6:26 pm
Adm. Zaxxon wrote:Ah, I see what you are talking about. Well, that seems like it would work to make an object appear at a location, but I thought there was an easier way.
Can you explain to me in depth what you are trying to do, i'm a bit confused.
posted on June 15th, 2012, 6:35 pm
Styer Crisis wrote:Adm. Zaxxon wrote:Ah, I see what you are talking about. Well, that seems like it would work to make an object appear at a location, but I thought there was an easier way.
Can you explain to me in depth what you are trying to do, i'm a bit confused.
Ok, well I am trying to basically fire ships at an enemy.


Anyway, I want to give it the ignore interface line, fire it from a ship and see what it does. If it works, it will be better than the torp style because you can blow them up, have them cause aoe damage when they are destroyed from impact or by weaponsfire. No need for a fancy point defense system if the missiles are just ships. They might even be smarter than torps, in case their targets were destroyed, they could go after another. I could also give them a timer so instead of just disappearing at the end of their lifespan, they could blow up.

So. the first thing I need is a replaceweapon that will fire like a regular weapon when the ship is in range, and will continue to fire according to the shot delay. I assume the missiles will take care of the rest.
The other thing is I want to be able to replace a ship to a target location. Pretty simple, but I cant get it to work.

posted on June 15th, 2012, 6:44 pm
Ah ok..... so ur gonna want to take the Special command away from the replaceweapon.... give it a shot delay. and also add
replacement0Class0Position = 0,0,100
to it... maybe. and be aware that the visual effects for replace weapons are limited (very) so this system might not be pretty.
As for replaceing a vessel to a location.. the command above can be used, just replace the vessel unto itself and that command will project it forward how ever far u want... be awary though that a area targetable projection replaceweapon is impossible i think... and it'd be better to use the trans warp system
replacement0Class0Position = 0,0,100
to it... maybe. and be aware that the visual effects for replace weapons are limited (very) so this system might not be pretty.
As for replaceing a vessel to a location.. the command above can be used, just replace the vessel unto itself and that command will project it forward how ever far u want... be awary though that a area targetable projection replaceweapon is impossible i think... and it'd be better to use the trans warp system
posted on June 15th, 2012, 7:09 pm
Well, I'm not actually trying to move a ship from one spot to another. I am trying to "purchase" a ship and have it appear at a targeted spot. I know this is possible because you do something similar through warpin, but I am also for some reason unable to get it to work. 

posted on June 15th, 2012, 8:02 pm
Oh thats pretty simple.... so you just want it to apear, or do you want ann effect? ah.. i'll cover both
So you have:
•dilithiumCost
•latinumCost
•metalCost
•biomatterCost
For you costs
•replacementKeepName // set to zero to have your craft get a new name
replacementRegisterAsNew // for the admirals log
replacementResetSpecialEnergy // just a good command to have
replacementKeepOwner // this is important, it keeps your original ship from dissipearing
the actual replace code
replacementMode = 0 //Default. Direct vessel replace / separation mode
replacement0Class0 = "fed_akira" //with this vessel
replacement0Class0Position = 0,0,100 // defines where it apears at
And for good measure....
replacementCreationType
Integer, Default: 0
Defines how the newly created vessel should be shown in the Admiral's Log after the game.
0 = normal
1 = evolved
2 = fused
3 = separated
4 = taken
5 = assimilated
and here is the guide replaceweapon section.... if you need stuff expounded on
http://guide.fleetops.net/guide/modding ... F-Commands
To get a visual, you have to replace to an ODF that has a Visual effect sod set as its base name, and then have a replacment inststant player replaceweapon on it to give you ship to u.. you will aslo need the command to make that model terminate after so many seconds... but idk what that is off the top of my head.
So you have:
•dilithiumCost
•latinumCost
•metalCost
•biomatterCost
For you costs
•replacementKeepName // set to zero to have your craft get a new name
replacementRegisterAsNew // for the admirals log
replacementResetSpecialEnergy // just a good command to have
replacementKeepOwner // this is important, it keeps your original ship from dissipearing
the actual replace code
replacementMode = 0 //Default. Direct vessel replace / separation mode
replacement0Class0 = "fed_akira" //with this vessel
replacement0Class0Position = 0,0,100 // defines where it apears at
And for good measure....
replacementCreationType
Integer, Default: 0
Defines how the newly created vessel should be shown in the Admiral's Log after the game.
0 = normal
1 = evolved
2 = fused
3 = separated
4 = taken
5 = assimilated
and here is the guide replaceweapon section.... if you need stuff expounded on
http://guide.fleetops.net/guide/modding ... F-Commands
To get a visual, you have to replace to an ODF that has a Visual effect sod set as its base name, and then have a replacment inststant player replaceweapon on it to give you ship to u.. you will aslo need the command to make that model terminate after so many seconds... but idk what that is off the top of my head.
posted on June 15th, 2012, 8:19 pm
and agin i completely spaced the fact that your going for targetability. I'm sorry to say but being able to target the replaceweapon is a feature of the warpin side of it i belive.... not sure though.. you'd have to ask dominus about that one. but if there is a way to do it, i could definately use it in my mod aswell
posted on June 15th, 2012, 9:12 pm
Item 1: You'll want to use a cannonimp that's a regular weapon that has a utribeam ordnance, which drops a utritiumball object at the target location, which fires the replaceweapon to drop the "torpedo" (utritiumball object has just enough energy/time to fire once). As far as I know it won't work like you want it to: you'll certainly get a smart torpedo, but it will behave very differently than a torpedo.
Item 2: You'll want to use a cannonimp with a button that has a utribeam ordnance, which drops a utritiumball object at the target location, which fires the replaceweapon to drop the ship (utritiumball object has just enough energy/time to fire once).
Item 2: You'll want to use a cannonimp with a button that has a utribeam ordnance, which drops a utritiumball object at the target location, which fires the replaceweapon to drop the ship (utritiumball object has just enough energy/time to fire once).
Who is online
Users browsing this forum: No registered users and 2 guests