..by not using proplist access too much. I noticed the Playground would start lagging (debug build) and the profiler told me it was the mosquitos.
Before, 83% of the time in Mosquito::Activity was spent in MoveToTarget. After the change, only around 70% (multiple runs).
Is this a sensible way to measure the change?
Previous:
[14:30:22] 00186ms Mosquito.Activity
[14:30:22] 00155ms Mosquito.MoveToTarget
Afterwards:
[14:37:37] 00238ms Mosquito.Activity
[14:37:37] 00172ms Mosquito.MoveToTarget
This means that ice, melted down to 10%, does not become a 9mm bullet anymore. It also means that all objects are at least visibly moved - e.g. when deflecting arrows.
The axe could always be used as a weapon. It dealt such a low amount of damage that it was basically useless, though. Hits required to kill a Clonk are now 9 (down from 17). The axe is still a lot weaker and slower than the sword.
It's just not ridiculously stupid anymore to try to use the axe as a weapon now.
We are now not trying to deceive the players anymore (who might have actually THOUGHT that the axe was usable as a weapon, because it is used just like the sword).
The alternative would be to disable the weapon-use completely.
This doesn't work for intros, though, because they use simple messages. We should unify the systems to only have one dialogue system that uses new-style-menus and implement required features in those menus..
The death-particles match the color of the chippie better (by mixing in some less pre-modulated graphics). The egg particles are also a bit more intense (as the graphics file is already not full white).
The production menu was used for showing information. Now the sawmill is no producer anymore and thus has no production menu. Instead, the sawmill adds the hint manually now.
This was hacky to begin with and often caused problems. Lately it made the saw blade spin down after each piece of wood was cut which was something I had fixed before. This won't happen anymore.
I also made the sawing a little bit nicer by adding an engine sound. I WILL MOVE THIS TO SOUND.OCG WHEN ITS DONE
After some testing, the text turned out to be the worse solution. At least Sven complained that the text was split into two lines on his resolution from 1997.
The sawmill splits up objects on Collection(). That means you could put trees into the sawmill and even without power could you then take out the wood (that was yet to be ejected).
This is solved by this commit as you cannot take objects out of the sawmill manually anymore. The sawmill still displays the wood that is to be produced (because I found that cool).
Some objects need to accept items (be IsContainer) but want a custom way to display their contents (e.g. because you can't take stuff out). For example the sawmill.
The sawmill can saw wooden objects back into wood. Since the coal was made from wood, you could refine a coal back into two wood.
I know of nothing that actually produces coal from two wood and thus the components were rather arbitrary anyway.
Also move all object sounds to global Sound.ocg so they are still played.
This is to prevent naming collisions. All sounds are moved because otherwise all scripts would have to be adjusted. Also, the distinction between sounds in definitions and sounds in Sound.ocg was rather arbitrary.
It will also ensure most sounds are reloaded when sound is turned off temporarily, although that should better be fixed properly.
Objects that prevent interaction just in some situations (hostility, dead Clonks, ..) should always be shown in the interaction menu (because otherwise players might suspect bugs) and TELL the player WHY they want no interaction.
For that, they might need to specify own error messages.
Known issues:
* The "OnOpen" callback is done even if interaction is disallowed, however just simply removing the callback might not be sufficient, because we might get a callback disbalance if objects change their attitude while the menu is opened and the menu is closed again.
* Some objects (which should) do not include the Library_Ownable. However, we have no base melees atm and since this might introduce new errors, postpone it to 8.0.
DrawMaterialQuad was probably changed at some point and forgotten here. grep tells me we don't have any other DrawMaterialQuad-calls remaining where a boolean value is passed as the old "fSub" parameter.
The idol was once just a temporary placeholder that was to be replaced immediately. But apparently, we won't replace it anytime soon.
So we should at least give it a basic texture for the next release...
The HP bar was only centered over the object IFF the object's first vertex was in its center. This was not necessarily true for buildings (e.g. targets in GIDL).
Now the vertex position is taken into account when positioning the bar.
The global System.ocg should not cause any errors even if Objects.ocd is not loaded. This means that any functions that depend on certain definitions (e.g. FindLocation) will just not be available.
This increases the military power and doesn't look as weird: after jumping off, the boompack will explode on IsProjectileTarget or OCF_Alive (like a normal arrow).
OnProjectileHit is called so that e.g. balloons still pop even if the explosion might not damage them.
The pump is rather complex. This should allow for (new) players to figure out faster whether e.g. the drain pipe is clogged (as opposed to them doing anything wrong).
This can be helpful to see why the observed behavior is triggered in some cases (e.g. why a fish swims straight into a wall (hint: because the wall was left AND right)).
DumpCache() can be used like so:
var brain = FuzzyLogic->Init();
// ..do stuff
brain->DumpCache();
The main difference is now that the check for walls is only done closer to the fish and, to compensate lacking foresight, walls trigger stronger intention to turn.
Additionally, wall vision works slightly differently now, because it's not one vision set (angle) but two distance sets (left: close/far, right: close/far). This
should enable a wall being both left and right (e.g. when swimming in a tunnel) and hopefully lead to a bit straighter trajectory in such cases.
Also, fishes now don't swim 100% straight when they have no sensory input. That looked rather strange in a huge ocean.
PPS: also reduced slimness of fish. Very slim fish looked stupid.
OnContentMenuOpen is not used anymore.
There is a small issue: the callback is also done when the object can actually not be interacted with (e.g. because it's hostile / unfinished). Gotta think about that. But this should solve all our issues for now.
When CheckAllComponentsForProduct returned true, but the item could still not be produced (due to missing water etc.), Produce would fail but the queue would not be cycled.
Now CheckAllComponentsForProduct is gone (why was it there anyway?) and if anything happens in Produce, the queue is cycled.
Previously, you would roll on landing when you had a movement key pressed. However, you would roll into your current direction even if you had the opposite movement key held down. This was one of the remaining possibilities of rolling into the void and being frustrated afterwards because the controls sucked.
The box actually does have different images for different stick counts. It's just not very visible there. And the old numbers were obstructed by the stack count anyway.
Custom overlays would only be closed when the object was changed. This was not apparent for the loam, because the new overlay would always completely obstruct the old one.
But with the dynamite box displaying the sticks, the old ones never disappeared.
Now the custom overlay is explicitely closed and the update is also done if the slot previously had a custom overlay and no has none.
The chest is a pretty important object and something a player sees over and over again. This patch adds some detail to the mesh which should look better with the new lighting we have. Additionally, the texture's resolution has been bumped up a little.
I just saw a let's play where the player had no clue that the real benefit of the dynamite was accurate mining by sticking it into the ground.
This should make it easier for new players to figure out this specialty. Also, we need to get rid of the notion that "Description" means "Funny Flavour Text". We also need to get rid of having TWO descriptions (aka "UsageHelp").
While not 100% in line with the default behavior (right click = throw), throwing the bomb is basically the ONLY thing you will want to do after fusing it.
So, this change will probably prevent some unecessary suicides especially by new players and thus reduce possible frustration.
This means that you start a roll currently with walking left/right and tapping [down]. OR falling a great height and just holding left/right when landing. When you let go of left/right, you will instantly walk again. This reduces the possibility of the players rolling into an abyss.
The count was displayed twice in certain situations: in the picture AND as a number.
Now the responsibility for displaying the count is solely on the menus' side. The objects only show an additional overlay when their count is infinite (to not display an arbitrary "50" there).
This can e.g. be used for the water barrel to show the fill-level. Or by an adventure scenario to highlight quest items.
Or by third-party packs to do other cool stuff.
When the sword was deleted while striking (or on hit), the effect that would reset the Clonk's speed was also deleted. The Clonk responded with a general inability to walk.
In at least one Let's Play, the player found it weird that the sword has such a short range even though it was (visually) clearly hitting the enemy. I agree.
Also, this is a (major?) sword buff of course.