Jump to content

[Minimum KSP version 1.11] KSPDev: LogConsole (v2.1) | Utils (v2.7) | ReleaseTools (v1.2) | LocalizationTool (v1.9)


IgorZ

Recommended Posts

9 hours ago, IgorZ said:

For some reason CKAN doesn't recognize the new version :(  You may load it from here. I'll figure out what's wrong with CKAN.

That's because the CKAN isn't rebuilt every time.  The way you have it set up, is referencing a netkan file in your source, but that is not rebuilt each time.

I don't know why you have this line:

"x_netkan_version_edit" : "^logconsole_(?<version>.+)$",

when you also have the .version file

Link to comment
Share on other sites

You changed the file name format.

Old format:

KSPDev-LogConsole/KSPDev-LogConsole-logconsole_0.13.0.ckan

 

New format:

KSPDev-LogConsole/KSPDev-LogConsole-0.13.1.ckan

Assuming you are going to keep the new names, you need to create an epoch, to tell CKAN that the versioning changed.

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

I don't know why you have this line:


"x_netkan_version_edit" : "^logconsole_(?<version>.+)$",

when you also have the .version file

When getting release files from Github netakn seems to ignore .version files in favor of release tag name. At least I haven't found a way to make netkan using info from the version file.

21 minutes ago, linuxgurugamer said:

Assuming you are going to keep the new names, you need to create an epoch, to tell CKAN that the versioning changed.

Correct, I've intentionally changed version label format since KSP dev has multiple binaries that are released separately. As far as I can tell netkan correctly picked up the new settings (see what it has generated). Though, for some reason CKAN client ignores new versions and uses the old one. I've requested deletion of the old file hoping it may help. What did you mean about "epoch"? Is it a  parameter in netkan file?

Link to comment
Share on other sites

24 minutes ago, IgorZ said:

When getting release files from Github netakn seems to ignore .version files in favor of release tag name. At least I haven't found a way to make netkan using info from the version file.

Correct, I've intentionally changed version label format since KSP dev has multiple binaries that are released separately. As far as I can tell netkan correctly picked up the new settings (see what it has generated). Though, for some reason CKAN client ignores new versions and uses the old one. I've requested deletion of the old file hoping it may help. What did you mean about "epoch"? Is it a  parameter in netkan file?

the client won't see the new one, and you can't delete the old one.

Add the following line to the netkan:

"x_netkan_epoch": "1"

This will tell ckan that the format has changed.  If you ever change it again, you would increase this by 1

Look at this for an example:

https://github.com/KSP-CKAN/NetKAN/blob/master/NetKAN/AlternatorsForAll.netkan

Edited by linuxgurugamer
Link to comment
Share on other sites

54 minutes ago, linuxgurugamer said:

the client won't see the new one, and you can't delete the old one.

Add the following line to the netkan:


"x_netkan_epoch": "1"

This will tell ckan that the format has changed.  If you ever change it again, you would increase this by 1

Look at this for an example:

https://github.com/KSP-CKAN/NetKAN/blob/master/NetKAN/AlternatorsForAll.netkan

This looks exactly like what I needed. Thanks! I've changed the epoch, so CKAN is expected to pick up the latest version of LogConsole soon.

Btw, I also found a fun issue about this versioning stuff: https://github.com/KSP-CKAN/CKAN/issues/963

Link to comment
Share on other sites

  • 2 weeks later...

Is there a value to completely disable the cleanup policy? Or just set all policy options to very high values?

I just noticed that the logconsole deleted almost all it's old logs. :( Big loss of information.

EDIT: Don't get me wrong, I love this mod and am very happy and thankful for this great mod! I am just a little sad about the lost information just at this moment.

Edited by Jebs_SY
Link to comment
Share on other sites

  • 3 weeks later...

KSPDev_Utils v0.21.0

@ihsoft ihsoft released this a minute ago

Link to comment
Share on other sites

On 2/18/2017 at 6:13 PM, Jebs_SY said:

Is there a value to completely disable the cleanup policy? Or just set all policy options to very high values?

I just noticed that the logconsole deleted almost all it's old logs. :( Big loss of information.

EDIT: Don't get me wrong, I love this mod and am very happy and thankful for this great mod! I am just a little sad about the lost information just at this moment.

Sorry, missed this comment (forum sometimes just doesn't send notifications :(). If you want to disable the cleanup policy just drop the whole "cleanupPolicy" section from the settings file. If you want to prevent only some of the policy settings then, well, drop a particular thing in this section :)  Or modify the policy to your taste:

	cleanupPolicy
	{
		totalFiles = 3000000  // 3 million files
		totalSizeMb = 1048576  // 1Tb in all files
		maxAgeHours = 367920  // Save the logs for retirement
	}

 

Link to comment
Share on other sites

  • 1 month later...

KSPDev_Utils v0.22.1

@ihsoft ihsoft released this 3 minutes ago

Edited by IgorZ
Link to comment
Share on other sites

  • 2 weeks later...

KSPDev_Utils v0.23.0

@ihsoft ihsoft released this 18 seconds ago

0.23.0 (May 11th, 2017):

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

KSPDev_utils v0.24

@ihsoft ihsoft released this just now

0.24 (June 22nd, 2017):

  • [Change] Allow any state transition in SimpleStateMachine when the strict mode is OFF: ProcessingUtils.SimpleStateMachine.
  • [Change] Drop donCache option from UISoundPlayer: UISoundPlayer.Play.
  • [Change] Add an optional parameter to: Hierarchy.FindTransformByPath.
  • [Change] Major refactoring of the state machine: ProcessingUtils.SimpleStateMachine.
  • [Change] Support KSP 1.3 localization in the GUIUtils message classes.
  • [Change] Drop a messaging type that doesn't support localization: GUIUtils.MessageBoolValue.
  • [Change] Drop a messaging type that doesn't support localization: GUIUtils.MessageSpecialFloatValue.
  • [Change] Drop a GUI helper that doesn't support localization: GUIUtils.Formatter.
  • [Change] Drop a messaging type that doesn't support localization: GUIUtils.MessageEnumValue<T>. Use GUIUtils.EnumType instead.
  • [Enhancement] Add method overloads for ModelUtils.FindTransformByPath to simplify finding the models in the part.
  • [Enhancement] Add a method to parse PosAndRot from a string: Types.PosAndRot.
  • [Enhancement] Add a method to log nullable values: DbgFormatter.Nullable.
  • [Enhancement] Add a new interface for the modules that need their context menu updated: GUIUtils.IHasContextMenu.
  • [Enhancement] Add a new utility class for better logging of an object state: LogUtils.HostedDebugLog.
  • [Enhancement] Add a new utility class to deal with the stock resource names: ResourceUtils.StockResourceNames.
  • [Enhancement] Add a new utility class to deal with the 3D sounds: SoundsUtils.SpatialSounds.
  • [Enhancement] Add a base class to deal with the localizable strings (KSP 1.3+): GUIUtils.LocalizableMessage.
  • [Enhancement] Add a localization class to format a distance: GUIUtils.DistanceType.
  • [Enhancement] Add a localization class to format a enum value: GUIUtils.EnumType.
  • [Enhancement] Add a localization class to format an angle value: GUIUtils.AngleType.
  • [Enhancement] Add a localization class to format a force value: GUIUtils.ForceType.
  • [Enhancement] Add a localization class to format a mass value: GUIUtils.MassType.
  • [Enhancement] Add a localization class to format a percent value: GUIUtils.PercentType.
  • [Enhancement] A major improvement in the methods that deal with the mod's paths resolving: FSUtils.KspPaths.
  • [Fix #12] Keyboard input switch misses release key event.
  • [Fix #13] AlignTransforms.SnapAlign sets a wrong direction to the source.

KSPDev Utils now support the localization feature. A new `LocalizationTool` is coming soon. Given you've used the localization classes from the Utils, you'll be able to easily localize your mods.

For an example of the mod that fully supports localization see the KAS Beta Winch. And here is what the tool will automatically generate (including the comments):

Spoiler

// Auto generated by KSPDev Localization tool at: 6/22/2017 11:56:19 PM
Localization
{
	ru
	{

		// ********** Part: KAS.W1

		#KAS_W1_Part_description = A winch used to extend and retract a cable. A hook or a connector port can be pre-attached if needed. 
		#KAS_W1_Part_manufacturer = KAS
		#KAS_W1_Part_tags = KIS KAS winch eject cable connector cck-kas
		#KAS_W1_Part_title = W-1 Winch

		// ********** Type: KAS.KASModuleWinchNew, KSP Events

		// A context menu item that sets the cable length ot the maximum, and unlocks the
		// head if it was locked.
		#kasLOC_08013 = Release cable
		// A context menu event that sets the cable length to the current distance to the
		// head.
		#kasLOC_08014 = Instant stretch
		// A context menu event that attaches the head to the EVA kerbal.
		#kasLOC_08015 = Grab head
		// A context menu event that detaches the head from the kerbal and puts it back to
		// the winch.
		#kasLOC_08016 = Lock head

		// ********** Type: KAS.KASModuleWinchNew, KSP Fields

		// Presents the real cable length that connects the winch and the head in the
		// context menu.
		#KAS_KASModuleWinchNew_cableLengthMenuInfo = Actual length
		#KAS_KASModuleWinchNew_cableLengthMenuInfo_Units = \u0020m
		// Status field to display the current winch status in the context menu.
		#kasLOC_08011 = Winch state
		// A context menu item that presents the maximum allowed cable length.
		#kasLOC_08012 = Deployed length

		// ********** Type: KAS.KASModuleWinchNew, KSPDev Messages

		// Info string in the part's context menu for the winch state.
		// Argument <<1>> is an int value of one of the FOUR states.
		// Example usage:
		// Head is locked
		#kasLOC_08001 = <<1[Head is locked/Idle/Extending/Retracting]>>
		// Error message to present when the electricity charge has exhausted.
		#kasLOC_08002 = No energy!
		// Error message to present when an improperly aligned cable head has attempted to
		// lock with the winch.
		#kasLOC_08003 = Cannot lock the head: not aligned
		// Info message to present when a cable head has successfully locked to the winch.
		#kasLOC_08004 = Head locked!
		// An info message to present when the cable is extended at its maximum length.
		// Argument <<1>> is the current cable length of type DistanceType.
		// Example usage:
		// Maximum cable length reached: 1.23 m
		#kasLOC_08005 = Maximum cable length reached: <<1>>
		// An info message to present when the cable retract action is attempted on a locked
		// head.
		#kasLOC_08006 = The head is already locked
		// Name of the context menu item that stops the cable extending.
		#kasLOC_08007 = Stop extending
		// Name of the context menu item that starts the cable extending.
		#kasLOC_08008 = Extend cable
		// Name of the context menu item that stops the cable retracting.
		#kasLOC_08009 = Stop retracting
		// Name of the context menu item that starts the cable retracting.
		#kasLOC_08010 = Retract cable
	}
}

 

 

Edited by IgorZ
Link to comment
Share on other sites

  • 4 weeks later...

KSPDev_Utils v0.25

@ihsoft ihsoft released this 17 seconds ago

0.25 (July 15th, 2017):

KSPDev_LogConsole v0.15

@ihsoft ihsoft released this just now

0.15 (July 15th, 2017):

  • [Enhancement #14] Allow three fixed window size modes: top, bottom, or center.
  • [Enhancement #15] Relocate the toolbar when the console goes out of the screen.
  • [Enhancement #16] Add a quick filter ability.
  • [Enhancement #17] Resolve assembly paths in the stack trace info.

Follow the links to the enhancement issue to see the actual GUI changes. Or just update to the new version and see it in the game :)

Link to comment
Share on other sites

  • 5 weeks later...

KSPDev_Utils v0.26

@ihsoft ihsoft released this just now

0.26 (August 8th, 2017):

Link to comment
Share on other sites

  • 3 weeks later...

KSPDev_Utils v0.27

@ihsoft ihsoft released this just now

0.27 (September 2nd, 2017):

Link to comment
Share on other sites

Well, that was confusing (in a good way)!

KSPDev-LogConsole is currently erroring out in the NetKAN bot: http://status.ksp-ckan.org/

However, it looks like that's intentional! LogConsole, Utils, ReleaseBuilder, and LocalizationTool are sharing one list of releases in Github, and you're using x_netkan_version_edit to select only the releases of LogConsole. Since NetKAN looks only at the most recent release in the list, this means it will index new versions of LogConsole correctly as long as they are the most recent, but will raise errors whenever the most recent release is one of the other three packages. So it's functional for users of LogConsole but raises false positives in NetKAN (currently failing to match the version pattern against "loctool_1.0"). (Though I think you're at risk of missing a package if you do multiple releases too quickly for NetKAN to keep up, which is kind of an onerous quirk for a package maintainer.)

Have I got that right? If so, maybe we can find a way to accommodate this better. I'm investigating some NetKAN-bot stuff now, and some kind of new "x_netkan_release_match" pattern setting might make this arrangement work without generating errors.

EDIT: This already exists. Rather than a separate "x_netkan_release_match" field, it uses an "/asset_match/" suffix appended to the "$kref" field:

Edited by HebaruSan
Link to comment
Share on other sites

  • 2 weeks later...
On 9/4/2017 at 0:54 PM, HebaruSan said:

Well, that was confusing (in a good way)!

KSPDev-LogConsole is currently erroring out in the NetKAN bot: http://status.ksp-ckan.org/

However, it looks like that's intentional! LogConsole, Utils, ReleaseBuilder, and LocalizationTool are sharing one list of releases in Github, and you're using x_netkan_version_edit to select only the releases of LogConsole. Since NetKAN looks only at the most recent release in the list, this means it will index new versions of LogConsole correctly as long as they are the most recent, but will raise errors whenever the most recent release is one of the other three packages. So it's functional for users of LogConsole but raises false positives in NetKAN (currently failing to match the version pattern against "loctool_1.0"). (Though I think you're at risk of missing a package if you do multiple releases too quickly for NetKAN to keep up, which is kind of an onerous quirk for a package maintainer.)

Have I got that right? If so, maybe we can find a way to accommodate this better. I'm investigating some NetKAN-bot stuff now, and some kind of new "x_netkan_release_match" pattern setting might make this arrangement work without generating errors.

EDIT: This already exists. Rather than a separate "x_netkan_release_match" field, it uses an "/asset_match/" suffix appended to the "$kref" field:

Thank you for getting this fixed! I'm really appreciated for the pull request that solved the problem. Sorry for being late with the response :)

Edited by IgorZ
Link to comment
Share on other sites

KSPDev_Utils v0.28

@ihsoft ihsoft released this 11 minutes ago

0.28 (September 14th, 2017):

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

0.29 (October 23rd, 2017):

  • [Enhancement] Add the Fine() logging methods to spit the logs when the game is set to the extending logging mode ("Verbose Logging"): LogUtils.HostedDebugLog.
  • [Enhancement] Add an optional parameter subFolder to allow getting/creating the mods data folder: FSUtils.KspPaths.
  • [Enhancement] Add a full replacement for the stock logging methods with a new method Fine that can produce more logs when the user has requested it (via a stock game's setting): LogUtils.DebugEx.
  • [Enhancement] Add a method to disable collisions between a part and a vessel: Colliders.SetCollisionIgnores.
  • [Change] Drop noDefault parameter in GUIUtils.MessageLookup.
Link to comment
Share on other sites

  • 3 weeks later...
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...