[Script] Hive Shield v1.20 (10/10/2011)

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
Posts: 4245
Joined: Fri, 20. Oct 06, 19:02

Post by Litcube » Sat, 27. Nov 10, 21:22

Well, any wait is going to drag out that script with that loop. You're running calculations comparing each ship with each other.

I think I'd use a =find ship command $race distance = $range ref obj=$shipcurrent. If it returns a ship (any ship) add the recharge. One loop.

That command is one line, replaces what you're looping 6,400 times to get, assuming a sector has 80 ships.

Posts: 121
Joined: Wed, 9. Dec 09, 05:53

Post by lamoyja » Sat, 27. Nov 10, 21:36

edit: lol reread last comment, and thats exactly what I was asking about.

:P Guess I should have posted earlier, and read all the comments :D

User avatar
Posts: 78
Joined: Tue, 14. Oct 08, 19:43

Post by BinaryBoy » Sat, 27. Nov 10, 23:57

I've added the find ship command, although as far as I can tell without further researching the command, I could only get the command to return 1 ship.

so now it only runs the embedded loop if 'find ship' finds a ship (which is around half of the previous script) so I can maintain control over the amount each ship regen's at.

User avatar
Posts: 78
Joined: Tue, 14. Oct 08, 19:43

Post by BinaryBoy » Fri, 3. Dec 10, 11:40

after researching the find ship command a bit more, I figured out how to make it return multiple ships. I've also restricted effected ships to player owned ships only, so it should run significantly quicker now.

Hive Shield v1.10

User avatar
Posts: 2146
Joined: Sat, 14. Jan 06, 22:29

Post by eldyranx3 » Fri, 24. Dec 10, 07:03

Brilliant. Gives carrier based fighters a chance against the Xenon. Does the player have to buy special equipment from the Boron Research Station? Its a bit more work, but it might add immersion, as the Boron are considered innovative in shielding and engine technology.

User avatar
Posts: 78
Joined: Tue, 14. Oct 08, 19:43

Post by BinaryBoy » Fri, 24. Dec 10, 10:01

at the moment, it doesn't require any equipment or wares.

it shouldn't be too hard to implement a ware required though, since it works passively all the time without needing to use the command console.

Posts: 56
Joined: Fri, 4. Mar 11, 09:47

Post by jiunejai » Thu, 2. Jun 11, 08:15

This is a great idea! but a little unusual that why a Fighter (M3, M4, M5) have ability or equipment or whatever that can increase the shield energy?

How about :

1. Just let Carrier (M1) can have "Hive Shield" ability to increase other ship's shield within 10km to 5%.

As a Carrier, to highlights it's ability as a base of operations, I consider that there should be a "Battle Field" that function like a kind of field of force.

"Within 10km to increase 5%" I think that is good enough to show forth the Carrier's status in a campaign. If can, I wish the "Hive Shield" just work on the ship's that home base is set on the Carrier. (So A carrier's Fighters can't get B carrier's "Hive Shield" Gain, that will avoid someone use carriers group to "produce" a powerful fight fleet.)

2. The Destroyer (M2) can just have "Hive Shield" effect to each other within 5km and gain 3% on shield energy.

Destroyer, as a capital battleship, I suppose that they have a kind of tech to make a "shield array" for tough battles. If can, I wish it will only work on the same type ship in M2 class.

Posts: 220
Joined: Mon, 16. Mar 09, 11:32

Post by Hardscript » Tue, 28. Jun 11, 09:48

Great script, however i did end up modifying it quite a bit to play a more active roll in combat but yet not be overpowered.

Posts: 640
Joined: Sun, 15. Apr 07, 23:28

Post by shilhi » Sat, 1. Oct 11, 04:06

It's seem as though a lot of the scripts hosted on Filefront have been removed.

Posts: 728
Joined: Sat, 19. Mar 11, 17:26

Post by Nemesis_87 » Sat, 1. Oct 11, 15:36

i might give this script a try, i use CODEA so in a battle my carrier can deploy upto 60 fighters atm and il have 6 destroyers, Now that will be some extra damm power for the fighters

Edit: Just to double check, this increases ships within range shield regeneration and not there overall shields?

User avatar
Posts: 78
Joined: Tue, 14. Oct 08, 19:43

Post by BinaryBoy » Mon, 10. Oct 11, 18:26

New version of Hive Shield avaliable.

now hive shield is activated by command console in the special commands

and rather than having all ships effect each other, I made it so only ships running the Hive Shield command effects other ships regen rate and only M1, M2 and M7's can run the command, shield ships also cannot move while running Hive Shield (although I may change this later)

also added overcharge modes which causes Shield draining on the Shield Ship in order to boost output of the Hive shield effect.

No longer an AL Plugin, instead it's activated via Command console
reduced effected ships to selected 'Shield Ships'
Hive shield ships will provide a bigger boost in regen to other ships than before
Overcharge modes added


@Nemesis yes, it increases shield regen, not max shields

Posts: 3335
Joined: Mon, 1. Oct 07, 02:18

Post by wwdragon » Wed, 16. May 12, 08:14

This is great! You are the first person who has come close to reproducing the effect of my favorite ship from the original XTended Mod! :)
Since it's no longer an AL plugin, maybe you should ask the S&M Library person to move it into a different area of that thread.

Now if it only worked like the original shield frigate one, I'd have it back in XTC. 8)

The way the Otas shield frigate worked was to drain enemy ships in the area of their shields; it was per tick (each second) for bumping it's own shields directly, in real time.
At the same time, it would provide your own ships in the area a constant regen of shields when theirs went below a certain amount. It would continue this until it's own shield reached a set value; I think it was 50%... it might've been user configurable.
It would continue to drain enemy shields until their shields hit 5%, at which point it stopped draining that particular ship.
It used a custom command slot and worked while moving.

The shield bump was far more efficient then a one to one transfer; much like military shields, it gave out far more then it lost. I think a 2gj military shield in XTC had an efficiency ratio of 1.7... which meant it got 70% more shields then the energy it was draining.

If you are set on a passive regen boost to friendly ships, then perhaps you could add in a leech mode for me, as an alternative operating mode to the boosts? :)

Removing the requirement for the ship to be stationary is a really good idea too.
Editing posts since long before I remember.

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”