Illarion-Content source question

Everything about Illarion that fits nowhere else. / Alles über Illarion was inhaltlich in kein anderes Board passt.

Moderator: Gamemasters

Post Reply
User avatar
snus-mumrik
Developer
Posts: 117
Joined: Mon Aug 22, 2016 6:22 pm

Illarion-Content source question

Post by snus-mumrik »

Hello,
I'm trying to understand how crafting is defined in Illarion-Content repository.
I am looking at repo https://github.com/Illarion-eV/Illarion ... e/20160320 .
In files ./content/craft/new/final/*.lua I see lines:

Code: Select all

local Craft = require("base.crafting.Craft")
local ProductGroup = require("base.crafting.ProductGroup")
local Product = require("base.crafting.Product")
local Ingredient = require("base.crafting.Ingredient")
But I can't find these files in the tree. There is "./base" directory, but no "crafting" file or directory inside it.
What am I missing? Are these files located elsewhere?
User avatar
Jupiter
Developer
Posts: 3477
Joined: Sun May 28, 2006 11:23 am

Re: Illarion-Content source question

Post by Jupiter »

Those files do not exist yet. You are in the directory for the NEW crafting. That is still work in progress and I guess the missing files will be added once we are ready to go.
User avatar
snus-mumrik
Developer
Posts: 117
Joined: Mon Aug 22, 2016 6:22 pm

Re: Illarion-Content source question

Post by snus-mumrik »

Oh, thanks! Didn't notice that there is old and new implementation (BTW this is what git branches are for),
I actually started looking at it because there is a cosmetic bug that you create silver goblets using iron bars. Sounds like fraud to me :)
So I thought that I can fix it myself and make a pull request. (Seems that I thought wrong).

Now in the old implementation inside content/craft/goldsmithing.lua I see:

Code: Select all

--Goblet
product = goldsmithing:addProduct(catId, 1858, 0, 20, 5, 10)
product:addIngredient(2535) -- Iron Ingot: 1x1
But I failed to find where name (and other data) of item 1858 are defined.
User avatar
Estralis Seborian
Posts: 12308
Joined: Wed Nov 10, 2004 9:14 pm
Location: Sir Postalot
Contact:

Re: Illarion-Content source question

Post by Estralis Seborian »

Hello,

and thanks for your interest in the source code! There is a lot one can learn from the code and many oddities wait for their discovery. The "new" crafting recipes you discovered were actually for quite some time in a branch of mine. I pushed them to the development branch for review and, well, they got eventually pushed then to the live branch. The good thing about this is that everyone can see how the crafting recipes will change (e.g. no more silver goblets made of iron).

As the necessary base scripts are not done and we don't want to make our players wait too long for the updated recipes (plus 150 new products!), I decided to use the old base scripts with some modifications for now and I work on implementing the recipes this way first. The additional work is actually quite low as the code is just generated from some spreadsheets. But this time, I'll keep the changes in my branch until everything is done.

The definition of item properties (weight, price, level,...) is done in our PostgreSQL database. Each item (as an object in a script) has all these properties at hand. You can e.g. check our lua docu https://raw.github.com/Illarion-eV/Illa ... luadoc.pdf or even have your own local server https://drive.google.com/folderview?id= ... ldKV0Z2SXc http://illarion.org/media/localserver/README.txt

If you want to discuss details, just join our chat #illarion on quakenet (http://illarion.org/community/us_chat.php) :-)

Estralis
User avatar
snus-mumrik
Developer
Posts: 117
Joined: Mon Aug 22, 2016 6:22 pm

Re: Illarion-Content source question

Post by snus-mumrik »

Thanks for the detailed reply. This clarifies a lot.
Post Reply