[English] Measures.dbt explained

    Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

    • [English] Measures.dbt explained

      This is a tutorial original written by FH/nirvana in the runeforge-board: forum.runeforge-games.net/index.php/topic,61.0.html

      I added a few things

      Example:



      Quellcode: Measures.dbt

      1. Table Description:
      2. "id" INT -1 |"script" STRING 0 |"classscript" STRING 0 |"name" STRING 0 |"interruptvalue" INT 0 |"icon_path" STRING 0 |"runtype" INT 0 |"type" INT 0 |"basexp" INT 0 |"panel" STRING 0 |"panelparam" STRING 0 |"guiorder" INT 0 |"repeat_time" INT 0 |"duration" INT 0 |"rangeeffect" STRING 0 |"rangeradius" INT 0 |"notargetattach" INT 0 |
      3. [...]
      4. 1970 "Artefacts\as_197_UseWalkingStick.lua" "-" "UseWalkingStick" 55 hud/items/Item_WalkingStick.tga" 0 12 100 "" "" 0 24 16 "none" 0 0 |





      Parameter 1: "id"
      This parameter is the ID of your measure which also identifies your measure in other database files.
      The ID must be unique!

      Parameter 2: "script"
      The filename of your script in the folder scripts/measures/

      Parameter 3: "classscript"
      This parameter is used to start scripts hardcoded.
      You won't need it. ("-")

      Parameter 4: "name"
      This is the name of your measure. The name is used to start the measure from
      within other scripts and to define a name and tooltip/description for
      your measure. For example via the function "MeasureRun"

      Parameter 5: "interruptvalue"
      The higher the value the more important the measure. Certain measures like
      "TryToWalkHome" should not be interrupted by less important measures
      (like getting a cake).

      Parameter 6: "icon_path"
      The path to the icon which should be used for this measure - starting from "textures/"

      Parameter 7: "runtype"
      This parameter defines what the measure is:
      0 ... measure can be used by AI and player
      1 ... measure can only be used by AI
      2 ... measure starts a GUI event

      You can leave it at 0 usually

      Parameter 8: "type"
      The category of the measure. Please look into the file "DB/MeasureType.dbt" in order to find out more:


      Data:
      0 "Hud" 1 |
      1 "None" 1 |
      2 "Family" 2 |
      3 "Aggressive" 2 |
      4 "Privilege" 2 |
      5 "BuildingDep" 2 |
      6 "Dialogue" 2 |
      11 "GUIIrrelevant" 0 |
      12 "Artefact" 2 |
      13 "Idle" 0 |
      14 "RPG" 2 |
      99 "DebugOnly" 2 |

      This parameter also defines how the buttons should be arranged, for example: all measures with type 3 will be grouped to the aggressive (red) measures.

      Parameter 9: "baseexp"
      This value can be used in your measure script with the command


      GetData("BaseXP")
      Using this you can incremend the XP of some character by the defined value. Note: You only get the value here
      if you use the function above. If the script uses own variables/numbers this number here becomes irrelevant

      Parameter 10: "panel"
      This parameter should be left empty or set to "none" because it's used for measures only that start a panel action.
      If you want to open a certain panel (like important persons or political overview) for measures that need a target, you can set the panel name here.

      Parameter 11: "panelparam"
      This parameter is also not very interesting for modding.

      Parameter 12: "guiorder"
      The measure with the lowest "guiorder" will be the first measure shown in it's measuregroup in the HUD while the measure with the highest "guiorder" will be shown at the very right.

      Parameter 13: "repeat_time"
      Defines how long the player has to wait to start the measure again. (The cooldown in ingame-hours)

      Parameter 14: "duration"
      Defines the base duration (or impact) of the measure in ingame-hours

      Parameter 15: "rangeeffects"
      Here you can define a .nif file (in your "Objects/" folder) where you've stored an effect (e.g. smoke) that's shown at the point where the measure is started.
      In case you want a circle of influence, you can use "particles/radius.nif"

      Parameter 16: "rangeradius"
      If you defined "rangeeffects" you can use "rangeradius" to set the radius of the effect.

      Parameter 17: "notargetattach"
      This parameter is used if you don't want the measure to pick a target (but you can leave it to zero in most cases).
      Fajeth: This is a strange parameter, I always leave it a 0 without negative effects.