Possible to make specific weapons not work until research is done?

I was wondering if it is possible to make it so that certain weapons on ships don't work until the proper research is done? For example, the Advent Radiance Battleship's beam weapons wouldn't work (or any beam weapons) until certain research (a new beam weapon research) is done. If it is possible, how would it be done? Thanks for any help.
8,079 views 12 replies
Reply #1 Top
I am trying to do that also. There are a couple ways you might go about doing this.

1. You could have the weapon have the weapon do very little damage and have the research modify this, but with that the weapon will still fire.

2. You could restrict access to the ship completely until the research is finished.

3. I don't know if this will work, but possibly have the initial range set for the beam weapon be extremely low (1) and then have the research modify it to a normal range. Like I said though, I don't know if that is possible.

4. You could change the weapon to be an ability instead, but then it will fire from somewhere different and will remove another ability. I'd only do that if you were creating a ship from scratch, which is what I am doing, so I will be using this method.

Hope this gives you some ideas to work with.
Reply #2 Top
3) should be doable, but it will have to be done empire-wide. Non-ability research is global, so it will affect every ship that's using that weapon. So if you set the range to 1 so that one ship can't use it, but you leave the range of another ship with the same weapon type ("BEAM", "PLASMA", etc) at 5000, and then you add research to increase the range by 5000% so the first ship gets a range of 5000, well.. imagine the mess with the second ship ;)

It would also have to be a non-primary weapon, I believe. From what I've noticed, ships tend to make sure to use the weapon that does the most damage primarily (as far as range/facing goes), so you may run into issues if it's trying to use a weapon with a range of 1 as a primary.
Reply #3 Top
3) should be doable, but it will have to be done empire-wide. Non-ability research is global, so it will affect every ship that's using that weapon. So if you set the range to 1 so that one ship can't use it, but you leave the range of another ship with the same weapon type ("BEAM", "PLASMA", etc) at 5000, and then you add research to increase the range by 5000% so the first ship gets a range of 5000, well.. imagine the mess with the second ship It would also have to be a non-primary weapon, I believe. From what I've noticed, ships tend to make sure to use the weapon that does the most damage primarily (as far as range/facing goes), so you may run into issues if it's trying to use a weapon with a range of 1 as a primary.
End of quote


I didn't even think about that affecting all the ships. Good point. I wasn't sure, but it was just a suggestion. I personally haven't tried it or plan to. Maybe, though, it will spark an idea for somebody that will figure how to do what the OP wants.

Actually. Where it says weapontype "Beam" for each of the different weapons, that usually means that there is a file out there somewhere that holds all the information for the different weapons. I can't confirm this, though. Maybe somebody could prove me right or wrong. If there is a file of that sort, could it be possible to add a research prerequisite line in there?
Reply #4 Top
Thanks for those ideas, specifically #3. I thought about that one for a while and decided it would probably work, as long as I changed the range for all the times that specific weapon was used. Then I thought of a problem: different ships have different ranges, so I can't just change them all to the same number. Thankfully, I just tested and discovered that I can change the range to be negative, so I can set the ranges so by adding the same number to them, when the research is done, will put them back to normal. So, it should work.

@Annatar11 - About the primary weapon. How can you tell which weapon is its primary weapon? Because I'm not convinced that it's the one that does the most damage. For example, take the Advent Radiance Battleship. The weapon that does the most damage is its lasers (at least, according to the info on it in-game), but even though those are on its sides, it still turns its front to its target. Any thoughts?
Reply #5 Top
Thanks for those ideas, specifically #3. I thought about that one for a while and decided it would probably work, as long as I changed the range for all the times that specific weapon was used. Then I thought of a problem: different ships have different ranges, so I can't just change them all to the same number. Thankfully, I just tested and discovered that I can change the range to be negative, so I can set the ranges so by adding the same number to them, when the research is done, will put them back to normal. So, it should work.
End of quote


Your Welcome..Anything I can do to help...as limited as it may be.

So you actually got it to work so that it doesn't fire until you research it? Also, Say I have Advent beams on my TEC battleship. Are all beams the same, or will it still affect every other ship in the fleet? Besides, Is there even another TEC ship that uses beams?
Reply #6 Top
@Annatar11 - About the primary weapon. How can you tell which weapon is its primary weapon? Because I'm not convinced that it's the one that does the most damage. For example, take the Advent Radiance Battleship. The weapon that does the most damage is its lasers (at least, according to the info on it in-game), but even though those are on its sides, it still turns its front to its target. Any thoughts?
End of quote


Well, if you look at the entity file for the Radiance:

WeaponType "Beam"
damageEnums
AttackType "CAPITALSHIP"
DamageAffectType "AFFECTS_SHIELDS_AND_HULL"
DamageApplyType "OVERTIME"
DamageType "ENERGY"
WeaponClassType "BEAM"
DamagePerBank:FRONT 105.000000
DamagePerBank:BACK 0.000000
DamagePerBank:LEFT 0.000000
DamagePerBank:RIGHT 0.000000

vs

WeaponType "Projectile"
damageEnums
AttackType "CAPITALSHIP"
DamageAffectType "AFFECTS_SHIELDS_AND_HULL"
DamageApplyType "BACKLOADED"
DamageType "ENERGY"
WeaponClassType "LASERPSI"
DamagePerBank:FRONT 0.000000
DamagePerBank:BACK 0.000000
DamagePerBank:LEFT 79.500000
DamagePerBank:RIGHT 79.500000

So technically speaking, the beams do the most damage per bank. The lasers are on both banks, so while the ship's infocard adds them up, only one bank can face the enemy at a time, and the beam comes out on top there. An easy way for you to test would be to increase the laser damage to anything above 105, and see if the Radiance will now try to fire primarily from its banks - which I think it will ;)
Reply #7 Top
About the primary weapon. How can you tell which weapon is its primary weapon? Because I'm not convinced that it's the one that does the most damage. For example, take the Advent Radiance Battleship. The weapon that does the most damage is its lasers (at least, according to the info on it in-game), but even though those are on its sides, it still turns its front to its target. Any thoughts?
End of quote


From my experience I would say that they just use the longest range weapon, I base this assertion on the fact that a ship that has a low damage 11,000 range weapon will choose to use it over a high damage 976 range weapon.

Additionally remember that the infocard ingame displays all banks damage added together so isnt a good judge
Reply #8 Top
It could just simply be range, yeah :P That's also easy to test.
Reply #9 Top
Yes, I did get it to work, and no, I don't think there is another TEC ship with beams. (which kinda makes me wonder why they gave that one beams? but oh well) As for your other question, I don't think I understand it. I will explain what I'm doing in detail, and hopefully that will answer your question.

First, I will remove the research for individual ships. Then I will set it up (like I described in my previous post) so that each race only has one type of weapon that they can use without any researching (ie, lasers for the Advent). Then, I will create the research items that allow access to the other types of weapons. Any ships that do not have the one starting weapon will not be buildable until that ship's weapon has been researched. When it gets complicated is when I work with ships that have more than one type of weapon, like capital ships. Once I figure out which weapon is the ships primary weapon, I will make it so that once the primary weapon is researched, that ship can be built. And if not all of its weapons are researched at one point, it will simply not be able to fire with those weapons yet. For example, before doing any research with the Advent, you would be able to build a Radiance Battleship (if lasers are its primary weapon that is), but you wouldn't be able to build any capital ships for which lasers were not their primary weapons.

In addition to changing the way ships are researched, this also makes it so that not all of the capital ships are available at the beginning, and yet you can still get a free one early on before any research. This is good in my opinion, because it annoyed me so much that while you could only build 3 frigates and no cruisers, you could build all of the capital ships. I hope this helps you understand how everything will work. If you have an opinion on this idea, or have any suggestions on how to improve it, feel free to voice them.
Reply #10 Top
Ok, thanks both of you, I shall do some testing and see what happens.
Reply #11 Top
Testing complete. Yep, it is the amount of damage, not the range. Thanks again.
Reply #12 Top
You're welcome, good luck with your modding :)