Hey All,
So I'd just like to preface with a quick apology - I did do my research beforehand, but I was unable to find an answer to this or I'm somehow missing something and thus unable to do it. I'm sure there's plenty of people who just ask questions without searching for the answer, but I have attempted to do that myself. Despite that though I feel bad asking what is probably a pretty simple question. In my defense however, this is a huge learning experience for me and I'm excited to do even this small simple project, because I've never tried any form of coding before - even simple ones where I just add values to data.
With that in mind however. I have a shiny new .txt file I made on Notepad++ with data for a laser I'd like to implement. However I'm unable to figure out how to turn that .txt file into a .oxp file, and thus Oolite cannot read the file. Could someone point me in the right direction or show me the steps to take? I've read most all of the pinned posts about OXP development, but couldn't figure it out. I've got my file all zipped up and it's all formatted correctly, I just can't figure out how to change that .txt to .oxp.
Thanks for your help! Fly safe, commanders.
-Cmdr Aiden H
How to change .txt file to .oxz?
Moderators: winston, another_commander
- Cmdr. Aiden Henessy
- Competent
- Posts: 36
- Joined: Wed Aug 24, 2016 10:30 pm
How to change .txt file to .oxz?
I'm Ravished by the Sheer Implausibility of that Last Statement
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: How to change .txt file to .oxz?
I'm going to assume that your .txt file is the definition for a new laser of some sort, with text that looks something like this:
That file should not have a .txt extension, though. It needs to be named "equipment.plist".
You need to create a folder structure in your "AddOns" folder, something like this:
You need to save your "equipment.plist" file in that "Config" folder.
Finally, you need to add a "manifest.plist" file in the "MySuperlaser.oxp" folder. This is another text file that will look something like this:
So you should end up with a file/folder structure that looks like this:
That should be the bare-bones minimum for creating an OXP for a laser weapon. To convert an OXP to an OXZ, you simply zip the contents of the "MySuperlaser.oxp" folder. But note: not the "MySuperlaser.oxp" folder itself. The content only.
Is that what you're after?
Code: Select all
(
(
10, 60000, "My SuperLaser",
"EQ_WEAPON_MYSUPER_LASER",
"Superpowerful laser of my own design",
{
available_to_all = true;
weapon_info = {
range = 30000;
energy = 1.1;
damage = 12.0;
recharge_rate = 0.1;
shot_temperature = 4.25;
color = "magentaColor";
threat_assessment = 1.0;
};
}
),
)
You need to create a folder structure in your "AddOns" folder, something like this:
Code: Select all
Addons/
MySuperlaser.oxp/
Config/
Finally, you need to add a "manifest.plist" file in the "MySuperlaser.oxp" folder. This is another text file that will look something like this:
Code: Select all
{
"identifier" = "oolite.oxp.your_name_or_id.MySuperLaser";
"required_oolite_version" = "1.82";
"title" = "My Superlaser";
"version" = "1.0";
"category" = "Weapons";
"description" = "Adds 'MySuperLaser' as a purchasable laser";
"author" = "Your Name";
"license" = "CC BY-NC-SA 4.0";
}
Code: Select all
AddOns/
MySuperlaser.oxp/
Config/
equipment.plist
manifest.plist
Is that what you're after?
- Cmdr. Aiden Henessy
- Competent
- Posts: 36
- Joined: Wed Aug 24, 2016 10:30 pm
Re: How to change .txt file to .oxz?
Yeah, that's the thing, I can't figure out how to make it not have a file type of .txt. Is that something that needs to be done inside of Notepad++, a "save as" sort of function?
I feel like it's such a simple question, but I'm just missing something.
I'm Ravished by the Sheer Implausibility of that Last Statement
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
Re: How to change .txt file to .oxz?
You operating system is GNU/Linux or OSX or Windows?Cmdr. Aiden Henessy wrote: ↑Thu Jan 12, 2017 1:43 amI feel like it's such a simple question, but I'm just missing something.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: How to change .txt file to .oxz?
You should be able to do a "Save as..." in Notepad++. Or you can rename the file in Windows Explorer. Just make sure you have the extensions visible, otherwise your "mydoc.txt" file will probably just be shown as "mydoc". See this URL for info on how to show file extensions. http://www.thewindowsclub.com/show-file ... in-windows
- Cmdr. Aiden Henessy
- Competent
- Posts: 36
- Joined: Wed Aug 24, 2016 10:30 pm
Re: How to change .txt file to .oxz?
Thank you, that did it! This community is awesome. Major brownie points to you, sir.phkb wrote: ↑Thu Jan 12, 2017 2:04 amYou should be able to do a "Save as..." in Notepad++. Or you can rename the file in Windows Explorer. Just make sure you have the extensions visible, otherwise your "mydoc.txt" file will probably just be shown as "mydoc". See this URL for info on how to show file extensions. http://www.thewindowsclub.com/show-file ... in-windows
I'm Ravished by the Sheer Implausibility of that Last Statement
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
It should be a crime for Anacondas to fly without escort. That much temptation is just too much to resist.
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: How to change .txt file to .oxz?
Cool! But can I get those brownies converted into cookies? Mmmm, cookies...Cmdr. Aiden Henessy wrote:Major brownie points to you, sir.