UFO:Alien Invasion

General => User modifications => Topic started by: NicSO on February 20, 2014, 11:26:22 am

Title: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 11:26:22 am
Well, I added new ufo in all files in 0ufos and in models but I still get that message.

I cant continue working on this mod until I solve this problem.

Please help and sorry for "spamming", I just wanna make new mod!
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: geever on February 20, 2014, 04:23:17 pm
Well, I added new ufo in all files in 0ufos and in models but I still get that message.

I cant continue working on this mod until I solve this problem.

Please help and sorry for "spamming", I just wanna make new mod!

Without sharing your changes we can't help.

-geever

ps. There might be hardcoded values for ufos though... Still need your changes to see if that's the problem.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 04:49:25 pm
Without sharing your changes we can't help.

-geever

ps. There might be hardcoded values for ufos though... Still need your changes to see if that's the problem.


For the start I wanna just test adding of new fighter, after that I will start making additional changes.

WHat I did for now is here in attachment!

Thnx!

btw. I editet aircraftmanagement minute ago but problem is still here:

aircraft craft_ufo_fightermk2
{
   param {
      speed      21
      maxspeed   26
      shield      2
      ecm         90
      damage      290
      accuracy   100
      range      236
   }
   name      "_UFO - FighterMk2"
   defaultname   "_Fightermk2 U"
   type      "ufo"
   model      "geoscape/ufo_fightermk2"
   size      1
   numteam      6
   price      15000
   image      "geoscape/air_ufo"
   interestlevel 50

   radar {
      range   10
      trackingrange   14
   }

   slot {
      type      "weapon"
      size      "heavy"
      contains   rs_craft_weapon_particle
      ammo      rs_craft_ammo_particle
   }
}

Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 04:58:52 pm
/ UFOS
// Notes
// UFOs are listed in order of appearance. See also: http://ufoai.org/wiki/index.php/Aircraft
// adding or renaming ufos: change the assembly name or add the assembly to corresponding ump files

I think this is the problem: add the assembly to corresponding up file - I dont know how or where!
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: Duke on February 20, 2014, 06:00:26 pm
Take a look at an xyz.ump file of your choice. In the corresponding dir maps/xyz you'll see the map tiles for various dropships, landed and crashed ufos.
You will need at least one maptile for one map to see your fighter in battlescape.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 06:24:37 pm
Take a look at an xyz.ump file of your choice. In the corresponding dir maps/xyz you'll see the map tiles for various dropships, landed and crashed ufos.
You will need at least one maptile for one map to see your fighter in battlescape.

Thnx. This will be simple as I will make only minor changes in blender/texture file. This will be advanced fighter. After this I will make completely new UFO but small size.
Making bigger ufo seems to me as HUGE work.

One more thing, can you give me some instructions how to make new mission - downed interceptor mission. I saw you already prepared game for that kind of mission while studying the game files.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 08:00:43 pm
Hm, still same error. I even modified *.bsp files. For start I added my test fightermk2 in village, village 2 and all umps/bsps connected to those maps including village.map but I get same error again so I rechecked all files again and problem is still here.

I edited files with notepad2 btw. *md2 files were edited in blender.

In mod folder I combined files from 0maps archive and maps folder - I think thats ok.

Im soon finished with my balancing mod which includes major craft speed overhaul, UFO damage capacity + SAM modifications for compensating speed changes. I also modified max aliens aboard some UFOs like bomber but I think I will need to modify maps too (max number of aliens per map). I rebalanced all weapons in the game also, added more names for soldiers and some other small modifications along all these.

It will be one big mod at the end with many modifications but for start only rebalancing as mentioned above because I see adding new UFO will consume more time that I thought

Here is my newest version of my test fightermk2 mod:
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 08:24:54 pm
Found new problem...files like fighter.bsp in 0maps and maps are 2 different files...how should I name them in my mod folder...do I need to create 0maps archive + maps folder? I will try it that way. I will create 0maps archive with my fighter files and separate maps folder. I have some feeling there is something more to this, maybe some script???!



Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: Noordung on February 20, 2014, 09:36:38 pm
If i remember corectly and if this havent change crafts are in sourco code so you cant add them. quite some time ago someone was asking something becous he wanted to add some intecetors and that was answer. (dont know anything about what sourco code might be) tipic should still be here on mods part of the forum.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: ShipIt on February 20, 2014, 10:08:11 pm
As Noordung said. Not sure about human aircraft, but iirc adding new UFOs cannot be done by modding the scripts. There are e.g. hardcoded values about what UFO types are available for certain mission types.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 20, 2014, 10:29:59 pm
So it is not possible for me to mod this :( Argh. I was so happy with the idea :(
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: ShipIt on February 20, 2014, 10:32:10 pm
Found new problem...files like fighter.bsp in 0maps and maps are 2 different files...how should I name them in my mod folder...do I need to create 0maps archive + maps folder? I will try it that way. I will create 0maps archive with my fighter files and separate maps folder. I have some feeling there is something more to this, maybe some script???!

In order to add a new aircraft to a map theme, you would have to create  a .map file for this craft, using the mapeditor called UFORadiant. This file needs to be compiled to a .bsp with the mapcompiler (ufo2map). Then it needs a tile descriptor in the map´s .ump file. It needs an entry in the map definition (maps.ufo ), so the game knows this craft is available for the map. Unfortunately, due to technical problems beyond my understanding, the mapeditor is currently broken for win.
There is no need to create archives in any way.

On the other hand, a UFO would work without adding any maps, as some maps don´t care about the UFO type.

If you want some more detailed info, please ask. :)
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: Duke on February 21, 2014, 06:02:19 am
I can confirm that the list of valid UFO names is hardcoded.
In several places btw :((
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 21, 2014, 06:44:18 am
Well thnx guys :) I am sad to hear that but thnx for help and I must ask...is there possibility it could be changed in the future?
Is it the same with aliens?
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: Duke on February 21, 2014, 07:04:08 am
Making UFOs completely scriptlable is not trivial. However, I can imagine to add some "UFO Modder" to the hardcoded list(s).
Your best bet is to convince at least one dev why the game *needs* a second fighter.

For now, you can use the "UFO Ripper" which is in the lists but not used anywhere afaik.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 21, 2014, 08:12:51 am
Making UFOs completely scriptlable is not trivial. However, I can imagine to add some "UFO Modder" to the hardcoded list(s).
Your best bet is to convince at least one dev why the game *needs* a second fighter.

For now, you can use the "UFO Ripper" which is in the lists but not used anywhere afaik.

But I must keep the name ripper :)

Well Ill try to convince them.

My idea is...humans are making more advanced fighters, 3 of them. I think aliens would compensate by upgunning their designs.

It was same in all wars. One side would add cannon to their craft, other side would respond. Lets take ME-109 and Spitfire as examples. Both planes were constantly changed and upgunned, their speed was increasing..etc.

I know this is a game with its limitations as such but I think we can make it more interesting, challenging and fun.
In reality there were numerous version of ME-109, I would like to make only 1 for this game, for the start. New more advanced, faster, upgunned and better armored UFO fighter, an answer to Dragon!
It would also be great that ufos are flying in formations and protecting other alien crafts.

I try to think from realistic point of view, thats why I modded all weapons in my game, some just a little, other alot.

This game is great but it can be even better :)

Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: geever on February 21, 2014, 03:57:57 pm
Making UFOs completely scriptlable is not trivial. However, I can imagine to add some "UFO Modder" to the hardcoded list(s).
Your best bet is to convince at least one dev why the game *needs* a second fighter.

For now, you can use the "UFO Ripper" which is in the lists but not used anywhere afaik.

Actually I want to make aircrafts, buildings, building capacities and employee sets, campaign mechanic fully scriptable which aren't now. But as always... it is time... and motivation issue..

-geever
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: NicSO on February 21, 2014, 04:51:51 pm
Actually I want to make aircrafts, buildings, building capacities and employee sets, campaign mechanic fully scriptable which aren't now. But as always... it is time... and motivation issue..

-geever

I would be happy to see that. Honestly all games I played I moded/used mod/many mods.

I can say Im hardcore fan of the original UFO and Laser Squad and this game is closest anyone ever got to the original ufo: atmosphere, feeling, playability, replay value, everything.

Because of all this I wanna play this game, help you any way I can and I wanna make mods.

Mods are very important for a game. Every superb game has great number of mods and this game is superb.
Its no problem for me to lost hours of changing stats, adding new stuff...etc. and then play :D

So please :) make those changes, this game deserves it :)
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: ShipIt on February 22, 2014, 08:26:19 am
Making UFOs completely scriptlable is not trivial. However, I can imagine to add some "UFO Modder" to the hardcoded list(s).
Your best bet is to convince at least one dev why the game *needs* a second fighter.

For now, you can use the "UFO Ripper" which is in the lists but not used anywhere afaik.

I doubt you can, at least not without changing the code. E.g. there is a list of all available UFOs for each mission category (see CP_MissionChooseUFO in cp_missions.cpp (https://github.com/ufoai/ufoai/blob/master/src/client/cgame/campaign/cp_missions.cpp). The Ripper UFO is in none of those, so it will never appear.

Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: ShipIt on February 22, 2014, 08:31:26 am
It would also be great that ufos are flying in formations and protecting other alien crafts.

There are already some basics for that, but it was left unfinished.
Title: Re: Adding new UFO: unknown craft_ufo_"name of new UFO"
Post by: ShipIt on February 22, 2014, 08:43:32 am
Sorry for spamming :)

If you provide a geoscape model, I think it should be possible to add the Ripper to the game. Then you could mod that. Same for Battleship.