|
Post by fadius on Jan 22, 2008 15:39:11 GMT
I am in the process of learning how to code a ship to be buy-able and flyable in game.
I know how to make it buy-able with market_ships.ini
What I do not know is how to code it. I have a number of models that my modelers have models and Hard-pointed. Some of them have even given me code to get the ship into the game, however, some of them cause the client to crash when entering the ship dealer.
So, I am going to post the Hard Points of a ship that is causing me problems and am hoping to get the basic code tog et the ship into game.
I understand there needs to be an entry in shiparch.ini and loadouts.ini. I may be missing some important files. Anyways, here is the list of Hardpoints of a ship I am trying to get into game. I am hoping someone can provide me with the basic code to get it working in game.
HpMount HpRadar01 HpEngine01 HpEngine02 HpEngine03 HpEngine04 HpEngine05 HpCM01 HpMine01 HpTractor_source HpShield01 HpTurret01 HpTurret02 HpTurret03 HpTurret04 HpWeapon01 HpWeapon02 HpWeapon03 HpWeapon04 HpTorpedo01 HpTorpedo02 HpDocklight01 HpDocklight02 HpContrail01 HpContrail02 HpContrail03 HpHeadLight01 HpThruster01
Thanks in advance for any help. I am learning the whole ship thing. I am more of a system building person.
|
|
|
Post by Gibbon on Jan 22, 2008 19:15:45 GMT
fadius,
Only hardpoint you don't need to worry about is the HpRadar one, as it's not needed. This is a scanner hardpoint which actually mounts internally so no need to make one.
Here is a script from my last mod for a ship i was using,
<script> <author> xXx, Gibbon </author> <data file="data\ships\shiparch.ini" method="append"> <source> [Ship] ids_name = 0 ;GENERATESTRRES("Colonial Viper Mk.VII") ids_info = 0 ;GENERATEXMLRES("<xml><RDL><PUSH/><TEXT/><PARA/><TRA data="1" mask="1" def="-2"/><JUST loc="center"/><TEXT>Stats</TEXT><PARA/><TRA data="0" mask="1" def="-1"/><JUST loc="left"/><TEXT/><PARA/><TEXT>Guns/Turrets: 6/0</TEXT><PARA/><TEXT>Armor: 10800</TEXT><PARA/><TEXT>Cargo Holds: 65</TEXT><PARA/><TEXT>Max Batteries/NanoBots: 75/75</TEXT><PARA/><TEXT>Optimal Weapon Class: 8</TEXT><PARA/><TEXT>Max. Weapon Class: 9</TEXT><PARA/><TEXT>Additional Equipment: M, CM, CD/T</TEXT><PARA/><PARA/><POP/></RDL></xml>") ids_info1 = 0 ;GENERATEXMLRES("<xml><RDL><PUSH/><TRA data="1" mask="1" def="-2"/><JUST loc="center"/><TEXT>Colonial Viper Mk.VII</TEXT><PARA/><TRA data="0" mask="1" def="-1"/><JUST loc="left"/><TEXT></TEXT><PARA/><TEXT>The Viper Mk VII is the state of the art fighter of the Colonial Fleet. It is sleeker and more modern than the older Viper Mk II. The Mk VII runs hotter than any other Viper model. The Viper Mk VII is a space superiority fighter without any equal. It is highly dependent on computer systems for tactical, combat, and navigation.</TEXT><PARA/><POP/></RDL></xml>") ids_info2 = 66608 ids_info3 = 0 ;GENERATEXMLRES("<xml><RDL><PUSH/><TEXT/><PARA/><TEXT/><PARA/><TEXT>6/0</TEXT><PARA/><TEXT>10800</TEXT><PARA/><TEXT>65</TEXT><PARA/><TEXT>75/75</TEXT><PARA/><TEXT>8</TEXT><PARA/><TEXT>9</TEXT><PARA/><TEXT>M, CM, CD/T</TEXT><PARA/><POP/></RDL></xml>") ship_class = 3 nickname = viper7 LODranges = 0, 9999 msg_id_prefix = gcs_refer_shiparch_Libhf mission_property = can_use_berths type=FIGHTER mass=150.000000 hold_size= 65 linear_drag=1 fuse = intermed_damage_smallship01, 0.000000, 650 fuse = intermed_damage_smallship02, 0.000000, 525 fuse = intermed_damage_smallship03, 0.000000, 263 fuse = drop_cargo_fuse, 0.000000, 1 max_bank_angle = 50 camera_offset = 10, 39 camera_angular_acceleration = 0.05 camera_horizontal_turn_angle = 23 camera_vertical_turn_up_angle = 5 camera_vertical_turn_down_angle = 30 camera_turn_look_ahead_slerp_amount = 1 nanobot_limit=75 shield_battery_limit=75 hit_pts = 10800 DA_archetype = ships\custom\Viper7\vipermk7.cmp material_library=ships\custom\Viper7\vipermk7.mat material_library=fx\envmapbasic.mat envmap_material=envmapbasic cockpit = cockpits\corsair\bw_elite2.ini pilot_mesh=generic_pilot explosion_arch = explosion_li_freighter surface_hit_effects = 0, small_hull_hit_light01, small_hull_hit_light02, small_hull_hit_light03 surface_hit_effects = 150, small_hull_hit_medium01, small_hull_hit_medium02, small_hull_hit_medium03 surface_hit_effects = 300, small_hull_hit_heavy01, small_hull_hit_heavy02, small_hull_hit_heavy03 steering_torque=24000, 24000, 58000 angular_drag=15000, 15000, 35000 rotation_inertia=2800, 2800, 1000 nudge_force=30000 strafe_force=20000 strafe_power_usage=2 num_exhaust_nozzles = 3 HP_tractor_source=HpTractor_Source shield_link=l_elite_shield01, HpMount, HpShield01 hp_type = hp_elite_shield_special_10, HpShield01 hp_type = hp_elite_shield_special_9, HpShield01 hp_type = hp_elite_shield_special_8, HpShield01 hp_type = hp_elite_shield_special_7, HpShield01 hp_type = hp_elite_shield_special_6, HpShield01 hp_type = hp_elite_shield_special_5, HpShield01 hp_type = hp_elite_shield_special_4, HpShield01 hp_type = hp_elite_shield_special_3, HpShield01 hp_type = hp_elite_shield_special_2, HpShield01 hp_type = hp_elite_shield_special_1, HpShield01 hp_type = hp_thruster, HpThruster01 hp_type = hp_mine_dropper, HpMine01 hp_type = hp_torpedo_special_1, HpTorpedo01, HpTorpedo02, HpTorpedo03 hp_type = hp_torpedo_special_2, HpTorpedo01 hp_type = hp_countermeasure_dropper, HpCM01 hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_8, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_5, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_4, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_3, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_2, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 hp_type = hp_gun_special_1, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 </source> </data>
<data file="DATA\EQUIPMENT\goods.ini" method="append"> <source> [Good] nickname = viper7_hull category = shiphull ship = viper7 price = 6191287 ids_name = 0 ;GENERATESTRRES("Colonial Viper Mk.VII") item_icon = ships\custom\Viper7\vipermk7.3db [Good] nickname = viper7_package category = ship hull = viper7_hull addon = fb_exotic02_power, internal, 1 addon = ge_s_scanner_01, internal, 1 addon = ge_s_tractor_01, internal, 1 addon = fb_exotic02_engine, internal, 1 addon = contrail01, HpContrail01, 1 addon = contrail01, HpContrail02, 1 addon = contrail01, HpContrail03, 1 addon = SlowSmallOrange, HpRunningLight01, 1 addon = SlowSmallOrange, HpRunningLight02, 1 addon = SlowSmallOrange, HpRunningLight03, 1 addon = DockingLightRedSmall, HpDockLight01, 1 addon = DockingLightRedSmall, HpDockLight02, 1 </source> </data>
<data file="DATA\Missions\mShipProps.ini" method="append"> <source> [mShipProps] archetype_id = viper7 prop = can_use_berths </source> </data> </script>
This contains everything except the marketships entry which you already know. Let me know if you're not sure about anyhting. Bear in mind this is in script format, not sure whether you're scripting or hardcoding.
|
|
|
Post by fadius on Jan 22, 2008 21:16:02 GMT
Thanks. I will look at this more when I get home tonight. I am hardcoding and already know how to make DLL entries for everything.
|
|
|
Post by fadius on Jan 22, 2008 21:18:26 GMT
When making the shiparch.ini entries, lets use the weapon hardpoints for this question.
Is this how you limit what level weapon can be put onto which hardpoint?
The package entry is what comes with the ship when it is purchased correct?
|
|
|
Post by Gibbon on Jan 22, 2008 22:09:00 GMT
Wep Hp query
Yes. If you want all wep hardpoints to be able to mount level 9 weps say, then you need to put the relevant weapon hardpoint number next to it as in the script. If you only want a certain hardpoint to mount level 8 weapons for instance, then you simply leave out the next level for that hardpoint.
Another thing to remember is if you want a hardpoint to mount guns from level 1 say up to level 9, as in the script, this means it can mount all level weapons UP TO the last level that you put the hardpoint entry for. Also means you have to put an entry for each individual level of weapon as well for each hardpoint.
Basically if you want all your hardpoints to be able to mount level 9 guns, then follow the example in the script lol
Package entry query
Absolutely. This must include an engine and a powerplant otherwise you won't be able to launch. This is also where you add any extras like, docking lights, running lights, contrails, headlights and so on.
|
|
|
Post by fadius on Jan 22, 2008 23:34:17 GMT
Gibbon, Thanks for your answers to my questions. You have been a great help. If you need any help with your mod, let me know. I am by no means a uber modder, but I can do systems alright and as soon as I figure out what I am doing wrong with my custom cmp planets, I will have system creation mastered. 
|
|
|
Post by Gibbon on Jan 23, 2008 10:31:47 GMT
With Lancers being somewhat intermittent, this is always a good place to ask about stuff. I don't claim to know everything though lol
|
|
Bejaymac
Crusader Pilot
Pain in the Butt
Posts: 95
|
Post by Bejaymac on Jan 23, 2008 22:48:55 GMT
That goes for most of us bud, but there are some who think they know everything 
|
|
|
Post by fadius on Jan 24, 2008 22:45:44 GMT
I happen to know everything. Well, except for those things I do not. 
|
|
|
Post by spacemunkey on Mar 12, 2008 3:14:22 GMT
Hi, I'm new to modding freelancer, and was wondering what you use to make scripts, Gibbon, and where to put the script. I don't know hardcoding, but scripting I could work with.
|
|
|
Post by Gibbon on Mar 12, 2008 9:35:34 GMT
Hi spacemunkey, Nice to see a fellow simian  You don't need anything special to make a script. Just create a new txt file in notepad, and change the .TXT extension to .XML. As simple as that really. As to where the scripts go, they would go in your main mod folder named (yourmod) where the DATA and EXE folder sit, not inside them, just next to them.
|
|
|
Post by spacemunkey on Mar 14, 2008 1:01:43 GMT
Ok, I made my model, made the cmp, mat, and sur files, made my script to add everything (I based the script after your example Gibbon) and made the mod folder with proper format. after all that, it crashes when I go to the ship dealer ( it also crashes FreeLancer Explorer when I open the ship list)
Any idea where my problem might be, I can put all my files into a .rar/.zip so someone can take a look at everything. ( how do I upload here?)
I have done everything I can.
A sad noob, SpaceMunkey
|
|
|
Post by lord on Mar 14, 2008 5:30:23 GMT
This is a definition of weapons classes: CLASS 10 hp_type = hp_gun_special_10, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 9 hp_type = hp_gun_special_9, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 8 hp_type = hp_gun_special_8, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 7 hp_type = hp_gun_special_7, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 6 hp_type = hp_gun_special_6, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 5 hp_type = hp_gun_special_5, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 4 hp_type = hp_gun_special_4, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 3 hp_type = hp_gun_special_3, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 2 hp_type = hp_gun_special_2, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 CLASS 1 hp_type = hp_gun_special_1, HpWeapon01, HpWeapon02, HpWeapon03, HpWeapon04, HpWeapon05, HpWeapon06 Every HpWeaponXX is simple weapon mount(only for each class). Sorry for bad english 
|
|
|
Post by Gibbon on Mar 14, 2008 12:12:00 GMT
Ok, I made my model, made the cmp, mat, and sur files, made my script to add everything (I based the script after your example Gibbon) and made the mod folder with proper format. after all that, it crashes when I go to the ship dealer ( it also crashes FreeLancer Explorer when I open the ship list) Any idea where my problem might be, I can put all my files into a .rar/.zip so someone can take a look at everything. ( how do I upload here?) I have done everything I can. Hmmm, tricky as it could be a number of issues. Let's start with your ship, are the textures correct? Either DDS or TGA format are the only types that work. At the shipdealer is the package name correct in market ships.ini ? If you've made it as far as the shipdealer then chances are most things are in the correct place. I suspect something with the model, maybe the sur file, maybe not. Can you see the ship for sale?
|
|
|
Post by spacemunkey on Mar 14, 2008 13:24:00 GMT
Ok, I made my model, made the cmp, mat, and sur files, made my script to add everything (I based the script after your example Gibbon) and made the mod folder with proper format. after all that, it crashes when I go to the ship dealer ( it also crashes FreeLancer Explorer when I open the ship list) Any idea where my problem might be, I can put all my files into a .rar/.zip so someone can take a look at everything. ( how do I upload here?) I have done everything I can. Hmmm, tricky as it could be a number of issues. Let's start with your ship, are the textures correct? Either DDS or TGA format are the only types that work. At the shipdealer is the package name correct in market ships.ini ? If you've made it as far as the shipdealer then chances are most things are in the correct place. I suspect something with the model, maybe the sur file, maybe not. Can you see the ship for sale? No, it crashes while loading the ship dealer.
|
|