Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help with 34 errors found on Module Manager? #151

Open
VexyCats opened this issue Aug 24, 2019 · 5 comments
Open

Help with 34 errors found on Module Manager? #151

VexyCats opened this issue Aug 24, 2019 · 5 comments

Comments

@VexyCats
Copy link

VexyCats commented Aug 24, 2019

I'm new to module manager and I'm just trying to do three things:

  1. Increase base cost and cost of all parts to realistic levels
  2. Increase rewards and associated rewards for all contracts

Here is my patch.cfg file in GameData with module manager newest version installed.


@PART[*]
{
    %addedCost = 25.0
    %entCost = 5.0
	@addedCost *= #$cost$ 
	
    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[#Cost]
{
    %addedCost = 25.0
    %entCost = 5.0
	@addedCost *= #$cost$ 
	
    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}

@RESOURCE[*]:HAS[#unitCost]
{   %extCost = 5.0
    @unitCost *= #$extCost$
    @unitCost = #$unitCost$
}


// StockNoContracts
// Copyright 2015 Malah
// This is free and unencumbered software released into the public domain.

// Types of stock contracts : ARM, Base, Flag, Grand, ISRU, Recovery, Satellite, Science, Station, Survey, Test, Tour

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
%addedCost = 400
 %upfront = 500

	        @addedCost *= #$BaseReward$
            @upfront *= #$upfront$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }

What am I doing wrong? Why are there errors on the landing screen?

Also FYI: even with errors, everything works but I want to remove the errors

@VexyCats
Copy link
Author

I've edited the code some more and this is my new code.

It still returns 11 errors All of which are from the code below.

Why is this? A syntax issue? Or some mod not working with my :HAS statements?


@PART[*]
{
    %addedCost = 25.0
    %entCost = 5.0
	@addedCost *= #$cost$ 
	
    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[#Cost]
{
    %addedCost = 25.0
    %entCost = 5.0
	@addedCost *= #$cost$ 
	
    @entCost *= #$entCost$
    @cost = #$addedCost$  
    @entryCost = #$addedCost$  
}
@PART[*]:HAS[@MODULE[ModuleScienceExperiment]]:Final
{
    @MODULE[*]
    {
        @hideUIwhenUnavailable = True
        @xmitDataScalar = 1.0
    }
}
@RESOURCE[*]:HAS[#unitCost]
{   %extCost = 5.0
    @unitCost *= #$extCost$
    @unitCost = #$unitCost$
}


// StockNoContracts
// Copyright 2015 Malah
// This is free and unencumbered software released into the public domain.

// Types of stock contracts : ARM, Base, Flag, Grand, ISRU, Recovery, Satellite, Science, Station, Survey, Test, Tour

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
            %addedCost = 250.0
            %upfront = 100.0

	        @addedCost *= #$BaseReward$
            @upfront *= #$BaseAdvance$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }
   
}
 @CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL
{
    %upfront = 100.0
    @rewardFunds *= #$upfront$
}

@blowfishpro
Copy link
Collaborator

The Log contains the full errors. Could you post that?

@VexyCats
Copy link
Author

@blowfishpro Thanks, but everyone says look at the log..... where is the log located? What folder directory? Whats it called? Is it .log?

I will upload it as soon as I can find it

@VexyCats
Copy link
Author

VexyCats commented Aug 25, 2019

Note: The pricing changes works. Everything is a lot more expensive.

I just can't change the rewards on the contracts - how do I do this?

I found the logs, and they change my prices, and they stop at @CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL
And do not do the

@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds:HAS[#BaseReward, #BaseAdvance]
   {
            %addedCost = 250.0
            %upfront = 100.0

	        @addedCost *= #$BaseReward$
            @upfront *= #$BaseAdvance$
            @BaseReward = #$addedCost$ 
            @BaseAdvance = #$upfront$
    }
   
}

Here is my new and updated code - it works for updating the price, and the two CONTRACT_TYPES but fails to update @contracts

@PART[*]:HAS[#cost]:FINAL
{
    @cost *= 80.0
    @entryCost *= 40.0
}
@PART[*]:HAS[#Cost]:FINAL
{
   
    @Cost *= 80.0
    @entryCost *= 40.0
}
@RESOURCE_DEFINITION[*]:HAS[#unitCost]:FINAL
{  
    @unitCost *= 5.0
}
@CONTRACT_TYPE[*]:HAS[#rewardFunds]:FINAL
{
  @rewardFunds *= 400
}
@Contracts[*]:HAS[@Funds]:FINAL
{
   @Funds
   {
        @BaseReward *= 500
        @BaseAdvance *= 400
    }
}


There are no errors anymore, it just doesn't seem to process the update, is there a reason why? Does it need to be positioned in a different order or something?

I just want to take all the squad contracts, and multiple their rewards by 400-500.

@blowfishpro
Copy link
Collaborator

blowfishpro commented Aug 25, 2019

Well I just noticed this: @Funds:HAS[#BaseReward, #BaseAdvance] - the space will break it (not MM's fault, by the time MM gets to it KSP has already parsed this and stripped off everything after the space)

The other stuff I'll look into later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants