|
 |
| Author |
Message |
|
adamstrange
|
Posted: 09 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
|
I want to give the Fatboy,SpiderBot & other units the same big explosion cloud death effect of the UEF Sub Commander.
I tried this editing the code like this in the Fatboy's BP.file...
Damage = 4000, DamageFriendly = true, DamageRadius = 17, DamageType = 'Normal', DisplayName = 'Death Nuke', DummyWeapon = true, Label = 'DeathWeapon', WeaponCategory = 'Death', ProjectileId = '/effects/Entities/SCUDeath01/SCUDeath01_proj.bp',
And in the Script.file...
local TMobileFactoryUnit = import('/lua/terranunits.lua').TMobileFactoryUnit local WeaponsFile = import('/lua/terranweapons.lua') local TDFGaussCannonWeapon = WeaponsFile.TDFLandGaussCannonWeapon local TDFRiotWeapon = WeaponsFile.TDFRiotWeapon local TAALinkedRailgun = WeaponsFile.TAALinkedRailgun local TANTorpedoAngler = WeaponsFile.TANTorpedoAngler local TIFCommanderDeathWeapon = TWeapons.TIFCommanderDeathWeapon
local EffectTemplate = import('/lua/EffectTemplates.lua')
local EffectUtil = import('/lua/EffectUtilities.lua') local CreateUEFBuildSliceBeams = EffectUtil.CreateUEFBuildSliceBeams
UEL0401 = Class(TMobileFactoryUnit) { Weapons = { RightTurret01 = Class(TDFGaussCannonWeapon) {}, RightTurret02 = Class(TDFGaussCannonWeapon) {}, LeftTurret01 = Class(TDFGaussCannonWeapon) {}, LeftTurret02 = Class(TDFGaussCannonWeapon) {}, RightRiotgun = Class(TDFRiotWeapon) { FxMuzzleFlash = EffectTemplate.TRiotGunMuzzleFxTank }, LeftRiotgun = Class(TDFRiotWeapon) { FxMuzzleFlash = EffectTemplate.TRiotGunMuzzleFxTank }, RightAAGun = Class(TAALinkedRailgun) {}, LeftAAGun = Class(TAALinkedRailgun) {}, Torpedo = Class(TANTorpedoAngler) {}, DeathWeapon = Class(TIFCommanderDeathWeapon) {}, },
But nothing happens,please help.
|
|
| Top |
|
 |
|
brandon007
|
Posted: 09 Mar, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
|
I can see what wrong already. Your script file isnt finished.
|
|
| Top |
|
 |
|
Lt_hawkeye
|
Posted: 10 Mar, 2012
|
|
Joined: 26 Mar, 2007 Posts: 5075 Location: California, United States
|
brandon007 wrote: I can see what wrong already. Your script file isnt finished. um, i can't tell if your being retarded or being sarcastic, either way you aren't helping. on that note he does have somewhat of a point, adam please using something like pastebin.com and post the script, as well as any log errors that seem to going on. also, are you merging the BPs and make sure you are hooking the scripts correctly
_________________ {◕ ◡ ◕}
|
|
| Top |
|
 |
|
Domino
|
Posted: 10 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, the unit isnt hooked its overridden, no doubt the bp is not merged either... taking that into account which is obvious from all the local and this line of code Code: UEL0401 = Class(TMobileFactoryUnit) { that said... your weapons var on this line Code: local TIFCommanderDeathWeapon = TWeapons.TIFCommanderDeathWeapon is incorrect it should be Code: local TIFCommanderDeathWeapon = WeaponsFile.TIFCommanderDeathWeapon unless im missing it there is no Code: TWeapons declared. for the unit override this will make it work.
_________________ Domino. ______________
|
|
| Top |
|
 |
|
adamstrange
|
Posted: 10 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
Ok I tried this... Section of SCRIPT.file Code: local TMobileFactoryUnit = import('/lua/terranunits.lua').TMobileFactoryUnit local WeaponsFile = import('/lua/terranweapons.lua') local TDFGaussCannonWeapon = WeaponsFile.TDFLandGaussCannonWeapon local TDFRiotWeapon = WeaponsFile.TDFRiotWeapon local TAALinkedRailgun = WeaponsFile.TAALinkedRailgun local TANTorpedoAngler = WeaponsFile.TANTorpedoAngler local TIFCommanderDeathWeapon = WeaponsFile.TIFCommanderDeathWeapon
local EffectTemplate = import('/lua/EffectTemplates.lua')
local EffectUtil = import('/lua/EffectUtilities.lua') local CreateUEFBuildSliceBeams = EffectUtil.CreateUEFBuildSliceBeams
UEL0401 = Class(TMobileFactoryUnit) { Weapons = { RightTurret01 = Class(TDFGaussCannonWeapon) {}, RightTurret02 = Class(TDFGaussCannonWeapon) {}, LeftTurret01 = Class(TDFGaussCannonWeapon) {}, LeftTurret02 = Class(TDFGaussCannonWeapon) {}, RightRiotgun = Class(TDFRiotWeapon) { FxMuzzleFlash = EffectTemplate.TRiotGunMuzzleFxTank }, LeftRiotgun = Class(TDFRiotWeapon) { FxMuzzleFlash = EffectTemplate.TRiotGunMuzzleFxTank }, RightAAGun = Class(TAALinkedRailgun) {}, LeftAAGun = Class(TAALinkedRailgun) {}, Torpedo = Class(TANTorpedoAngler) {}, DeathWeapon = Class(TIFCommanderDeathWeapon) { }, },
Section of BP.File that deals with death animation Code: Damage = 4000, DamageFriendly = true, DamageRadius = 14, DamageType = 'Normal', DisplayName = 'Death Nuke', DummyWeapon = true, FireOnDeath = true, FiringTolerance = 2, Label = 'DeathWeapon', MaxRadius = 1, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1, MuzzleVelocity = 0, ProjectileId = '/effects/Entities/SCUDeath01/SCUDeath01_proj.bp', RackBones = { { MuzzleBones = { 0, }, RackBone = 0, }, }, RackRecoilDistance = 0, RateOfFire = 1, TargetCheckInterval = 9999999, TargetRestrictDisallow = 'UNTARGETABLE', Turreted = false, WeaponCategory = 'Death', }, },
And nothing happens except that the Fatboy is now totally invisible,except for its shield. Quote: the unit isnt hooked its overridden, no doubt the bp is not merged either... taking that into account which is obvious from all the local and this line of code
Code: UEL0401 = Class(TMobileFactoryUnit) { Sorry but I don't know what any of this means.
|
|
| Top |
|
 |
|
Domino
|
Posted: 12 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, Sorry forgot all about this thread, had 5 mins so did the mod for you.. http://www.mediafire.com/?rr81grhx4fkzxybthis is how to MERGE and units blueprint and also HOOK its script correctly.. if the mod is enabled the UEF fatboy will now go BOOM when it dies..  any questions just ask. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
adamstrange
|
Posted: 13 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
|
Thanks Domino now I can figure out how to do it...except one slight problem.
Why is the Fatboy invisible ?
When I build it all you see is its shield.
|
|
| Top |
|
 |
|
Domino
|
Posted: 13 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, Remove any modifications you previously did with the unit.. as you did it wrong. there is nothing in the mod i posted to make it do that, works fine for me. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
adamstrange
|
Posted: 13 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
|
Could you send me the original Fatboy's UEL0401_script.lua & UEL0401_unit.bp ?
The only way I was editing the Fatboy was from inside the game's original unit.scd.
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 13 Mar, 2012
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
adamstrange wrote: Could you send me the original Fatboy's UEL0401_script.lua & UEL0401_unit.bp ?
The only way I was editing the Fatboy was from inside the game's original unit.scd.  NEVER DO THAT! EVER!!!Mike
_________________ God of Models - Moderator BlackOps Team Twitter
|
|
| Top |
|
 |
|
brandon007
|
Posted: 13 Mar, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
Do you even know how to make a mod at all? Now that you edited the actual unit, you gotta reinstall... How dumb are you? Follow Exaviers tutorial on how to make a proper mod...
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 13 Mar, 2012
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
brandon007 wrote: Do you even know how to make a mod at all?
Now that you edited the actual unit, you gotta reinstall...
How dumb are you? :lol:
Follow Exaviers tutorial on how to make a proper mod... You aren't one to talk considering some of the stuff you've done..... Mike
_________________ God of Models - Moderator BlackOps Team Twitter
|
|
| Top |
|
 |
|
brandon007
|
Posted: 13 Mar, 2012
|
|
Joined: 16 Jan, 2010 Posts: 2908 Location: Draconis VII
|
OrangeKnight wrote: brandon007 wrote: Do you even know how to make a mod at all? Now that you edited the actual unit, you gotta reinstall... How dumb are you? Follow Exaviers tutorial on how to make a proper mod... You aren't one to talk considering some of the stuff you've done..... Mike Stop ******* bringing that up! 
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 13 Mar, 2012
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
brandon007 wrote: OrangeKnight wrote: brandon007 wrote: Do you even know how to make a mod at all?
Now that you edited the actual unit, you gotta reinstall...
How dumb are you? :lol:
Follow Exaviers tutorial on how to make a proper mod... You aren't one to talk considering some of the stuff you've done..... Mike Stop ******* bringing that up! :evil: I'll be just as nice to you as you are to others, deal? Mike
_________________ God of Models - Moderator BlackOps Team Twitter
|
|
| Top |
|
 |
|
BulletMagnet
|
Posted: 13 Mar, 2012
|
|
Joined: 05 Oct, 2007 Posts: 16425 Location: camping near the biggest power-up
|
|
OH SNAP!
_________________
Nephylim wrote: But, an FA army in an FA environment just looks... right. Does anyone know how to use air transports? I cant get them to pick up troops.
|
|
| Top |
|
 |
|
Domino
|
Posted: 14 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
adamstrange wrote: Could you send me the original Fatboy's UEL0401_script.lua & UEL0401_unit.bp ?
The only way I was editing the Fatboy was from inside the game's original unit.scd. Hi, yeah, as the others have already said, were not going to send the original files, and ofcourse you should NEVER alter the files directly in the scd's. You should have read the forum OR asked how to start a mod. Your going to have to reinstall your game pal. We all make mistakes, its part of the learning process, some of my ealier work is a total mess  you get over it and scripting does become easier. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
adamstrange
|
Posted: 16 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
I tried giving the Nuke silo a small nuke explosion when its destroyed and it works except that it won't build any missiles. hook fileCode: do #**************************************************************************** #** #** File : /cdimage/units/UEL0401/UEL0401_script.lua #** Author(s): John Comes, David Tomandl, Gordon Duclos #** #** Summary : UEF NUKE SILO #** #** Copyright © 2005 Gas Powered Games, Inc. All rights reserved. #****************************************************************************
local TerranWeaponFile = import('/lua/terranweapons.lua') local TIFCommanderDeathWeapon = TerranWeaponFile.TIFCommanderDeathWeapon
local OldUEB2305 = UEB2305 UEB2305 = Class(OldUEB2305) { OnPreCreate = function(self) OldUEB2305.OnPreCreate(self) if not self.Weapons['DeathWeapon'] then self.Weapons['DeathWeapon'] = Class(TIFCommanderDeathWeapon) {} end end, }
TypeClass = UEB2305
end
I added copied the code that you created and pasted it under the fatboy code. merge fileCode: -- UEF T4 EXPERAMENTAL, "FATBOY" -- UnitBlueprint { Merge = true, BlueprintId="uel0301",
Weapon = { { AboveWaterTargetsOnly = true, CollideFriendly = false, Damage = 0, DamageFriendly = true, DamageRadius = 0, DamageType = 'Normal', DisplayName = 'Death Nuke', FireOnDeath = true, FiringTolerance = 2, Label = 'DeathWeapon', MaxRadius = 1, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1, MuzzleVelocity = 0, NukeInnerRingDamage = 3500, NukeInnerRingRadius = 30, NukeInnerRingTicks = 24, NukeInnerRingTotalTime = 0, NukeOuterRingDamage = 500, NukeOuterRingRadius = 40, NukeOuterRingTicks = 20, NukeOuterRingTotalTime = 0, ProjectileId = '/effects/Entities/UEFNukeEffectController01/UEFNukeEffectController01_proj.bp', RackBones = { { MuzzleBones = { 0, }, RackBone = 0, }, }, RackRecoilDistance = 0, RateOfFire = 1, TargetCheckInterval = 9999999, TargetRestrictDisallow = 'UNTARGETABLE', Turreted = false, WeaponCategory = 'Death', }, }, }
---------------------------------------------------------------------------- -- UEF NUKE SILO" -- UnitBlueprint { Merge = true, BlueprintId="ueb2305",
Weapon = { { AboveWaterTargetsOnly = true, CollideFriendly = false, Damage = 0, DamageFriendly = true, DamageRadius = 0, DamageType = 'Normal', DisplayName = 'Death Nuke', FireOnDeath = true, FiringTolerance = 2, Label = 'DeathWeapon', MaxRadius = 1, MuzzleSalvoDelay = 0, MuzzleSalvoSize = 1, MuzzleVelocity = 0, NukeInnerRingDamage = 5000, NukeInnerRingRadius = 40, NukeInnerRingTicks = 30, NukeInnerRingTotalTime = 0, NukeOuterRingDamage = 660, NukeOuterRingRadius = 50, NukeOuterRingTicks = 30, NukeOuterRingTotalTime = 0, ProjectileId = '/projectiles/CIFEMPFluxWarhead02/CIFEMPFluxWarhead02_proj.bp', RackBones = { { MuzzleBones = { 0, }, RackBone = 0, }, }, RackRecoilDistance = 0, RateOfFire = 1, TargetCheckInterval = 9999999, TargetRestrictDisallow = 'UNTARGETABLE', Turreted = false, WeaponCategory = 'Death', }, }, }
----------------------------------------------------------------------------
|
|
| Top |
|
 |
|
adamstrange
|
Posted: 16 Mar, 2012
|
|
Joined: 09 Dec, 2010 Posts: 194
|
I can now build the missiles with this code Code: local TStructureUnit = import('/lua/terranunits.lua').TStructureUnit local TIFStrategicMissileWeapon = import('/lua/terranweapons.lua').TIFStrategicMissileWeapon local TerranWeaponFile = import('/lua/terranweapons.lua') local TIFCommanderDeathWeapon = TerranWeaponFile.TIFCommanderDeathWeapon
local OldUEB2305 = UEB2305 UEB2305 = Class(TStructureUnit) { Weapons = { NukeMissiles = Class(TIFStrategicMissileWeapon) {}, Weapons['DeathWeapon'] = Class(TIFCommanderDeathWeapon) {} OnPreCreate = function(self) OldUEB2305.OnPreCreate(self) if not self.Weapons['DeathWeapon'] then self.Weapons['DeathWeapon'] = Class(TIFCommanderDeathWeapon) {} end end, }
TypeClass = UEB2305
end
But I can't get it to use the nuke explosion and it will no longer allow me to target anything thing so I can't launch the missiles.
|
|
| Top |
|
 |
|
OrangeKnight
|
Posted: 16 Mar, 2012
|
|
| Forum Scout |
 |
 |
Joined: 02 Mar, 2007 Posts: 8995 Location: Ninja Editing Your Post from a Canadian IPhone
|
|
Honestly it sounds like user error, I can't foresee any reason why changing the death effect would do as you describe.
Try starting again from scratch, see if you get the same error(s) then check your log to back track where the error is sprouting from.
Mike
_________________ God of Models - Moderator BlackOps Team Twitter
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Hi, i see what is wrong in your script.. its the locals for the weapon they are incorrect.. Code: do #**************************************************************************** #** #** File : /cdimage/units/UEL0401/UEL0401_script.lua #** Author(s): John Comes, David Tomandl, Gordon Duclos #** #** Summary : UEF NUKE SILO #** #** Copyright © 2005 Gas Powered Games, Inc. All rights reserved. #****************************************************************************
local CWeapons = import('/lua/cybranweapons.lua') local CIFCommanderDeathWeapon = CWeapons.CIFCommanderDeathWeapon
local OldUEB2305 = UEB2305 UEB2305 = Class(OldUEB2305) { OnPreCreate = function(self) OldUEB2305.OnPreCreate(self) if not self.Weapons['DeathWeapon'] then self.Weapons['DeathWeapon'] = Class(CIFCommanderDeathWeapon) {} end end, }
TypeClass = UEB2305
end dont add this code just look at the locals and ofcourse the deathweapon class.. they are different... i shown you this to show you that eac weapon uses a different weapon class, you can look in the faction weapons file for the actual class code.. note the differance and understand what is different, also look at other weapons and look at there weapon classes  to fully understand what your doing when adding weapons to units..  Ok.. the proper way to add the deathweapon to this unit.. because it already has a deathweapon is to use a modblueprints hook in blueprints.lua to remove the existing deathweapon and replace it with your new cybran acu death weapon.. do you know how to do that?
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Domino
|
Posted: 16 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
here i did it for you.. http://www.mediafire.com/?jau7uxx6ekvuuvsi removed some code changed other and added some more in /hook/lua/system/blueprints.lua i changed the local in the units script.. sometimes this is the only proper way to hook add/remove unit related things, specailly for existing stuff.. we cannot merge them, they have to be removed.. the problem you were having is that you gave the unit another death weapon, it already had a death weapon.. the orginal deathwep would be called because its table id is lower (at 2) than our 3rd merged deathweapon, in the script we added the death weapon to but it held the incorrect params for the default death weapon.. this is they it didnt function correctly.. 
_________________ Domino. ______________
|
|
| Top |
|
 |
|
Sprouto
|
Posted: 27 Mar, 2012
|
|
Joined: 26 Feb, 2007 Posts: 336 Location: Toronto
|
|
| Top |
|
 |
|
Domino
|
Posted: 29 Mar, 2012
|
|
Joined: 26 Feb, 2009 Posts: 2996
|
Sprouto wrote: Domino, always helpful. i do try  we all have to make more effort IF WE DONT WANT forged alliance to die! we have these new steam players coming through a few want to mod, its best to help them than ignore them, obviously were all still checking and reading the forums, we just need more older modders helping out a little more..  i know the game is getting a little long in the tooth now, however, there is nothing actually near this game even now after all this time.. the sheer amount of things we can do with the scripts and units ect, its mind blowing.. and it should not be laid to rest just yet... if only they had done sc2 like fa, we would have all moved across to that by now and who knows where we would be, it would be totally amazing i know that much.. however things as they we dont have that so if we want fa to live on longer we have to answer posts on the forum with whatever we can add.. even if its been done before.. the show must go on.. god im so hardcore lol.. 
_________________ Domino. ______________
|
|
| Top |
|
 |
 |
 |
|