Hi,
I tried to run BOTA mod with current spring and I run into problem that game initialization (game_spawn.lua) throws exception when trying to call Spring.SetUnitLineage(unitID, teamID, true)
Anyways the mod starts but game initialization is half done (start metal & energy is always 0 - no matter what set from lobby or the default 1000 values).
So I looked from xtar mod and found out that in it the call to SetUnitLineage had been commented out as. I did that in Bota too however now I am wondering should I add some additional initialization code?
From http://springrts.com/wiki/Lua_SyncedCtrl I found out that
Spring.SetUnitLineage Removed from version 83.0
( number unitID, number teamID [, boolean isRoot] ) -> nil
SetUnitLineage call in Game spawn lua of BOTA mod
Moderator: Moderators
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: SetUnitLineage call in Game spawn lua of BOTA mod
It will take a bit of work to get BOTA working because it relies on some special case code that has been removed from the engine. Try taking BA's initialisation gadget.
- PepeAmpere
- Posts: 589
- Joined: 03 Jun 2010, 01:28
Re: SetUnitLineage call in Game spawn lua of BOTA mod
Hi, I can repair the BOTA, but i suggest Thor's later work... NOTA - that enhances concepts of BOTA much more and its still maintained. Try it.ismo wrote:Hi,
I tried to run BOTA mod with current spring and I run into problem that game initialization (game_spawn.lua) throws exception when trying to call Spring.SetUnitLineage(unitID, teamID, true)
Anyways the mod starts but game initialization is half done (start metal & energy is always 0 - no matter what set from lobby or the default 1000 values).
So I looked from xtar mod and found out that in it the call to SetUnitLineage had been commented out as. I did that in Bota too however now I am wondering should I add some additional initialization code?
From http://springrts.com/wiki/Lua_SyncedCtrl I found out that
Spring.SetUnitLineage Removed from version 83.0
( number unitID, number teamID [, boolean isRoot] ) -> nil
Re: SetUnitLineage call in Game spawn lua of BOTA mod
Lineage has been fully removed from engine. You can use the ba game spawb gadget instead.
Re: SetUnitLineage call in Game spawn lua of BOTA mod
iirc the lineage thing was something where it kept track of the original owner when a unit was shared to other players. idea was to prevent the "share units to teammate 1 seconde before commander dies in com-ends matches." So if you not need that, just remove the line.
Re: SetUnitLineage call in Game spawn lua of BOTA mod
Thank you all from good comments. I ran into another 4 lua script issues which of 2 I managed to fix already.
The remaining ones are:
Error #1:
[f=0000000] Error: [WeaponDefIndex] ERROR_TYPE for key "areaOfEffect" in WeaponDefs __index
(I could not find source of above error but my guess it is that it is related to gui_attack_aoe_bota.lua - see the #2 error)
Error #2:
f=0000000] Error in Initialize(): [string "LuaUI/Widgets/gui_attack_aoe_bota.lua"]:182: attempt to compare number with nil
This is coming from initialization / function SetupUnitDef(unitDefID, unitDef), from line
However I think that SetupUnitDef is ok, thus the source must be in some weapon tdf etc file (just my guess). Jools was thinking that perhaps areaOfEffect is not defined for some needed weapon(s).
I also noticed that Ray's xtar 1.03 mod is getting these two errors too (I guess as it is no longer developed?) but Deadnight's XTA mod did not get. So I tried to copy the gui_attack_aoe_xta.lua from Deadnight's mod but that resulted into ~20 new ERROR_TYPE for key "maxVelocity" in WeaponDefs __index errors.
P.S. Perhaps I try NOTA someday, haven't tested it for a year or so.
The remaining ones are:
Error #1:
[f=0000000] Error: [WeaponDefIndex] ERROR_TYPE for key "areaOfEffect" in WeaponDefs __index
(I could not find source of above error but my guess it is that it is related to gui_attack_aoe_bota.lua - see the #2 error)
Error #2:
f=0000000] Error in Initialize(): [string "LuaUI/Widgets/gui_attack_aoe_bota.lua"]:182: attempt to compare number with nil
This is coming from initialization / function SetupUnitDef(unitDefID, unitDef), from line
Code: Select all
and (weaponDef.areaOfEffect > maxSpread or weaponDef.range * (weaponDef.accuracy + weaponDef.sprayAngle) > maxSpread )
However I think that SetupUnitDef is ok, thus the source must be in some weapon tdf etc file (just my guess). Jools was thinking that perhaps areaOfEffect is not defined for some needed weapon(s).
I also noticed that Ray's xtar 1.03 mod is getting these two errors too (I guess as it is no longer developed?) but Deadnight's XTA mod did not get. So I tried to copy the gui_attack_aoe_xta.lua from Deadnight's mod but that resulted into ~20 new ERROR_TYPE for key "maxVelocity" in WeaponDefs __index errors.
P.S. Perhaps I try NOTA someday, haven't tested it for a year or so.
Re: SetUnitLineage call in Game spawn lua of BOTA mod
2) wdef[id].areaOfEffect was made redundant and clearly tagged for removal after the introduction of wdef[id].damageAreaOfEffect + wdef[id].craterAreaOfEffect in 85.0 (as can be found in the changelog)
wdef[id].maxVelocity was already marked deprecated
- Deadnight Warrior
- Posts: 183
- Joined: 08 Jun 2009, 17:59
Re: SetUnitLineage call in Game spawn lua of BOTA mod
When in doubt look into SVN. XTA 9.71 has an outdated AreaOfEffect widget, but latest beta doesn't (at least I think it's fixed, as I have a local copy since some other less maintained games might have problems with this as well)
Re: SetUnitLineage call in Game spawn lua of BOTA mod
The problem is also that sometimes mods define their own names for some parameters, so you cannot just look up in the wiki for the name of some parameter.
For example, the original OTA name is "soundhit", bit it is defined as WeaponDefs[3]["hitSound"] in the wiki.
For example, the original OTA name is "soundhit", bit it is defined as WeaponDefs[3]["hitSound"] in the wiki.
Last edited by Jools on 28 May 2012, 23:34, edited 1 time in total.
Re: SetUnitLineage call in Game spawn lua of BOTA mod
There are not that many projects. It isn't THAT big a deal.
Re: SetUnitLineage call in Game spawn lua of BOTA mod
I guess that one is redefined by the engine.