I was looking through my game.log while diagnosing an unrelated issue, and I saw a few warnings that are probably related to TvG. It's up to you if you want to fix them, but I'd appreciate it if you did.
- Code: Select all
warning: *WARNING: Tried to apply a buff with an unknown affect type of Range for buff VeterancyPerkRange
It looks like the range perk is supposed to apply a 5% range increase, but it has no effect because uses "Range" as the Affects type instead of "MaxRadius".
- Code: Select all
warning: Error running lua script: ...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(4704): attempt to call field `IsInCombat' (a nil value)
stack traceback:
...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(4704): in function <...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua:4679>
This one showed up a lot. In the IsInCombat function in Unit.lua, you call oldUnit.IsInCombat, but I don't think the previous definition had a function by that name. If you're calling the original class's function for compatibility with another mod, maybe check if the function exists before calling it? Otherwise you could probably just remove that line.
- Code: Select all
warning: Error running OnCreate script in Entity urc1101 at 6e75ee08: ...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(4165): attempt to perform arithmetic on field `xpTimeStep' (a nil value)
stack traceback:
...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(4165): in function `OnCreate'
...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(4758): in function `OnCreate'
...gramdata\faforever\gamedata\lua.nx2\lua\sim\unit.lua(5080): in function `OnCreate'
...data\faforever\gamedata\lua.nx2\lua\defaultunits.lua(57): in function <...data\faforever\gamedata\lua.nx2\lua\defaultunits.lua:56>
[C]: in function `CreateUnitHPR'
...rever\gamedata\lua.nx2\lua\sim\scenarioutilities.lua(745): in function `CreatePlatoons'
...rever\gamedata\lua.nx2\lua\sim\scenarioutilities.lua(1702): in function `CreateArmyGroup'
...ce\maps\scca_coop_r03.v0010\scca_coop_r03_script.lua(241): in function `OnPopulate'
...ogramdata\faforever\gamedata\lua.nx2\lua\siminit.lua(168): in function <...ogramdata\faforever\gamedata\lua.nx2\lua\siminit.lua:160>
...ogramdata\faforever\gamedata\lua.nx2\lua\siminit.lua(277): in function <...ogramdata\faforever\gamedata\lua.nx2\lua\siminit.lua:273>
...ogramdata\faforever\gamedata\lua.nx2\lua\siminit.lua(356): in function `BeginSession'
This happened a few times at the beginning of a campaign mission. I think your function that modifies the blueprints doesn't set Economy.xpTimeStep for certain campaign-related units (civilian buildings, maybe?). The XPOverTime function in Unit.lua exits if there's not a value there, but the OnCreate function always tries to multiply it by 0.002, which causes the errors. The simplest solution is probably to move that math into the XPOverTime function.