Login  Register
 



Post new topicReply to topic
 
Author Message
 PostPosted: 09 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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
 Profile  
 PostPosted: 09 Mar, 2012 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
I can see what wrong already. Your script file isnt finished.


Top
 Profile  
 PostPosted: 10 Mar, 2012 
 
User avatar

Joined: 26 Mar, 2007
Posts: 5075
Location: California, United States
Offline
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

_________________
{◕ ◡ ◕}
Image


Top
 Profile  
 PostPosted: 10 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
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
 Profile  
 PostPosted: 10 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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
 Profile  
 PostPosted: 12 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
Hi,

Sorry forgot all about this thread, had 5 mins so did the mod for you..

http://www.mediafire.com/?rr81grhx4fkzxyb

this 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
 Profile  
 PostPosted: 13 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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
 Profile  
 PostPosted: 13 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
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
 Profile  
 PostPosted: 13 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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
 Profile  
 PostPosted: 13 Mar, 2012 
 
Forum Scout
Forum Scout
User avatar

Joined: 02 Mar, 2007
Posts: 8995
Location: Ninja Editing Your Post from a Canadian IPhone
Offline
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.

Image

NEVER DO THAT!

EVER!!!

Mike

_________________
God of Models - Moderator
BlackOps Team Twitter

Image


Top
 Profile  
 PostPosted: 13 Mar, 2012 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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...


Top
 Profile  
 PostPosted: 13 Mar, 2012 
 
Forum Scout
Forum Scout
User avatar

Joined: 02 Mar, 2007
Posts: 8995
Location: Ninja Editing Your Post from a Canadian IPhone
Offline
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

Image


Top
 Profile  
 PostPosted: 13 Mar, 2012 
 
User avatar

Joined: 16 Jan, 2010
Posts: 2908
Location: Draconis VII
Offline
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:


Top
 Profile  
 PostPosted: 13 Mar, 2012 
 
Forum Scout
Forum Scout
User avatar

Joined: 02 Mar, 2007
Posts: 8995
Location: Ninja Editing Your Post from a Canadian IPhone
Offline
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

Image


Top
 Profile  
 PostPosted: 13 Mar, 2012 
 

Joined: 05 Oct, 2007
Posts: 16425
Location: camping near the biggest power-up
Offline
OH SNAP!

_________________
Nephylim wrote:
But, an FA army in an FA environment just looks... right.
help wrote:
Does anyone know how to use air transports? I cant get them to pick up troops.


Top
 Profile  
 PostPosted: 14 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
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
 Profile  
 PostPosted: 16 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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 file
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 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 file
Code:
-- 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
 Profile  
 PostPosted: 16 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
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
 Profile  
 PostPosted: 16 Mar, 2012 
 
Forum Scout
Forum Scout
User avatar

Joined: 02 Mar, 2007
Posts: 8995
Location: Ninja Editing Your Post from a Canadian IPhone
Offline
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

Image


Top
 Profile  
 PostPosted: 16 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
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
 Profile  
 PostPosted: 16 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
here i did it for you..

http://www.mediafire.com/?jau7uxx6ekvuuvs

i 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
 Profile  
 PostPosted: 27 Mar, 2012 
 
User avatar

Joined: 09 Dec, 2010
Posts: 194
Offline
Thank you Domino.


Top
 Profile  
 PostPosted: 27 Mar, 2012 
 

Joined: 26 Feb, 2007
Posts: 336
Location: Toronto
Offline
Domino, always helpful.


Top
 Profile  
 PostPosted: 29 Mar, 2012 
 

Joined: 26 Feb, 2009
Posts: 2996
Offline
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.. :P

_________________
Domino.
______________


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic



Quick Tools

Search for:
Jump to:  

© 2002-2010 Gas Powered Games Corp. All Rights Reserved. Gas Powered Games is the exclusive trademark of Gas Powered Games Corp.
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
 
Home| Games | Company | News & Press | Support
  Terms of Use   |    Copyright Information   |    Privacy Policy