Not logged inOpenClonk Forum
Up Topic Development / Scenario & Object Development / Repairing Buildings
- - By boni [at] Date 2012-05-12 13:09
Here's my concept for how to repair buildins without weird interface-interactions.

Pre-Requisite: You need a hammer in your inventory.

If standing in front of a building, you get an Interaction-Button at the end of the Action-Bar, that allows the repair of that building.
We have a function, that somehow calculates the cost for fully repairing the building, further referred to as $cost.
The tooltip of the interaction displays $cost.
By interacting, every material from $cost is taken from the clonks inventory, if present. It does not have to be the full $cost.
Then the building is automatically beeing repaired as far as materials were present. The repairing happens over time.
It is possible to add more materials to repairing by interacting again during repair.

As all this sounds hella complicated, here's an example:
Hut is damaged by 50% and needs 4 Wood to repair. Clonk with 2 Wood and a hammer in his inventory stands in front of said hut. He presses interact, the 2 Wood are taken, and the Hut is repaired up to 75% over $time.
Parent - - By Maikel Date 2012-05-12 13:14 Edited 2012-05-12 13:22
Can you indicate what happens when repairing a structure costs 2 wood and 1 metal (=$cost), and I come with 1 wood, 1 metal. I see the following options:
*repair 50%, lose half a metal.
*repair 50%, store the half metal.
*repair 75%????
Parent - By boni [at] Date 2012-05-12 13:18
The concept doesn't care how much material a structure needs to be built. That's the task of the function that somehow calculates the repair-cost. ;)
The cost always will be in full objects though.

+I don't get your example.
Parent - - By Zapper [de] Date 2012-05-12 13:39
Proposal for the remaining-material-problem:

The cost is not calculated when attempting to repair a building!
Each time a reparable structure takes damage, it adds material according to the current damage level to an internal list.
When a player tries to repair a building only that list is displayed and whenever a material from that list is used to repair a part of the building, it is removed from the list.
Parent - - By Luchs [de] Date 2012-05-12 13:55
This is exactly what ClonkMars uses, and it works pretty well. Especially small damage can often be repaired without using material. Additionally, it makes repairing things more interesting, because you can't know in advance what you need to repair it.
Parent - - By Maikel Date 2012-05-12 13:57
Sounds good, but repairing for free should be prevented in melees where sometimes low percentage damage to buildings is inflicted.
Parent - - By Luchs [de] Date 2012-05-12 15:11
Well, repairing stuff would still take some time, so you wouldn't be able to repair it while under attack.
Parent - By boni [at] Date 2012-05-12 15:13
We could also have it pause when taking damage. So it has to be restarted by a clonk with a hammer.
Parent - By boni [at] Date 2012-05-12 14:23
In the end that'd mean you could always repair the building to a certain % with only one ressource. Sounds intriguing and somewhat broken at the same time. I like it though, let's just hope that there aren't (m)any abuse cases. :3
Parent - - By PeterW [gb] Date 2012-05-12 14:02
Hm, don't we need something to indicate that a building is damaged in the first place? Possibly a health bar that shows when you're in front of the building or whenever it gets damaged?

Could we maybe integrate these ideas? :)
Parent - - By boni [at] Date 2012-05-12 14:26
Well, if there's a repair interaction you know that it's damaged. ;)
The interaction could also display the damage% I guess. Would look cool. :D

I'm kinda hesitant to implement health-bars etc. for buildings, as I fear that they'll just spam everything. And only showing it when taking damage is easily overlooked. I can see displaying them during repair though, to indicate the progress.

Thoughts/Ideas?
Parent - - By Caesar [de] Date 2012-05-12 14:33
Show the health bar on the interaction-button.
Parent - By boni [at] Date 2012-05-12 14:35
I'd have preferred numerical information there. If you want something like that we could always do "display building health bar when standing in front of it"? That'd be a general change though. :)
Parent - - By PeterW [gb] Date 2012-05-12 14:46

> And only showing it when taking damage is easily overlooked.


Plus when you're standing in front, possibly with a hammer? I agree with Newton, btw, that we should try to make this a simple hammer-interaction if possible. That would work well together, as you could easily tell by the health bar appearing that you're about to do a repair job.

Disadvantage being obviously that you couldn't build buildings in front of other buildings, as we might want to do sooner or later...
Parent - - By PeterW [gb] Date 2012-05-12 14:48
Oh yeah, and we could use the health bar to show the progress of the initial building process as well. In case we encode the repair cost in there, we could possibly even unify this with building cost?
Parent - By boni [at] Date 2012-05-12 14:49
Definitively. :)
Parent - By boni [at] Date 2012-05-12 14:48
I dunno. I feel like item-interactions should mainly be used for stuff that needs mouse-coordinates. Also having multiple interactions on item-use is really hard to communicate to the player. (Aka the burden of knowledge. A thing that the old clonk had way too much. ;))
Parent - By Heyub [us] Date 2012-05-16 14:37
Maybe a health pie?  I'm just biased like that, love pies.
You may consider having the health bars disappear when player is X distance away from it.  Though I am not sure if that would help with the clutter you speak of...
Parent - - By Randrian [de] Date 2012-05-15 23:01
Hmm, I think healthbars are kinda ugly for medival buildings in clonk. They remind me of Spacelaunch and other SiFi mods.
What about making the damage visible on the building? Burnmarks and stuff? We could solve this by using overlays over the models texture. Perhaps you remember in the old CR repos in the additional stuff there way some implementation for this for CR.
The downside is that you don't know exactly the percentage of the damage. But is this really nessassary? In the end you normally just need a quick desicion wether to repair or not. And some stages of burnmarks could definitivly give you a good help for this decision.
Reply
Parent - - By PeterW [gb] Date 2012-05-16 00:40
Well, it would show you how many more flints the tower could take. Whether having that knowledge is a good thing or not is up for debate - but it's the kind of thing players tend to care about eventually.

Visible damage on buildings would obviously be nice as well - if somebody cares enough about it to make n versions of every model. Maybe only for some buildings of tactical importance?
Parent - By Matthias [de] Date 2012-05-16 06:56
Not really - flints dont have a "damage bar" that you could compare. Also they might deal varying damage each time. I'm actually for a more visual approach as well. Maybe by spawning small flames and smoke on the mesh. Military buildings could use the health bar additionally.
Reply
Parent - By Caesar [de] Date 2012-05-16 18:23
Wouldn't scorch marks and maybe a second model for some buildings suffice?
Parent - - By Newton [de] Date 2012-05-12 14:06
Why not using the hammer in front of a building? After all, one cannot build another structure at the same place as another building.
Parent - - By boni [at] Date 2012-05-12 14:24
You can place it next to the building though, if it's a small building. And standing in front of it.
Don't try to force every interaction on item-use. ;)
Parent - - By Newton [de] Date 2012-05-12 19:52
Well you use an  item though, don't you?
Parent - - By boni [at] Date 2012-05-13 14:55
Not necessarily. You only tell the building to repair itself.
For using an item itself, like the bow, the mouse-use is the preferred option of course. ;)
(At least 90% of those need mouse coordinates though)
Parent - By Gurkenglas [de] Date 2012-05-25 20:55
Fling the hammer at buildings! Its HP go a random amount up or down. If your Clonk is called Thor, the hammer flies back into its hand.
Reply
Up Topic Development / Scenario & Object Development / Repairing Buildings

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill