Author Topic: Adding the Snakemen?  (Read 4023 times)

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Adding the Snakemen?
« on: October 25, 2012, 11:33:03 pm »
So, the ruleset seems to look a little different from when I was last fiddling with it. Can somebody tell me how to set up snakemen as a race I can select in the New Battle (and full game), and so I can link up to my drawing routine?

 Thanks

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2160
    • View Profile
Re: Adding the Snakemen?
« Reply #1 on: October 26, 2012, 04:51:27 pm »
Races in New Battle screen are hardcoded (because they're not all implemented :P), so you'd have to add them in there manually.

There are 3 things a new "alien race" needs in the ruleset:
- The "unit" entry, which defines the unit stats, behavior, etc.
- The "armor" entry, which defines the matching armor and drawing routine.
- The "alienRaces" entry, which defines the crew layouts for each race (these are already done, but you'll have to remove unimplemented units to test it).

You can probably just copy-paste an existing unit and edit it accordingly. :P

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: Adding the Snakemen?
« Reply #2 on: October 26, 2012, 05:09:45 pm »
Excellent. Thanks

Offline Daiky

  • Battlescape Programmer
  • Administrator
  • Commander
  • *****
  • Posts: 904
    • View Profile
Re: Adding the Snakemen?
« Reply #3 on: October 30, 2012, 11:09:52 am »
pmprog, I know you are also doing draw routines, but I was thinking I just copy-paste the unit drawing routines from Warboy's code?:
https://github.com/Warboy1982/OpenXcom/blob/master/src/Battlescape/UnitSprite.cpp

Offline pmprog

  • Commander
  • *****
  • Posts: 647
  • Contributor
    • View Profile
    • Polymath Programming
Re: Adding the Snakemen?
« Reply #4 on: October 30, 2012, 11:33:24 am »
Sure :) I never got it all sorted anyway