Jump to content


Photo

Lua Coding Help


  • Please log in to reply
4 replies to this topic

#1 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 15 August 2005 - 07:58 AM

Ahem.

AddXcomTerrain {
	Name = "Xcom Sub",
	Tiles =  {
  "$(xcom)/terrain/blanks.*",
  "$(tftd)/terrain/xbases01.*",
  "$(tftd)/terrain/xbases05.*",
  "$(xcom)/terrain/avenger.*",
  "$(xcom)/terrain/lightnin.*",
  "$(tftd)/terrain/sea.*",
	},
	Maps = {
  "$(ufo2000)/newmaps/sub/sub01.map",
  }
	}

I have been attempting to code a LUA to make my xcom base sub work, but it isn't having any of it, for some reason. Does this code look plausible for a 1 map, 60x20 terrain?

#2 Violazr

Violazr

    Captain

  • Forum Members
  • PipPipPipPip
  • 249 posts

Posted 15 August 2005 - 08:19 AM

It looks alright, but you have to force the terrain to be 60x20 if you want that.

Maybe try the code I wrote fox Exo's subbase, it should fit yours just fine.

And what's the error?

#3 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 15 August 2005 - 08:44 AM

Well, it said something about an unrecognised symbol at '<eof>' or something. I'll have a play, se what I can do.

I changed it, now it just won't load. Here's the zip, someone have a play.

Edited by Blood Angel, 15 August 2005 - 08:51 AM.


#4 Violazr

Violazr

    Captain

  • Forum Members
  • PipPipPipPip
  • 249 posts

Posted 15 August 2005 - 03:33 PM

Well, I got it to run, but parts of it are still garbled.

- There is no tileset called "Seabed", at least not in my in TFTD. Maybe you meant "Sand"?

- The mapfiles must be listed with the ending .map, wildcards don't work.

It's still garbled in the game, though.
In the editor, it is alright, but all the ground outside the ship is still filled with base parts (tile #3, probably due to missing tiles of the last set).


Edit:

I tried some things about this strange error and I found that is somehow has to do with the "blanks" tileset.
While the TFTD tilesets appear right in the game, all XCOM tiles show the tile that comes three indexes lower - as if there was a 3 tile blanks file too much, loaded before them.

Loding no blanks results in garbled TFTD tilesets, and the XCOM tiles showing the entry still 1 index lower (as if there was one tile too much listed before).

I don't know why this happens, but I don't see a way to solve it.
Might be a bug in the editor. Which one did you use? Or did you incluse "blanks" in the editor's tileset list? (don't!)

Edited by Violazr, 15 August 2005 - 04:42 PM.


#5 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 16 August 2005 - 02:46 AM

Aha. I used Mapview, and the blanks directory was set to somewhere in My Documents. Could this have an effect?

And fair play on the Seabed thing, I did mean sand.

Do you have mapview? I assume so. Have a tinker with that.