Jump to content


Photo

Units LUA support


  • Please log in to reply
10 replies to this topic

#1 Catgirl Leader

Catgirl Leader

    Squaddie

  • Forum Members
  • PipPip
  • 8 posts

Posted 03 September 2007 - 06:23 PM

*stocks up on sonic cannons for the lobsterman invasion*

#2 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 03 September 2007 - 07:07 PM

I agree. It's going to be a decent sized conversion though, considering we have to define unit specifics like stats, sound, etc. in the lua. Hopefully Azrael will keep interested in doing this, and I can focus on helping him since I know my way around the unit code. Perhaps I can also see what I can do with the 'Chameleon' lua to prepare for the "switch" of other races. No worries. :)

#3 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 03 September 2007 - 08:55 PM

Yes, we all did a splendid job I must say! :D

Prepare to see some (6) TFTD units in the near future! (Yes Guruluas2000, we will have Calcinites. :P)


Time to stop adding them hardcoded however.
We'd rather have a LUA API for units, it's been trailing behind for too long now.
We will have to rebuild the old ones to LUA too.

Is the plan to have a single LUA file for all units or have different "unitsets" like we do with weapons?

#4 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 03 September 2007 - 09:10 PM

Unit sets. If someone wants to add a new unit, they should simply be able to drop a new '/unit-example/exampleunit.lua'.

If you're talking about categories where you must pick a certain set to play only (like ufo2k weapons only), I think we want to be able to use ALL units at the same time, not specific ones (like xcom units only, or TFTD units only).

#5 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 03 September 2007 - 09:14 PM

(topic split)

So, you want to use ALL unit LUA files at once? I'm not really sure that's so easy... but then again, I could be mistaken, nachtwolf?

#6 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 03 September 2007 - 10:34 PM

(topic split)

So, you want to use ALL unit LUA files at once? I'm not really sure that's so easy... but then again, I could be mistaken, nachtwolf?


The LUA API first. Units that can be loaded like others are (not just chameleon variants) from LUA.
Each unit will be loadable independently from one another but stock units can be provided in a single file (multiple LUA function calls).
Also, the API should pave the way for HWP support.

Units will then be unhardcoded once the LUA API works and is fully operationnal.

And no, not unitsets. All units (common between both players) should be available.

I might take this issue on my shoulders if needed.

Edited by nachtwolf, 03 September 2007 - 10:58 PM.

Posted Image

#7 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 04 September 2007 - 07:42 AM

(topic split)

So, you want to use ALL unit LUA files at once? I'm not really sure that's so easy... but then again, I could be mistaken, nachtwolf?


The LUA API first. Units that can be loaded like others are (not just chameleon variants) from LUA.
Each unit will be loadable independently from one another but stock units can be provided in a single file (multiple LUA function calls).
Also, the API should pave the way for HWP support.

Units will then be unhardcoded once the LUA API works and is fully operationnal.

And no, not unitsets. All units (common between both players) should be available.

I might take this issue on my shoulders if needed.

Just wanted to know how we wanted it to be, I'll start working on the LUA API, I guess it should be similar to the one that handles items.

edit: if you want to handle this yourself, just let me know.

Edited by Azrael Strife, 04 September 2007 - 07:42 AM.


#8 Sporb

Sporb

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 739 posts

Posted 04 September 2007 - 06:52 PM

any chance we can have the ability to set custom stats via the LUAs? that way we can force units like the muton to act as they do in Xcom.

#9 Guest_Azrael Strife_*

Guest_Azrael Strife_*
  • Guests

Posted 04 September 2007 - 06:56 PM

any chance we can have the ability to set custom stats via the LUAs? that way we can force units like the muton to act as they do in Xcom.

All stats and basically everything customisable about an unit will be in the LUA file, the idea is to move away completely from hardcoded.

#10 bamb

bamb

    Captain

  • Forum Members
  • PipPipPipPip
  • 155 posts

Posted 05 September 2007 - 06:37 AM

Would you have CRC checks for individual units like with weapons and maps so that if you have dissimilar versions you can't use them in multiplayer?

#11 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 05 September 2007 - 08:28 AM

One would hope so, bamb. If the checks are in place to prevent weapon and map cheating, I don't see why they wouldn't be in place for unit cheating -- imagine if someone was using a modified super-unit or something.
Posted Image