Not logged inOpenClonk Forum
Up Topic Development / Scenario & Object Development / [Project] Castles.ocd
- - By manuelclonk Date 2019-01-29 19:36 Edited 2020-02-09 16:52
Hi there,

This is the castle package. It contains a lot of castle elements and two scenarios

Last Update: 9 February 2020:  Solid masks improved, Map improvements, Destruction animations improved

* Download Castles.ocf and Castles.ocd below and place it in your OpenClonk folder.

Help and some tipps
* When building use the space key to change direction of the building
* In melees build a flagpole first to buy stuff
* Hold Space and press left or right to go downstairs a tower
* Press x to go downstairs a staircase
* Doors can be opened with Space + Left/Right, Drawbridge can be opened with Space+Up/Down
* You can use the bow when sitting on a horse

Best regards,

Attachment: Castles.ocd (1186k)
Attachment: Castles.ocf (32k)
Attachment: screenshot2.jpg (67k)
Attachment: castles_preview.gif (564k)
Attachment: screenshot-1.png (376k)
Parent - - By Clonkonaut Date 2019-01-29 23:07
Very good! The alignment could make use of the already existing connection feature (like basements can be attached to each other). That you don't need to script all stuff yourself and it's already working with existing systems.
Parent - - By manuelclonk Date 2019-02-03 20:59
Thanks for the reply. This feature looks promising for bridge like elements especially. However, I started looking at the WoodenBridge and Basement scripts and both make use of
IsBelowSurfaceConstruction() { return true; }. If I set it to false it is not possible to place the object in the air anymore. If I set it to true the construction site falls down somehow during construction (left side):

Will try to implement it for normal castle elements however!
Parent - - By Clonkonaut [de] Date 2019-02-04 11:46
IsBelowSurfaceConstruction is a special functions for construction that can be placed below the surface of the landscape. Like basements do whenever you build them below another construction. The construction previewer (what you place when selecting the hammer) will try to place the construction site deeper down if it's set to true. Also, when the construction starts (all building material present), there will be no landscape obstruction checks. But it has nothing to do with the sticking feature of connecting buildings.

The main functions for sticking together are ConstructionCombineWith(), ConstructionCombineDirection() and whatever callback ConstructionCombineWith defines. Examples are the wooden bridge, the basement and the elevator (the elevator would be one that doesn't use IsBelowSurfaceConstruction because it's not one).

The construction site itself does not fall down (because it's a StaticBack object). But it of course creates the building at some point (all building material present) and starts to build it. Because the building is created with Con 1 and not 100, Initialize will not be called. In order to have your buildings float, you need to do something about that in Construction() or in CombineWith(object) - which is called as soon as creation is done and tells you which other building this one should stick to. Of course, this means to change the category to StaticBack or similar techniques to make it float (e.g. the basement changes to StaticBack in Construction()). Otherwise it will fall down because C4D_Structure objects do that.
Parent - By manuelclonk Date 2019-02-04 20:39
Thank you so much for the good explanation! The structure from the screenshot can be connected to the tower now. Will work on the connection feature for the remaining structures next :)
Parent - By manuelclonk Date 2019-02-13 19:21 Edited 2019-02-23 19:18
The connection feature is implemented now for left and right directions. However, for the door and the drawbridge buildings I noticed something strange: Both have set local Touchable=1; and SetCategory(C4D_StaticBack); called in the Construction method. SetCategory(C4D_StaticBack); made the construction flipable by the clonk in the game however (e.g. the Clonk could change the direction of the drawbridge). So right now the door and the drawbridge are not of type C4D_StaticBack but of C4D_Structure instead. Is it possible to use C4D_StaticBack and prevent the construction from flipping somehow?

Edit: Both FlipDir=1 and NoConstructionFlip=False are set in order to allow direction change before building using the spacebar
Edit2: Okay, I ended up creating an extra invisible object for the door control...
Parent - - By Armin Date 2019-02-05 19:17
When I overcome my Blender problems, I'll upload an updated version of my castle decorations pack, too. They will likely fit into your castles.
Parent - By manuelclonk Date 2019-02-07 20:58
Good to hear! The castle decoration pack looks quite promising!
Parent - By manuelclonk Date 2019-03-16 20:34 Edited 2019-03-16 20:43
Some preview for the next version: Started developing a horse, but it will probably take a while until it is finished/bug free:
Parent - - By Caesar [jp] Date 2019-03-17 05:11
I wonder, might the towers be a good place to use the half-solid masks?
Parent - - By manuelclonk Date 2019-03-23 10:42 Edited 2019-03-23 11:40
Do you mean for the doors or for the staircase? For the staircase it would be possible to use something like in the illustration attached (Blue is half solid mask)
Attachment: screenshot1.png (3k)
Parent - - By Caesar [jp] Date 2019-03-23 12:43 Edited 2019-03-23 12:45
For the staircases, yes. I would have tried something simpler first, though.

Parent - - By manuelclonk Date 2019-03-29 21:03 Edited 2019-03-29 21:14
Here is a first draft! See Attachment below. Will add it to the next release and work on the texture a bit more.
Question that remains: How to walk down?
Possible balancing problem:  Arrows can be fired only upwards

Attachment: Staircase2.ocd (72k)
Attachment: screenshot1.jpg (19k)
Parent - - By Sven2 [us] Date 2019-03-29 22:30
For movement in staircases, I think <Space> + <Direction key (WASD)> to move up/down or even sideways would be nice. I don't think the clonk should even have to "enter" the staircase (like in CR). It could just be teleported if you press Interact+Direction.
Parent - By K-Pone [de] Date 2019-03-30 22:32
But can this be done somehow? I mean, Space + A/D switches between interactable objects and Space + W switches between available actions for the currently selected object. Can this be overridden?
Parent - By Luchs Date 2019-03-30 00:03

>Question that remains: How to walk down?

Press X to drop through the half-solid mask.
Parent - By Caesar [jp] Date 2019-04-01 14:14
I had a thing somewhere that allowed arrows and bullets to permeate half-solid masks in any direction. But that still leaves flints and other weapons.

Also, I'd like to know… how does this feel? Does it allow to move smoothly?
Parent - - By manuelclonk Date 2020-01-24 22:29 Edited 2020-01-25 13:52
Did an update with new objects: Horse (Use space to enter), horse armour (use left mouse click before horse) , new castle elements, new scenario, new staircase.
Parent - - By Zapper [de] Date 2020-01-24 23:16
Very cool to see some activity :)
Parent - By manuelclonk Date 2020-01-27 20:35
Just trying to contribute a small part to Openclonk life support :D
Parent - - By manuelclonk Date 2020-02-03 20:52
I was thinking about creating some peaceful castle scenarios which can be also played in single player mode - Some options would be

- Horse Race Downhill: Like the parcour scenarios but with a horse
- Babel: Build a tower with castle elements up to a certain height. With lots of meteorits, lightning, monsters and rain falling from the sky and trying to stop the player

Will start with one of the two options, anyone having any favorites or other ideas?
Parent - - By Sven2 [us] Date 2020-02-04 06:49
A single player scenario would be cool. What about a castle invasion (like the last OC mission)?
Parent - By manuelclonk Date 2020-02-07 19:30
Not so peaceful anymore, but also a good option :)
Parent - - By Pyrit Date 2020-02-04 22:07
Underwater Casltes!!!
Parent - - By manuelclonk Date 2020-02-07 19:32
How should this work without Aquaclonks who can walk in Water?
Parent - - By Caesar [jp] Date 2020-02-08 05:13
New item. Metal shoes. (Is it easy to stop climbing/walking/kneeling/etc… from changing to swim in water?)
Parent - By Marky Date 2020-02-08 08:20
Yes, you can temporarily change the ActMap property, so that the InLiquid Action is nil. At least that is how the walk speed is increased/reduced by certain effects
Parent - - By Wipfhunter [at] Date 2020-02-09 00:43 Edited 2020-02-09 01:10
Just use Hydroclonks.

Just a small testmap and proof of concept. Far from finished. Feel free to make the script better. The hydroclonk has a male and female skin and depends on the gender of the chosen standard skin. Press the *Crew Member Toggle Button*while jumping to toggle between swimming and underwater walking mode.  Needs Castles.ocd.  Should work with the latest snapshot. (I think the fish was from Marky and the shark from arminlc, but not really sure anymore)
Attachment: WH_HydroclonkTest.ocs (3306k)
Parent - - By Marky [de] Date 2020-02-09 17:00
The Hydroclonk and hydrowipt look cool
Parent - By manuelclonk Date 2020-02-16 17:25
I agree with that!
Up Topic Development / Scenario & Object Development / [Project] Castles.ocd

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill