Skip to content

Support for square bracket parameters in scripted_effects and scripted_triggers #57

Open

Description

@mati-k

Hey, would it be possible to add support for square bracket parameters? The way they work is if paramater in bracket is passed, the rest of racket is executed. The dollar and bracket parameters can overlap. I could try make change but never used F#

#Province effect
upgrade_building = {
	[[trade]
		if = {
			limit = { has_building = trade_depot }
			add_building = stock_exchange
		}
		else_if = {
			limit = { has_building = marketplace }
			add_building = trade_depot
		}
	]
	[[government]
		if = {
			limit = { has_building = courthouse }
			add_building = town_hall
		}
	]
}

upgrade_building = { trade = yes }
define_advisor_of_random_type = {
  define_advisor = {
	  [[name] name = $name$ ]
	  type = treasurer
	  skill = $skill$
	  [[culture] culture = $culture$ ]
	  [[religion] religion = $religion$ ]
	  [[discount] discount = $discount$ ]
	  [[cost_multiplier] cost_multiplier = $cost_multiplier$ ]
  }
}

define_advisor_of_random_type = { skill = 1 culture = some_culture }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions