Increase shields on space-ships
Moderator: Moderators
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Increase shields on space-ships
Hi, I'm making a space map with a very large spaceship so I need to increase the shields on it. Is there any way to do this? Thanks for the help.
- PilotX
- Private
- Posts: 35
- Joined: Thu Jun 17, 2010 10:58 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: California
Re: Increase shields on space-ships
MaxShield =
AddShield =
AddShield =
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
Where may I find those?
- acryptozoo
- Master Bounty Hunter

- Posts: 1642
- Joined: Wed Jun 03, 2009 3:14 pm
- Projects :: Yavin Mappack
- xbox live or psn: acryptozoo
- Location: in the jungles of Yavin IV
- Contact:
Re: Increase shields on space-ships
in its odflinksith wrote:Where may I find those?
- sim-al2
- 2nd Lieutenant

- Posts: 412
- Joined: Mon Jul 06, 2009 10:26 pm
- Projects :: Mapping on occasion
- Location: In the cockpit of some vehicle...
Re: Increase shields on space-ships
For a cap-ship shield...?
LinkedShields.lua in your common\scripts folder would be a good place to start, although I haven't tried space maps yet so I don't know if that would be the only thing to change.
LinkedShields.lua in your common\scripts folder would be a good place to start, although I haven't tried space maps yet so I don't know if that would be the only thing to change.
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
Ok, it took me a while but I found that it will increase the shields on both ships. Is there a way to only modify one of those ships?
- PilotX
- Private
- Posts: 35
- Joined: Thu Jun 17, 2010 10:58 am
- Projects :: No Mod project currently.
- xbox live or psn: No gamertag set
- Location: California
Re: Increase shields on space-ships
If both ships use the same odf, then you need to make a new odf without the shield and use that as the second ship.
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
They're different files. I'm Trying to replace the Federation cruiser with a droid control ship (AKA droid battleship). I looked in it's odf file but there was (of course) no shield properties. So I looked in the Linked shields LUA like sim said. but I figured out that that would change both shield properties. And yes, I told my LUA to shield the battleship as well.
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
You can't just add the new ship to the template copy of the linkedShieldObjects*** part of the mission lua without it treating it as part of the same overall object. You'll need to make a renamed copy of that part of the function and add the other ship separately. They're separated by teams, yes, but that's because stock maps use one cruiser. The names are local, so it shouldn't be a problem to add another block of code similar to the others within the SetupShields function. That will also mean changing the controllerObject name, as that's the name of the shield internal system within ZE.
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
Ok, I guess what I'm really asking is how can I make shields more powerful for one ship, and on the same team for a second ship have the shields at default. Also for the second ship I would like a separate shield generator.
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
I'm pretty sure the max hp for a shield (or anything else, really) is 999,999. The easiest thing you could do is change the sheildscale so that weapons do less damage to shields, thus giving the illusion of a ship with a more powerful shield, while lowering the shield value of the stock ships so that the normal gameplay is relatively unchanged.
As for the separate shields, that's what my above post was all about. Basically, you'll have to copy and rename that aforementioned piece of the SetupShields function so your new ship geometry is treated as separate from the other ships.
Lemme see if I can make a quick example without screwing up..
linkedShieldObjectsExecutor can really be any name, but it appears twice, and must be exactly the same in each instance. Same goes for shieldStuffIMP2. You can throw in the VO and text functions for the shield status, so long as they reference the name used at the start of the last two lines of this block of code, which is shieldStuffIMP2 in this case. The various ZE names referring to the ship's geometry should obviously be changed to those of the new ship's geometry. (Those listed are the only objects protected by the shield.) The name after controllerobject (imp-shield) on the second to last line is the name of your shield internal system as given in ZE, which should be changed to something else, like the name of the new ship's internal shield generator, which can actually be a second instance of the stock shield generator object.
Hopefully that's a little more clear.
*mumbles something about the Hobbits*
As for the separate shields, that's what my above post was all about. Basically, you'll have to copy and rename that aforementioned piece of the SetupShields function so your new ship geometry is treated as separate from the other ships.
Lemme see if I can make a quick example without screwing up..
Code: Select all
local linkedShieldObjectsExecutor = { "imp_ship_1", "imp_ship_2", "imp_ship_3", "imp_ship_4", "imp_ship_5", "imp_ship_6",
"imp-bridge", "imp-comms", "imp-life-ext", "imp-sensors",
"imp_drive_1", "imp_drive_2", "imp_drive_3", "imp_tur1", "imp_tur2", "imp_tur3", "imp_tur4", "imp_cap_stardestroyer_shield1", "imp_bulb"}
shieldStuffIMP2 = LinkedShields:New{objs = linkedShieldObjectsExecutor, controllerObject = "imp-shield"}
shieldStuffIMP2:Init()Hopefully that's a little more clear.
*mumbles something about the Hobbits*
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
So does that mean that I cannot make the shields on one ship more powerful than the other shields?
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
I told you how to make that work in the previous post. Shields are already maxed out in the stock game, so you have to scale down the damage done to them by all applicable weapons, and lower the shields of the less shielded ships (the stock cruisers) accordingly. That preserves the relationship between the weapons and shielding you normally see. Then, you can have the better shielded ship maxed out at 999999 (or whatever value up to that number), which will make it appear to have better shielding ingame.
It's a limitation of the engine that we can't simply raise the shield value to one million or more, so you must work within the means you're given to get the desired result. I can't really get more specific, because I simply don't know exactly what you want. Depending on how powerful the shielding of the new ship is, it's going to change the numbers for everything else you have to edit to make it work. Throwing in a ship with double the shielding of, say, the ISD, would mean halving damage against shields as well as halving the ISD shield value. However, if you want the shields four times as strong, then you'd have to quarter damage to shields, and quarter the ISD shields.
Am I making sense, yet?
It's a limitation of the engine that we can't simply raise the shield value to one million or more, so you must work within the means you're given to get the desired result. I can't really get more specific, because I simply don't know exactly what you want. Depending on how powerful the shielding of the new ship is, it's going to change the numbers for everything else you have to edit to make it work. Throwing in a ship with double the shielding of, say, the ISD, would mean halving damage against shields as well as halving the ISD shield value. However, if you want the shields four times as strong, then you'd have to quarter damage to shields, and quarter the ISD shields.
Am I making sense, yet?
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
So how do I lower shields on other ships to give the effect of a more powerful shield? I have added pictures to show what I'm doing.
Currently I'm still working on the model. I've also been unable to walk up and down the stairs from the CIS hangar that I moded. Also, I could only use two of the many turrets that I could get into from the inside of the ship. I'm not sure how long I will be working on this map but I also plan to put in a few other cruisers for each team. Hopefully my situation is made more clear.
Hidden/Spoiler:
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
If you want to change the shield's hp, you have to alter the MaxShield value in the odfs for that ship. If that parameter is not there, it shouldn't have a shield, but you could add the line in, so long as the odf is of the proper classlabel.
Also note that I'm not even touching the shield regeneration, but that shouldn't really require explanation.
Also note that I'm not even touching the shield regeneration, but that shouldn't really require explanation.
- linksith
- Command Sergeant Major

- Posts: 284
- Joined: Mon Jul 12, 2010 12:19 pm
- Projects :: Waaay too many projects
- xbox live or psn: me has no xbox
- Location: looking for a wifi connection
Re: Increase shields on space-ships
I can't find any odfs with a maxshield line in it. I've also tried to look in stock space ships but I couldn't find anything. I've also found that the republic and federation cruisers are in four parts (that does not include the bridge, sensors, life support, etc.). So if a shield protects all of the items mentioned in the LUA, then where is the shield information stored? 
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Increase shields on space-ships
the shieldinformation is stored in the LinkedShields.lua, if you want to have a custom shield you have to edit it, but dont ask me how it must look like, or maybe you can use the maxshield command for the indivisual shields in spacelua, i dunno
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
Ok, it appears I made a major mistake here. (I was looking at MaxHealth in the odfs. Oh bother.) The maxshield and addshield parameters are in the LinkedShields lua (maxShield = 200000), but they're also odf parameters. That nullifies the whole need to change weapon damage against shields, unless you're going for shielding that's more than 5 times the shield capacity of the stock game. Since they're set in that lua, that changes things. You could try setting the parameters within the odfs of the new ship to see if they override the values given in the LinkedShields script, though I somehow doubt it'll be as easy as that.
- DarthD.U.C.K.
- Master of the Force

- Posts: 6027
- Joined: Wed Sep 27, 2006 11:05 am
- Location: Duckburg, Germany
Re: Increase shields on space-ships
but in this case the odflines have nothing to do with lua, the luashield is a single shield shielding a list of objects until a certain object is destroyed, the odfshield is a shield on a single object
-
MercuryNoodles
- Jedi

- Posts: 1003
- Joined: Sun Mar 12, 2006 7:16 pm
- Projects :: Space - Boarding Action
- xbox live or psn: No gamertag set
Re: Increase shields on space-ships
You're right. I keep forgetting that he wants an internal system included. In that case, it's going to require some brand new scripting, I think, but I'm having trouble working through how to get the higher shield capacity for the battleship.


