DevOnTheRocks / RockyTweaks

A Minecraft Forge mod that adds additional functionality to other mods.
GNU General Public License v3.0
5 stars 2 forks source link

Can't get remove anvil input script to work #22

Closed ddd800 closed 5 years ago

ddd800 commented 5 years ago
Anvil.remove([<iceandfire:dragonsteel_ice_helmet>]);
Anvil.remove([<iceandfire:dragonsteel_ice_chestplate>]);
Anvil.remove([<iceandfire:dragonsteel_ice_leggings>]);
Anvil.remove([<iceandfire:dragonsteel_ice_boots>]);
Anvil.remove([<mysticalagriculture:supremium_helmet>.withTag({})>]);
Anvil.remove([<mysticalagriculture:supremium_chestplate>.withTag({})>]);
Anvil.remove([<mysticalagriculture:supremium_leggings>.withTag({})>]);
Anvil.remove([<mysticalagriculture:supremium_boots>.withTag({})>]);
Anvil.remove([<thaumadditions:mithminite_hood>]);
Anvil.remove([<thaumadditions:mithminite_robe>]);
Anvil.remove([<thaumadditions:mithminite_belt>]);
Anvil.remove([<thaumadditions:mithminite_boots>]);
Anvil.remove([<thaumadditions:adaminite_hood>]);
Anvil.remove([<thaumadditions:adaminite_belt>]);
Anvil.remove([<thaumadditions:adaminite_boots>]);
Anvil.remove([<thaumadditions:adaminite_robe>]);
Anvil.remove([<iceandfire:dragonsteel_fire_helmet>]);
Anvil.remove([<iceandfire:dragonsteel_fire_chestplate>]);
Anvil.remove([<iceandfire:dragonsteel_fire_leggings>]);
Anvil.remove([<iceandfire:dragonsteel_fire_boots>]);
Anvil.remove([<projecte:item.pe_rm_armor_3>]);
Anvil.remove([<projecte:item.pe_rm_armor_2>]);
Anvil.remove([<projecte:item.pe_rm_armor_1>]);
Anvil.remove([<projecte:item.pe_rm_armor_0>]);
Anvil.remove([<projecte:item.pe_dm_armor_3>]);
Anvil.remove([<projecte:item.pe_dm_armor_2>]);
Anvil.remove([<projecte:item.pe_dm_armor_1>]);
Anvil.remove([<projecte:item.pe_dm_armor_0>]);

That was the code I was trying to use and I had tried it various ways with ".rockycore." in the lines and starting the whole thing with "import mods.rockycore.Anvil;". But I almost always got this error "ERROR: [crafttweaker | SIDE_CLIENT]: Error parsing anvil.zs:5 -- Invalid expression, last token: ]"

If possible could you tell me what I am doing wrong or upload a fully functional test script that effects a vanilla item of some kind? Thank you for any help!

ddd800 commented 5 years ago

I also took a look at https://github.com/DevOnTheRocks/RockyTweaks/issues/5 too for help figuring it out but it seems like they all had a different method.

Mohron commented 5 years ago

The mod name was renamed as was the import. Try again with mods.rockytweaks.Anvil.

ddd800 commented 5 years ago

It still keeps giving me this error but in an new place each time

[CHAT] ERROR: [crafttweaker | SIDE_CLIENT]: Error parsing anvil.zs:8 -- Invalid expression, last token: ]

Am I supposed to be adding -- to certain places in the code?

Mohron commented 5 years ago

You're going to have to provide more information than that. Can you upload your entire script as well as your crafttweaker log?

ddd800 commented 5 years ago

Craft Tweaker Logs

[PREINITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit]]
[PREINITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [preinit]
[PREINITIALIZATION][CLIENT][INFO] [preinit | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: anvil.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] [preinit | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: MineTweakerRecipeMaker.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] [preinit | SIDE_CLIENT]: Skipping file {[0:crafttweaker]: recipes.zs} as we are currently loading with a different loader
[PREINITIALIZATION][CLIENT][INFO] Completed script loading in: 7ms
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Building registry
[INITIALIZATION][CLIENT][INFO] CraftTweaker: Successfully built item registry
[INITIALIZATION][CLIENT][INFO] Current loaders after merging: [[preinit], [recipeevent | crafttweaker]]
[INITIALIZATION][CLIENT][INFO] Loading scripts for loader with names [crafttweaker | recipeevent]
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: anvil.zs}
[INITIALIZATION][CLIENT][ERROR] [crafttweaker | SIDE_CLIENT]: Error parsing anvil.zs:8 -- Invalid expression, last token: ]
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: MineTweakerRecipeMaker.zs}
[INITIALIZATION][CLIENT][INFO] [crafttweaker | SIDE_CLIENT]: Loading Script: {[0:crafttweaker]: recipes.zs}
[INITIALIZATION][CLIENT][INFO] Completed script loading in: 552ms
[POSTINITIALIZATION][CLIENT][INFO] Removing recipes for various outputs
[AVAILABLE][CLIENT][INFO] Fixed the RecipeBook

Entire script for anvil.zs. Changed it to a .txt file so I could upload it.

anvil.txt

Mohron commented 5 years ago

Pretty sure that zenscript was just invalid. you had extra >s

import mods.rockytweaks.Anvil;

Anvil.remove([<iceandfire:dragonsteel_ice_helmet>]);
Anvil.remove([<iceandfire:dragonsteel_ice_chestplate>]);
Anvil.remove([<iceandfire:dragonsteel_ice_leggings>]);
Anvil.remove([<iceandfire:dragonsteel_ice_boots>]);
Anvil.remove([<mysticalagriculture:supremium_helmet>.withTag({})]);
Anvil.remove([<mysticalagriculture:supremium_chestplate>.withTag({})]);
Anvil.remove([<mysticalagriculture:supremium_leggings>.withTag({})]);
Anvil.remove([<mysticalagriculture:supremium_boots>.withTag({})]);
Anvil.remove([<thaumadditions:mithminite_hood>]);
Anvil.remove([<thaumadditions:mithminite_robe>]);
Anvil.remove([<thaumadditions:mithminite_belt>]);
Anvil.remove([<thaumadditions:mithminite_boots>]);
Anvil.remove([<thaumadditions:adaminite_hood>]);
Anvil.remove([<thaumadditions:adaminite_belt>]);
Anvil.remove([<thaumadditions:adaminite_boots>]);       
Anvil.remove([<thaumadditions:adaminite_robe>]);
Anvil.remove([<iceandfire:dragonsteel_fire_helmet>]);
Anvil.remove([<iceandfire:dragonsteel_fire_chestplate>]);
Anvil.remove([<iceandfire:dragonsteel_fire_leggings>]);
Anvil.remove([<iceandfire:dragonsteel_fire_boots>]);
Anvil.remove([<projecte:item.pe_rm_armor_3>]);
Anvil.remove([<projecte:item.pe_rm_armor_2>]);
Anvil.remove([<projecte:item.pe_rm_armor_1>]);
Anvil.remove([<projecte:item.pe_rm_armor_0>]);
Anvil.remove([<projecte:item.pe_dm_armor_3>]);
Anvil.remove([<projecte:item.pe_dm_armor_2>]);
Anvil.remove([<projecte:item.pe_dm_armor_1>]);
Anvil.remove([<projecte:item.pe_dm_armor_0>]);
ddd800 commented 5 years ago

God I love you it worked! Thank you so much for the help and sorry for taking up your time.