sarbian

[1.4.0-1.7.x] Module Manager 4.0.2 (February 3rd 2019) - Right To Ludicrous Speed

Recommended Posts

Just wanted to clarify something. In the OP you specify a share-alike license, but ialdabaoth's OP for ModuleManager contains the following:

Plugin developers and other modders have my explicit permission to redistribute this dll with their own works, so long as you give credit to me and provide a URL back to this forum post.

Reference: http://forum.kerbalspaceprogram.com/threads/31342-0-20-ModuleManager-1-3-for-all-your-stock-modding-needs

The share-alike license seems to specify that any work which *builds upon* and redistributes ModuleManager (which would seem to apply to any mods that make use of it) must also use a share-alike license, whereas what ialdabaoth says above does not.

Is this actually the case for 1.5 where it's only intended to be redistributed with mods that also have a share-alike license? If not, would you mind including a similar statement to ialdabaoth's in the OP?

Share this post


Link to post
Share on other sites
Just wanted to clarify something. In the OP you specify a share-alike license, but ialdabaoth's OP for ModuleManager contains the following:

Reference: http://forum.kerbalspaceprogram.com/threads/31342-0-20-ModuleManager-1-3-for-all-your-stock-modding-needs

The share-alike license seems to specify that any work which *builds upon* and redistributes ModuleManager (which would seem to apply to any mods that make use of it) must also use a share-alike license, whereas what ialdabaoth says above does not.

Is this actually the case for 1.5 where it's only intended to be redistributed with mods that also have a share-alike license? If not, would you mind including a similar statement to ialdabaoth's in the OP?

He's said elsewhere that all of his work is free for others to use.

Share this post


Link to post
Share on other sites

If you read the line about the licence in the first post you'll see that the "here" is a link. It point to the post where ialdabaoth gave his licence term.

The licence is only about the source. I just added "source" to my post to make it clearer.

Share this post


Link to post
Share on other sites
Space in part name are evil.

Replace the space with an "?". It should work

If not replace it with an "*". I know this one work but it may match more than just 1 space

I need to add more trim() then ...

I investigated this, no amount of Trim will help with this issue.

The lines of this kind

""@PART[*]:HAS[ @RESOURCE[*] ]""

just have to be without spaces, they are truncated at the first white-space.

ModuleManager cannot do much about it as far as I can see.

Share this post


Link to post
Share on other sites
If you read the line about the licence in the first post you'll see that the "here" is a link. It point to the post where ialdabaoth gave his licence term.

The licence is only about the source. I just added "source" to my post to make it clearer.

Cool, thanks for that man.

Share this post


Link to post
Share on other sites

An other unofficial release : http://www.sarbian.com/sarbian/ModuleManager_1_5_2.dll

This one include code cleanup by dhx and new operators asked by NathanKell

% for a value or a node will edit if present and add if not

$ for a node will duplicate it

@NODENAME,2 {} will get you the third node of that type (0 is the first, 1 the second, ... we programmer like this joke)

And it does apply patch when reloading the database

I'll release it as official in a few days if no bug emerge.

Share this post


Link to post
Share on other sites

Still on 1.5.1 but just wanted to say that reload ability just saved me about half an hour worth of restarts. (Half an hour that I don't actually have.)

Share this post


Link to post
Share on other sites

Yeah, with all the people working on RSS and related mod I figured it was important I make it work. It was kind of depressing to see how little code was required in the end ...

Share this post


Link to post
Share on other sites
Yeah, with all the people working on RSS and related mod I figured it was important I make it work. It was kind of depressing to see how little code was required in the end ...

Yeah I had a few ideas about it that I wanted to bring up with you but couldn't tear myself from all the tweaking and testing I was doing. Glad you figured it out.!

Share this post


Link to post
Share on other sites

I visited the github fork but didn't see a way to suggest a change, so I'm here

It'd be nice to also be able to edit RESOURCE_DEFINITIONs. There are some biology/life support mods that have the same resource (oxygen, for example), but use different densities.

Being able to use module manager to bring order to chaos in resources would be nice.

Share this post


Link to post
Share on other sites

Ressource are part of the database, so you can already edit them

Share this post


Link to post
Share on other sites
Ressource are part of the database, so you can already edit them

Well. I feel dumb.

Is there a wiki or how to that describes what one can do and how to do it?

Share this post


Link to post
Share on other sites

The short version is : if it's defined in a .cfg in any subdirectory of GameData you can edit it.

All the doc is in the first 2 post.

To edit this


RESOURCE_DEFINITION
{
name = LiquidFuel
density = 0.005
flowMode = STACK_PRIORITY_SEARCH
transfer = PUMP
}

You do


@RESOURCE_DEFINITION[LiquidFuel]
{
@density = 0.2
}

Share this post


Link to post
Share on other sites
The short version is : if it's defined in a .cfg in any subdirectory of GameData you can edit it.

All the doc is in the first 2 post.

Thank you so much. :)

Share this post


Link to post
Share on other sites

Sarbian: I'm having an issue with $: It doesn't seem to apply to root nodes. Checking the source, you seem to only check for $ in subnodes, whereas exactly the place I would like it is root nodes (i.e. $PART[foo] rather than @PART[foo]).

Share this post


Link to post
Share on other sites

Further issue with 1.5.3: I now get "Could not find node to modify: @foo" for pretty much every subnode I try to modify.

Share this post


Link to post
Share on other sites
Suggestion: A means to swap entire nodes based on the presence of other mods by identifying loaded .dlls

Is this syntax ok ?


PART
{
MM_SWITCH
{
CASE
{
dll_loaded = FireSpitter
MODULE
{
name = FSwheel
etc = etc
}
}
CASE
{
dll_loaded = Multiwheels6
MODULE
{
name = TTModularWheel
etc = etc
}
}
DEFAULT
{
MODULE
{
name = ModuleLandingGear
}
}
}
}

Edited by sarbian

Share this post


Link to post
Share on other sites
Sarbian: I'm having an issue with $: It doesn't seem to apply to root nodes. Checking the source, you seem to only check for $ in subnodes, whereas exactly the place I would like it is root nodes (i.e. $PART[foo] rather than @PART[foo]).

Ok so assuming that foo is an existing part, and I would like to duplicate it and then just give it a new name, is this the way?


$PART[foo]
{
@PART
{
@name = newfoo
}
}

Share this post


Link to post
Share on other sites

I got the module manager and put it in the gamadata file (1.5.5) then i created a folder for my patch, the patch used the code you provided to send any mod part to have tech tree integration at the composites node, but everything i do is failing i still do not get how to use this mod, do i need to provide a root to the files some how?

Share this post


Link to post
Share on other sites

Alas no. Sarbian found that you can't do that for root nodes (like PART) only subnodes. Has to be a Squad-side change to allow that.

So the main use case for $ is not working. :\

You'd use it just like @, though, IIRC: i.e.


$PART[foo]
{
@name = newfoo
//@other_changes_from_foo
}

Share this post


Link to post
Share on other sites

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.