project-navigation
Personal tools

Author Topic: Crash because of aircraft type  (Read 10091 times)

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Crash because of aircraft type
« on: January 06, 2012, 03:00:59 pm »
I added some weapons and made changes to hte game and everything worked fine. However, I then decided to add a newaircraft. I did thing before in the older UFO versions.

This time however, whenever I clock on their aircraft tab (in buy/sell) the game crashes stating that inter_starfire is not a known type.
tehy tpsye is set to interceptor tough.

I made the necessarsy meshes and placed them in appropriate folders, added hte craft to the research.ufo, models.ufo and aircraftmanagment.ufo.


Here:

*** aircrafttpyes***

aircraft craft_inter_starfire
{
   param {
      speed      18
      maxspeed   24
      shield      9
      ecm         110
      damage      500
      accuracy   120
      range      150
      antimatter   100
   }
   name      "_starfire-class Interceptor"
   defaultname   "_starfire"
   type      interceptor
   model      "geoscape/inter_starfire"
   numteam      0
   size      1
   price      40000
   building   building_intercept
   image      "geoscape/air_interceptor"
   slot {
      type      weapon
      position   nose_center
      size      medium
   }
   slot {
      type      weapon
      position   wing_left
      size      light
   }
   slot {
      type      weapon
      position   wing_right
      size      light
   }
   slot {
      type      electronics
      position   wing_left
   }
   slot {
      type      electronics
      position   wing_right
   }
}




*** research***

tech rs_craft_inter_starfire
{
   type   craft
   description {
      default "_inter_starfire_txt"
   }
   pre_description   {
      default "_inter_starfire_pre_txt"
   }
   up_chapter   crafts

   mail_pre
   {
      from   "_mail_from_paul_navarre"
      to   "_mail_to_base_commander"
      // subject   defined by "name"
      icon   icons/mail_tech
   }
   mail
   {
      from   "_mail_from_paul_navarre"
      to   "_mail_to_base_commander"
      // subject   defined by "name"
      icon   icons/mail_tech
   }

   provides   craft_inter_starfire
   require_AND {
      tech rs_craft_inter_dragon
   }
   time   15000
   producetime   600

   require_for_production
   {
       item alienmaterials 6000
      item   craft_alien_propulsion   2
      item   craft_alien_astrogation   1
      item   craft_alien_detection   2
   }

   mdl      inter_starfire
}



**models ***

// ============== Starfire Interceptor ======================

menu_model inter_starfire_gear
{
   model   "aircraft/inter_starfire/starfire_gear"
}
menu_model inter_starfire
{
   model   "aircraft/inter_starfire/starfire_folded"
   need   "inter_starfire_gear"
}
menu_model inter_starfire_flying
{
   model   "aircraft/inter_starfire/starfire"
}


What the hell could be causing this weird error?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Crash because of aircraft type
« Reply #1 on: January 06, 2012, 03:04:38 pm »
you would have to modify code to make this work (scripts.c, humanAircraftType_t, V_AIRCRAFTTYPE)

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #2 on: January 06, 2012, 04:04:02 pm »
WUT?

You hard-coded aircraft now?
WHY??
I had no problem adding my own aircraft in 2.3.
And the only type listed in any file is "craft" or "interceptor....


I'm confused...is it possible to add a new interceptor or not?
« Last Edit: January 07, 2012, 10:21:06 am by TrashMan »

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #3 on: January 06, 2012, 06:16:13 pm »
another question: Is there any way to set the ratio of male-to-female recruits?

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Crash because of aircraft type
« Reply #4 on: January 10, 2012, 12:16:08 am »
currently you have to modify the code to add new interceptors or aircraft. this is due to the fact that we have to be able to identify the craft for various in-game structs. i hope this will get removed anytime soon - but not for 2.4

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #5 on: January 10, 2012, 09:25:10 am »
Ah...that sucks >:(

I wasn't aware this change was introduced. I made the model for nothing....


That said - any way to adjust the ratio of male to female soldiers, or is this also hard-coded?
« Last Edit: January 10, 2012, 03:00:02 pm by TrashMan »

Offline MCR

  • PHALANX veteran
  • ******
  • Posts: 1244
    • View Profile
Re: Crash because of aircraft type
« Reply #6 on: January 10, 2012, 12:45:50 pm »
Ah...that sucks >:(

I wasn't aware this change was introduced. I made the model for nothing....


How about contributing your models ;) ?

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #7 on: January 10, 2012, 03:02:32 pm »
I don't think Mattn and Winter liked it when I showed it months ago.... :'(


Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Crash because of aircraft type
« Reply #8 on: January 11, 2012, 07:57:40 am »
That said - any way to adjust the ratio of male to female soldiers, or is this also hard-coded?

this is random afair

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #9 on: January 11, 2012, 10:45:35 am »
Can it be externalized?

I'm trying to make Let's PLays or create specific teams, and re-starting the game 50 times is not fun. And editing the campaing to start with 50 people reduces difficulty.

Offline Kildor

  • Project Artist
  • Captain
  • ***
  • Posts: 757
  • Project mapper and some other stuff`er
    • View Profile
    • http://ufoai.nx0.ru
Re: Crash because of aircraft type
« Reply #10 on: January 11, 2012, 11:34:24 am »
Yes, it will be nice to select soldiers appearance. I do not like woman soldiers, and hate black ones.

Offline TrashMan

  • Captain
  • *****
  • Posts: 833
    • View Profile
Re: Crash because of aircraft type
« Reply #11 on: January 11, 2012, 12:45:25 pm »
I just want to set the ratios to something more sensible (let's face it - soldiers are mostly male. Especially the elite.)

But being able to select the apperance..or being able to create your own soldier (either by point distribution or re-rolling) ould be great. A lot of poeple are Roleplayers.

Offline ShipIt

  • Project Artist
  • Captain
  • ***
  • Posts: 906
    • View Profile
Re: Crash because of aircraft type
« Reply #12 on: January 11, 2012, 07:16:39 pm »
... being able to create your own soldier (either by point distribution or re-rolling) ould be great. A lot of poeple are Roleplayers.

This would be really great.

Offline H-Hour

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1923
    • View Profile
Re: Crash because of aircraft type
« Reply #13 on: January 11, 2012, 09:25:02 pm »
geever has talked about a possible save game editor, intended to cover same game transitions. But it might be possible to extend it to allow you to edit your soldier info for roleplaying situations. You'd have to dive into some code though, probably.

Offline Crystan

  • Project Artist
  • Captain
  • ***
  • Posts: 572
  • UFO:AI Lead Sound Artist
    • View Profile
    • http://crysea.cr.funpic.de/
Re: Crash because of aircraft type
« Reply #14 on: January 11, 2012, 09:31:49 pm »
I think that model is sexeh!