coldmix / windower-lua-add-ons

Windower LUA Add Ons
0 stars 0 forks source link

Cards #1

Open ghost opened 6 years ago

ghost commented 6 years ago

I have attempted to add the new card synths to your project but I am unable to get it to work any help would be appreciated

coldmix commented 6 years ago

You will need to edit your data/settings.xml and insert the new items into the Materials list. Then you need to update the recipes.lua with the new recipes. I was waiting for the craft add-on to add them to the recipes but it relies on the bgwiki page. https://github.com/Windower/Lua/blob/dev/addons/craft/create_recipes.py

You can do it manually by adding the new recipes to recipe.lua in this add-on and the craft add-on. The names have to be the same to trigger the crafting properly.

ghost commented 6 years ago

Tried adding the new recipes but seem to be an issue that the Card synths use different crystals then the previous ones I am going to have to wait for a much smarter person to figure this out.

Krakkott commented 6 years ago

Same problem here. Put the cards in data/settings.xml , error in game "Escutcheons: invalid item xxx card" There was un update in the craft addon recently to add the cards synth recipe. I did copy/paste those in escutcheons recipes.lua but I still get the same error in game. Thx.

coldmix commented 6 years ago

The problem was due to the section from line 51 to 61 where the id of the materials are determined based on their name. Unfortunately, the card name collided with the the existing corsair card names in the windower res/items.lua.

Actually, you don't really need to add the cards to the script since the cards are stackable. It might be better to just stack the cards and craft them with the appropriate support in town by invoking the craft command directly ('//craft make "recipe name" ). You will need to check craft/recipes.lua for the exact recipe name.

For example, "Induration Sphere 4" is the recipe to make Induration Sphere from Ice Cards. //craft make "Induration Sphere 4" 100

Dziumbrelis commented 5 years ago

Stumbled upon this and i see what you mean by just doing it in town, but sometimes delay or small lag will give you "Unable to craft at this moment" message from craft addon. How do you go about telling escutcheon to search for item name with certain ID (for example 'Ice Card' where id is 9765 ), so escutcheon would search for craftable item and not corsiar card. BTW you can have corsair card in the inventory and it will craft other cards, but it will stuck as soon as the only corsair card

coldmix commented 5 years ago

The IDs list is populated in this section of escutcheons.lua line 51 onwards. for name in settings.Materials:it() do local search = res.items:name(name) local id, item = next(search, nil) if id then ids[item.en:lower()] = id ids[item.enl:lower()] = id code.materials = code.materials + id else log("Invalid item %s":format(name)) end end It reads the list from the Materials and identify the ID by search res.items. Can probably manually insert the card IDs into the list at the end of the loop.

Vamperica commented 4 years ago

So the issue I found is that the items.lua list the Cor and the Crafting cards as the same name, so the search hits the Cor card and errors out or something,

So I made a simple change to the items.lua list to make it Fire Emblem Card instead of just Fire Card. and then added it that way to the recipes and to the materials list. That was the quick fix

If the windower4 team doesnt fix that im sure it will overwrite every update. could make a local list with all the IDs involved and place it in the addon folder instead to call