Difference between revisions of "Ladders Documentation"

From Nexus Mods Wiki
Jump to: navigation, search
(Created page with "<div class="xcontent"><div class="row"><div class="col-xs-12" id="xwikicontent"> This page describes how to create visual ladderobject and how to make it work in the game. ==...")
 
Line 6: Line 6:
 
Ladders need to be placed as prefabs, to be found in SmartObjects/Ladders library.
 
Ladders need to be placed as prefabs, to be found in SmartObjects/Ladders library.
  
[[File:Ladders Documentation Image1.jpg]]
+
[[File:Ladders Documentation Image1.jpg|RTENOTITLE]]
  
 
Number in the prefab's name represents the height of the ladder in centimeters. Height is measured from the very bottom of the ladder to the top rung and should as close as possible correspond with height of the floor. However there is some tolerance...
 
Number in the prefab's name represents the height of the ladder in centimeters. Height is measured from the very bottom of the ladder to the top rung and should as close as possible correspond with height of the floor. However there is some tolerance...
Line 14: Line 14:
 
You can slightly change the height of ladder if needed - for example 250 cm tall ladder can work as 225 or 275 ladder. Animation might not look perfect then, but it can solve problems with navmesh. How to do it? Open ladder prefab, select Ladder entity, select SmartObjectHelpers property and change it to desired height. Try to stay as close to original height as possible.
 
You can slightly change the height of ladder if needed - for example 250 cm tall ladder can work as 225 or 275 ladder. Animation might not look perfect then, but it can solve problems with navmesh. How to do it? Open ladder prefab, select Ladder entity, select SmartObjectHelpers property and change it to desired height. Try to stay as close to original height as possible.
  
[[File:Ladders Documentation Image2.jpg]]
+
[[File:Ladders Documentation Image2.jpg|RTENOTITLE]]
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
If you need to have ladder with '''very specific height''', you have to create new model and ask scripters to create new SmartObjectHelper with desired height.
 
If you need to have ladder with '''very specific height''', you have to create new model and ask scripters to create new SmartObjectHelper with desired height.
Line 22: Line 22:
 
Distance between rungs is 25 cm, rungs need to be straight. Pivot is at the very bottom of the ladder and in the center of the rungs. Minimum width of the ladder between vertical beams is 40 cm.
 
Distance between rungs is 25 cm, rungs need to be straight. Pivot is at the very bottom of the ladder and in the center of the rungs. Minimum width of the ladder between vertical beams is 40 cm.
  
[[File:Ladders Documentation Image3.jpg]]
+
[[File:Ladders Documentation Image3.jpg|RTENOTITLE]]
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
== <span>Stairs as ladder</span> ==
 
== <span>Stairs as ladder</span> ==
  
<del>We can use ladder climbing mechanism for very steep stairs, just change LadderType to SteepStairs. Because it's very annoying to climb such a stairs, try to use it olny in case of necessity. Not sure what about the height, ask script http://xwiki.warhorse.local:8080/xwiki/resources/icons/silk/emoticon_smile.png</del>
+
We can use ladder-climbing mechanism for very steep stairs, just change LadderType to SteepStairs. Because it's very annoying to climb such a stairs, try to use it olny in case of necessity.
  
[[File:Ladders Documentation Image4.jpg]]
+
[[File:Ladders Documentation Image4.jpg|RTENOTITLE]]
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
== <span>Collision</span> ==
 
== <span>Collision</span> ==
Line 34: Line 34:
 
Collision of ladder should look like this:
 
Collision of ladder should look like this:
 
<div class="wikimodel-emptyline">&nbsp;</div>  
 
<div class="wikimodel-emptyline">&nbsp;</div>  
[[File:Ladders Documentation Image5.jpg]]
+
[[File:Ladders Documentation Image5.jpg|RTENOTITLE]]
  
 
== <span>Navmesh</span> ==
 
== <span>Navmesh</span> ==
Line 40: Line 40:
 
Always check navmesh. As usually, there has to be free space in front of the ladder on both ends - bottom and top. The green arrow means navmesh is connected by the ladder and ladder is working.
 
Always check navmesh. As usually, there has to be free space in front of the ladder on both ends - bottom and top. The green arrow means navmesh is connected by the ladder and ladder is working.
  
[[File:Ladders Documentation Image6.jpg]]
+
[[File:Ladders Documentation Image6.jpg|RTENOTITLE]]
  
 
Sometimes the navmesh is working even without the arrows for no reason http://xwiki.warhorse.local:8080/xwiki/resources/icons/silk/emoticon_smile.png&nbsp;You can ask programmers for help.
 
Sometimes the navmesh is working even without the arrows for no reason http://xwiki.warhorse.local:8080/xwiki/resources/icons/silk/emoticon_smile.png&nbsp;You can ask programmers for help.
Line 46: Line 46:
 
You can also check prefab helpers following <span class="wikiexternallink">[http://wiki/Programming/AI/Animations_on_Smart_Objects this guide]</span>; green boxes incicating height of the ladder SHOULD be on the floor (both bottom and top). However there is some tolerance...
 
You can also check prefab helpers following <span class="wikiexternallink">[http://wiki/Programming/AI/Animations_on_Smart_Objects this guide]</span>; green boxes incicating height of the ladder SHOULD be on the floor (both bottom and top). However there is some tolerance...
  
[[File:Ladders Documentation Image7.jpg]]
+
[[File:Ladders Documentation Image7.jpg|RTENOTITLE]]
  
 
== <span>Remarks</span> ==
 
== <span>Remarks</span> ==
Line 53: Line 53:
 
*All ladders in the game should be climbable. If you want to have ladder only as the decoration, make it appear so, for example:  
 
*All ladders in the game should be climbable. If you want to have ladder only as the decoration, make it appear so, for example:  
  
[[File:Ladders Documentation Image8.jpg]]
+
[[File:Ladders Documentation Image8.jpg|RTENOTITLE]]
</div> </div> </div> <div class="clearfloats">&nbsp;</div> <br/> <br/> [[Category:Tools]] [[Category:Kingdom Come Deliverance]]
+
</div> </div> </div> <div class="clearfloats">&nbsp;</div> <br/> &nbsp;
 +
[[Category:Documentation]] [[Category:Kingdom Come Deliverance]]

Revision as of 14:18, 29 October 2019

This page describes how to create visual ladderobject and how to make it work in the game.

Ladder prefabs

Ladders need to be placed as prefabs, to be found in SmartObjects/Ladders library.

RTENOTITLE

Number in the prefab's name represents the height of the ladder in centimeters. Height is measured from the very bottom of the ladder to the top rung and should as close as possible correspond with height of the floor. However there is some tolerance...

 

Adjusting height of ladder

You can slightly change the height of ladder if needed - for example 250 cm tall ladder can work as 225 or 275 ladder. Animation might not look perfect then, but it can solve problems with navmesh. How to do it? Open ladder prefab, select Ladder entity, select SmartObjectHelpers property and change it to desired height. Try to stay as close to original height as possible.

RTENOTITLE

 

If you need to have ladder with very specific height, you have to create new model and ask scripters to create new SmartObjectHelper with desired height.

Making new ladder

Distance between rungs is 25 cm, rungs need to be straight. Pivot is at the very bottom of the ladder and in the center of the rungs. Minimum width of the ladder between vertical beams is 40 cm.

RTENOTITLE

 

Stairs as ladder

We can use ladder-climbing mechanism for very steep stairs, just change LadderType to SteepStairs. Because it's very annoying to climb such a stairs, try to use it olny in case of necessity.

RTENOTITLE

 

Collision

Collision of ladder should look like this:

 

RTENOTITLE

Navmesh

Always check navmesh. As usually, there has to be free space in front of the ladder on both ends - bottom and top. The green arrow means navmesh is connected by the ladder and ladder is working.

RTENOTITLE

Sometimes the navmesh is working even without the arrows for no reason emoticon_smile.png You can ask programmers for help.

You can also check prefab helpers following this guide; green boxes incicating height of the ladder SHOULD be on the floor (both bottom and top). However there is some tolerance...

RTENOTITLE

Remarks

  • Climbing ladder might look ugly when ladder is too inclined.
  • All ladders in the game should be climbable. If you want to have ladder only as the decoration, make it appear so, for example:

RTENOTITLE