Useless Junk
Moderators: winston, another_commander
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
-
- Competent
- Posts: 35
- Joined: Wed Jul 11, 2007 1:25 pm
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
That's true... people must do something with old asteroid mines, once they've been completely hollowed out. Set one spinning and you could even get some gravity inside.Arexack_Heretic wrote:re-using a rockhermit from the basic game and a advertisement board from DrNil, maybe a few extra struts, and you have a "Ye olde Hermitage" shop.
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
hmm... it would require a bit of playing around with the positionings of the subentities as the models are all in .dat format, but it should be doable.The Dreamcatcher wrote:I really like the idea of that, but unfortunately have no idea whatsoever of how to go about it.Arexack_Heretic wrote:re-using a rockhermit from the basic game and a advertisement board from DrNil, maybe a few extra struts, and you have a "Ye olde Hermitage" shop.
-----
A small 10 step tutorial on how you could go about this:
Code: Select all
1- learn how plist dictionaries work (similar to XML)
2- make an empty shipdata.plist in /Addons/YOUROXP/Config/
3- copy/paste into shipdata: from the oolite game data hermitage (including subentity entries referred to)
3a- rename the entitykey to hermitage_my_shop
3b- delete all entries but the subentities and roles.
3c- add the key like_ship and refer this to the rock-hermit.
3d- add into subentities the billboard and optional extra struts.
3e- change the role to 'my_shop_role'
4- copy/pasteinto shipdata: from Dr.Nil's YourAddHere_oxp, the shipadata entry for a billboard.
4a change again the entity-keys and make sure this corresponds to the names used in the hermitage subentities.
4b set roles to shop_subentity_sign
5- copy paste into /models/ that bilboard
6- copy/paste it's associated texture to /textures/.
6a- edit the texture and rename it.
6b open with a texteditor the .dat in /models/, rename references to the texture you renamed to the new name.
7- open the texture with a grafics program.
7a- change the texture-image, to a shop sign. (save as PNG, overwrite the old file)
8- download a small testscript from one of the boards, (so that you can observe the new shop in-game). put the file in /config/.
(8a- you could also use the demoships.plist file, but I found that is pretty buggy with subentities sometimes)
9-run the game
9a - meet your shop. look at subentity placement. make notes. exit game.
10a- adjust the quaternion coordinates for the subentities.
10b- goto: 9
And are usually a good reason to just make your own models.
Maybe the SHIPYARD-utility could be of use here, as it can manipulate .dat files (IIRC). Only available for Mac though.
Edit: I forgot about adding shipyard and equipment data etc, but you have info on that already.
Disclaimer: as with all my code, this tut is probably crawling with bugs.
Last edited by Arexack_Heretic on Wed Jul 25, 2007 11:34 am, edited 2 times in total.
Riding the Rocket!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
The syntax is “d100_number lessthan 4” (or 8, as the case may be), but yes.Disembodied wrote:OK, thanks. Just so I'm clear: the conditions key would specify a percentage chance of an item being available for sale, so (despite the strident objections from certain anti-competitive types) it would be possible, with <key>conditions</key><string>d100_8</string> to make Nodding Trumbles twice as common as <key>conditions</key><string>d100_4</string> The Machine That Goes PING?
No, it means that the player can buy it regardless of what ship is being used. Equipment which is not marked available_to_all can only be bought if your ship’s shipyard.plist entry specifies it as optional equipment.Disembodied wrote:And I'm assuming that available_to_all means that these pieces of equipment could be found on NPC ships and ships available for purchase.
NPCs will never use equipment not specified in their shipdata.plist entry.
E-mail: [email protected]
- Arexack_Heretic
- Dangerous Subversive Element
- Posts: 1876
- Joined: Tue Jun 07, 2005 7:32 pm
- Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
- Contact:
that is one minor problem with equipment oxps:
NPCs don't have them, unless the EQ can be fitted into a class like MISSILE or such.
Could I make a request for an additional file that defines the format of shipdata entries?
(ie: I make Ping-machine.
now I add to this shipdata_syntax.file the information that makes a new entry <key>hasPing</key>, which accepts /True, /False, 0.0-1.0.
or returns <key>hasPing<key> <False/> unless overriden by the shipdata.)
Obviously the form of accepted input (bool/ integer/ string/ etc) for the newentry would need to be described as well in the syntaxfile.
NPCs don't have them, unless the EQ can be fitted into a class like MISSILE or such.
Could I make a request for an additional file that defines the format of shipdata entries?
(ie: I make Ping-machine.
now I add to this shipdata_syntax.file the information that makes a new entry <key>hasPing</key>, which accepts /True, /False, 0.0-1.0.
or returns <key>hasPing<key> <False/> unless overriden by the shipdata.)
Obviously the form of accepted input (bool/ integer/ string/ etc) for the newentry would need to be described as well in the syntaxfile.
Riding the Rocket!
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Nah. The proper way to handle that sort of thing would be to add an extra_equipment array (or possibly dictionary) to shipdata.plist entries. It would also be necessary to make internal changes to make NPC ships handle the extra equipment. In general, this is part of making NPC ships more like player ships, which is something I’d like to do but which is not going to happen until after the next stable release. (I’ve already got way to much stuff scheduled for that…)
E-mail: [email protected]
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Thanks, all! All very interesting... gradually, the mental fog begins to lift... whether it will ever clear enough for me to do anything more than guddle around to no real purpose is, as yet, unknown: but who knows? Stranger things have happened. Not often, admittedly -- but every bell curve has those little pointy bits at either end.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Some methods have been showed. The best method with "available to all" works only with version 1.68 or newer. I used a method that works with older versions. Set the technical level to high to be purchased. Then define the conditions on witch the item should show up. If true he gets a level of 1, if false, it is reset to its original tech-level and won't show up at that station.what would be a good way of making them relatively rare, apart from giving them stupidly high tech levels? Is it possible to make types of equipment only available in certain places?
Eric Walch<key>conditions</key>
<array>
<string>status_string equal STATUS_DOCKED</string>
<string>systemGovernment_number equal 0</string>
</array>
<key>do</key>
<array>
<string>set: mission_TL_FOR_EQ_UPS_POLICE_SCANNER 1</string>
</array>
<key>else</key>
<array>
<string>reset: mission_TL_FOR_EQ_UPS_POLICE_SCANNER</string>
</array>
- Cholmondely
- Archivist
- Posts: 5365
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Useless Junk
Is this still true for Oolite v.1.90?
Or is it now Useless Junk?
Or is it now Useless Junk?
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?