Messing around with shields


(Taiidan Republic Mod) #21

I put my files on dropbox here in case you want to use them to test:

https://www.dropbox.com/s/ko8gnyxmi78u2fc/hgn_defensefieldfrigate.zip?dl=1

They work fine for me - if you have a defense field frigate without scout ping research, it won’t be able to do the shield thing, but as soon as you have the scout ping research, it can…


(GOLIATH Mod) #22

no, I couldn’t turn the shields on with mine - I’ll check your files out. I bet there’s something simple that’s not set up right.


(Taiidan Republic Mod) #23

Yeah do that. Step 1 in modding something new is to get an example to work, or get something really simple to work, then build on it…


(GOLIATH Mod) #24

Yep! Your version totally works :wink: I kind of want to go through and find the mistake, but I guess I doesn’t really matter, right? Also, the pause it made with mine during the game start up isn’t there. So that was probably the game crapping the bed when it go to the mistake. haha

Okay, cool thanks! I’ll see if I can get this to work on another ship, and then with a weaker magnetic shield because I think this will be too butch if ever single frigate has the Hiigaran shield.

Good karma for you, my friend!


(GOLIATH Mod) #25

So, I got the shield to work the exact same way on the ion cannon frigate; the shield works, but there’s no bubble. I entered this in the .events file :

        event15 =
        {
            { "anim", "On" },
            { "animtime", "-1" },
            { "marker", "root" },
            { "sound", "SP_ELEMENTS/HGN_DEFENSEFIELDFRIGATE_ON" },
			{ "fx", "defensefield_sphere_spray" },
			{ "fx_scale", "3000" },
        },

but it didn’t work. Is the connection between the fx and the shield being set to ‘on’ in the model animations?

The Goliath test file is updated. If you want to look.


(Taiidan Republic Mod) #26

You are trying to make a shield work without a mad animation… So you need to read this:


(GOLIATH Mod) #27

So, using the stuff in the link you posted and your ship.lua from the dropbox:

I got the Hiigaran type shield to work as desired. The Research in the .lua turns the shields on, and they work just like normal afterwards.

For the game, that’s gonna be way too butch though, so I’d like to do the same thing with magnetic shields so we can turn the deflection percentages down to maybe 25% or so.

I got the magnetic shield on the ship, but I can’t figure out how to turn it off. Here are the files:

The excerpt from the .ship file:



--this set worked to make the HGN shield and the ship.lua works to activate it as well
--addAbility(NewShipType,"DefenseFieldAbility",1,0,1200,200,200,0.7,0.6,0,"defensefield_sphere_spray");
--addAbility(NewShipType,"DefenseFieldShieldAbility",0,1200,0,0);
--addCustomCode(NewShipType,"data:Ship/hgn_ioncannonfrigate/hgn_ioncannonfrigate.lua","","","Update_IonFrigate","","hgn_ioncannonfrigate",2)

--this set to make the TAI sheild which is actually the one we want
addMagneticField(NewShipType,"MagneticField",1000,99,"defenseField_generic",15,"defenseField_generic",99,"plasma_hit_spray_MagneticField","defensefield_sphere_spray_TFF");
addAbility(NewShipType,"DefenseFieldShieldAbility",0,1200,0,0);
--with or without the next line the mag shield is always on, but is visible and works
addCustomCode(NewShipType,"data:Ship/hgn_ioncannonfrigate/hgn_ioncannonfrigate.lua","","","Update_IonFrigate","","hgn_ioncannonfrigate",2)



LoadModel(NewShipType,1);
StartShipWeaponConfig(NewShipType,"Hgn_IonCannon","Weapon_Top","Fire");
addShield(NewShipType,"EMP",310,20);

--AddShipAbility(NewShipType,"DefenseField",1,"ThisShipOnly",0);

here’s the ship.lua you sent, I also tried the lines which are commented out, but they don’t work:

function Update_IonFrigate(CustomGroup, playerIndex, shipID)
	print("+++")
	if (Player_HasResearch(playerIndex, "ScoutPingAbility")==1) then
		print("+++ activating AB_DefenseField")
		SobGroup_AbilityActivate(CustomGroup, AB_DefenseField, 1)
		--SobGroup_AbilityActivate(CustomGroup, AB_MagneticField, 1)
		SobGroup_AbilityActivate(CustomGroup, AB_DefenseFieldShield, 1)
		SobGroup_AbilityActivate(CustomGroup, AB_Move, 1)
		SobGroup_AbilityActivate(CustomGroup, AB_Attack, 1)
	else
		print("+++ disactivating AB_DefenseField")
		SobGroup_AbilityActivate(CustomGroup, AB_DefenseField, 0)
		--SobGroup_AbilityActivate(CustomGroup, AB_MagneticField, 0)
		SobGroup_AbilityActivate(CustomGroup, AB_DefenseFieldShield, 0)
		SobGroup_AbilityActivate(CustomGroup, AB_Move, 0)
		SobGroup_AbilityActivate(CustomGroup, AB_Attack, 0)
	end
	
	if (Player_HasQueuedResearch(playerIndex, "ScoutPingAbility") == 1) then
		print("+++ Player has queued research ping")
	end
	
end

Do you think you could make this work with the magnetic field as well? I’m kind of out of ideas because I don’t even really get how it works for the Hiigaran one. haha Thanks!


(GOLIATH Mod) #28

If it’s not possible, I guess I could turn the shield from the Hiigaran Field frigate into a magnetic field, use the shield that works for the upgrade we want to make, and then change all of the penetration values in the weapon files to make the current Hiigaran shield a lot weaker.


(Taiidan Republic Mod) #29

Oops just noticed the extra bits in there - you can remove the AB_move and AB_attack lines --> they will stop your ships from attacking or moving until you have the research! I only had them in the for my testing.

Also you can remove the reach queue if statement (that was me getting distracted - I never realised you could check if a player has queued research!)

Not sure about magnetic fields, I don’t think that is an “ability” as such…


(GOLIATH Mod) #30

Yeah, I know. But it was also useful to see whether or not the .lua was being read. I’m pretty sure that as soon as there’s some nonsense in there, it throws the whole lua out. I noticed it with the reseach, that if you had a mistake a lot of times nothing from that lua file would be entered.

I can live with the Hiigaran field frigate being turned on all the time. I’ll leave the two field frigates as magnetic shields, and use the fields that can be turned off as the upgrade fields. I’ll have to change all the weapon penetrations in the weapon files, but whatever, it was a lot of typing anyway. haha

Thanks for all the help you guys. There’s no freaking way I would’ve figured that out on my own.


(Taiidan Republic Mod) #31

Yes it does. Add -luatrace to your command line to get lua debugging in the log file (it usually tells you what file and what line the error is on, which is helpful).

If you are still trying to get magnetic fields to work, have a look at hgn_cloakgenerator.subs. This line in particular:

AddSubSystemAbility(NewSubSystemType,"Cloak",1,"ThisShipOnly",0);

I wonder if that could work with magnetic fields… If it did, you could make an invisible “magnetic field” subsystem and use HOD patching to apply it to exisiting ships…

That’s what the forum is for :wink: None of us would be anywhere near as knowledgeable if we were all doing this on our own.


(Taiidan Republic Mod) #32

To go back to the research question, how does this work?

	{
		Name =					"RepairAbility",
		RequiredResearch =		"",
		RequiredSubSystems =	"Research | AdvancedResearch",
		Cost = 					750,
		Time = 					40,
		DisplayedName =			"$7511",
		DisplayPriority =		26,
		Description =			"$7512",
		UpgradeType =			Ability,
		TargetType =			Ship,
		TargetName =			"Hgn_ResourceCollector",
        	UpgradeName =			"Repair",
		Icon = 				Icon_Ability,
		ShortDisplayedName = 		"$7205",
	},

I mean, do you even need custom code to link an ability with a research item…?


(GOLIATH Mod) #33

You can just put the ones in this list in the research item: http://hw2bsg.org/wiki.hw2.info/ModifiableValues.html

The problem was that none of those are meant to turn the shield ability on.


(Taiidan Republic Mod) #34

ah, ok.

ResourceCapacity

That’s interesting. You could make a research item to increase your collector capacity.


(GOLIATH Mod) #35

Crap - I totally had this working, then I tried to get the magnetic shields working without securing a copy. Now I can get the Hiigaran shields to work again. Can you guys please take a look? I bet there’s a stupid mistake that I’m not seeing. The custom code is commented out; that works. I can’t seem to get the Hiigaran shield bubble to show again.

Ship FIle:

NewShipType = StartShipConfig()
NewShipType.displayedName="$1520"
NewShipType.sobDescription="$1521"
NewShipType.maxhealth=getShipNum(NewShipType, "maxhealth", 18500)
NewShipType.regentime=1200
NewShipType.minRegenTime=1200
NewShipType.sideArmourDamage = getShipNum(NewShipType, "sideArmourDamage", 1.2)
NewShipType.rearArmourDamage = getShipNum(NewShipType, "rearArmourDamage", 1.2)
setTacticsMults(NewShipType, "ENGINEACCEL", 1.10, 0.90, 1.0)
setTacticsMults(NewShipType, "THRUSTERACCEL", 1.10, 0.90, 1.0)
setTacticsMults(NewShipType, "ROTATION", 0.95, 1.05, 1.0)
setTacticsMults(NewShipType, "ROTATIONACCEL", 1.10, 0.90, 1.0)
setTacticsMults(NewShipType, "FIRERATE", 0.98, 1.02, 1.0)
NewShipType.isTransferable=1
NewShipType.formationSpacing=250
NewShipType.defaultROE="Defensive"
NewShipType.defaultStance="Neutral"
NewShipType.mass=100
NewShipType.collisionMultiplier=1
NewShipType.thrusterMaxSpeed=165
NewShipType.mainEngineMaxSpeed=165
NewShipType.rotationMaxSpeed=35
NewShipType.thrusterAccelTime=7
NewShipType.thrusterBrakeTime=2
NewShipType.mainEngineAccelTime=8
NewShipType.mainEngineBrakeTime=2
NewShipType.rotationAccelTime=0.4
NewShipType.rotationBrakeTime=0.2
NewShipType.thrusterUsage=0.5
NewShipType.accelerationAngle=40
NewShipType.mirrorAngle=0
NewShipType.secondaryTurnAngle=70
NewShipType.maxBankingAmount=25
NewShipType.descendPitch=35
NewShipType.goalReachEpsilon=30
NewShipType.slideMoveRange=100
NewShipType.controllerType="Ship"
NewShipType.tumbleStaticX=10
NewShipType.tumbleStaticY=20
NewShipType.tumbleStaticZ=5
NewShipType.tumbleDynamicX=2
NewShipType.tumbleDynamicY=10
NewShipType.tumbleDynamicZ=5
NewShipType.tumbleSpecialDynamicX=2
NewShipType.tumbleSpecialDynamicY=10
NewShipType.tumbleSpecialDynamicZ=5
NewShipType.relativeMoveFactor=3
setTargetBox(NewShipType, 0, -0.3,-0.35,-0.75, 0.4,0.6,0.85)
NewShipType.useLayoutBounds=1
NewShipType.layoutBoundX=60
NewShipType.layoutBoundY=50
NewShipType.layoutBoundZ=100
NewShipType.layoutCenterX=0
NewShipType.layoutCenterY=0
NewShipType.layoutCenterZ=10
NewShipType.dustCloudDamageTime=160
NewShipType.nebulaDamageTime=200
NewShipType.MinimalFamilyToFindPathAround="MotherShip"
NewShipType.BuildFamily="Frigate_Hgn"
NewShipType.AttackFamily="Frigate"
NewShipType.DockFamily="Frigate"
NewShipType.AvoidanceFamily="Frigate"
NewShipType.DisplayFamily="Frigate"
NewShipType.AutoFormationFamily="Frigate"
NewShipType.CollisionFamily="Big"
NewShipType.ArmourFamily=getShipStr(NewShipType, "ArmourFamily", "MediumArmour")
setSupplyValue(NewShipType, "Frigate", 1.0)
setSupplyValue(NewShipType, "LayoutFrigate", 1.0)
NewShipType.fighterValue=0
NewShipType.corvetteValue=0
NewShipType.frigateValue=12
NewShipType.neutralValue=0
NewShipType.antiFighterValue=0
NewShipType.antiCorvetteValue=0
NewShipType.antiFrigateValue=12
NewShipType.totalValue=12
NewShipType.buildCost=700
NewShipType.buildTime=45
NewShipType.buildPriorityOrder=30
NewShipType.retaliationRange=5500
NewShipType.retaliationDistanceFromGoal=160
NewShipType.visualRange=1000
NewShipType.prmSensorRange=5000
NewShipType.secSensorRange=6000
NewShipType.detectionStrength=1
NewShipType.TOIcon="Diamond"
NewShipType.TOScale=1
NewShipType.TODistanceFade0=9000
NewShipType.TODistanceDisappear0=7000
NewShipType.TODistanceFade1=4500
NewShipType.TODistanceDisappear1=3500
NewShipType.TODistanceFade2=12000
NewShipType.TODistanceDisappear2=35000
NewShipType.TOGroupScale=1
NewShipType.TOGroupMergeSize=0
NewShipType.mouseOverMinFadeSize=0.045
NewShipType.mouseOverMaxFadeSize=0.1
NewShipType.healthBarStyle=1
NewShipType.nlips=0.000125
NewShipType.nlipsRange=6000
NewShipType.nlipsFar=0.0001
NewShipType.nlipsFarRange=10000
NewShipType.SMRepresentation="HardDot"
NewShipType.meshRenderLimit=14000
NewShipType.dotRenderLimit=10
NewShipType.visibleInSecondary=1
NewShipType.minLOD=0.25
NewShipType.goblinsStartFade=1540
NewShipType.goblinsOff=1540
NewShipType.upLOD=2250
NewShipType.downLOD=2000
NewShipType.minimumZoomFactor=0.6
NewShipType.selectionLimit=150000
NewShipType.preciseATILimit=0
NewShipType.selectionPriority=75
NewShipType.militaryUnit=1
addAbility(NewShipType,"MoveCommand",1,0);
addAbility(NewShipType,"CanDock",1,0);
NewShipType.dockTimeBetweenTwoFormations=1
NewShipType.dockTimeBeforeStart=2
NewShipType.dockNrOfShipsInDockFormation=1
NewShipType.dockFormation="delta"
NewShipType.queueFormation="dockline"
NewShipType.strikeGroupRadius=100
NewShipType.dontDockWithOtherRaceShips=1
NewShipType.ignoreRaceWhenDocking=0
addAbility(NewShipType,"CanLaunch");
NewShipType.launchTimeBetweenTwoFormations=1
NewShipType.launchTimeBeforeStart=2
NewShipType.launchNrOfShipsInDockFormation=1
NewShipType.launchFormation="delta"
addAbility(NewShipType,"ParadeCommand",1);
addAbility(NewShipType,"WaypointMove");
addAbility(NewShipType,"HyperSpaceCommand",0,1,200,500,0,3);
addAbility(NewShipType,"CanAttack",1,1,0,1,0.35,1.5,"Capturer, Frigate, SmallCapitalShip, BigCapitalShip, Mothership, Utility,,,,, Corvette, Corvette_hw1, Fighter, Fighter_hw1","frontal_frigate",

{Fighter="frontal_vs_fighter"},
{Fighter_hw1="frontal_vs_fighter"},
{Corvette="frontal_vs_fighter"},
{Corvette_hw1="frontal_vs_fighter"},
{SmallCapitalShip="frontal_frigate"},
{BigCapitalShip="frontal_frigate"});
addAbility(NewShipType,"GuardCommand",1,3000,600);
addAbility(NewShipType,"HyperspaceViaGateCommand",1,3,1,0.3);
addAbility(NewShipType,"CanBeCaptured",30,0.1,"CapCap");
addAbility(NewShipType,"CanBeSalvageCaptured",0,1,0,0,1,"SalCap");
addAbility(NewShipType,"CanBeRepaired","RepCap");
addAbility(NewShipType,"RetireAbility",1,1);


--this set worked to make the HGN shield and the ship.lua works to activate it as well
--addAbility(NewShipType,"DefenseFieldAbility",1,0,1500,200,200,0.7,0.6,0,"defensefield_sphere_spray");
--addAbility(NewShipType,"DefenseFieldShieldAbility",0,1500,0,0);
--addCustomCode(NewShipType,"data:Ship/hgn_ioncannonfrigate/hgn_ioncannonfrigate.lua","","","Update_IonFrigate","","hgn_ioncannonfrigate",2)

--this set to make the TAI sheild which is actually the one we want
--addMagneticField(NewShipType,"MagneticField",500,99,"defenseField_generic",15,"defenseField_generic",99,"plasma_hit_spray_MagneticField","defensefield_sphere_spray_TFF");
--addAbility(NewShipType,"DefenseFieldShieldAbility",0,500,0,0);
--with or without the next line the mag shield is always on, but is visible and works
--addCustomCode(NewShipType,"data:Ship/hgn_ioncannonfrigate/hgn_ioncannonfrigate.lua","","","Update_IonFrigate","","hgn_ioncannonfrigate",2)

addAbility(NewShipType,"DefenseFieldAbility",1,0,1200,200,200,0.7,0.6,0,"defensefield_sphere_spray");
addAbility(NewShipType,"DefenseFieldShieldAbility",0,1200,0,0);


LoadModel(NewShipType,1);
StartShipWeaponConfig(NewShipType,"Hgn_IonCannon","Weapon_Top","Fire");
addShield(NewShipType,"EMP",310,20);

AddShipAbility(NewShipType,"DefenseField",1,"ThisShipOnly",0);

NewShipType.battleScarCoverage=2
NewShipType.battleScarBudgetLow = 400
NewShipType.battleScarBudgetNext = 600
NewShipType.sobDieTime=1.9
NewShipType.sobSpecialDieTime=1
NewShipType.specialDeathSpeed=40
NewShipType.chanceOfSpecialDeath=0
NewShipType.deadSobFadeTime=0
NewShipType.trailLinger=4
setEngineGlow(NewShipType,1,1,1.02,20,300,50,1.5,{0.27, 0.47, .69, 0.25});
loadShipPatchList(NewShipType,"data:sound/sfx/ship/Hiigaran/Frigate/",0,"Engines/HFrigateEng","",1,"Ambience/HFrigateAmb","");
loadLatchPointList(NewShipType,"SalCap","SalvagePoint1","SalvagePoint2");
loadLatchPointList(NewShipType,"CapCap","CapturePoint0");
loadLatchPointList(NewShipType,"RepCap","RepairPoint0","RepairPoint1");		
NewShipType.minFalloffDamageDist=100
NewShipType.maxFalloffDamageDist=100*2
NewShipType.maxFalloffScuttleDamageDist=100*4
NewShipType.explosiveScuttleDamageOnDeath=971
NewShipType.maxFalloffForce=500*10
NewShipType.explosiveDamageOnDeath=194
NewShipType.radiusDamageEvadeMod=1.1														 
NewShipType.canSurround=1

Events file:

effects =
{
    animations =
    {
        animation1 =
        {
            name = "Fire",
            length = 5,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation2 =
        {
            name = "Death",
            length = 3,
            loop = 0,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation3 =
        {
            name = "Damage",
            length = 1,
            loop = 1,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },
        animation4 =
        {
            name = "dmg01",
            length = 1,
            loop = 1,
            parent = "Damage",
            minimum = 0.25,
            maximum = 1,
            markers = {""}
        },
        animation5 =
        {
            name = "dmg02",
            length = 1,
            loop = 1,
            parent = "Damage",
            minimum = 0.5,
            maximum = 1,
            markers = {""}
        },
        animation6 =
        {
            name = "dmg03",
            length = 1,
            loop = 1,
            parent = "Damage",
            minimum = 0.75,
            maximum = 1,
            markers = {""}
        },

    animation9 =
        {
            name = "On",
            length = 1,
            loop = 1,
            parent = "",
            minimum = 0,
            maximum = 0,
            markers = {""}
        },


    },
    events =
    {
        event1 =
        {
            { "anim", "Fire" },
            { "animtime", "0" },
            { "marker", "Weapon_Top_Position" },
            { "fx", "ion_beam_charge_combo" },
            { "sound", "WEAPON/FRIGATE/FIRE/WEAPON_FRIGATE_ION_CANNON_BEAM" },
        },
        event2 =
        {
            { "anim", "Fire" },
            { "animtime", "0.1" },
            { "marker", "vent2" },
            { "fx", "ion_cannon_steam_spray" },
            { "sound", "DAMAGE/SMOKE/ION_BEAM_DISCHARGE" },
        },
        event3 =
        {
            { "anim", "Death" },
            { "animtime", "0" },
            { "marker", "marker2" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "sound", "EXPLOSION/SMALL/ETG_EXPLODE_SMALL_PLASMA" },
            { "fx_scale", "1.5" },
        },
        event4 =
        {
            { "anim", "Death" },
            { "animtime", "0.2" },
            { "marker", "marker6" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "fx_scale", "1" },
        },
        event5 =
        {
            { "anim", "Death" },
            { "animtime", "0.1" },
            { "marker", "marker4" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "sound", "EXPLOSION/MEDIUM/ETG_EXPLODE_MEDIUM_PLASMA" },
            { "fx_scale", "1.5" },
        },
        event6 =
        {
            { "anim", "Death" },
            { "animtime", "0.3" },
            { "marker", "marker8" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "fx_scale", "2.5" },
        },
        event7 =
        {
            { "anim", "Death" },
            { "animtime", "0.45" },
            { "marker", "Root" },
            { "fx", "dmg_cloud_main_explosion_combo" },
            { "sound", "EXPLOSION/MEDIUM/ETG_EXPLODE_MEDIUM_PLASMA" },
            { "fx_scale", "7" },
        },
				--smoke
				smoke1 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0", }, 
						{ "marker", "Root", }, 
						{ "fx", "death_generic_cf_instant", },						
						{ "fx_scale", "entity", }, 
				},  
				--chunck				
				chunck1 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0.42", }, 						
						{ "marker", "Root", }, 
						{ "fx", "dmg_capital_explosion_large_hull_flare_cf_noscar_35_final2", },                 
						{ "fx_scale", "0.85", }, 
				},        
				chunck2 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0.43", }, 						
						{ "marker", "Root", },
						{ "fx", "dmg_capital_explosion_large_hull_flare_cf_noscar_35_final1", },                 
						{ "fx_scale", "0.95", }, 
				},
				--chunck fast				
				chunckfast1 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0.44", }, 						
						{ "marker", "Root", },
						{ "fx", "dmg_capital_explosion_large_hull_flare_cf_noscar_35_final_fast2", },                 
						{ "fx_scale", "0.5", }, 
				},    				
				chunckfast2 = 
				{ 
						{ "anim", "death", }, 
						{ "animtime", "0.45", }, 						
						{ "marker", "Root", },
						{ "fx", "dmg_capital_explosion_large_hull_flare_cf_noscar_35_final_fast1", },                 
						{ "fx_scale", "0.6", }, 
				}, 
        event8 =
        {
            { "anim", "Death" },
            { "animtime", "0.05" },
            { "marker", "marker1" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "fx_scale", "1" },
        },
        event9 =
        {
            { "anim", "Death" },
            { "animtime", "0.1" },
            { "marker", "marker5" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "sound", "EXPLOSION/SMALL/ETG_EXPLODE_SMALL_PLASMA" },
            { "fx_scale", "2.5" },
        },
        event10 =
        {
            { "anim", "Death" },
            { "animtime", "0.25" },
            { "marker", "marker7" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "fx_scale", "2" },
        },
        event11 =
        {
            { "anim", "Death" },
            { "animtime", "0.2" },
            { "marker", "marker3" },
            { "fx", "dmg_cloud_explosion_large_nodebris" },
            { "sound", "EXPLOSION/LARGE/ETG_EXPLODE_LARGE_FIREY" },
            { "fx_scale", "0.75" },
        },
        event12 =
        {
            { "anim", "dmg01" },
            { "animtime", "-1" },
            { "marker", "marker1,marker2" },
            { "fx", "dmg_damage_puff_combo_frigate,dmg_damage_cloud_puff_spray" },
            { "sound", "DAMAGE/SMOKE/DAMAGE_SMOKE_EXHAUST_HEAVY" },
            { "fx_scale", "5" },
            { "fx_nlips", "on" },
        },
        event13 =
        {
            { "anim", "dmg02" },
            { "animtime", "-1" },
            { "marker", "marker3,marker4" },
            { "fx", "dmg_damage_puff_combo_frigate,dmg_damage_cloud_puff_spray" },
            { "sound", "DAMAGE/SMOKE/DAMAGE_SMOKE_EXHAUST_HEAVY" },
            { "fx_scale", "7.5" },
            { "fx_nlips", "on" },
        },
        event14 =
        {
            { "anim", "dmg03" },
            { "animtime", "-1" },
            { "marker", "marker5" },
            { "fx", "dmg_damage_puff_combo_frigate,dmg_damage_cloud_puff_spray" },
            { "sound", "DAMAGE/SMOKE/DAMAGE_SMOKE_EXHAUST_HEAVY" },
            { "fx_scale", "10" },
            { "fx_nlips", "on" },
        },

         event15 =
        {
            { "anim", "On" },
            { "animtime", "-1" },
            { "marker", "root" },
            { "sound", "SP_ELEMENTS/HGN_DEFENSEFIELDFRIGATE_ON" },
			{ "fx", "defensefield_sphere_spray" },
			{ "fx_scale", "1500" },
        },

 
    }
}

Madstate file:



HGN_IONCANNONFRIGATE_DefenseFieldActivate_OnSet = function(ship)
    startEffect(ship, "DefFieldEffect")
end

HGN_IONCANNONFRIGATE_DefenseFieldDeActivate_OnSet = function(ship)
    endEffect(ship, "DefFieldEffect")
end

Crud. I totally had this before. Thanks for the help!


(GOLIATH Mod) #36

found it, madstate was wrong:


HGN_IONCANNONFRIGATE_DefenseFieldActivate_OnSet = function(ship)
   
    setState(ship, "DefenseFieldActivate", 1)

    	startEffect(ship, "On")

end

HGN_IONCANNONFRIGATE_DefenseFieldDeActivate_OnSet = function(ship)
   
    setState(ship, "DefenseFieldDeActivate", 1)
       	endEffect(ship, "On")
 
end

obviously - STUPID!!


(GOLIATH Mod) #37

Has anybody ever messed around with changing the way the shields look?

I guess I should’ve looked at this to begin with, because it’s the most important aspect of the whole thing: the Vaygr shields need to be RED!! DUH.

It seems like the appearance of the shield is determined by the defence_field.lod, but there is also a defence_field.tga that looks like you should be able to change it, but I haven’t been able to get it to work.

Are there any fx experts out there?


(Taiidan Republic Mod) #38

Calling @radar3301

Are you sure it is .lod not .hod?


(GOLIATH Mod) #39

oh, yeah right - it’s the .hod.

I opened the .hod file in notepad, and in the nonsense I can see a reference to defence_field.tga. I tried changing it like that, but it crashed.

I’m wondering why they included the defence_field.tga in the files though. The other hod textures aren’t included. Might be left over from before I guess…

But didn’t people used to do do that, just opening files in text and changing the stuff you can read to try and mod or hack stuff? Maybe there’s a trick to it.

Or maybe it’s easy to make a new hod in blender? It’s just a sphere with a texture on it, right?


(Taiidan Republic Mod) #40

HOD files contain models, textures and joint data. You cannot edit them in notepad.

You could try opening the existing one in cfhoded to find out the format and then create a new one using blender and HODOR. But this is topic really off the map for me, I have never messed with fx HOD files… Maybe I should learn how to one day…