Problems spawning start units

Players:PPsh vs Archl and pain3dw
Map:Kiev V4
Game version:Pre-M test 2787
Engine version: 0.81.2
Awesome rating (out of 5): BUG
Comments: The enemy team started with just the HQ unit !!! I think this bug is due to the recent change about starting units and starting units orientation (made by flozi).
It seems this bug appears some times but not every time !!

The change about stating units is not a “cleaning”. It is better to have a hack that works than a “clean up” that doesnt work.

This is what happened:

[      0] LuaRules::RunCallIn: error = 2, GameStart, [string "LuaRules/Gadgets/game_setup.lua"]:109: attempt to index local 'spawnList' (a nil value)
stack traceback:
	[string "LuaRules/Gadgets/game_setup.lua"]:109: in function 'SpawnBaseUnits'
	[string "LuaRules/Gadgets/game_setup.lua"]:164: in function 'SpawnStartUnit'
	[string "LuaRules/Gadgets/game_setup.lua"]:190: in function 'GameStart'
	[string "luagadgets/gadgets.lua"]:914: in function <[string "luagadgets/gadgets.lua"]:912>
	(tail call): ?

Edit: I think the fact some players had Random team has something to do with the crash. Namely that Random team’s starting unit list is not defined and so hqDefs[startUnit] is nil (and that’s what spawnList is…)
FLOZi, any ideas? (I don’t know the new init code too well)

Edit2: game_randomFaction.lua just replaces GMToolbox unit with a faction starting unit, without running game_setup for it again. So no wonder additional stuff doesn’t spawn. Proposed solution: as game_randomFaction.lua runs at GameStart(), do additional unit spawning at GameFrame 1 (supposedly that happens AFTER GameStart(), so SpawnBaseUnits(teamID, startUnit, x, z) in game_setup.lua should run after that somehow).

Additionnaly, it seems spiked’s Deployment Mode got broken by this change. Now only the infantry spawn point appears at begin. (no vehicles, tanks, artillery …)

JAL has pointed this out already.
And I third the report XD

I imagine there’s a cleaner way to do it. I’ll sort it out soon.

Should be fixed in r2789.

(Essentially I merged game_randomFaction into game_setup. All unit spawning still done in GameStart :slight_smile: (Now to overhaul the flag spawner… :wink: ))

This doesnt fix the deployment mode starting units. Some players like the deployment mode.

Players: PPsh vs C.R.A.I.G.
Map: Kiev V4
Game version: test 2791
Engine version: 0.81.2
Awesome rating (out of 5): BUG
Comments: I started with a negative amount of Ammo ! ! this was probably the cause of my unability to build any buildings and units (I could not morph AT guns neither) ! !
Other bug : the AI ( C.R.A.I.G. ) didnt do anything. the negative ammo or may be the starting units change may be the cause.

Are recent changes realy “clean up” :slight_smile: ? Please, avoid to break the svn …

I’ll see to deployment mode when I see to it.

If anyone wants to bisect which rev broke CRAIG, I’ll fix that.

Its not like I break things intentionally. :stuck_out_tongue: ‘You can’t make omelettes without breaking a few eggs’

Ok, I now know why this happens. Deployment is set up in a very peculiar way, I’ll hold off on fixing it until I can query Nemo on what he was up to (iirc set it up for spiked)

Deployment should be fixed as of r2795