GitHub-TC / EmpyrionScripting

Displays various informations directly and live on LCD screens and will support conveyor and construction control
GNU General Public License v3.0
35 stars 5 forks source link

Deconstruct/Recycle With Cost for Blocks doesn't have Salary in configuration.json #38

Closed TheHammander closed 7 months ago

TheHammander commented 7 months ago

Describe the bug A clear and concise description of what the bug is.

We downloaded the update, and it's working, but it's not 200 credits for 10 blocks. I put in 50k Credits and started a Deconstruct, and without finishing yet, have roughly 20k blocks in the storage, but only roughly 3000 credits used. We found the Salary Configuration in the .cs file, but not in the .json at all.

To Reproduce Steps to reproduce the behavior:

  1. Use the following code: {{#entitiesbyname '' 500}} {{#each .}} {{#test @root.E.Id neq Id}} {{Name}}: {{#deconstruct . 'Storage Bay 1 640K*'}} min: {{MinPos}} max: {{MaxPos}} current X: {{X}} current Y: {{Y}} current Z: {{Z}} TotalBlocks: {{TotalBlocks}} CheckedBlocks: {{CheckedBlocks}} RemovedBlocks: {{RemovedBlocks}} {{else}}
    • {{/deconstruct}}

{{/test}} {{/each}} {{/entitiesbyname}}

  1. Set LCDs to Script:Deconstruct & Deconstruct
  2. Name a core of a ship appropriately and have money in the storage
  3. See error

Expected behavior A clear and concise description of what you expected to happen.

Either see 200 credits deducted per 10 blocks, or see the configuration option in configuration.json

Screenshots If applicable, add screenshots to help explain your problem.

image

Additional context Add any other context about the problem here.

I love the mod, and I can't believe how quickly you got this up after I asked about it, I can't express my appreciation for you & your work enough! I also apologize if that's a rough Deconstruct code, I barely know what I'm doing and just took the first one that I found that worked.

TheHammander commented 7 months ago

Also if needed, the ship it was tested on was Ente's Stellar Endeavour (https://steamcommunity.com/sharedfiles/filedetails/?id=2817869183), with a Block Count of 59,451

GitHub-TC commented 7 months ago

Please upload your configuratioin.json from the savegame scripting directory, because it works fine for me.

PS. Have you changed the number of ProcessMaxBlocksPerCycle? because this must not exceed the number that the dismantling costs, otherwise nothing will be calculated because RemoveItems will fail

TheHammander commented 7 months ago

Configuration.json

I believe it's this one? Our server has 2, one in \serverfiles\Content\Mods\EmpyrionScripting, and one in \serverfiles\Saves-Reforged\Games\DediGame\Mods\EmpyrionScripting, which is where this config is from.

The one in Content/Mods doesn't have the Deconstruct Salary, but the Saves-Reforged/Games (attached) has the Deconstruct Salary, but if I'm reading it correctly, it's currently set to 10 Credits per 100 blocks

If that's correct, should this json be somewhere else, or can we just edit this to make the adjustments?

TheHammander commented 7 months ago

Not closed, I apologize, not used to github

GitHub-TC commented 7 months ago

Works very strangely for me. Your configuration is also correct.

Can you try dismantling with the Vega AI and only follow the dismantling on the LCD (without opening the box during the process)?

TheHammander commented 7 months ago

I used the Vega AI and didn't open the box, it fully deconstructed the ship, which is 59,541 blocks, but it only used 8,920 Money Card.

Side Note: Using the Vega AI, was experiencing quite a bit of lag whenever the scripts ticked, is there a setting to fix/adjust that? Happens on both singleplayer & server.

GitHub-TC commented 7 months ago

With the default settings, it runs smoothly for me. Have you installed the mod locally? Then please delete the local installation so that ONLY the mod runs on the server.

The effects almost look as if several instances of the mod are running at the same time

TheHammander commented 7 months ago

I deleted the local version, thought it was needed for both client & server, my apologies.

We haven't changed anything server-side, and still using Vega AI for the deconstruct, it used 30 Credits for 200 blocks

GitHub-TC commented 7 months ago

Perhaps one of your fellow players still has the mod installed locally.

PS: With an active EAC, Eleon did not load the client mods in the past, but unfortunately, due to a bug, they do this now. With strange side effects

TheHammander commented 7 months ago

I don’t believe anyone does, but I’ll check to be sure, and if not it is what it is; I greatly appreciate your help with it!

Before I close, is there anywhere I can go for like, script support? I’ve been spending the past few weeks trying to understand how to make my own, and I just can’t do it. Hoping for assistance with either understanding how to do it, or help making the script

GitHub-TC commented 7 months ago

However, you can also set the setting to "debug" again in "EGS\Saves\Games\Savegamename\Mods\EmpyrionScripting\Configuration.json"

  "LogLevel": "Debug",

And then perform a teardown and make the log files (dedicated & playfield) from "EGS\Log" available to me via fileshare.

There is this section in the forum where players can also exchange information https://empyriononline.com/threads/mod-ext-empyrion-scripting-scripts.92458/

Unfortunately there are not so many players on Empyrion anymore so you might have to wait a bit for reactions

image
TheHammander commented 7 months ago

I'll give it a shot, but it could take some time due to my friend hosting the server being busy the next week or so, so I can't make any promises. At least the script is using SOME money and not none, lol.

And thank you so much! I threw a post up on it so I'll just check it every so often and see what happens.

Sincerely, thank you for everything you've done with this and your help. It's a game changer, even with Reforged Eden, to make the game more enjoyable. I hope you have a wonderful day!