How to implement automatic classification of items through scripts? For example, I store all items in the 'A' box and automatically classify them into the BCD box.
There are many ships and bases in the workshop that use sorting via scripting. Just search for "script
Is it possible to use item Keys instead of IDs for the config? Adding and changing the IDs I want to use for the decon script is a pain after each wipe. Using Keys would negate this issue.
Yes, is is shorter thus more often used, but shpuld work just the same with keys. You can work with id lists (@ids.xy) as well!
ASTIC, Ich hab 2 Fragen: Laufen C# LCD Scripte seltener als Handlebars? (Ich habe experimentiert und das Ergebnis einer Änderung hat recht lange gebraucht) Ist der Schild Status auch in Handlebars? (in der Doku hab ich 's nicht gefunden) über C# komme ich dran, aber habe da oben genantes Problem. War warscheinlch langsam weil ein altes Mod noch auf dem Testserver gelaufen ist.... nochmal n edit: wie kann ich mit (ingame LCD) C# n Lever / Signal setzen? Danke!
I am not sure what I am doing wrong here. I'm trying to use a shop script for my player shop. The script I have requires someone to put in the exact amount of currency for each transaction. I want to make it so that you can place a stack of currency into the sale box and then it gives you as many items as you can with that amount of currency and then gives you the items and any change at the end. I can attach the script I have below. <align=center><size=+1><color=purple>Item Name Here</color></size></align> {{set 'cost' 5000}} {{set 'volume' 1}} {{#items E.S 'box33-item'}} {{set 'itemID' Id}} {{/items}} {{#items E.S 'box33'}} {{#test Id 'eq' 4347}} {{#test Count 'eq' @root.Data.cost}} {{set 'Payed' true}} <color=green>Thank you for the correct deposit.</color> {{/test}} {{/test}} {{/items}} {{#items E.S 'box33-item'}} {{#test Id 'eq' @root.Data.itemID}} {{#test Count 'lt' @root.Data.volume}} <color=red>Not enough item. {{set 'emptybox' true}} {{/test}} {{/test}} {{else}} {{set 'emptybox' true}} <color=red>The shop is empty. {{/items}} {{#items E.S 'box33'}} {{#test Id 'eq' @root.Data.itemID}} <color=red>Please remove your item. No new transactions until previous item has been removed. {{set 'emptybox' true}} {{/test}} {{/items}} {{#if @root.Data.emptybox}} Transactions halted {{else}} {{#if @root.Data.Payed}} {{#items E.S 'box33-item,box33'}} {{~set 'ShopBox1NB' ''}} {{~set 'Amount' ''}} <color=orange>Transfer In Progress</color> {{#test Id in '4347'}} {{~set 'ShopBox1NB' 'moneybox'}} {{/test}} {{#test Id in @root.Data.itemID}} {{~set 'ShopBox1NB' 'box33'}} {{~set 'Amount' @root.Data.volume}} {{/test}} {{#ok @root.Data.ShopBox1NB}} {{#move ../. @root.E.S @root.Data.ShopBox1NB @root.Data.Amount}} {{Source}} -> {{Destination}} {{/move}} {{/ok}} {{/items}} {{else}} {{#items E.S 'box33-item'}} <align=center><color=green>This box is selling {{@root.Data.volume}} {{Name}} for {{@root.Data.cost}} Gold Coins. There is {{Count}} available to purchase. Deposit exactly {{@root.Data.cost}} Gold Coins into the box and wait for this screen to inform you that your item is ready to retrieve. <smallcaps><color=red>No refunds Do no open the box until instructed to or you may lose your money</color> Item ID {{Id}} </color> {{/items}} {{/if}} {{/if}}
EmpyrionScripting: 12.0.0 All configuration entries works with item names HarvestCores, StructureTank, GardenerSalary and DeconstructBlockSubstitutions change to ItemNameId Generate ID lists (Oxygen, Fuel, Pentaxid) if not exists https://github.com/GitHub-TC/EmpyrionScripting/releases/tag/12.0.0
Love the Mod, even though we are still running on 11.4.6... Is there a variable for showing the maximum Shield like... E.S.Shieldlevel ? I'd like to have a bar display and not have to recode the 15550 if I update the ship in a manner that affects the shield <color=#ffd700> {{#use E.S.ShieldLevel}} {{bar . 0 15550 16 }} {{~format . '{0,8:}'}} {{/use}}</color> Thanks, and any help appeciated
I can't get the commands to work. I have. The source, Script: Deconstruct, the destination, DeconstructLcd. On the script I have the following: (LCD Names) Script: DeconstructLcd DeconstructLcd (Script) {{gettext Script: Deconstruct}} {{settext DeconstructLcd}} This outputs an error on DeconstructLcd of: Reached end of template before block expression 'gettext' was closed. So, I closed the expressions with the following: {{gettext Script: Deconstruct}} {{/gettext}} {{settext DeconstructLcd text}} {{/settext}} Expressions are closed, no more error message. But now, DeconstructLcd displays nothing
Code: {{settext DeconstructLcd (gettext Script:Deconstruct)}} gettext is a single command that returns the text directly. settext is also a single command for setting a text to a LCD
Tryd it but get this in the DeconstructLcd An unhandled exception occurred while trying to compile the template 5:02:42 PM What im atemting to do is put the script for public use on the base so thay can copy it with out wrecking the original text.
I forgot the quotes Code: {{settext "DeconstructLcd" (gettext "Script:Deconstruct")}} Or try the Code: {{#settextblock "DeconstructLcd"}} {{gettext "Script:Deconstruct"}} {{/settextblock}}
still get the error on the first set of code An unhandled exception occurred while trying to compile the template 1:40:39 AM Second set of code tels me Reached end of template before block expression 'gettext' was closed 1:43:06 AM so I closed it Code: {{#settextblock "DeconstructLcd"}} {{gettext "Script:Deconstruct"}} {{/gettext}} {{/settextblock}} no error but the DeconstructLcd is empty no text
I'm currently on holiday and unfortunately can't try it out in the game. So unfortunately I have to leave you with a "verified" version
Sorry ASTIC, I have a savegame cs problem: after some try/error I figured out sending a chat message in cs wont work and cause an error. I use almost the same code as in an working api script. Is there a better / working way to send a chat message? the "bad" line is: Code: root.ModApi.Application.SendChatMessage(new Eleon.MessageData() { Channel = Eleon.MsgChannel.SinglePlayer, RecipientEntityId = root.E.S.Pilot.Id , SenderNameOverride = "TEST", SenderType = Eleon.SenderType.ServerPrio, Text = "TEST" }); and the error is Code: 09-13:47:42.256 15_47 -ERR- {EmpyrionScripting} C# Run [80001/C:\SERVERS\EMPYRIONDEDICATEDSERVER\SAVES\GAMES\RE2BETA2\MODS\EMPYRIONSCRIPTING\SCRIPTS\CV\WARP.CS]:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object at Submission#0+ModMain.Main (EmpyrionScripting.Interface.IScriptModData rootObject) [0x00083] in <737b1f52dad04767bb3f6e356af88985>:0 at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&) at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <27124aa0e30a41659b903b822b959bc7>:0 --- End of inner exception stack trace --- at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <27124aa0e30a41659b903b822b959bc7>:0 at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <27124aa0e30a41659b903b822b959bc7>:0 at EmpyrionScripting.CsCompiler.CsCompiler+<>c__DisplayClass49_0`1[T].<GetExec>b__2 (System.Object rootObject) [0x00169] in <2d5bec663c06439caa55fa8470927ffb>:0 Ans as always thank You for the great mods you make.
EmpyrionScripting 13.2.0 Release DB Queries add (TerrainPlaceablesRes) & fix - Remove the DBQueries from your configuration.json to get the new ones · GitHub-TC/EmpyrionScripting