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.Svengali wrote: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).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.
My First Models
Moderators: winston, another_commander
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
E-mail: [email protected]
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
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
and Shipdemo
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
Shipyard<?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>
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.<?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">
<array>
<string>Beetle</string>
</array>
</plist>
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
There are two issues with your shipdata and one with the shipyard.plist (I guess c&p-problems):
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.
By the way: All of this should be visible in your stderr-file.
The name-key needs to be followed by something that is the name of the ship. Presumably<?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>
And the following <key> misses the opening "<".<string>Beetle</string>
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.
There is a superfluous "s" in the beginning of the first line.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>
By the way: All of this should be visible in your stderr-file.
Hello Amen,
I see some more mistakes. The shipdata itself is the toplevel container and needs a dict-block too.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:
The escort-ship (case sensitive)
Hope this helps.
EDIT: Corrected a typo
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>
...
Code: Select all
</dict>
</dict>
</plist>
Code: Select all
<key>Beetle</key>
Code: Select all
<key>cargo_type</key>
<string>CARGO_NOT_CARGO</string>
Code: Select all
<key>escort-ship</key>
<string>krait</string>
EDIT: Corrected a typo
Last edited by Svengali on Sat Jun 07, 2008 6:53 pm, edited 2 times in total.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
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.Commander McLane wrote:Dammit! How could I miss so much? :shock:
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;
};
}
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
EDIT: Don't get the smilies wrong, Amen. I've made so much mistakes when I started (only a few month ago) to script my first Oxp, but there were a lot of people who gave me a lot of hints, code snippets and solutions for problems. And it is easy to make mistakes - we are all not perfect. So I'm looking forward to see your first oxp...
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
@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 )
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 )
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
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?
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?
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
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.
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.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
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.Dammit! How could I miss so much?
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.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.
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.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- Amen Brick
- Deadly
- Posts: 187
- Joined: Sat May 10, 2008 5:22 pm
- Location: Bolton!
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!
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!
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Nice texturing - very different - quite Babylon5ish for some reason. look forward to the oxp.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.