Index


CF+ map maker library and utilities

count_linked ($map, $connected)

Counts the number of objects with the connected value $connected on the map $map.

object attachment: 'check_inventory_on_apply'

This attachment checks on apply whether the applyer has a specific item. Currently you can only match the slaying field of the inventory item of the player.

On match the apply isn't inhibited.

Following configuration can be supplied to this attachment:

key_string

This is the string that will be matched against the slaying field of the inventory item of the player. The first found item will be decreased by the amount that can be passed in the 'decrease_by_cnt' option.

decrease_by_cnt

This is the amount the matching object will be decreased by from the inventory. Default is 0 and means nothing will be removed.

message_on_match

This is the message that will printed to the player if a matching object was found.

message_on_nomatch

This is the message that will printed to the player if NO matching object was found.

object attachment: 'trigger_on_dialog_flag'

This attachment checks whether the player has a specific dialog flag set (the ones you can set with @setflag, see also NPC_Dialogue, and triggers a connection depending on that.

The attachment has following configuration:

flag

This field should contain the name of the flag that you want to check for.

connection

The connection ID of the connection you want to trigger.

state

The state of the connection: 0 for release, 1 for push.

object attachment: 'ratelimit_converter'

This is an attachment that allows a converter to be ratelimited in terms of items per hour.

The attachment has following configuration:

match

This field should contain a cf::match match string, that should match the input object.

generate_arch

This field should contain the archetype name of the output.

items_per_hour

This field should contain the number of items to generate at maximum per hour. Default is: 20

converter_tag

This is the tag of the converter, it should be unique per converter. You can also use this to make the limit hit for multiple converters.

msg

This is the message when the player successfully converted.

failmsg

This is the failure message, which will be presented to the player when he hits the rate limit.

object attachment: 'display_info_window'

If you attach this attachment to a sign a window containing the message will open in the client when the player applies it.

Use this feature with care, as popups usually are very noisy. This is mostly thought for tutorial or other instructions.