Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / Convert material into another
- - By Newton [th] Date 2014-01-10 09:38 Edited 2014-01-10 10:24
I am trying to implement the suggestion I made over a year ago:

Concept



1. remove sulphur, replace with firestone material (casts firestones on blast, thus should be mined with pickaxe)
  - in effect, make dynamite stronger (cause it is made from firestone)

2. like oil, the firestone material (solid) should be inflammable. Though, it should not burn away but convert into firefluid which is incendary itself and converts into ore (because if it converted back to firestone it would immediately reincinerate itself) after a while. The firefluid can be sipped up with barrels and used as a material for certain explosives. The other use of that material is to let it flow into water. Like lava, it poofs when flowing into lava, but out of that, we get super flints (which may be further used as materials)!

3. in turn, make the pickaxe weaker by: making it only able to mine coal and firestone. Not gold, not rock, not granit, not ore. Coal is not diggable anymore.

Implementation



Now, I need help on point 2 because this definitely does not work without engine changes and I am not sure which way I should implement it.

+ The conversion of firefluid to ore can simply be made with AboveTempConvert. If at all. I don't really like it turning into ore but turning back to firestone is not possible (reinflames itself then).

+ I think to make the poofing into the water produce materials could be implemented by adding Poof2Object and Poof2ObjectRatio properties to the material definition.

+ To implement the burning into another material, I thought of this:
  - Implement that each material can define its own "fire" definition when incinerated. Currently always an object of type "FLAM" is created (deprecated).
  - The firestone fire object would eat its way through the firestone vein and InsertMaterial firefluid the same amount it ate up.
However, how to eat up one specific material (without blasting it), is there a function for that? Also, how to determine how many pixels were eaten up in the specified area? Also, is there a way to not inserting single pixels but replacing the material? Because without the mass mover, there isn't gonna be anything like a "wave" coming down from the vein, only a 1px high streamlet.

Also, do you think for enabling certain materials to be mined with the pickaxe (and disabling all others) would be best implemented by adding a Mine2Object property to the material definition plus adding script functions MineFree etc. analogous to BlastFree?
Parent - - By Sven2 Date 2014-01-10 11:07

Pickaxe change



> 3. in turn, make the pickaxe weaker by: making it only able to mine coal and firestone. Not gold, not rock, not granit, not ore. Coal is not diggable anymore.


That's a nice approach to the pickaxe / explosive problem. However, I don't like how it would require to rework some scenarios like e.g. Golden Mountain, which is a lot of fun to play currently. I like this kind of scenario where you just dig and dig for hours and try to find materials without the need to produce explosives all the time.

However, I think the two can coexist. There could be another type of pickaxe that can be used to mine gold and rock (maybe not gems). This pickaxe could be built out of gems and generally not be available in all scenarios because few scenarios have gems and because it doesn't need to be activated in construction plans.

The "standard" pickaxe would then be changed the way you describe it.

Material changes



You can define material reactions of arbitrary materials (e.g. a reaction of a FireFluid material with Oil material) and material reactions may call back into script. When a script implementation is ready and doesn't run fast enough, it can of course be moved into the engine. check the script documentation on User-defined reactions in http://docs.openclonk.org/en/sdk/material/ocm.html
Parent - By Newton [th] Date 2014-01-10 11:59

>Another Pickaxe


This perhaps? http://forum.openclonk.org/topic_show.pl?tid=2674

> You can define material reactions of arbitrary materials (e.g. a reaction of a FireFluid material with Oil material) and material reactions may call back into script. When a script implementation is ready and doesn't run fast enough, it can of course be moved into the engine. check the script documentation on User-defined reactions in http://docs.openclonk.org/en/sdk/material/ocm.html


I read that, but I don't know how that would help in the case of converting ignited firestone to firefluid. In the case of pshshshing into water, as I understand it, it can also not be solved by a material reaction since it should poof (reaction type = poof) and it should create an object every X poofed material pixels (reaction type = script) but I can only specify one type.
Parent - Date 2014-01-10 12:22
Parent - - By Clonkonaut [de] Date 2014-01-14 15:39
What's your plan on production costs (Dynamite /box, powder keg, ...?)? Replace sulphur 1:1 with firestone?
Also, this is but a side note, you can remove the 'Split Firestone' definition after removing sulphur. Just so it won't be forgotten.
Reply
Parent - By Newton [th] Date 2014-01-15 03:39
Yes
- - By Newton [th] Date 2014-01-11 14:00
Ping?
Parent - - By Sven2 [de] Date 2014-01-12 00:06
OverloadMaterials / OverloadTextures: This just instructs the engine to load textures and/or materials in addition to the ones already loaded from the main material file.

A scenario that defines completely new materials (like e.g. Hazard in CR) would not use this setting, while most scenarios that just have some extra materials (like e.g. Rubies) would set it.
Parent - By Newton [th] Date 2014-01-12 04:29
I see. So OverloadMaterials and OverloadTextures do have nothing to do with the Texmap.txt, only with the *.ocm and *.jpg/*.png definitions within the Material.ocg folder? Thus, I still need to respecify the whole Texmap.txt even if I just add one material?

Can you answer my original questions I stated in my initial post?
Up Topic Development / Developer's Corner / Convert material into another

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill