Fbi2Lua is broken.

Fbi2Lua is broken.

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Fbi2Lua is broken.

Post by smoth »

local success, defs = pcall(VFS.Include, 'gamedata/defs.lua', defsEnv)

defs.unitdefs and defs.featuredefs show up as empty tables.

Any ideas?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Fbi2Lua is broken.

Post by smoth »

yeah it is there in 77b5 so why can I not see it now?
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Fbi2Lua is broken.

Post by jK »

The `success` return argument isn't there for nothing.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Fbi2Lua is broken.

Post by smoth »

It was returning true btw. I also had to add some bs hack to get that far:

vfsutils.lua

Code: Select all

function RecursiveFileSearch(startingDir, fileType, vfsMode)
  local files = {}
  local function AddSubDir(dir)
	--bs hack	
	if vfsMode == nil then
		vfsMode = VFS.RAW
	end
	--bs hack

	--Spring.Echo(dir, fileType, vfsMode)
    for _,file in ipairs(VFS.DirList(dir, fileType, vfsMode)) do
      files[#files + 1] = file
    end
    for _,sd in ipairs(VFS.SubDirs(dir, "*", vfsMode)) do
      AddSubDir(sd)
    end
  end

  AddSubDir(startingDir)

  return files
end
User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: Fbi2Lua is broken.

Post by jK »

It has some VFS issue I never investigated, cause it always worked when either run from lobby or spring.exe (forgot which one worked).
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Fbi2Lua is broken.

Post by smoth »

possibly lobby, I was trying in spring.exe.
Post Reply

Return to “Game Development”