Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ready) Crafting #382

Merged
merged 192 commits into from
Dec 13, 2018
Merged

(ready) Crafting #382

merged 192 commits into from
Dec 13, 2018

Conversation

AquariusPower
Copy link
Contributor

@AquariusPower AquariusPower commented Jun 1, 2018

To test, prefer this branch: https://github.com/AquariusPower/ivan/tree/THE_MERGED_BRANCHES_I_AM_PLAYING , I will avoid duplicating code as much as possible between branches to lower maintenance difficulty, this means, if it is not compiling here is because depends on other PR branches :) mainly this one: #458 , may be I should just merge it here? I can still keep that PR, the merging is easy thru git gui that PR is now merged here, so that it compiles properly, and that is a pre-requisite now

First steps on recipe/crafting code. Let's say it is being designed yet.

Any kind of thing is craftable (spawnable), the whole point is balance and challenge.

The recipe system is just a scratch, but usable. This means other recipes can be added.
Good would be to let ingredients requirements count be reused to provide help info on the list, preferably creating a struct to hold that data.
May be an external .dat wouldnt be a good thing, as allowing users to customize them could become too easy, so hardcoded may be better? or it will just hinder creativity?

but... I am not sure crafting is a good thing anyway, it is just fun, but if it makes things too easy, will take the fun out of the game.
TODO: it seems easy to code the action that will spend time in turns to craft things.
May be this system can sit there disabled until we think it is not game breaking.

Chair Recipe (still unbalanced and easy, just as basic test)

you can now build a chair anywhere, as long you have 20 sticks of anything.

is that recipe balanced?

whenever you get a chair you will be able to heal faster,
w/o this recipe you are required to travel to other dungeon levels or even outside it,
so may be we should remove this recipe later or increase it's constraints?
like where it can be placed, like only if near a furnace or may be a fountain?
add required ingredients, may be spider web or nails?
make it be more fragile than other chairs?

Problem0: I didnt limit it to fir sticks as configured in the .dat file.

Problem1: it currently is instantaneous, an action class instance (like dig) is required to make it take time and be interruptible (and preferably continuable), and it's data will be put in the savegame file also.

Possible Improvement: wooden walls could drop more rare planks and these be required instead of sticks?

Wall recipe

made of stones

poison

from spiders 100ml per corpse

other stuff

many other things were added, just try the game and hit F1 for each recipe help :)

@red-kangaroo
Copy link
Contributor

Any kind of thing is craftable (spawnable), the whole point is balance and challenge.

Artifacts and quest items should definitely not be craftable, but that's obvious. :)

I would also forbid crafting of any form of magical items - rings, amulets, wands, scrolls, horns etc. Crafting any of this would be unbalanced as hell and unrealistic given your characters upbringing. You're after all a slave, with no knowledge of magic, and crafting magical items should be beyond most craftsmen.

Maybe only allow crafting of non-magical equipment and furniture?

Good would be to let ingredients requirements count be reused to provide help info on the list, preferably creating a struct to hold that data. May be an external .dat wouldnt be a good thing, as allowing users to customize them could become too easy, so hardcoded may be better? or it will just hinder creativity?

IMHO .dat file would be great. I wouldn't worry about users changing it, because all the dungeons are already in .dat files, so you could theoretically spawn yourself end-game gear in New Attnam, so...

Problem0: I didnt limit it to fir sticks as configured in the .dat file.

Actually, crafting should definitely take into account the materials you provide. There's no point in many materials if you cannot craft a mahogany chair or a golden sword with diamond handle. I don't think recipes actually need to be limited by an item type. You could make a golden chair from a lump of gold.

It should also take into account material volume. Note that each item has a set mass/volume of material. You shouldn't be able to spawn more material by crafting, so rather than a set amount of sticks, crafting a chair should take as many sticks as to fill the volume needed for a chair. You should be able to make iron wall with enough iron weapons and armors at your disposal.

Problem1: it currently is instantaneous, an action class instance (like dig) is required to make it take time and be interruptible (and preferably continuable), and it's data will be put in the savegame file also.

It should take quite some time. Plus maybe also tools, like the smith needing a hammer wielded to be able to repair your items. You could require an axe wielded to work with wood etc.

And there should be a chance of failure. Some random chance to end up with a useless lump of material instead of whatever you were crafting. You could also attach an attribute to crafting, making you chances of success and time needed better with higher attribute. I'd suggest dexterity and wisdom - dowxterity for crafty fingers and wisdom for knowing how to craft things. I wouldn't use intelligence as the second attribute because int is already bound to magic and very useful, while wisdom not so much.

What if crafting only required large enough volume of material and the right tools? Like you would need a wielded hammer and be standing next to an anvil to craft metal, but you could craft anything out of your available metal. Like taking a broken sword and reforging it into two unbroken daggers. You would need a wielded axe to work with wood, to work with cloth and leather, you would need to be standing next to a workbench etc.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Jun 2, 2018

@red-kangaroo I am still reading it. (EDIT: wow I confused user names sorry! fixed!)

I will just dump what I thought promptly (I will see if you spoke about these soon :))

to make it more in the ivan way, we should be required to find an schematic/recipe to be able to craft.
The picture could be like the scroll, but with some geometry lines instead of simulated text, and in a bluey paper.
And if we are hit in the head, we could randomly forget recipes, or recipe improvements, like happens with gods and dungeon memorized squares.

if we find another recipe of the same kind we already did before, the memorized recipe would be upgraded by +1.

Every recipe level would

  • lower ingredient requirements by 5% in volume
  • or improve the result quality
  • or lower the time required to prepare it.

may be one of these could be randomly chosen when creating something, so we can't count on the result, keeping it challenging.

@AquariusPower
Copy link
Contributor Author

I would also forbid crafting of any form of magical items - rings, amulets, wands, scrolls, horns etc. Crafting any of this would be unbalanced as hell and unrealistic given your characters upbringing. You're after all a slave, with no knowledge of magic, and crafting magical items should be beyond most craftsmen.

cool!, I understand now why we cant learn magic! xD
btw, zapping wands could have some minor requirements too, fumbling if not :)
I took part of that text into a nice ABORT message :) (not sure if too drastic tho)

IMHO .dat file would be great. I wouldn't worry about users changing it, because all the dungeons are already in .dat files, so you could theoretically spawn yourself end-game gear in New Attnam, so...

you made a good point.
after all we may end with good and balanced contributed recipes too :)
for now, I will keep it hardcoded until I figure out how to .dat(ify) it.

Actually, crafting should definitely take into account the materials you provide. There's no point in many materials if you cannot craft a mahogany chair or a golden sword with diamond handle. I don't think recipes actually need to be limited by an item type. You could make a golden chair from a lump of gold.

.dat files endup in-memory as data, so I think it will not be a problem to change the material of the chair for ex. I saw OLTerra.png and all gfx is prepared to receive color based on materials, will work great I guess.

It should also take into account material volume. Note that each item has a set mass/volume of material. You shouldn't be able to spawn more material by crafting, so rather than a set amount of sticks, crafting a chair should take as many sticks as to fill the volume needed for a chair. You should be able to make iron wall with enough iron weapons and armors at your disposal.

this is excellent, much better than a count that makes not much sense after all!

It should take quite some time. Plus maybe also tools, like the smith needing a hammer wielded to be able to repair your items. You could require an axe wielded to work with wood etc.

the dig feature has all we need, just to be adapted then!

may be shops in town too, they fix everything instantaneously (the NPCs are cheating lol), they should just fix it much faster than us tho based on their high skills, and they should move around while doing it, would look nice.

may be, the more we craft, the faster we get also, til a certain limit, lets say at most lower the craft time by 50%. based on attribues is better.

And there should be a chance of failure. Some random chance to end up with a useless lump of material instead of whatever you were crafting. You could also attach an attribute to crafting, making you chances of success and time needed better with higher attribute. I'd suggest dexterity and wisdom - dowxterity for crafty fingers and wisdom for knowing how to craft things. I wouldn't use intelligence as the second attribute because int is already bound to magic and very useful, while wisdom not so much.

this sound very good too!
I just think that, the lump of material, would still have volume, in case of metals, so it would just be useless working with wood or leather or other non meltable materials. But we should lose some of the meltable volume out of impurities in the mix thrown when we fumble.

also, may be instead of auto checking what will be used on crafting, the user would have to specify what will be used, to not be forced to drop to not lose items.

What if crafting only required large enough volume of material and the right tools? Like you would need a wielded hammer and be standing next to an anvil to craft metal, but you could craft anything out of your available metal. Like taking a broken sword and reforging it into two unbroken daggers. You would need a wielded axe to work with wood, to work with cloth and leather, you would need to be standing next to a workbench etc.

cool!
"next to an anvil to craft metal" and next to a furnace too, to melt it! :)

btw, destroying anything magically enhanced (ex.: +1 or of venom etc), would break the spell, and on doing that, the released magic could harm in some way when absorbing part of it.
So considering the destructive action of melting a metal armor of great health, it would cause some damage to anyone around.

PS.:
I think we could prepare a nice TODO list (with chekboxes) out of this.
And let other ppl contribute code too.
As soon we have a good base code to be improved, not requiring too drastic changes.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Jun 3, 2018

Crafting takes time now,
Ingredients are only spend after crafting successfully ends.

There is support to create items but no recipe yet (therefore not tested).

The problem is the non placed spawned olterrain is saved as a full object, not an ID.
As long the crafting ends (and it is placed on level) before an autosave happens, it is ok.
I havent tested yet if autosave happens before crafting ends (but I don't know if it is ever possible, but the code seems to be able to handle that). To test, we may need to lower the frequency the autosave happens, currently walls take 20 turns to finish.
DONE: Also if crafting is cancelled that object should be erased.

@AquariusPower AquariusPower changed the title (Experimental/Incomplete/FirstSteps) Crafting (Incomplete) Crafting Jun 3, 2018
- now works with selectable ingredients
- requirements is by volume now
- added poison recipe from spider's corpse and bottle (not selectable, still instantaneous)
@AquariusPower
Copy link
Contributor Author

AquariusPower commented Jun 3, 2018

now works with selectable ingredients

requirements is by volume now
but the volume for a chair or wall is nowhere to be found (I couldnt at least), so used some guessed relative to the values of count I used before,
when we have .dat for recipes it will be easier to test and tweak.

the poison recipe is still instantaneous, but max 100ml per spider

- added snake and skunk as poison source
- random poison amount per corpse
@red-kangaroo
Copy link
Contributor

Oooh, poison from venomous corpses! I like that!

- weakest stone used to create the wall material, others are stored at wall square
- weakest stick used to create chair material (others are lost for now)
- better reading recipes (could be improved?)
- tools requirements for poison and chair
(previous commit: humanoid with one arm is required, but will be slower)
- tool can be broken, will be slower
- basic item creation recipe is now fully functional
@red-kangaroo
Copy link
Contributor

may be shops in town too, they fix everything instantaneously (the NPCs are cheating lol), they should just fix it much faster than us tho based on their high skills, and they should move around while doing it, would look nice.

IDK, I'd go with player convenience here and let the NPCs cheat. :D

It would be pretty nice to be able to repair your broken items yourself, though. To not make it better than paying for repair in shops, make it require other item of same material to be consumed in the repairs, plus a crafting station (anvil for metal, workbench for other).

@AquariusPower
Copy link
Contributor Author

ugh, the conflict solving got a bit too complicated, I will do it locally (meld) and not thru browser and will take some time :>

# Conflicts:
#	.devsPrefs/AquariusPower/TODO.txt
#	.devsPrefs/AquariusPower/nbproject/configurations.xml
#	FeLib/Include/graphics.h
#	FeLib/Source/felist.cpp
#	FeLib/Source/graphics.cpp
#	Main/Include/bugworkaround.h
#	Main/Include/devcons.h
#	Main/Include/iconf.h
#	Main/Include/proto.h
#	Main/Source/actions.cpp
#	Main/Source/bugworkaround.cpp
#	Main/Source/command.cpp
#	Main/Source/devcons.cpp
#	Main/Source/game.cpp
@attnam-bot
Copy link

This pull request introduces 17 alerts when merging e5514a6 into 92bc1cd - view on LGTM.com

new alerts:

  • 14 for Wrong type of arguments to formatting function
  • 1 for Expression has no effect
  • 1 for Too few arguments to formatting function
  • 1 for Short global name

Comment posted by LGTM.com

@AquariusPower
Copy link
Contributor Author

LGTM, interesting, Im reading it :)

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Nov 30, 2018

interesting, the majority of "alerts" were about wrong printf %d that should be %lu or %ld, I wonder if CXXFLAGS could be added to compiler letting us avoid knowing about'em only thru LGTM? also the whole project has more than 100 "alerts".

PS.: I mean "alert" and not ALERT!!! because the project compiles and run w/o crashes, and so they should not be an "alerting scary matter" IMHO lol, but merely warnings..., I mean, calling the wrong attention kind puts the caller on discredit for future calls, like in "Peter and the Wolf" story, where LGTM could be behaving like Peter lol! Can anyone prove me wrong with strong arguments? xD

@jakwings
Copy link
Member

jakwings commented Dec 1, 2018

:P If those warnings are not about this pull request, just ignore them. Don't know if LGTM provides a filter for pull-request-related changes. EDIT: just found it

You can add -Wall -Wextra -pedantic to get more warnings. There are more and we need to check the compiler's documentation. LGTM provides some intelligent checks.

Integer overflow and uncheck negative integers must be a concern...

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 1, 2018

TODO: new issue/task one day?

I had tailoring plans:

  • cut a spider web (already from crafting menu option) could provide 50g (?) of spider silk, initially a lump would suffice, later proper graphics would be better, being a requirement for tailoring work
  • a sewing kit (created from meltables) would allow working anywhere
  • a tailoring bench would speed up the work by 3x and would not require the sewing kit
  • a list of materials would be required, like I did for what is a wooden material: all leathers, feathers?, hairs? ... may be we could only work on cloth, and lumps could also be turned into cloth.

It is not a lot of work, neither little.
The framework and examples is all already there in the crafting code.
I dont know when I will be able to implement it tho...

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 1, 2018

a filter for pull-request-related changes

it does, here only 17 there were

You can add -Wall -Wextra -pedantic to get more warnings

cool thx!

LGTM provides some intelligent checks

yup, this is good, I complained about the wording, I receive email sometimes with the alert word, as soon I see there is nothing alerting I put that ppl/business on spam permanently lol xD

Integer overflow and uncheck negative integers must be a concern...

good to know, will read more about the "uncheck negative integers" thx :)

@red-kangaroo
Copy link
Contributor

I have tried it some more and I have comments! :D

Firstly, I like it and can't wait to have this in the game. It's quite fun to play with (and cutting webs is very, very useful).

Now, my criticism:

  • Shouldn't the crafting skill be included in the "@" menu? BTW, at what level does it start? It would be nice to make it start at 0 (even through some number shenanigans) to make it consistent with other skills.
  • The recipes for crafting are a bit confusing in their order. It would be nice to split "F" menu into several sub-menus: Build (and then you specify wall, door, anvil, chair, ...), Craft (item crafting), Dismantle (all the various lump-handling options), Info (examining item materials and material values), plus maybe Other (cutting webs, or anything else that doesn't fit).
  • It's really weird how all crafting uses first person, when the rest of the game uses second person. It would be nice to switch all the messages to second person, for consistency...
  • Could crafting use game::EnterBigMessageMode()? It would probably look better to have the various checks and messages compiled into a single longer message.
  • Could you list all lumps/sticks in your inventory when crafting an item, rather than going one type at a time? It would be easier to browse your options. Also I was unable to craft from steeleaf, so not all materials are probably enabled for crafting (or I did something wrong).
  • I like how you can extract liquids from corpses, but what about generalizing it? Instead of special cases, you could extract blood material from the corpse in question. You would get spider blood (still poisonous) instead of poison from spider corpses, dark frog blood (still acidic) instead of sulphuric acid from frogs, and whatever other blood they have from other corpses.
  • You could have a different recipe for refining/purifying eg. poisonous liquids into poison, acidic liquids into sulphuric acid etc.
  • You should automatically craft containers (bottle, can, vial) as empty, and then have a different recipe for putting any material into them.
  • Can you build normal or bar door? Or different types of walls?

Anyway, really great work.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 1, 2018

Shouldn't the crafting skill be included in the "@" menu? BTW, at what level does it start? It would be nice to make it start at 0 (even through some number shenanigans) to make it consistent with other skills.

well.. after I implemented, it ended up being solely on current stats that may vary a lot depending on limbs materials! It is currently more like a crafting capability than skill, like in how well you can craft it but w/o learning from previous attempts.

Crafting as a skill should progress, but currently it is completely dynamic :/

May be, every successful crafting should give 3 points, and every failure give 1 point as a base crafting skill value.

Then, the stats formula would only be a buff adding to the base crafting skill shown at '@' menu!
Or, may be, stats should only interfere with success and fumble?

Or... the stats formula would calc how many skill points you learn on success and on failure, could be a multiplier over s.3 and f.1 from above.

The recipes for crafting are a bit confusing in their order. It would be nice to split "F" menu into several sub-menus: Build (and then you specify wall, door, anvil, chair, ...), Craft (item crafting), Dismantle (all the various lump-handling options), Info (examining item materials and material values), plus maybe Other (cutting webs, or anything else that doesn't fit).

As there arent many options for now, all them spread directly provides faster access.
I wonder if there may have too many new craftables later? I think what I coded may already cover almost all possibilities, but I may be wrong :)
I grouped by similarity in the order, may be a section title grayed-non-selectable list entry would help on making that clearer (than reading it at the code heh). Well at least initially just to help the user quickstart using them easier.

Build (and then you specify wall, door, anvil, chair, ...)

well, that would be just another list, is not complicated.
These are all related to OLterrain.
I also thought on allowing dragging chairs and the anvil, even benches around, causing fatigue, but didnt implement either.

Craft (item crafting)

this is automatic using the prototype subsystem, like when we wish for an item and type what we want, it uses almost the same code flow but with several restrictions to prevent any cheating.

Dismantle (all the various lump-handling options)

this one is automatic, like there is actually no options, it looks for main and secondary materials, and creates lumps from wooden, meltables and cloth like materials, but will create rocks from non meltables because when crafting with them it will lose some of the rock volume to shape the new item main material tip, and that was not documented other than in the code itself!

The main problem is: it takes no time and requires not tool yet.
Should require a hammer or any stronger weapon.
It is like breaking the item, so if a wand it should apply the wand releasing it's powers if you fumble, otherwise you recover the materials successfully, not implemented yet.
if both materials are meltables, a furnace is required, no way to break it, but we should be able to, by just using a stronger weapon to dismantle'm, also not implemented yet.

It's really weird how all crafting uses first person, when the rest of the game uses second person. It would be nice to switch all the messages to second person, for consistency...

surely! I didnt even noticed that! oh I mean "you doesnt seem to have noticed that!" xD

Could crafting use game::EnterBigMessageMode()? It would probably look better to have the various checks and messages compiled into a single longer message.

Interesting, I considered it but not for too long, I didnt completely understand how BigMessageMode works and if it would fit properly with crafting in a non intrusive (non slowed/annoying play) way? is it that messages when we talk to important NPCs like the necromancer for the alternative quest? if so, it would be slow, intrusive and annoying for the crafting context (not for the quest line context, where it is cool), but it is just my opinion xD

Could you list all lumps/sticks in your inventory when crafting an item, rather than going one type at a time? It would be easier to browse your options. Also I was unable to craft from steeleaf, so not all materials are probably enabled for crafting (or I did something wrong).

if I am not wrong steeleaf is not meltable.
Crafting currently only works with meltables and sticks, so a wooden lump is trash. Meltables lumps just need to be turned into ingots. Non-meltables are only usable when carving them from a single rock with enough volume (more volume than the required, so some of the volume will become a lump due to the carving process).

I like how you can extract liquids from corpses, but what about generalizing it? Instead of special cases, you could extract blood material from the corpse in question. You would get spider blood (still poisonous) instead of poison from spider corpses, dark frog blood (still acidic) instead of sulphuric acid from frogs, and whatever other blood they have from other corpses.

This needs checking for the blood vs distilled poison/acid power. If you extract from the same spider 100ml of poison but 1000ml of blood and both have the same poison power, there would be no point on extrating the poison from the glands at all :), but most importantly, that would require a lot more code for a minor (despite immersive and cool) practical result.

The problem on extracting other kinds of blood is vs food abundancy, will Mellis and eating/drinking become useless? will foods from shops become useless? but would be cool anyway. I focused on missing features.

So essentially, we got things a bit easier with extra vanilla poison and sulf.acid., and I didnt touch the food balance. Not that these shouldnt be done one day, just that were not my priority :).

You could have a different recipe for refining/purifying eg. poisonous liquids into poison, acidic liquids into sulphuric acid etc.

certainly! on a second step of the crafting system! xD, for now, it could just take more time to compensate, but if poison is from glands, it could still be fast but have a chance to fumble and poison self (not sure but I may have implemented it already, also with the s.acid).

You should automatically craft containers (bottle, can, vial) as empty, and then have a different recipe for putting any material into them.

as I remember, using a glass ingot, you can create bottles and vials, and other metals into cans.
cans are being forced into vanilla material after opened tho, I didnt look into that, left for a later time as bug-fix PR.

Can you build normal or bar door? Or different types of walls?

to not consume too much time, I thought the most useful would be the secret door, when one day they actually become secret (useful functionality).

walls are piled rocks, no cement.

but, about "can you build", well sure! just needs creating new recipe code based on existing ones ingredients and tools requirements.
The problem is that it is hardcoded, no .dat files.
This crafting is a pre-work. Functional but fully opened for improvements, tweaks, overhauls.
I had some trouble following how .dat files are decoded so I focused on implementing the way I know: coding.
I almost created another kind of data files, could even be portable xml to be exported, further edited and re-imported, but would consume a lot of time, so I give up on it too.

time, energy, I think we all wish we had always more of these xD

Unfortunately I can only focus now on critical changes (like the craft skill that doesnt progress), and bugs.

My workflow is like:
1o - problem found (thx! xD)
2o - think a bit and re-read the code; now it is time to sense a solution (yup, usually not much thinking is needed, just forget about it and suddenly an idea comes xD)
3o - "try to implement; fail; try again; fail; now I finally need to extensively think; ok it worked; commit" :)

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 1, 2018

@red-kangaroo

what about these initial priorities?

  • ?CRITICAL?: find a way to let crafting progress from usage attempts
  • Important!: add more documentation during the crafting sub-steps: why ingredients are required the way they are? why it requires that volume usage percentual? etc. To let users think the way I do as I know how it all was coded :)
  • Usability: (quick and fast alternative) create subsections in the craft menu for now to make is less confusing/weird (later sub-menus may be good).

I think the critical one should happen before any release tho, as it may change the playability a lot! but... it would become easier...
unless... for the sake of keeping xtreme difficulty, crafting could not be a skill at all, so w/o progress, depending only on limbs materials, it would continue being hardcore? what about it? the decision making step is the most fun one :)
I mean, why to we need to really imitate every other game that is always about progress and skill? And I am not thinking lazily (the laziest way to deal with that), just thinking differently. Ok crafting as skill is a confortable expected option, but if it could not be that confortable, always dynamic, depending on the limbs material system solely? I think that is hardcore! well, just my opinion anyway, what do you ppl think?

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 2, 2018

New info and subsections, use the F1 to read the details of the list entry about creating an item .
See if it needs more clarification/precision/details.
(these were simple and fast to do :))

@red-kangaroo
Copy link
Contributor

unless... for the sake of keeping xtreme difficulty, crafting could not be a skill at all, so w/o progress, depending only on limbs materials, it would continue being hardcore? what about it?

I would have nothing against it being simply based on stats, rather than trained skill. We could call it something different to prevent confusion with weapon skills (proficiency?), and have it only show in the "F" menu, then. Your choice, I guess. :)

I grouped by similarity in the order, may be a section title grayed-non-selectable list entry would help on making that clearer (than reading it at the code heh).

Yeah, little headings would go a long way towards making it easy to use.

It is like breaking the item, so if a wand it should apply the wand releasing it's powers if you fumble.

That would be cool. BTW, you cannot craft magical items, right?

BigMessageMode

No no, quest screens use game::TextScreen. EnterBigMessageMode and ExitBigMessageMode just takes all ADD_MESSAGE and places them in a buffer rather than displaying them right away, then displays them as a single long message. Look at how combat messages are generated - you have several sentences from different functions in a single message, clumped together by BigMessageMode.

For crafting, the various "trying to find suitable material" messages could be clumped together.

Crafting currently only works with meltables and sticks, so a wooden lump is trash. Meltables lumps just need to be turned into ingots. Non-meltables are only usable when carving them from a single rock with enough volume (more volume than the required, so some of the volume will become a lump due to the carving process).

I like that you need to have extra material for crafting from rocks. :D And yes, steeleaf is generic plant material, so it's probably uncraftable.

The problem is that it is hardcoded, no .dat files.

I don't think that's really such a problem. Crafting recipes seem rather complex, requiring quite some special cases, so I have no idea how we could transfer them to .dat files in any simple way. We can always deal with it later.

time, energy, I think we all wish we had always more of these xD

:D

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 2, 2018

you cannot craft magical items, right?

if a new coder tries, an ABORT message will show up with a kind message explaining why he should not dot it at all xD

I would have nothing against it being simply based on stats, rather than trained skill. We could call it something different to prevent confusion with weapon skills (proficiency?), and have it only show in the "F" menu, then. Your choice, I guess. :)

I was thinking, to code as a skill may be simple, at the tryCraft/Fumble formula, just add the skill as base to the calculation (sum it up), and crafting will be easier with time.
Also, if we dont use the other skills for some time, we lose points on it, and I think crafting should do the same, but take longer may be, like 5x or 10x what a weapon skill takes to drop down.

"Your choice, I guess. :)" not exactly xD, If we had some kind of public poll linked with Attnam forum accounts, we could know what ppl think about it. And it may be improved later too one day by someone xD

Cutting webs has a risk, a fun one, but overall make the game easier, and making it easier is always a problem when we are looking for challenge :). So I thought the same about crafting.

Btw, if you build a workbench at Attnam city in a Attnam owned floor, and destroy it later, you will be hunted, I dont know if it is possible to place that furniture keeping the player's ownership.

For crafting, the various "trying to find suitable material" messages could be clumped together

ahh I see, but also they happen while the user is doing things thru many questions (about main and secondary material and types of manterials (ingots, sticks, rocks)), so isnt instant feedback better?

steeleaf is generic plant material

mmm... this means dismantling a steeleaf rock from an axe, for ex, would make no sense. Plant materials, dismantling them could always create a lump. In the other hand, a cheap trick is keep the rock available as carving it will already lose a lot of material volume and would work well, just that plant materials could be other thing than a rock one day, may be plant fiber sheet, but would not change how the game is played now, so no hurry :> EDIT: despite I never dismantled steeleaf things and I am not sure it provides a rock lol, I always keep'em as they have little weight!

Crafting recipes seem rather complex, requiring quite some special cases

There are a few things that could go to .dat files, like required volumes to build walls, anvil etc, but also, instead of a special crafting.dat file, it could just be a new wall or anvil etc field specifiying such volume.
Actually the game system already demands what must be an ingredient to craft things, therefore recipes are quite restricted by it: walls will be from rock's material (and different material rocks will be hidden under it to provide required volume), every weapon already requires and is from a very specific material and volume, even bottles, armors etc, just OLTerrain (anvil, forge, door) have nothing specified and could become a customizable recipe, but... just adding such fields to their already existing .dat data would suffice and still crafting.dat or recipes.dat would still not be necessary/useful.

@AquariusPower
Copy link
Contributor Author

AquariusPower commented Dec 10, 2018

TODO: new issue/task one day?

I wonder if someone could try to code/test the base crafting skill value?

A character's float var field must be created and saved/loaded (preferably appended to the saved data to help on old savegame importing compatibility).

If crafting succeeds, give 1.0 point, and on failure, give 0.25 point.

The base crafting skill value would be put on the crafting check formulae as like: BaseSkill + CurrentCraftFormula (the current formula is solely based on current stats that may be based on the current material limbs if not default human one).
A normal final skill value is 10.0, a good one is 20.0, anything above is like a master.

Optional/Bonus: 5x more time than the time we un-learn fight skills, we could un-learn 1 crafting skill point.

Optional/Bonus: you can create a user config option on the menu to allow the base crafting skill that makes the game easier with time, default true?

If needed, ask I will try to clarify it more!
After you make tests, the implementation way I described may become slightly different, be creative and ask for tips!
After ready, you can make another PR to this PR's branch so I can review and your commits shall be incorporated properly, or it may be a fresh PR later after this one kicks in.
If you start doing it, please say here to avoid DUP coding with someone else :)

@ryfactor
Copy link
Member

I like the features in this PR, and I don't think they will break the gameplay or stability. Let's merge this in time for the upcoming release so that people actually get to play with it.

To this end, can it just be merged straight, or does some extra work need to be done to fix bugs?

@AquariusPower
Copy link
Contributor Author

It can be merged, I fixed all bugs I found, if you ppl find some more just say it (as usual a stacktrace and debug log will help in case of crashes).

@ryfactor ryfactor merged commit f03c4f3 into Attnam:master Dec 13, 2018
@AquariusPower AquariusPower deleted the Crafting branch December 15, 2018 00:24
red-kangaroo pushed a commit to red-kangaroo/ivan that referenced this pull request Dec 17, 2018
Fixes issue Attnam#511, replacing first person in crafting messages with
second person, as in the rest of the game.
ryfactor pushed a commit that referenced this pull request Dec 17, 2018
* Fix for PR #382

Fixes issue #511, replacing first person in crafting messages with
second person, as in the rest of the game.

* Fix for PR #492

Apparently, TweraifIsFree() only works in NA, so Terra was not saying
what she should.

* Crafting wording

Simplify wording of crafting options. If @AquariusPower disagrees, I can
revert this, but I think some of the options were worded in a bit
strange manner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants