Grimes Posted May 6, 2010 Posted May 6, 2010 I was looking through some of the files in the scripts folder. It got me to thinking... is it possible to add a completely new object to the game? I don't mean replace, I mean add. So if we wanted to add a variant of the Humvee that isn't present... we could do so without replacing anything else. It seems plausible, we just need to find how the files are linked between 3d model, texture, mission editor, and in game AI. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Michelange Posted May 6, 2010 Posted May 6, 2010 (edited) Yep, I think also that it's possible to add New objects. Now I'm exploring this way. For exemple : wsTypes.lua wsType_Air = 1 wsType_Airplane = 1 wsType_Fighter = 1 F_4E = 45; -- Is that the FM of the F4 ? I saw in this file 57 planes ID and ..... that : LastPlaneType = 150; !!! In WSTypesTree.lua -- That's only à tree ? [wsType_Air] = { [wsType_Airplane] = { [wsType_Fighter] = { ["F-4E"] = F_4E, In Types.lua planes_types[45 ]= {wsType_Air, wsType_Airplane, wsType_Fighter,F_4E} -- array of the wsTypes data In Names.lua laTypes["{4B75FEBA-9997-4D34-A0D6-0DB061350951}"] = F_4E; -- assygn the CLSID ? And in F-4E.lua -- the definition of the plane return plane("{4B75FEBA-9997-4D34-A0D6-0DB061350951}", "F-4E", _("F-4E"), I want test this : - If I change in wsTypes.lua the line F_4E = 3; -- 3 = Su-27 what's happen ? -Or if I add : In Types.lua : planes_types[58 ]= {wsType_Air, wsType_Airplane, wsType_Fighter,F_4E} In Names.lua : laTypes["{new CLSID}"] = F_4E; In Mirage-F1.lua : return plane("{new CLSID}", "Mirage F1", _("Mirage F1"), Do I have than a new IA Plane with the F_4E FM ? Grimes : the only thing is to find where or how the FM is assigned to the model, all the other things is done in the models.lua files in \Scripts\Database\planes for the planes. :music_whistling: Edited May 6, 2010 by Michelange 1 EVAC : French fighter school on LockOn: Flaming Cliffs Moding tutorials at C6
jib Posted May 6, 2010 Posted May 6, 2010 I have been experimenting trying to add a new plane in flaming cliffs 2. I have got it to show up in the editor but when I try to fly lockon crashes. Here is what I have so far, I probably have some way to go. copy aircraft controls folder and rename update aircraft names.lua change server.lua and view.lua change customhuman.lua db_countrries.lua generate CLSIDs number cnt_unit("{AC22DC99-5FF0-4485-BC96-2258850C1BAF}", "F-22", { color_scheme("{58206553-0986-4B0A-B0BA-BAD1950CEC01}", "USAF Standart"), change world ID in planes folder f-22.lua database/type.lua add f-22 to bazar/planesTable.lua // f-22 shape { file = "f-22"; life = 20; vis = 3; // desrt = "Fighter-1-crush"; desrt = "f-15-oblomok"; shadow= "shadow10"; // load = { false, false}; fire = { 300, 2}; username = "F-22"; index =56; I think I will have to add info to the flight model in SFM_Engine.lua and some other stuff. I will let people know how I get on Mods I use: KA-50 JTAC - Better Fire and Smoke - Unchain Rudder from trim KA50 - Sim FFB for G940 - Beczl Rocket Pods Updated! Processor: Intel Q6600 @ 3.00GHz GPU: GeForce MSI RTX 2060 6GB RAM: Crucial 8GB DDR2 HDD: 1TBGB Crucial SSD OS: Windows 10, 64-bit Peripherals: Logitech G940 Hotas, TrackiR 5, Voice Activated commands , Sharkoon 5.1 headset. ,Touch Control for iPad, JoyToKey
Michelange Posted May 6, 2010 Posted May 6, 2010 (edited) OK this is how to add a new F-16 BLK 60 in FC2.0 In Names.lua add this line to have the FM of the F-16C : laTypes["{082D2561-FB8B-11d5-9190-00A0249B6F01}"] = F_16;-- = 7; -- F-16 Fighting Falcon This is a copy/past of the original line with CLSID+1 In db_units_planes.lua add at the end : plane_file("planes\\F-16C-3.lua"); In db_countries.lua add under cnt_unit("{082D2561-FB8B-11d5-9190-00A0249B6F00}", "F-16C bl.52d", { color_scheme("{eeaab67f-6f15-4a5d-9b74-1c08ee971e9b}", "USAFE 555th FS (AV) Aviano AFB"), color_scheme("{189e0024-e439-494c-8b7e-817a2884ab85}", "PACAF 14th FS (MJ) Misawa AFB"), color_scheme("{65a85d13-351d-450d-84f9-c5cc528228cf}", "PACAF 35th FW (WW) Misawa AFB"), color_scheme("{89c5ff57-d84c-4950-8109-dafd18e40143}", "USAF 77th FS (SW) Shaw AFB"), color_scheme("{356613e0-28af-4ca1-ac5d-1c590bb213c6}", "USAFE 22nd FS (SP) Spangdahlem AFB"), color_scheme("{382e7a6a-b29f-4881-9c28-d9ea192bc4c6}", "USAF 414th CTS (WA) Nellis AFB"), color_scheme("{924ed5b8-c371-4315-b29f-c0be4ecb188d}", "USAF 412th TW (ED) Edwards AFB"), color_scheme("{d00a836b-6c9c-40f9-a8c5-39501ae3a178}", "USAF 147th FIG (EF) Ellington AFB"), }), this files : cnt_unit("{082D2561-FB8B-11d5-9190-00A0249B6F01}", "F-16C bl.60", { color_scheme("{eeaab67f-6f15-4a5d-9b74-1c08ee971e9b}", "USAFE 555th FS (AV) Aviano AFB"), Its only a copy past with CLSID+1 Now in directory \Scripts\Database\planes : copy / past and rename F-16C-2.lua to F-16C-3.lua you must also edit the first line : return plane("{082D2561-FB8B-11d5-9190-00A0249B6F01}", "F-16C bl.60", _("F-16C bl.60"), I've added also in wsTypesTree.lua this line ["F-16C bl.60"] = F_16, under [wsType_Fighter] = { but i think this it is not necessary. That's It You have now a new IA with the FM of the F-16C that will open all the doors to add the 3D models of the planes we have. The rest of the issues are details to adjust but the principle is there. Sorry, but it's to difficult for me to translate all the moding stuff I've explained there. :smilewink: Edited May 6, 2010 by Michelange EVAC : French fighter school on LockOn: Flaming Cliffs Moding tutorials at C6
Grimes Posted May 6, 2010 Author Posted May 6, 2010 Very cool! I was thinking of this more for adding China and other countries as a coalition, but also to expand the ground, sea, or airforces of existing coalitions. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
Michelange Posted May 7, 2010 Posted May 7, 2010 I was thinking of this more for adding China and other countries as a coalition Adding a countrie is not a problem. At the end of this tutorial you will find 2 templates. One for FC2.0 the other for Blackshark. At now, there à little différences between the tow sim's. If you are taking a look in the /Blackshark directory, you will find pictures of flags from countries who are not in the sim. EVAC : French fighter school on LockOn: Flaming Cliffs Moding tutorials at C6
VireVolte_tigrou Posted May 7, 2010 Posted May 7, 2010 And another tutorial for adding countries : http://forums.eagle.ru/showthread.php?t=51857
farias76 Posted October 20, 2011 Posted October 20, 2011 I tried this procedure gives me error: BlackShark\modules\logbook.lua:147: attempt to index field'country_by_id'(a nil value)
Recommended Posts