Page 14 of 16

Re: BA Chicken Defense V2.15 (BA720)

Posted: 26 Jul 2011, 22:09
by dcore221
here are the bad units if anyone wants to take a look?

chickena1.lua
http://pastebin.com/7RRahU4p

chickena2.lua
http://pastebin.com/gcYtFTBe

chickenp1.lua
http://pastebin.com/3N0LvuUz

chickenr1.lua
http://pastebin.com/jMB7UsxA

chickenr2.lua
http://pastebin.com/nFnTBX5h

chickenr3.lua
http://pastebin.com/he58cCZA

and a minor artifact with chicken_dodo2.lua
http://pastebin.com/5xs3J6PY
Image

ImageShack.us

Re: BA Chicken Defense V2.15 (BA720)

Posted: 26 Jul 2011, 22:46
by very_bad_soldier
dcore221 wrote: also my team spawns 2 commanders

any ideas?
BA750 includes a new gadget for spawning initial commanders. game_initial_spawn.lua by Niobium. Chickens also includes the old spawn gadget ending up in spawning two commanders.
You will probably want to modify chickens to also use Nio's new spawn gadget. Just my guess though...

Re: BA Chicken Defense V2.15 (BA720)

Posted: 27 Jul 2011, 13:55
by Zydox
Keep up the job with trying to fix CD for BA7.50, I've missed it but been to lazy to do anything myself... :oops:

Re: BA Chicken Defense V2.15 (BA720)

Posted: 27 Jul 2011, 14:27
by smoth
Can someone tell me if ba/ba chickens is using a modified unitdefs parsing lua? because that could explain why he is getting no errors with the chickens unit defs. IIRC chickens should not have any gamedata/unitdefs*.lua

Re: BA Chicken Defense V2.15 (BA720)

Posted: 27 Jul 2011, 14:54
by dansan
smoth wrote:Can someone tell me if ba/ba chickens is using a modified unitdefs parsing lua? because that could explain why he is getting no errors with the chickens unit defs. IIRC chickens should not have any gamedata/unitdefs*.lua
There is no such file inside bachickens215ba720.sdz
In BA720.sdz (dependency of bachickens215) there is gamedata/unitdefs_post.lua.

Re: BA Chicken Defense V2.15 (BA720)

Posted: 27 Jul 2011, 15:36
by dcore221
thanks bad_soldier that worked it fixed player resources too :]

i have fixed the bad units and everything seems to be working, the only thing is the chicken commander self destroying at the start if we can fix that think it will be ready for testing :mrgreen:

Re: BA Chicken Defense V2.15 (BA720)

Posted: 27 Jul 2011, 18:32
by dcore221
any suggestions im totally stuck :(

Re: BA Chicken Defense V2.15 (BA720)

Posted: 02 Aug 2011, 19:15
by dcore221
the error has been fixed with some help, it is now possible to play but i get this error mid-game
any ideas?

Code: Select all

[f=0071700] LuaRules::RunCallIn: error = 2, UnitDestroyed, [string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1201: DestroyUnit() recursion is not permitted
stack traceback:
	[C]: in function 'DestroyUnit'
	[string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1201: in function 'UnitDestroyed'
	[string "LuaRules/gadgets.lua"]:1248: in function <[string "LuaRules/gadgets.lua"]:1245>
	(tail call): ?
	[C]: in function 'DestroyUnit'
	[string "LuaRules/Gadgets/unit_spawner_defense.lua"]:358: in function 'KillOldChicken'
	[string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1037: in function 'GameFrame'
	[string "LuaRules/gadgets.lua"]:931: in function <[string "LuaRules/gadgets.lua"]:929>
	(tail call): ?
unit_spawner_defense.lua
http://pastebin.com/HhjtE8tA

gadgets.lua
http://pastebin.com/rgDZUCaj

Re: BA Chicken Defense V2.15 (BA720)

Posted: 02 Aug 2011, 22:28
by hoijui
when you want to destroy a unit when an other unit was destroyed, i think you have to set a flag, and actually delete it the next time update is called (or something like that).

Re: BA Chicken Defense V2.20 (BA750)

Posted: 07 Aug 2011, 17:57
by TheFatController
Didn't realise the changes to BA would make updating this a pain in the ass however I have spent this afternoon fixing it (plus a few small changes), see OP for download link.

Re: BA Chicken Defense V2.20 (BA750)

Posted: 07 Aug 2011, 20:21
by KaiserJ
tyvm sir!

Re: BA Chicken Defense V2.20 (BA750)

Posted: 07 Aug 2011, 22:27
by Zydox
TheFatController wrote:Didn't realise the changes to BA would make updating this a pain in the ass however I have spent this afternoon fixing it (plus a few small changes), see OP for download link.
<3

Re: BA Chicken Defense V2.25 (BA750)

Posted: 12 Aug 2011, 00:31
by TheFatController
Updated with a load of tweaks and changes
http://springfiles.com/spring/games/ba- ... -defense-1
Changelog 2.25 (BA750)
- Bit more variation in chicken size / colour
- A few new chicken types!
- Rebalanced most waves with various tweaks to squads/types
- Queen is larger, more effective against Air (2.20 failed to include BA's new air classes on her weapons)
- Queen behaviour & squad spawning altered
- Possibly more changes I forgot (also added an easter egg..!)

Re: BA Chicken Defense V2.25 (BA750)

Posted: 29 Sep 2011, 22:48
by abma
lua-errors in BA Chicken Defense V2.25 (BA7.50):

http://pastebin.com/c0w6tFsQ
snipped part:

Code: Select all

[f=0046912] LuaRules::RunCallIn: error = 2, UnitDestroyed, [string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1234: DestroyUnit() recursion is not permitted
stack traceback:
        [C]: in function 'DestroyUnit'
        [string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1234: in function 'UnitDestroyed'
        [string "LuaRules/gadgets.lua"]:1248: in function <[string "LuaRules/gadgets.lua"]:1245>
        (tail call): ?
        [C]: in function 'DestroyUnit'
        [string "LuaRules/Gadgets/teamcomends.lua"]:45: in function 'GameFrame'
        [string "LuaRules/gadgets.lua"]:931: in function <[string "LuaRules/gadgets.lua"]:929>
        (tail call): ?

Re: BA Chicken Defense V2.25 (BA750)

Posted: 24 Nov 2011, 00:18
by abma
doesn't work with current release...

Re: BA Chicken Defense V2.25 (BA750)

Posted: 03 Dec 2011, 08:41
by dcore221

Code: Select all

[f=0008400] Error: LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/unit_spawner_defense.lua"]:621: 'for' limit must be a number
stack traceback:
	[string "LuaRules/Gadgets/unit_spawner_defense.lua"]:621: in function 'SpawnBurrow'
	[string "LuaRules/Gadgets/unit_spawner_defense.lua"]:1139: in function 'GameFrame'
	[string "LuaRules/gadgets.lua"]:931: in function <[string "LuaRules/gadgets.lua"]:929>
	(tail call): ?
[f=0008410] Error: LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Gadgets/unit_spawner_defense.lua"]:621: 'for' limit must be a number

Code: Select all

616    if (blocking == 2) and (burrowSpawnType == "avoid") then
617      local proximity = GetUnitsInCylinder(x, z, minBaseDistance)
618      local vicinity = GetUnitsInCylinder(x, z, maxBaseDistance)
619      local humanUnitsInVicinity = false
620      local humanUnitsInProximity = false
621      for i=1,vicinity['n'],1 do

Code: Select all

1136    if (burrowCount < minBurrows) or (burrowSpawnTime <  (t - timeOfLastSpawn) and burrowCount < maxBurrows) then 
1137      if firstSpawn then
 1138       for i = 1,math.min(math.ceil((SetCount(humanTeams) * 1.5)) + gracePenalty, 40),1 do
1139          SpawnBurrow()
1140        end

Code: Select all

927  if (unitDefID == LOBBER) then
928    local nSpawn = false
929    if ((GetUnitHealth(unitID) < 2475) and (damage < (2000 + 930mRandom(1,500)))) then nSpawn = true end
930    if ((JUNO[weaponID]) and (mRandom(1,2) == 1)) then nSpawn = true end
931    if nSpawn then 

Re: BA Chicken Defense V2.25 (BA750)

Posted: 03 Dec 2011, 14:54
by knorke
621 for i=1,vicinity['n'],1 do
->
for i=1,#vicinity,1 do

Re: BA Chicken Defense V2.25 (BA750)

Posted: 03 Dec 2011, 16:12
by dcore221
Thanks knorke :-)

Re: BA Chicken Defense V2.25 (BA750)

Posted: 03 Dec 2011, 16:25
by FabriceFABS
Thx knorke

Re: BA Chicken Defense V2.25 (BA750)

Posted: 28 Dec 2011, 22:48
by Zydox
Any new update for BA 7.63 on it's way? :-)