Page 2 of 3
Posted: Tue Jun 03, 2008 7:16 pm
by JensAyton
Svengali wrote:Amen Brick wrote:Here are my first five models (most are variations on a theme, so didn't take too long. My only concern is that they are not to complicated for the game.
Nice looking things, hehe. But too much edges - I think (658
edges for a small light fighter?). Currently Oolite (OOMesh.h) does support 500 vertices and 800 faces as a maximum. So maybe it is better to reduce it a little bit. With my models I'm trying to keep the vertices <200 and the faces <250 (this values only for the big and mostly uniquely ones).
Just to be clear here: there is no edge limit, and there are always more edges than vertices on a real-world model, so a 658-edge model is likely to be well within the limit.
Posted: Sat Jun 07, 2008 1:01 pm
by Amen Brick
OK.. next problem.
I have added a models, textures and config folders and put the respective files in each to a folder marked Beetle.oxp and put it in addons. I checked the stderr file and it seems to have loaded with no issue. But I can't find my ship.
(I did press shift to clear the cache).
I did the following (heavily copypastad from existing ship files)
Shipdata
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<key>Beetle<key>
<dict>
<key>ai_type</key>
<string>pirateAI.plist</string>
<key>bounty</key>
<integer>150</integer>
<key>cargo_type</key>
<key>chance</key>
<real>1</real>
<string>CARGO_NOT_CARGO</string>
<key>energy_recharge_rate</key>
<real>5</real>
<key>exhaust</key>
<array>
<string>0 0 -30 10 8 15</string>
</array>
<key>forward_weapon_type</key>
<string>WEAPON_BEAM_LASER</string>
<key>laser_color</key>
<string>yellowColor</string>
<key>has_ecm</key>
<true/>
<key>has_escape_pod</key>
<true/>
<key>likely_cargo</key>
<integer>2</integer>
<key>max_cargo</key>
<integer>60</integer>
<key>max_energy</key>
<real>400</real>
<key>max_flight_pitch</key>
<real>1.85</real>
<key>max_flight_roll</key>
<real>1.85</real>
<key>max_flight_speed</key>
<real>150</real>
<key>missiles</key>
<integer>4</integer>
<key>view_position_aft</key>
<string>0.0 7 -39.5</string>
<key>view_position_forward</key>
<string>0.0 8 25</string>
<key>view_position_port</key>
<string>-44.9 0 -10.5</string>
<key>view_position_starboard</key>
<string>44.9 0 -10.5</string
<key>escort-ship</key>
<string>Krait</string>
<key>escorts</key>
<integer>2</integer>
<key>model</key>
<string>beetle.dat</string>
<key>name</key>
key>roles</key>
<string>trader(2.0) scavenger (2.0) hunter pirate</string>
<key>thrust</key>
<real>20</real>
<key>weapon_energy</key>
<real>25</real>
</dict>
<plist>
Shipyard
s<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Beetle</key>
<dict>
<key>chance</key>
<real>0.90</real>
<key>optional_equipment</key>
<array>
<string>EQ_ECM</string>
<string>EQ_FUEL_SCOOPS</string>
<string>EQ_ESCAPE_POD</string>
<string>EQ_ENERGY_BOMB</string>
<string>EQ_ENERGY_UNIT</string>
<string>EQ_WEAPON_MILITARY_LASER</string>
<string>EQ_FUEL_INJECTION</string>
<string>EQ_MULTI_TARGET</string>
<string>EQ_GAL_DRIVE</string>
<string>EQ_ADVANCED_COMPASS</string>
<string>EQ_SHIELD_BOOSTER</string>
</array>
<key>price</key>
<integer>475000</integer>
<key>standard_equipment</key>
<dict>
<key>extras</key>
<array/>
<key>forward_weapon_type</key>
<string>EQ_MILITARY_LASER</string>
</dict>
<key>techlevel</key>
<integer>1</integer>
<key>weapon_facings</key>
<integer>1</integer>
</dict>
</dict>
</plist>
and Shipdemo
Any reason why my ship isn't there? Is it obvious? Please help.
Posted: Sat Jun 07, 2008 2:08 pm
by Commander McLane
There are two issues with your shipdata and one with the shipyard.plist (I guess c&p-problems):
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<key>Beetle<key>
<dict>
<key>ai_type</key>
<string>pirateAI.plist</string>
<key>bounty</key>
<integer>150</integer>
<key>cargo_type</key>
<key>chance</key>
<real>1</real>
<string>CARGO_NOT_CARGO</string>
<key>energy_recharge_rate</key>
<real>5</real>
<key>exhaust</key>
<array>
<string>0 0 -30 10 8 15</string>
</array>
<key>forward_weapon_type</key>
<string>WEAPON_BEAM_LASER</string>
<key>laser_color</key>
<string>yellowColor</string>
<key>has_ecm</key>
<true/>
<key>has_escape_pod</key>
<true/>
<key>likely_cargo</key>
<integer>2</integer>
<key>max_cargo</key>
<integer>60</integer>
<key>max_energy</key>
<real>400</real>
<key>max_flight_pitch</key>
<real>1.85</real>
<key>max_flight_roll</key>
<real>1.85</real>
<key>max_flight_speed</key>
<real>150</real>
<key>missiles</key>
<integer>4</integer>
<key>view_position_aft</key>
<string>0.0 7 -39.5</string>
<key>view_position_forward</key>
<string>0.0 8 25</string>
<key>view_position_port</key>
<string>-44.9 0 -10.5</string>
<key>view_position_starboard</key>
<string>44.9 0 -10.5</string
<key>escort-ship</key>
<string>Krait</string>
<key>escorts</key>
<integer>2</integer>
<key>model</key>
<string>beetle.dat</string>
<key>name</key>
key>roles</key>
<string>trader(2.0) scavenger (2.0) hunter pirate</string>
<key>thrust</key>
<real>20</real>
<key>weapon_energy</key>
<real>25</real>
</dict>
<plist>
The name-key needs to be followed by something that
is the name of the ship. Presumably
And the following <key> misses the opening "<".
From a scripter's perspective: It doesn't really make sense to give a trader pirateAI, because this means that if you call it as a trader in your script, it won't behave like a trader. If you however intend to let it just be called by the system populator, the engine will set its AI correctly. Anyway, this is more a story-problem, and won't prevent your ship from appearing.
s<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "
http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Beetle</key>
<dict>
<key>chance</key>
<real>0.90</real>
<key>optional_equipment</key>
<array>
<string>EQ_ECM</string>
<string>EQ_FUEL_SCOOPS</string>
<string>EQ_ESCAPE_POD</string>
<string>EQ_ENERGY_BOMB</string>
<string>EQ_ENERGY_UNIT</string>
<string>EQ_WEAPON_MILITARY_LASER</string>
<string>EQ_FUEL_INJECTION</string>
<string>EQ_MULTI_TARGET</string>
<string>EQ_GAL_DRIVE</string>
<string>EQ_ADVANCED_COMPASS</string>
<string>EQ_SHIELD_BOOSTER</string>
</array>
<key>price</key>
<integer>475000</integer>
<key>standard_equipment</key>
<dict>
<key>extras</key>
<array/>
<key>forward_weapon_type</key>
<string>EQ_MILITARY_LASER</string>
</dict>
<key>techlevel</key>
<integer>1</integer>
<key>weapon_facings</key>
<integer>1</integer>
</dict>
</dict>
</plist>
There is a superfluous "s" in the beginning of the first line.
By the way: All of this should be visible in your stderr-file.
Posted: Sat Jun 07, 2008 3:43 pm
by Svengali
Hello Amen,
I see some more mistakes. The shipdata itself is the toplevel container and needs a dict-block too.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
...
and at the end
The ship-key should be
Then take a look at the cargo_type key. The corresponding value is some lines below and the chance-key is a
shipyard entry (or is it a undocumented feature?). It should be:
Code: Select all
<key>cargo_type</key>
<string>CARGO_NOT_CARGO</string>
The escort-ship (case sensitive)
Code: Select all
<key>escort-ship</key>
<string>krait</string>
Hope this helps.
EDIT: Corrected a typo
Posted: Sat Jun 07, 2008 3:47 pm
by Commander McLane
Dammit! How could I miss so much?
Posted: Sat Jun 07, 2008 5:06 pm
by Svengali
Commander McLane wrote:Dammit! How could I miss so much? :shock:
It is often not so easy to see such little details. I have overlooked so many things in my oxps, but then I switched to OpenStep. Now I have a better overview and it is less code. And if I get this right Ahruman has implemeted OpenStep, because it is a lot easier to handle and Oolite reckognizes the type of the values (real. integer,...) on it's own. So the typos won't happen so often.
Amens complete shipdata.plist would be:
Code: Select all
{
Beetle = {
ai_type = "pirateAI.plist";
bounty = 150;
cargo_type = "CARGO_NOT_CARGO";
energy_recharge_rate = 5;
escort-ship = "krait";
escorts = 2;
exhaust = ( "0 0 -30 10 8 15" );
forward_weapon_type = "WEAPON_BEAM_LASER";
has_ecm = true;
has_escape_pod = true;
laser_color = "yellowColor";
likely_cargo = 2;
max_cargo = 60;
max_energy = 400;
max_flight_pitch = 1.85;
max_flight_roll = 1.85;
max_flight_speed = 150;
missiles = 4;
model = "beetle.dat";
name = "Beetle";
roles = "trader(2.0) scavenger(2.0) hunter pirate";
thrust = 20;
view_position_aft = "0.0 7 -39.5";
view_position_forward = "0.0 8 25";
view_position_port = "-44.9 0 -10.5";
view_position_starboard = "44.9 0 -10.5";
weapon_energy = 25;
};
}
But I also don't understand why he has no entry in stderr.txt. At least such a thing like 'couldn't parse ...shipdata.plist... HOMEBREW parser couldn't help...'
Posted: Mon Jun 09, 2008 12:19 pm
by Amen Brick
Thanks for that. Copy and pasting not as easy as it looks... heh.
Posted: Mon Jun 09, 2008 4:43 pm
by Svengali
Posted: Tue Jun 10, 2008 9:19 am
by Amen Brick
@svengali: No offence was taken!
Nearly there!
Beetle wouldn't work because of my inexperience with wings, i had two textures showing up in the dat file. I imagine that's why that was failing ultimately.
So I tried with the grasshopper (now renamed the Troublemaker) and I got as far getting the model into the game (yay!), but without textures. I scratched my head for a bit and realised I'd put a space in the texture name and the dat converter doesn't handle spaces so....
Third time will be the charm! (I hope
)
Posted: Wed Jun 11, 2008 11:18 am
by Amen Brick
Even closer!
I tried five models this morning. One worked perfectly! One has a mesh error (so restart there
) and three had too many vertices/faces, which is not how I remember it from wings, but hey ho. At least i know what's wrong, eh?
Next: Sub Entities! How do they work? I mean, do you do them as separate dats or part of the same dat.. or what?
Posted: Wed Jun 11, 2008 11:30 am
by Commander McLane
Completely seperate models, seperate dats, even seperate textures if you like. So with only one subentity you already double your vertices and faces.
As the very last step you stick it to the main model, using the subentities-array in shipdata.
Clue: Just have a look in any existing OXP where subentities are used. That will explain everything.
Posted: Wed Jun 11, 2008 12:51 pm
by Eric Walch
Dammit! How could I miss so much?
That is quite normal. When something is not working and you find a bug of two, one often thinks he found them all. But there is probably still a bug in it. I see a shipyard file. that means it is mend as player buyable. In that case also the role "player" is needed. In this ship, or a similar ship.
From a scripter's perspective: It doesn't really make sense to give a trader pirateAI, because this means that if you call it as a trader in your script, it won't behave like a trader. If you however intend to let it just be called by the system populator, the engine will set its AI correctly.
Starting with 1.70 this is not a problem anymore. In 1.69 an auto_ai key was introduced and starting with 1.70 the default value is yes. This means that when no auto_ai is defined (like here) it will switch the AI to the appropriate AI for that role when added by script. This works for the most internal roles. In Oolite itself there is a plistfile that controls the AI changes based on role.
Only the bounty stays a problem. The populator will disregard this value and make all roles clean except when a pirate. An even with a pirate it will give it a new random value. However, when added by script, the bounty sticks to the ship resulting in traders or scavengers with a bounty. But when you make bounty 0 you get clean pirates. Also annoying but as all oolites internal pirates will also generate clean pirates this is less of a problem.
Posted: Wed Jun 11, 2008 2:15 pm
by Svengali
Hehe, still not perfect (me).
Posted: Thu Jun 12, 2008 3:35 pm
by Amen Brick
Ok, these five work. When I master subentities (or die trying) I'll add a capital ship and a base. I have a theme now and the them will be "Crooks". Exta pirate ships, a couple of new target ships (in another optional oxp) and some missions when I tackle that. Perhaps joinable Pirate gangs and consequences thereof. Who knows?
The Hoodlum
The Mugger
The Thug
The Scoundrel
The Assassin
There is also the Spiv (formerly the Beetle) and the El Capo (Godfather? Don?) Capital ship.
I had a muck about with textures on Paintship (massive Griffenvy and Navyguyenvy!). Hot wax effect, ftw!
Posted: Thu Jun 12, 2008 7:18 pm
by DaddyHoggy
Nice texturing - very different - quite Babylon5ish for some reason. look forward to the oxp.