Jump to content

How to make .version file?


Nightside

Recommended Posts

I have a few patches I'm updating and developing. What do I need to do to get that nifty .version file working. Can I just make one and include it in my mod folder or do I need to go register it somewhere and update it whenever I make a new release?

Link to comment
Share on other sites

If you're talking about AVC you need it in two places.  The first place is with your mod.  The second place is somewhere on the internet.  The basic way it works is the AVC/MiniAVC mod looks at the .version in your mod's folder.  It then looks at the URL you have in the version file and compares that to one you have on a website.  If the two matches, it does nothing.  Otherwise, it gives the notice.

Here's a basic PHP file that I use for Maritime Pack.  You'll note that I have id=1 as the query string for the URL.  Buy doing that, I'm able tell MiniAVC to check the same PHP file but have it select from multiple mods.  If you have any questions or need help making a PHP file, PM me.

Not sure if @linuxgurugamer still has it, but there used to be a website where you could create and store your remote .version files.

Check here:

<?php
header('Content-Type: text/plain');
if ($_GET["id"]=='1')
{
echo '{
	"NAME": "MaritimePack",
	"URL": "http://www.datainterlock.com/Kerbaltopia/AVCCheck.php?id=1",
	"DOWNLOAD": "http://kerbal.curseforge.com/projects/the-maritime-pack",
	"VERSION": {
		"MAJOR": 0,
		"MINOR": 1,
		"PATCH": 11,
		"BUILD": 0
	}, 
    "KSP_VERSION": {
        "MAJOR": 1, 
        "MINOR": 4, 
        "PATCH": 0
    }, 
    "KSP_VERSION_MAX": {
        "MAJOR": 1, 
        "MINOR": 4, 
        "PATCH": 99
    }, 
    "KSP_VERSION_MIN": {
        "MAJOR": 1, 
        "MINOR": 4, 
        "PATCH": 0
    }
}';
?>

 

Edited by Fengist
Link to comment
Share on other sites

On 8/22/2018 at 9:23 PM, Nightside said:

I have a few patches I'm updating and developing. What do I need to do to get that nifty .version file working. Can I just make one and include it in my mod folder or do I need to go register it somewhere and update it whenever I make a new release?

@Fengist mostly has it, although I don't recommend the ksp-avc site anymore.  What I do is have the URL point to the raw file of it on Github.  The KSP-AVC site is good to make an initial one, although I rarely bother anymore, I just write it, and then check the syntax on https://jsonformatter.org/

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...