UFO:Alien Invasion

General => User modifications => Topic started by: TrashMan on January 06, 2012, 03:00:59 pm

Title: Crash because of aircraft type
Post by: TrashMan 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?
Title: Re: Crash because of aircraft type
Post by: Mattn on January 06, 2012, 03:04:38 pm
you would have to modify code to make this work (scripts.c, humanAircraftType_t, V_AIRCRAFTTYPE)
Title: Re: Crash because of aircraft type
Post by: TrashMan 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?
Title: Re: Crash because of aircraft type
Post by: TrashMan on January 06, 2012, 06:16:13 pm
another question: Is there any way to set the ratio of male-to-female recruits?
Title: Re: Crash because of aircraft type
Post by: Mattn 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
Title: Re: Crash because of aircraft type
Post by: TrashMan 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?
Title: Re: Crash because of aircraft type
Post by: MCR 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 ;) ?
Title: Re: Crash because of aircraft type
Post by: TrashMan on January 10, 2012, 03:02:32 pm
I don't think Mattn and Winter liked it when I showed it months ago.... :'(

(http://img109.imageshack.us/img109/1329/starfirep.jpg)
Title: Re: Crash because of aircraft type
Post by: Mattn 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
Title: Re: Crash because of aircraft type
Post by: TrashMan 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.
Title: Re: Crash because of aircraft type
Post by: Kildor 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.
Title: Re: Crash because of aircraft type
Post by: TrashMan 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.
Title: Re: Crash because of aircraft type
Post by: ShipIt 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.
Title: Re: Crash because of aircraft type
Post by: H-Hour 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.
Title: Re: Crash because of aircraft type
Post by: Crystan on January 11, 2012, 09:31:49 pm
I think that model is sexeh!
Title: Re: Crash because of aircraft type
Post by: geever on January 11, 2012, 09:34:28 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.

No. Not a savegame editor, but a Patcher to help with savegame compatibility.

-geever
Title: Re: Crash because of aircraft type
Post by: Nutter on January 11, 2012, 10:53:30 pm
I think that model is sexeh!


Even has a paint job!
Title: Re: Crash because of aircraft type
Post by: TrashMan on January 12, 2012, 11:07:39 am
Another question - can UGV's be added? Or will that to ocause chrashes?

I'm asking cause I have a model ready...