- Code: Select all
LOG('processing >>>'..id..'<<< +LAND -STRUCTURE -EXPERIMENTAL : Changing MaxHealth from ('..(bp.Defense.MaxHealth)..') to "'..(bp.Defense.MaxHealth * 2.0)..'"')
This is a simple "print" into the debug log. It just show information about the unit and what you are changing on it.
I guess you have the debugwindow always open when you are programming/checking someting in Supreme commander ?
If not:
Start the game in windowed mode.
Select skirmish or LAN and launch into a game session.
If you can see your commander press [F9] to activate the debug window.
The debugwindow will be maybe under or behind your main-game-window.
There you can see any errors and many information about the game.
You can also force the debugwindow to show up while gamestart:
Please Make a desktop-shortcut from the file:
C:\ProgramData\FAForever\bin\ForgedAlliance.exe
(Rightclick the file and select "Send to" -> Desktop Shortcut")
Open the shortcut and change the Command line (target):
from:
C:\ProgramData\FAForever\bin\ForgedAlliance.exe
to:
C:\ProgramData\FAForever\bin\ForgedAlliance.exe /init init_faf.lua /EnableDiskWatch /log C:\game.log /showlog
commandline explanation:
"/init init_faf.lua" this will start the normal FAF version of the game. Change this to "/init init_fafbeta.lua" and you will start the beta version of FAF
"/EnableDiskWatch" with this you can change unit or game files and the game will immediately load and execute the new changes. You dont need to restart the game.
"/log C:\game.log" will force to write the game.log at c:\ root dir.
"/showlog" displays the Debug Window (Shows the same what you can find inside the game.log)
For your problem with death nuke weapons this will help:
It's looping over all weapons, and looking for "weapon.WeaponCategory == 'Death'"
If it has found a deatweapon it will check for nuke-ring-damage or set the normal damage to zero.
- Code: Select all
-- remove deat weapon damage on eco buildings
if Categories.ECONOMIC and not Categories.EXPERIMENTAL then
-- check first if we have a weapon array inside the unit blueprint
if bp.Weapon then
-- Loop over all Weaponss
for _,weapon in bp.Weapon do
-- check if we have a Death Weapon
if weapon.WeaponCategory and weapon.WeaponCategory == 'Death' then
-- If we have a nuke Weapon then disable damage from inner and outer nuke blast ring
if weapon.NukeInnerRingDamage and weapon.NukeOuterRingDamage then
LOG('processing >>>'..id..'<<< +ECONOMIC -EXPERIMENTAL : Changing Weapon.Damage from Nuke-Deathweapon from ('..weapon.NukeInnerRingDamage..'/'..weapon.NukeOuterRingDamage ..') to "0"')
-- set the damage to 0
weapon.NukeInnerRingDamage = 0
weapon.NukeOuterRingDamage = 0
-- in case its not a nuke weapon set the normal damage to Zero
elseif weapon.Damage then
LOG('processing >>>'..id..'<<< +ECONOMIC -EXPERIMENTAL : Changing Weapon.Damage from normal-Deathweapon from ('..(weapon.Damage)..') to "0"')
-- set the damage to 0
weapon.Damage = 0
end
end
end
end
end
If you want to reduce the BuildTime from an upgradeable unit you can do this:
- Code: Select all
-- Find a upgradeable structure and reduce the buildtime to 10%
if Categories.STRUCTURE then
-- is tis unit upgradeable ?
if bp.General.UpgradesTo then
-- check if we have a BuildTime and change it.
if bp.Economy.BuildTime then
LOG('processing >>>'..id..'<<< +STRUCTURE : Is upgradeable, Changing BuildTime from ('..(bp.Economy.BuildTime)..') to "'..(bp.Economy.BuildTime * 0.1)..'"')
-- set the BuildTime to 10%
bp.Economy.BuildTime = bp.Economy.BuildTime * 0.1
end
end
end
Well now to the last thing
- Code: Select all
--Hide full life bars
if Categories.SELECTABLE then
if bp.LifeBarSize and bp.Defense.MaxHealth and bp.Defense.Health then
if bp.Defense.MaxHealth = bp.Defense.MaxHealth then
bp.LifeBarSize = 0
end
end
end
First of all, the script is only executed once at gamestart.
It will not check the whole game long for the if statement.
So you can't change it inside the blueprint.lua.
Second, your if statement is missing a equal sign. you need 2 equals "=="
- Code: Select all
if bp.Defense.MaxHealth == bp.Defense.MaxHealth then
And of course "MaxHealth" is always equal to "MaxHealth". One of it should be "Health" ^^
I don't know what else could be a nice change. And i fear the balance terrorist. They are seeing everything
There are some people on steam asking for a cheat for Supreme Commander.
Maybe those players have some ideas what they want to change in the game as cheat or trainer.