This Week In Veloren 109
This week, we have many writeups. We hear from @zesterer, @Christof, @Sarra_Kitty, @Sam, @VincentFoulon80, and @aweinstock.
- AngelOnFira, TWiV Editor
Contributor Work
Thanks to this week's contributors, @Sam, @Slipped, @ccgauche, @heydabop, @xMAC94x, @imbris, @Lerg-exe, @aweinstock, @zesterer, @Snowram, @Pfau, @Timo, @Sarra_Kitty, @nwildner, and @AngelOnFira!
As we prepare for the 0.9 release on March 20th, we've seen many changes getting merged. This week @zesterer worked on a site overhaul. @Christof has been continuing work on NPC merchants. @Sarra_Kitty has been improving the number of models that are in the water. @Sam made many changes around buffs and combat. @aweinstock has been continuing work on player-to-player trading, as well as modular weapons. @VincentFoulon80 has been working on icons for skill trees.
Site Overhaul by @zesterer
I've been working on the new site overhaul. As part of that, I'm working on a generator system that allows other developers to define their own structure generation rules with a system similar to CAD-style CSG (Constructive Solid Geometry). CSG is pretty great because it allows you to define your geometry using simple primitives and then combine them using Boolean operators to produce new geometry.
This new approach comes with a few notable advantages:
- It's much easier to define your own geometry than the old sample-based API that required a lot of boundary logic and reasoning in multiple coordinate spaces.
- It's 'backend-agnostic'. Although right now we're 'rendering' the geometry into blocks, it might be possible to render it to other outputs in the future such as low-poly geometry for the LoD system.
- It's modular and independent of the underlying structure of the building, so you can take a CSG-style structure and adjust it to fill whatever dimensions you require and the system can adapt accordingly
I've also been working on the layout of sites themselves. The new site system uses a tile-based grid for positioning 'plots' (buildings, roads, etc.). Each tile is 7x7 blocks and belongs to exactly one plot.
This system is much more flexible since plots may define their own generation rules independently of other plots which makes modularising the generation code much easier and lowers barriers for other developers wanting to work on world generation.
It'll also allow us to generate sites that take almost any structure we want, mixing and matching elements throughout history simulation as appropriate. We could, for example, generate a town with a castle-like perimeter wall, a fortress with a dungeon in the middle, or a port village surrounded by ruins.
Because the only thing required to tie these elements together is the plot-based tile grid, the work required to allow different procedural elements to work together is significantly reduced and the brunt of the work now gets placed on the layout generator rather than the generators of the individual structures themselves.
Trader NPCs @Christof
I modified the town spawning code to generate merchants. They wear nice colorful armor, carry some local wares - determined by local economic numbers - and accept trading invitations. It makes use of the recent user interface additions by @aweinstock. Unfortunately, I will need to adjust the wares and balance the prices before this gets ready for inclusion into the game.
Here is an updated merchant screenshot. A less beautiful merchant, but much nicer wares: a bag for each, filled with armor, weapons, craft material, food, potions. Side note: This town has spent all its coin in other markets, so they will gladly accept coins, but if you sell items they can only offer goods in exchange.
Assets for Water by @Sarra_Kitty
I implemented the spawning of coral reef and kelp forest sprites in all bodies of water at or below the world sea level. They are temperature-dependent, and the two environments transition between each other if the climate changes.
Additionally, I added seagrass patches that can spawn along the coast, the grass actually spawns in the water, but pokes out above it, so it gives a nice transition from land to the sea. In the future, there will be more content underwater, new mobs, generated structures, and also plants and scenery for freshwater ponds and lakes that generate inland above sea level as well.
Compared to what we had before with barren seafloor, this is a massive improvement and makes for a lot more of a welcoming environment underwater for players to explore. There already should be seashells scattered rarely around, for you to find, and I plan to add more you can do to keep the underwater areas fun and interesting, not just pretty to look at. Hopefully, we can give the lakes and ponds inland the same treatment soon.
Lots of Work by @Sam
I've changed the saturation buff from food to queue. This means that only the currently active saturation buff will tick its duration, and any inactive ones instead wait until they are active before their duration begins to tick.
I finally integrated some sword and bow models that Gemu had created multiple months prior. Most of the previous sword and bow models were replaced.
I've also changed how auras apply buffs. Instead of applying a buff only when an entity does not already have a buff of that kind and then applying the buff every second, it instead applies the buff and then doesn't tick the duration for that buff until the entity is no longer in range of the aura.
I've added a combo component to the player (and other entities). Instead of combo melee scaling its combo only within that attack state, it instead increases the combo in the component. Combo then resets to 0 after 5 seconds of not increasing. This has a few advantages, but the one with the immediate effect is that the sword, axe, and hammer can retain the advantages of having some combo when you use an attack that isn't combo melee or when you stop attacking for half a second. It will also allow us to use combo for different things as well, including the potential to use combo as a resource for some attacks.
I also fixed torvus a couple times when it broke earlier this week.
Skill tree Icons @VincentFoulon80
I finished implementing the new icons onto the skill tree. I also added the main and secondary attack as dummy skill at the center of each sections (top-left and top-right). I think these additional icons are handy to find out which skill you will improve.
Trading and Modular Weapon Update by @aweinstock
Regarding trade, I implemented the ability for each party to see the counter party's inventory and request items from it by dragging them into the trade window. Since trading works on any entity with an Inventory
and a Controller
, it should work with NPC merchants as soon as their AI (Agent
) emits the Controller
actions corresponding to trade. I also added a coin item, and made some finishing touches to @heyzoos's item stack splitting MR that allowed it to be merged.
Regarding modular weapons, I added support for making the stats of a weapon or weapon component different based on the materials it's made out of, so a generic claymore blade recipe and a generic scimitar blade recipe can each make (bronze, iron, cobalt, etc) blades of the corresponding type, which can then be added to any hilt.