Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

"Internal limit size exceeded" compile error - function with lots of "elseif"s

This is a new error I've never seen before:

*** ERROR compiling /pkg:/source/obj.brs:
Internal limit size exceeded. (compile error &hae) in pkg:/source/obj.brs(3394)

Line 3394 is the "END IF" of a very large IF statement with many many ELSEIF lines. This is my object list for all Things and Items in the game. I've never heard of a limit like this - what is the limit? I'll probably just have to restructure how I do it, but if there is any insight, that would be appreciated.

A quick count is about 240 ELSEIF lines

Here's the whole function:
(I tried to put the whole function but it's far over the 60000 character limit for making a forums post! So here is a part of it...
IF objct = "blocker"
objct = {
kind: "infoTh"
'kind: "block" ' If we use this, then it would block flying Items, I think I don't want that
name: "blocker"
objNm: "blocker"
blocker: TRUE
'vis: FALSE
swap: TRUE
}
'============== ITEMS ===============
ELSEIF objct = "handL" ' Only for HUD
objct = {
sprite: ["sprite_handL", "sprite_handL_2", "sprite_handL_3"]
}
ELSEIF objct = "handR" ' Only for HUD
objct = {
sprite: ["sprite_handR", "sprite_handR_2", "sprite_handR_3"]
}
ELSEIF objct = "short sword" ' 5
c = 5
objct = {
kind: "005 sword"
name: "short sword"
objNm: "short sword"
code: c
blocker: FALSE
sprite: ["sprite_sword1", "sprite_sword1_2", "sprite_sword1_3"]
spriteDraw: FALSE
inven: {
weight: 1
value: 5
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 8 ' Cooldown, in cycles
}
statsArr: [ ["att", 2] ]
dscr: getCreateItemDscr(c) ' "SHORT SWORD: A short sturdy blade of iron, simple and effective."
}
ELSEIF objct = "cutlass" ' 6
c = 6
objct = {
kind: "005 sword"
name: "cutlass"
objNm: "cutlass"
code: c
blocker: FALSE
sprite: ["sprite_sword2", "sprite_sword2_2", "sprite_sword2_3"]
spriteDraw: FALSE
inven: {
weight: 1.2
value: 8
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 10 ' Cooldown, in cycles
}
statsArr: [ ["att", 3] ]
dscr: getCreateItemDscr(c) ' "CUTLASS: Nautical in design, with a slight curve like the bow of a ship, this blade will stab and slice as you see fit."
}
ELSEIF objct = "vorpal sabre" ' 7
c = 7
objct = {
kind: "005 sword"
name: "vorpal sabre"
objNm: "vorpal sabre"
code: c
blocker: FALSE
sprite: ["sprite_sword3", "sprite_sword3_2", "sprite_sword3_3"]
spriteDraw: FALSE
inven: {
weight: 1
value: 35
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 6 ' Cooldown, in cycles
}
statsArr: [ ["att", 5] ]
dscr: getCreateItemDscr(c) ' "VORPAL SABRE: This exotic blade was forged in Ironheart and vorpalized, at great expense, in Zarehm so that its edge forms a mathematical line of nearly infinite sharpness."
}
ELSEIF objct = "knife" ' 10
c = 10
objct = {
kind: "010 dagger"
name: "knife"
objNm: "knife"
code: c
blocker: FALSE
sprite: ["sprite_dagger1", "sprite_dagger1_2", "sprite_dagger1_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 1
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 6 ' Cooldown, in cycles
}
statsArr: [ ["att", 1] ]
dscr: getCreateItemDscr(c) ' "KNIFE: Thieves and brigands often brandish the simple knife because they cannot afford anything better. Nonetheless, it can cause serious damage."
}
ELSEIF objct = "dagger" ' 11
c = 11
objct = {
kind: "010 dagger"
name: "dagger"
objNm: "dagger"
code: c
blocker: FALSE
sprite: ["sprite_dagger2", "sprite_dagger2_2", "sprite_dagger2_3"]
spriteDraw: FALSE
inven: {
weight: 0.8
value: 2
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 8 ' Cooldown, in cycles
}
'statsArr: [ ["att", 2] ]
statsArr: [ ["att", 1000] ]
dscr: getCreateItemDscr(c) ' "DAGGER: A short iron blade, easily concealed, and quite deadly in the skilled hand."
}
ELSEIF objct = "severance blade" ' 12
c = 12
objct = {
kind: "010 dagger"
name: "severance blade"
objNm: "severance blade"
code: c
blocker: FALSE
sprite: ["sprite_dagger3", "sprite_dagger3_2", "sprite_dagger3_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 45
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 4 ' Cooldown, in cycles
}
statsArr: [ ["att", 6] ]
dscr: getCreateItemDscr(c) ' "SEVERANCE BLADE: Unnervingly light, this slender weapon has been given a dark enchantment which prevents pierced flesh from clotting or cauterizing for several hours longer than usual."
}
ELSEIF objct = "rapier" ' 15
c = 15
objct = {
kind: "015 finesse"
name: "rapier"
objNm: "rapier"
code: c
blocker: FALSE
sprite: ["sprite_sword6", "sprite_sword6_2", "sprite_sword6_3"]
spriteDraw: FALSE
inven: {
weight: 0.8
value: 12
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 8 ' Cooldown, in cycles
}
statsArr: [ ["att", 4] ]
dscr: getCreateItemDscr(c) ' "RAPIER: As a finesse weapon, the thin-bladed rapier requires training and skill to be most effective."
}
ELSEIF objct = "middonian backsword" ' 16
c = 16
objct = {
kind: "015 finesse"
name: "middonian backsword"
objNm: "middonian backsword"
code: c
blocker: FALSE
sprite: ["sprite_sword7", "sprite_sword7_2", "sprite_sword7_3"]
spriteDraw: FALSE
inven: {
weight: 1.2
value: 28
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 10 ' Cooldown, in cycles
}
statsArr: [ ["att", 7] ]
dscr: getCreateItemDscr(c) ' "MIDDONIAN BACKSWORD: A particular single-edged sword, the clannish fighters of Middoni developed its use into a lethal artform rarely shared outside that city."
}
ELSEIF objct = "torch" ' 20
c = 20
objct = {
kind: "020 club"
name: "torch"
objNm: "torch"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_torch_lit", "anim_torch_lit_2", "anim_torch_lit_2"]
["sprite_torch", "sprite_torch_2", "sprite_torch_3"] ]
spriteDraw: FALSE
inven: {
weight: 1
value: 1
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 8 ' Cooldown, in cycles
destroy: FALSE
}
fuel: m.sy.torchLife
litOn: FALSE
bright: 0
dM: 1 ' Distance multiplier
onLMap: FALSE
statsArr: [ ["att", 1] ]
stats2Arr: [ ["fire", 2] ]
stats2Bool: "litOn"
effect: [torchToggle]
dscr: getCreateItemDscr(c) ' "TORCH: A simple wooden stave, banded with an oil soaked wick at one end, it can be used as a club while in-hand and continues to serve as a light source when not equipped. Its fuel is limited and it will eventually burn out."
}
ELSEIF objct = "club" ' 21
c = 21
objct = {
kind: "020 club"
name: "club"
objNm: "club"
code: c
blocker: FALSE
sprite: ["sprite_club", "sprite_club_2", "sprite_club_3"]
spriteDraw: FALSE
inven: {
weight: 2.4
value: 0
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 14
}
statsArr: [ ["att", 2] ]
dscr: getCreateItemDscr(c) ' "CLUB: A dense piece of hardwood, worn to rounded lumpy edges and stained through brutal use."
}
ELSEIF objct = "earl's mace" ' 22
c = 22
objct = {
kind: "020 club"
name: "earl's mace"
objNm: "earl's mace"
code: c
blocker: FALSE
sprite: ["sprite_mace", "sprite_mace_2", "sprite_mace_3"]
spriteDraw: FALSE
inven: {
weight: 2.8
value: 16
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 12
}
statsArr: [ ["att", 6] ]
dscr: getCreateItemDscr(c) ' "EARL'S MACE: Constructed of enduring steel, its head is encircled with a series of spiked flanges. This style of mace took on the moniker ""earl"" after the legendary questings of Omner, the first Earl of Stalwart Row in Ironheart, it being his preferred weapon."
}
ELSEIF objct = "sling" ' 25
c = 25
objct = {
kind: "025 ranged"
name: "sling"
objNm: "sling"
code: c
blocker: FALSE
sprite: ["sprite_sling", "sprite_sling_2", "sprite_sling_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 3
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 16 ' Cooldown, in cycles
}
ranged: ["rock"]
statsArr: [ ["att", 1] ]
dscr: getCreateItemDscr(c)
}
ELSEIF objct = "short bow" ' 26
c = 26
objct = {
kind: "025 ranged"
name: "short bow"
objNm: "short bow"
code: c
blocker: FALSE
sprite: ["sprite_bow1", "sprite_bow1_2", "sprite_bow1_3"]
spriteDraw: FALSE
inven: {
weight: 1
value: 7
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 14 ' Cooldown, in cycles
}
ranged: ["broad arrow", "fire arrow"]
statsArr: [ ["att", 2] ]
dscr: getCreateItemDscr(c) ' "SHORT BOW: A simple small wooden bow, strung straight, effective but not overpowering, this is good for the inexperienced."
}
ELSEIF objct = "reflex bow" ' 27
c = 27
objct = {
kind: "025 ranged"
name: "reflex bow"
objNm: "reflex bow"
code: c
blocker: FALSE
sprite: ["sprite_bow2", "sprite_bow2_2", "sprite_bow2_3"]
spriteDraw: FALSE
inven: {
weight: 1.2
value: 14
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 18 ' Cooldown, in cycles
}
ranged: ["broad arrow", "fire arrow"]
statsArr: [ ["att", 4] ]
dscr: getCreateItemDscr(c) ' "REFLEX BOW: Composited of maple, spruce, oryx horn, and wild deer sinew for maximum flexibility, the recurve lends greater shot strength to your ranged attacks."
}
ELSEIF objct = "supernal bow" ' 28
c = 28
objct = {
kind: "025 ranged"
name: "supernal bow"
objNm: "supernal bow"
code: c
blocker: FALSE
sprite: ["sprite_bow3", "sprite_bow3_2", "sprite_bow3_3"]
spriteDraw: FALSE
inven: {
weight: 0.5
value: 48
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 12 ' Cooldown, in cycles
}
ranged: ["broad arrow", "fire arrow"]
statsArr: [ ["att", 8] ]
dscr: getCreateItemDscr(c) ' "SUPERNAL BOW: Anciently blessed by the goddess Sariah, and stolen from Oblasia by the brazen thief Esrom, it has been lost for centuries until now. Holy magic seems to have preserved it's fibers; even the string has nary a wisp of fray."
}
ELSEIF objct = "rock" ' 30
c = 30
objct = {
kind: "030 throwing"
name: "rock"
objNm: "rock"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_rockAn", "anim_rockAn_2", "anim_rockAn_3"]
["sprite_rock", "sprite_rock_2", "sprite_rock_3"] ]
spriteDraw: FALSE
inven: {
weight: 0.5
value: 0
stack: 1
stackW: 0.5
stackV: 0
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 4 ' Cooldown, in cycles
}
frPlyr: FALSE
ranged: ["rock"]
statsArr: [ ["att", 1] ]
' sticky: FALSE
dscr: getCreateItemDscr(c) ' "ROCK: A fist-sized stone capable of inflicting some damage if thrown well."
}
ELSEIF objct = "throwing star" ' 31
c = 31
objct = {
kind: "030 throwing"
name: "throwing star"
objNm: "throwing star"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_star1An", "anim_star1An_2", "anim_star1An_3"]
["sprite_star1", "sprite_star1_2", "sprite_star1_3"] ]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 2
stack: 1
stackW: 0.2
stackV: 2
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 4 ' Cooldown, in cycles
}
frPlyr: FALSE
ranged: ["throwing star"]
statsArr: [ ["att", 2] ]
req: [ ["dex", 12] ]
sticky: TRUE
dscr: getCreateItemDscr(c) ' "THROWING STAR: A small but deadly multi-bladed instrument requiring a skillful hand to wield effectively."
}
ELSEIF objct = "gyre slicer" ' 32
c = 32
objct = {
kind: "030 throwing"
name: "gyre slicer"
objNm: "gyre slicer"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_star2An", "anim_star2An_2", "anim_star2An_3"]
["sprite_star2", "sprite_star2_2", "sprite_star2_3"] ]
spriteDraw: FALSE
inven: {
weight: 0.8
value: 22
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 8 ' Cooldown, in cycles
}
frPlyr: FALSE
ranged: ["gyre slicer"]
statsArr: [ ["att", 12] ]
req: [ ["dex", 14] ]
sticky: FALSE
dscr: getCreateItemDscr(c) ' "GYRE SLICER: The use of this whirling chalikar eludes the average thrower, but a dextrous hand will send its five star-aligned blades slicing into an enemy with alarming precision."
}
ELSEIF objct = "boomerang" ' 33
c = 33
objct = {
kind: "030 throwing"
name: "boomerang"
objNm: "boomerang"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_boomAn", "anim_boomAn_2", "anim_boomAn_3"]
["sprite_boom", "sprite_boom_2", "sprite_boom_3"] ]
spriteDraw: FALSE
inven: {
weight: 0.5
value: 5
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 10 ' Cooldown, in cycles
'cd: 2 ' TESTING
}
frPlyr: FALSE
ranged: ["boomerang"]
statsArr: [ ["att", 1] ]
dscr: getCreateItemDscr(c) ' "BOOMERANG: An aged and hardened wooden arc with sharp edges, it will reverse trajectory mid-flight and return to its starting point."
}
ELSEIF objct = "astral cross-stick" ' 34
c = 34
objct = {
kind: "030 throwing"
name: "astral cross-stick"
objNm: "astral cross-stick"
code: c
blocker: FALSE
spOrAnim1: FALSE
spOrAnims: [ ["anim_boom2An", "anim_boom2An_2", "anim_boom2An_3"]
["sprite_boom2", "sprite_boom2_2", "sprite_boom2_3"] ]
spriteDraw: FALSE
inven: {
weight: 1.6
value: 21
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 14 ' Cooldown, in cycles
}
frPlyr: FALSE
ranged: ["astral cross-stick"]
statsArr: [ ["att", 3] ]
dscr: getCreateItemDscr(c) ' "ASTRAL CROSS-STICK: A four-armed metallic boomerang with enough weight to cause blunt force damage, the curvature of its arms steer it back to the thrower's location."
}
ELSEIF objct = "broad arrow" ' 40
c = 40
objct = {
kind: "040 arrow"
name: "broad arrow"
objNm: "broad arrow"
code: c
blocker: FALSE
spriteZ: [ ["sprite_arrow0", "sprite_arrow0_2", "sprite_arrow0_3"]
["sprite_arrow1", "sprite_arrow1_2", "sprite_arrow1_3"]
["sprite_arrow2", "sprite_arrow2_2", "sprite_arrow2_3"]
["sprite_arrow3", "sprite_arrow3_2", "sprite_arrow3_3"] ]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 1
stack: 1
stackW: 0.1
stackV: 1
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 4 ' Cooldown, in cycles
}
frPlyr: FALSE
statsArr: [ ["att", 2] ]
facing: 1 ' arrows need facing
sticky: TRUE
dscr: getCreateItemDscr(c) ' "BROADHEAD ARROW: A simple wooden shaft, sturdy enough, with a sharp iron head."
}
ELSEIF objct = "blackwood wand" ' 64
c = 64
objct = {
kind: "060 wand"
name: "blackwood wand"
objNm: "blackwood wand"
code: c
blocker: FALSE
sprite: ["sprite_wand2", "sprite_wand2_2", "sprite_wand2_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 15
equip: TRUE
slot: "ield" ' Match last 4 of "right wield" OR "left wield"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
cd: 6 ' Cooldown, in cycles
}
spellInfo: [ 1, "magic missile"]
statsArr: [ ["att", 3], ["ltng", 2], ["cold", 2] ]
'spellAtt: [ 3,0,2,2,0 ]
dscr: getCreateItemDscr(c) ' "BLACKWOOD WAND: An aged gnarled wooden rod, bent with power and purpose."
}
ELSEIF objct = "alder wand" ' 65
c = 65
objct = {
kind: "060 wand"
name: "alder wand"
objNm: "alder wand"
code: c
blocker: FALSE
sprite: ["sprite_wand3", "sprite_wand3_2", "sprite_wand3_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 25
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 4 ' Cooldown, in cycles
}
bright: 0 ' Read by updateLMapObjct(), placeItem(), fillLayout(), tSpawnAt()
dM: 1 ' Distance multiplier
onLMap: FALSE
spellInfo: [ 2, "magicLight"]
dscr: getCreateItemDscr(c)
}
ELSEIF objct = "leather cap" ' 70
c = 70
objct = {
'kind: "045 light armor" ' This matters in equipLorH()
kind: "070 head"
heavy: FALSE
name: "leather cap"
objNm: "leather cap"
code: c
blocker: FALSE
sprite: ["sprite_leather_cap", "sprite_leather_cap_2", "sprite_leather_cap_3"]
spriteDraw: FALSE
inven: {
weight: 0.5
value: 2
equip: TRUE
slot: "head"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 1] ]
dscr: getCreateItemDscr(c) ' "LEATHER CAP: Adorned with a few iron spikes, this hardened leather cap offers a bit of protection for your not so hardened head."
}
ELSEIF objct = "tumbler helm" ' 71
c = 71
objct = {
kind: "070 head"
heavy: FALSE
name: "tumbler helm"
objNm: "tumbler helm"
code: c
blocker: FALSE
sprite: ["sprite_tumbler_helm", "sprite_tumbler_helm_2", "sprite_tumbler_helm_3"]
spriteDraw: FALSE
inven: {
weight: 0.8
value: 12
equip: TRUE
slot: "head"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "TUMBLER HELM: Made of overlapping plates of hardened leather infused with rare strengthening agents."
}
ELSEIF objct = "mail coif" ' 72
c = 72
objct = {
kind: "070 head"
heavy: TRUE
name: "mail coif"
objNm: "mail coif"
code: c
blocker: FALSE
sprite: ["sprite_mail_coif", "sprite_mail_coif_2", "sprite_mail_coif_3"]
spriteDraw: FALSE
inven: {
weight: 1.1
value: 4
equip: TRUE
slot: "head"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "MAIL COIF: Simple and elegant in design, this ring mesh head gear will help you live to see another day."
}
ELSEIF objct = "iron helmet" ' 73
c = 73
objct = {
'kind: "040 heavy armor"
kind: "070 head"
heavy: TRUE
name: "iron helmet"
objNm: "iron helmet"
code: c
blocker: FALSE
sprite: ["sprite_iron_helmet", "sprite_iron_helmet_2", "sprite_iron_helmet_3"]
spriteDraw: FALSE
inven: {
weight: 1.5
value: 6
equip: TRUE
slot: "head"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 4] ]
dscr: getCreateItemDscr(c) ' "IRON HELMET: A dented and worn helm to protect your noggin."
}
ELSEIF objct = "leather jerkin" ' 77
c = 77
objct = {
kind: "077 torso"
heavy: FALSE
name: "leather jerkin"
objNm: "leather jerkin"
code: c
blocker: FALSE
sprite: ["sprite_leather_jerkin", "sprite_leather_jerkin_2", "sprite_leather_jerkin_3"]
spriteDraw: FALSE
inven: {
weight: 2.5
value: 12
equip: TRUE
slot: "torso"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "LEATHER JERKIN: Sturdy and tough, you'll be glad you were wearing it instead of a flimsy cloth shirt, but all other armor types are stronger."
}
ELSEIF objct = "tumbler cuirass" ' 78
c = 78
objct = {
kind: "077 torso"
heavy: FALSE
name: "tumbler cuirass"
objNm: "tumbler cuirass"
code: c
blocker: FALSE
sprite: ["sprite_tumbler_cuirass", "sprite_tumbler_cuirass_2", "sprite_tumbler_cuirass_3"]
spriteDraw: FALSE
inven: {
weight: 3.5
value: 28
equip: TRUE
slot: "torso"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 6] ]
dscr: getCreateItemDscr(c) ' "TUMBLER CUIRASS: Cured and perfected over several months, the formula for turning this multi-jointed leather armor into near-steel strength is a jealously guarded secret among the fighters of Middoni in Oblasia."
}
ELSEIF objct = "mail hauberk" ' 79
c = 79
objct = {
kind: "077 torso"
heavy: TRUE
name: "mail hauberk"
objNm: "mail hauberk"
code: c
blocker: FALSE
sprite: ["sprite_mail_hauberk", "sprite_mail_hauberk_2", "sprite_mail_hauberk_3"]
spriteDraw: FALSE
inven: {
weight: 2.5
value: 18
equip: TRUE
slot: "torso"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 5] ]
dscr: getCreateItemDscr(c) ' "MAIL HAUBERK: Composed of thousands of heat treated steel rings clasped in groups of five, the wearer is protected from all peircing and cutting attacks, and retains great flexibility."
}
ELSEIF objct = "leather pants" ' 84
c = 84
objct = {
kind: "084 legs"
heavy: FALSE
name: "leather pants"
objNm: "leather pants"
code: c
blocker: FALSE
sprite: ["sprite_leather_pants", "sprite_leather_pants_2", "sprite_leather_pants_3"]
spriteDraw: FALSE
inven: {
weight: 1.2
value: 8
equip: TRUE
slot: "legs"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 2] ]
dscr: getCreateItemDscr(c) ' "LEATHER PANTS: The pliable softened hide allows for leg movement while still being thick enough to offer some real protection."
}
ELSEIF objct = "tumbler leggings" ' 85
c = 85
objct = {
kind: "084 legs"
heavy: FALSE
name: "tumbler leggings"
objNm: "tumbler leggings"
code: c
blocker: FALSE
sprite: ["sprite_tumbler_leggings", "sprite_tumbler_leggings_2", "sprite_tumbler_leggings_3"]
spriteDraw: FALSE
inven: {
weight: 1.9
value: 21
equip: TRUE
slot: "legs"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 5] ]
dscr: getCreateItemDscr(c) ' "TUMBLER LEGGINGS: This Middonian leather, ultra-hardened and fashioned to give full twisting flexibility at the knee, will provide excellent leg protection."
}
ELSEIF objct = "mail chausses" ' 86
c = 86
objct = {
kind: "084 legs"
heavy: TRUE
name: "mail chausses"
objNm: "mail chausses"
code: c
blocker: FALSE
sprite: ["sprite_mail_chausses", "sprite_mail_chausses_2", "sprite_mail_chausses_3"]
spriteDraw: FALSE
inven: {
weight: 2.4
value: 16
equip: TRUE
slot: "legs"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 4] ]
dscr: getCreateItemDscr(c) ' "MAIL CHAUSSES: These mail leg coverings, held up by a belt, allow your legs freedom of movement whilst keeping them from serious harm."
}
ELSEIF objct = "leather boots" ' 91
c = 91
objct = {
'kind: "045 light armor"
kind: "091 feet"
heavy: FALSE
name: "leather boots"
objNm: "leather boots"
code: c
blocker: FALSE
sprite: ["sprite_leather_boots", "sprite_leather_boots_2", "sprite_leather_boots_3"]
spriteDraw: FALSE
inven: {
weight: 1.1
value: 5
equip: TRUE
slot: "feet"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 1], ["cold", 1] ]
dscr: getCreateItemDscr(c) ' "LEATHER BOOTS: Moderate flexible protection for your feet."
}
ELSEIF objct = "tumbler shoes" ' 92
c = 92
objct = {
kind: "091 feet"
heavy: FALSE
name: "tumbler shoes"
objNm: "tumbler shoes"
code: c
blocker: FALSE
sprite: ["sprite_tumbler_shoes", "sprite_tumbler_shoes_2", "sprite_tumbler_shoes_3"]
spriteDraw: FALSE
inven: {
weight: 0.9
value: 12
equip: TRUE
slot: "feet"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "TUMBLER SHOES: A flexible segmented design, these shoe or boot coverings allow for full movement of the foot and ankle, yet the treated leather plates are remarkably strong."
}

ELSEIF objct = "mail leather boots" ' 93
c = 93
objct = {
kind: "091 feet"
heavy: TRUE
name: "mail leather boots"
objNm: "mail leather boots"
code: c
blocker: FALSE
sprite: ["sprite_mail_leather_boots", "sprite_mail_leather_boots_2", "sprite_mail_leather_boots_3"]
spriteDraw: FALSE
inven: {
weight: 1.6
value: 14
equip: TRUE
slot: "feet"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "MAIL LEATHER BOOTS: Simply a pair of flexible leather boots with steel ring mail bound to the upper surface for extra protection."
}
ELSEIF objct = "iron sabatons" ' 94
c = 94
objct = {
'kind: "040 heavy armor"
kind: "091 feet"
heavy: TRUE
name: "iron sabatons"
objNm: "iron sabatons"
code: c
blocker: FALSE
sprite: ["sprite_iron_boots", "sprite_iron_boots_2", "sprite_iron_boots_3"]
spriteDraw: FALSE
inven: {
weight: 2.6
value: 5
equip: TRUE
slot: "feet"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 2], ["dex", -1] ]
dscr: getCreateItemDscr(c) ' "IRON SABATONS: Hefty plate protection for your feet."
}
ELSEIF objct = "leather gloves" ' 98
c = 98
objct = {
kind: "098 hands"
heavy: FALSE
name: "leather gloves"
objNm: "leather gloves"
code: c
blocker: FALSE
sprite: ["sprite_leather_gloves", "sprite_leather_gloves_2", "sprite_leather_gloves_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 4
equip: TRUE
slot: "hands"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 1] ]
dscr: getCreateItemDscr(c) ' "LEATHER GLOVES: These tough gloves will help protect your hands as you face your enemies in close combat."
}
ELSEIF objct = "tumbler fists" ' 99
c = 99
objct = {
kind: "098 hands"
heavy: FALSE
name: "tumbler fists"
objNm: "tumbler fists"
code: c
blocker: FALSE
sprite: ["sprite_tumbler_fists", "sprite_tumbler_fists_2", "sprite_tumbler_fists_3"]
spriteDraw: FALSE
inven: {
weight: 0.5
value: 12
equip: TRUE
slot: "hands"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 3] ]
dscr: getCreateItemDscr(c) ' "TUMBLER FISTS: Overlapping hard leather segments specially laid together for full finger and wrist movement yet complete protective covering."
}
ELSEIF objct = "iron gauntlets" ' 101
c = 101
objct = {
'kind: "040 heavy armor"
kind: "098 hands"
heavy: TRUE
name: "iron gauntlets"
objNm: "iron gauntlets"
code: c
blocker: FALSE
sprite: ["sprite_iron_gauntlets", "sprite_iron_gauntlets_2", "sprite_iron_gauntlets_3"]
spriteDraw: FALSE
inven: {
weight: 1.5
value: 8
equip: TRUE
slot: "hands"
eqp1: "equip armor"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["def", 2], ["ftr", 1] ]
dscr: getCreateItemDscr(c) ' "IRON GAUNTLETS: Putting this segmented iron protection on your hands lends strength to your grip and gives you a sense of fighting power."
}
ELSEIF objct = "star shield" ' 108
c = 108
objct = {
kind: "105 shield"
name: "star shield"
objNm: "star shield"
code: c
blocker: FALSE
sprite: ["sprite_shield4", "sprite_shield4_2", "sprite_shield4_3"]
spriteDraw: FALSE
inven: {
weight: 2.2
value: 6
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 24 ' Cooldown, in cycles
}
'statsArr: [ ["def". 2], ["att", 1] ]
statsArr: [ ["def", 2], ["att", 1], ["con", 1] ]
dscr: getCreateItemDscr(c) ' "IRON SHIELD: Deft use of a good shield can deflect many a blow. Good for the occasional shield bash too."
}
ELSEIF objct = "mirror shield" ' 109
c = 109
objct = {
kind: "105 shield"
name: "mirror shield"
objNm: "mirror shield"
code: c
blocker: FALSE
sprite: ["sprite_shield5", "sprite_shield5_2", "sprite_shield5_3"]
spriteDraw: FALSE
inven: {
weight: 3
value: 30
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 24 ' Cooldown, in cycles
}
'statsArr: [ ["def", 3], ["att", 1] ]
statsArr: [ ["def", 3], ["att", 1], ["wis", 2] ]
dscr: getCreateItemDscr(c) ' "MIRROR SHIELD: It's entire front half is fitted with a smooth continuous sheet of hundreds of nearly transparent actinolite gemstones, set in a slightly concave surface. When wielded with skill and good timing, it has the power to deflect elemental magic."
}
ELSEIF objct = "opal ring" ' 130
c = 130
objct = {
kind: "130 ring"
name: "opal ring"
objNm: "opal ring"
code: c
blocker: FALSE
sprite: ["sprite_ring1_opal", "sprite_ring1_opal_2", "sprite_ring1_opal_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 25
equip: TRUE
slot: "ring"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["max", 10 ] ]
dscr: getCreateItemDscr(c) ' "OPAL RING: A simple band with a single opal gem that slightly glows."
}
ELSEIF objct = "steel ring" ' 131
c = 131
objct = {
kind: "130 ring"
name: "steel ring"
objNm: "steel ring"
code: c
blocker: FALSE
sprite: ["sprite_ring2_steel", "sprite_ring2_steel_2", "sprite_ring2_steel_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 25
equip: TRUE
slot: "ring"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
}
statsArr: [ ["str", 2] ]
dscr: getCreateItemDscr(c) ' "STEEL RING: Octagonal in shape, it almost seems to grow and shrink with emanations of power, like breath."
}
ELSEIF objct = "pink potion" ' 140 Healing
c = 140
objct = {
'kind: "tool"
kind: "140 potion"
name: "pink potion"
objNm: "pink potion"
code: c
blocker: FALSE
'sprite: ["sprite_potion4", "sprite_potion4_2", "sprite_potion4_3"]
sprite: ["sprite_potion1", "sprite_potion1_2", "sprite_potion1_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 1
stack: 1
stackW: 0.2
stackV: 1
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "round flask"
}
'stats: { hth: 10 }
'effect: [potionHealPre]
effect: [potionQuaff]
taskInfo: [ 41, 6, ["a pink potion"] ]
dscr: getCreateItemDscr(c) ' "PINK POTION: A deep pink infusion, when imbibed it restores 10 to 20 percent of your health."
}
ELSEIF objct = "grey potion" ' 141 Invisibility
c = 141
objct = {
kind: "140 potion"
name: "grey potion"
objNm: "grey potion"
code: c
blocker: FALSE
sprite: ["sprite_potion2", "sprite_potion2_2", "sprite_potion2_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 5
stack: 1
stackW: 0.2
stackV: 5
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "pyramid flask"
}
'effect: [potionInvisPre]
effect: [potionQuaff]
taskInfo: [ 41, 0, [] ]
dscr: getCreateItemDscr(c) ' "GREY POTION: An illusive cloudy grey decoction, it grants you short-term invisibility, allowing movement and simple actions. The shroud dissipates early if you attack or get hit."
}
ELSEIF objct = "blue potion" ' 142 Speed
c = 142
objct = {
'kind: "tool"
kind: "140 potion"
name: "blue potion"
objNm: "blue potion"
code: c
blocker: FALSE
sprite: ["sprite_potion3", "sprite_potion3_2", "sprite_potion3_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 1
stack: 1
stackW: 0.2
stackV: 1
equip: TRUE
slot: " use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "round flask"
}
'stats: { hth: 10 }
effect: [potionQuaff]
taskInfo: [ 41, 30, [] ]
dscr: getCreateItemDscr(c) ' "BLUE POTION: This light blue solution quickens all your attacks for a time."
}
ELSEIF objct = "black potion" ' 143 Poison
c = 143
objct = {
kind: "140 potion"
name: "black potion"
objNm: "black potion"
code: c
blocker: FALSE
sprite: ["sprite_potion4", "sprite_potion4_2", "sprite_potion4_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 5
stack: 1
stackW: 0.2
stackV: 5
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "round flask"
}
effect: [applyPoison]
dscr: getCreateItemDscr(c) ' "BLACK POTION: Applied to a weapon or projectile set, this viscous dark tincture aids in more rapidly dispatching enemies."
}
ELSEIF objct = "dynamic potion" ' 146 Strength
c = 146
objct = {
kind: "140 potion"
name: "dynamic potion"
objNm: "dynamic potion"
code: c
blocker: FALSE
'sprite: ["sprite_potion1", "sprite_potion1_2", "sprite_potion1_3"]
animSprite: ["anim_potion_permR", "anim_potion_permR_2", "anim_potion_permR_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 30
stack: 1
stackW: 0.2
stackV: 30
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "round flask"
}
effect: [potionQuaff]
taskInfo: [ 41, 31, ["a dynamic potion", "str", "strength"] ]
dscr: getCreateItemDscr(c) ' "DYNAMIC POTION: A powerful suspension coursing with energy."
}
ELSEIF objct = "effervescent potion" ' 147 Dexterity
c = 147
objct = {
kind: "140 potion"
name: "effervescent potion"
objNm: "effervescent potion"
code: c
blocker: FALSE
animSprite: ["anim_potion_permR", "anim_potion_permR_2", "anim_potion_permR_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 30
stack: 1
stackW: 0.2
stackV: 30
equip: TRUE
slot: " use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "round flask"
}
effect: [potionQuaff]
taskInfo: [ 41, 31, ["an effervescent potion", "dex", "dexterity"] ]
dscr: getCreateItemDscr(c) ' "EFFERVESCENT POTION: An impressive suspension dancing with vivacity."
}
ELSEIF objct = "ebullient potion" ' 148 Constitution
c = 148
objct = {
kind: "140 potion"
name: "ebullient potion"
objNm: "ebullient potion"
code: c
blocker: FALSE
animSprite: ["anim_potion_permP", "anim_potion_permP_2", "anim_potion_permP_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 30
stack: 1
stackW: 0.2
stackV: 30
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "pyramid flask"
}
effect: [potionQuaff]
taskInfo: [ 41, 31, ["an ebullient potion", "con", "constitution"] ]
dscr: getCreateItemDscr(c) ' "EBULLIENT POTION: An overactive suspension vibrating with zest."
}
ELSEIF objct = "sparkling potion" ' 149 Wisdom
c = 149
objct = {
kind: "140 potion"
name: "sparkling potion"
objNm: "sparkling potion"
code: c
blocker: FALSE
animSprite: ["anim_potion_permP", "anim_potion_permP_2", "anim_potion_permP_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 30
stack: 1
stackW: 0.2
stackV: 30
equip: TRUE
slot: " use" ' Match last 4 of "L quick use" OR "R quick use"
eqp1: "equip other"
equipped: FALSE
eqSlot: "" ' For exact slot name
use: TRUE
destroy: TRUE
repl: "pyramid flask"
}
effect: [potionQuaff]
taskInfo: [ 41, 31, ["a sparkling potion", "wis", "wisdom"] ]
bright: 2
dM: 0.8
onLMap: FALSE
dscr: getCreateItemDscr(c) ' "SPARKLING POTION: A shining suspension pulsing with brilliance."
}
ELSEIF objct = "mortar" ' 150
c = 150
objct = {
kind: "150 alchemy"
name: "mortar"
objNm: "mortar"
code: c
blocker: FALSE
sprite: ["sprite_mortar", "sprite_mortar_2", "sprite_mortar_3"]
spriteDraw: FALSE
inven: {
weight: 1.6
value: 15
equip: FALSE
use: TRUE
destroy: FALSE
}
effect: [alchInit]
dscr: getCreateItemDscr(c) ' "MORTAR: A medium-fine grain small granite mortar and pestle, used for grinding and mixing ingredients for potion making."
}
ELSEIF objct = "round flask" ' 151
c = 151
objct = {
kind: "150 alchemy"
name: "round flask"
objNm: "round flask"
code: c
blocker: FALSE
sprite: ["sprite_potion_flask1", "sprite_potion_flask1_2", "sprite_potion_flask1_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 1
stack: 1
stackW: 0.1
stackV: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "ROUND FLASK: Basic apparatus, you'll need a flask to mix ground ingredients into some liquid to have a quaffable potion. Round flasks are well suited to potions that affect the body, needing just the right swirl."
}
ELSEIF objct = "pyramid flask" ' 152
c = 152
objct = {
kind: "150 alchemy"
name: "pyramid flask"
objNm: "pyramid flask"
code: c
blocker: FALSE
sprite: ["sprite_potion_flask2", "sprite_potion_flask2_2", "sprite_potion_flask2_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 2
stack: 1
stackW: 0.1
stackV: 2
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "PYRAMID FLASK: Basic apparatus, you'll need a flask to mix ground ingredients into some liquid to have a quaffable potion. Pyramid flasks are well suited to potions that affect the mind, needing just the right shake."
}
ELSEIF objct = "hagoth leaf" ' 153
c = 153
objct = {
kind: "153 ingredients"
name: "hagoth leaf"
objNm: "hagoth leaf"
code: c
blocker: FALSE
sprite: ["sprite_ingr_hagothleaf", "sprite_ingr_hagothleaf_2", "sprite_ingr_hagothleaf_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 3
stack: 1
stackW: 0.3
stackV: 3
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "HAGOTH LEAF: A large broad red leaf of tropical origin with healing qualities, that dries into a cloth-like foldable material, discovered by the explorer Hagoth on the first of his two great sea expeditions."
}
ELSEIF objct = "gideontree root" ' 154
c = 154
objct = {
kind: "153 ingredients"
name: "gideontree root"
objNm: "gideontree root"
code: c
blocker: FALSE
sprite: ["sprite_ingr_gideontreeroot", "sprite_ingr_gideontreeroot_2", "sprite_ingr_gideontreeroot_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 2
stack: 1
stackW: 0.2
stackV: 2
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "GIDEONTREE ROOT: The gideontree is not a tree at all, but a small shrub with the root being larger than the top. Thus it is a hardy defensive plant, believed to be a source of long life."
}
ELSEIF objct = "moss sprig" ' 155
c = 155
objct = {
kind: "153 ingredients"
name: "moss sprig"
objNm: "moss sprig"
code: c
blocker: FALSE
sprite: ["sprite_ingr_moss_sprig", "sprite_ingr_moss_sprig_2", "sprite_ingr_moss_sprig_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 0
stack: 1
stackW: 0.1
stackV: 0
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "MOSS SPRIG: This bluish spongy moss smells especially pungent."
}
ELSEIF objct = "cotton thorn" ' 156
c = 156
objct = {
kind: "153 ingredients"
name: "cotton thorn"
objNm: "cotton thorn"
code: c
blocker: FALSE
sprite: ["sprite_ingr_cotton_thorn", "sprite_ingr_cotton_thorn_2", "sprite_ingr_cotton_thorn_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 1
stack: 1
stackW: 0.1
stackV: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "COTTON THORN: This reedy stalk is topped with a grey-tufted ball brandishing thin spikey thorns, yet the angles seem to absorb more light than they reflect, causing a fading effect of dim and darker areas that are hard to see."
}
ELSEIF objct = "black widow egg" ' 157
c = 157
objct = {
kind: "153 ingredients"
name: "black widow egg"
objNm: "black widow egg"
code: c
blocker: FALSE
sprite: ["sprite_ingr_blackWidowEgg", "sprite_ingr_blackWidowEgg_2", "sprite_ingr_blackWidowEgg_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 3
stack: 1
stackW: 0.5
stackV: 3
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "BLACK WIDOW EGG: A suprisingly heavy fibrous egg sack, you can see it writhing and wiggling, its inner life striving to break free."
}
ELSEIF objct = "flower of eden" ' 158
c = 158
objct = {
kind: "153 ingredients"
name: "flower of eden"
objNm: "flower of eden"
code: c
blocker: FALSE
sprite: ["sprite_ingr_flowerofEden", "sprite_ingr_flowerofEden_2", "sprite_ingr_flowerofEden_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 8
stack: 1
stackW: 0.2
stackV: 8
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "FLOWER OF EDEN: It is said Ze'ezrom himself cultivates this slow growing flower to mix into his tea, its aroma reminiscent of lemons and cinnamon."
}
ELSEIF objct = "centipede legs" ' 159
c = 159
objct = {
kind: "153 ingredients"
name: "centipede legs"
objNm: "centipede legs"
code: c
blocker: FALSE
sprite: ["sprite_ingr_centipedeLegs", "sprite_ingr_centipedeLegs_2", "sprite_ingr_centipedeLegs_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 15
stack: 1
stackW: 0.1
stackV: 15
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "CENTIPEDE LEGS: After carefully de-legging a dead centipede, you are now the proud possessor of exactly 100 tiny brittle centipede legs, proven by sages throughout history to cure warts, toe fungus, beetle bules, halitosis, worm fit, gadianton fever, lemuel's itch, nephitis, scrumpox, rose cold, and possibly scrivener's palsy (unconfirmed)."
}
ELSEIF objct = "book" ' 160
c = 160
objct = {
kind: "160 readable" ' This matters in saveInvItemDetails(), saveItemDetails()
name: "book"
objNm: "book"
code: c
blocker: FALSE
sprite: ["sprite_book", "sprite_book_2", "sprite_book_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 0 ' Will a value of 0 cause a problems?
equip: FALSE
'use: TRUE
read: TRUE ' both "use" and "read" are checked in workGenMenu() inventory section, getCreateItemDscr()
destroy: FALSE
}
effect: [prepBookInv]
dscr: 0
}
ELSEIF objct = "note" ' 161
c = 161
objct = {
kind: "160 readable"
name: "note"
objNm: "note"
code: c
blocker: FALSE
sprite: ["sprite_note", "sprite_note_2", "sprite_note_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 0 ' Will a value of 0 cause a problems?
equip: FALSE
}
airDrag: 0.3
dscr: 0
}
ELSEIF objct = "copper key" ' 170
c = 170
objct = {
kind: "170 key"
name: "copper key"
objNm: "copper key"
code: c
blocker: FALSE
sprite: ["sprite_copper_key", "sprite_copper_key_2", "sprite_copper_key_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 1
stack: 1 ' Stackable, and quantity
stackW: 0.2
stackV: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "COPPER KEY: An uninteresting dull copper key, commonly used for low security locks."
}
ELSEIF objct = "gate key" ' 171
c = 171
objct = {
kind: "170 key"
name: "gate key"
objNm: "gate key"
code: c
blocker: FALSE
sprite: ["sprite_gate_key", "sprite_gate_key_2", "sprite_gate_key_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 2
stack: 1
stackW: 0.3
stackV: 2
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "GATE KEY: A bracket-shaped key for a portcullis lock."
}
ELSEIF objct = "garnet" ' 180
c = 180
objct = {
kind: "180 gem"
name: "garnet"
objNm: "garnet"
code: c
blocker: FALSE
sprite: ["sprite_gem_garnet", "sprite_gem_garnet_2", "sprite_gem_garnet_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 30
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "GARNET: A multifaceted oval-shaped pyrope or ""fire eye"" gem about the size of your thumb, of a deep blood-red hue."
}
ELSEIF objct = "citrine" ' 181
c = 181
objct = {
kind: "180 gem"
name: "citrine"
objNm: "citrine"
code: c
blocker: FALSE
sprite: ["sprite_gem_citrine", "sprite_gem_citrine_2", "sprite_gem_citrine_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 50
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "CITRINE: Cut as a shallow blunted triangle, this quartz gem's smokey orangish yellow color reminds you of crystalized honey."
}
ELSEIF objct = "azurite" ' 182
c = 182
objct = {
kind: "180 gem"
name: "azurite"
objNm: "azurite"
code: c
blocker: FALSE
sprite: ["sprite_gem_azurite", "sprite_gem_azurite_2", "sprite_gem_azurite_3"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 70
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "AZURITE: An uncut copper carbonate stone, rounded and polished to a bright sheen, you feel as though you could swim in its mystical swirling blue depths."
}
ELSEIF objct = "seraphinite" ' 183
c = 183
objct = {
kind: "180 gem"
name: "seraphinite"
objNm: "seraphinite"
code: c
blocker: FALSE
sprite: ["sprite_gem_seraphinite", "sprite_gem_seraphinite_2", "sprite_gem_seraphinite_3"]
spriteDraw: FALSE
inven: {
weight: 0.2
value: 90
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "SERAPHINITE: Carved into a smooth, almost soft, rounded heart, this stormy green and white clinochlore stone is possessed of ethereal divine beauty."
}
ELSEIF objct = "moonstone" ' 190
c = 190
objct = {
kind: "190 junk"
name: "moonstone"
objNm: "moonstone"
code: c
blocker: FALSE
sprite: ["sprite_gem_moonstone", "sprite_gem_moonstone", "sprite_gem_moonstone"]
spriteDraw: FALSE
inven: {
weight: 0.3
value: 50
equip: FALSE
}
bright: 2
dM: 1.5
onLMap: FALSE
dscr: getCreateItemDscr(c) ' "MOONSTONE: A perfect sphere of polished orthoclase, its bluish white chatoyancy follows your eye as you turn it in your hand, while its adularescent glow emanates with power."
}
ELSEIF objct = "star block" ' 191
c = 191
objct = {
kind: "190 junk"
name: "star block"
objNm: "star block"
code: c
blocker: TRUE
flyBlocker: FALSE
sprite: ["sprite_starblock", "sprite_starblock_2", "sprite_starblock_3"]
spriteDraw: FALSE
inven: {
weight: 250
value: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "STAR BLOCK: A large and very heavy stone block which has been rough hewn into the shape of a four-pointed star."
}
ELSEIF objct = "barrel" ' 200
c = 200
objct = {
kind: "200 breakable"
name: "barrel"
objNm: "barrel"
code: c
blocker: TRUE
flyBlocker: FALSE
sprite: ["sprite_barrel", "sprite_barrel_2", "sprite_barrel_3"]
spriteDraw: FALSE
inven: {
weight: 215
value: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "BARREL: A surprisingly heavy large wooden barrel with thick sides. It is in such disrepair that it can be knocked apart if enough force is applied."
lit: -1 ' Objct.lit is usually for moving things, like monsters or flyItems, but also in this case needed for proper dmg txt brightness in prepDmgNum()
hth: 15
max: 15
dex: 0
def: [ 2,-1,-1,10,100 ]
exp: 0
stepN: 0
contents: []
' dmg: []
}
ELSEIF objct = "crate" ' 201
c = 201
objct = objctInfo("barrel")
objct.Append( {
name: "crate"
objNm: "crate"
code: c
sprite: ["sprite_crate1", "sprite_crate1_2", "sprite_crate1_3"]
inven: {
weight: 45
value: 1
equip: FALSE
}
dscr: getCreateItemDscr(c) ' "CRATE: A roughly constructed wooden storage box with a lid that has been nailed shut. It doesn't appear very strong and could be knocked apart with a few hits."
hth: 10
max: 10
def: [ 1,-1,-1,10,100]
} )
ELSEIF objct = "dried batwing" ' 220
c = 220
objct = {
kind: "220 food"
name: "dried batwing"
objNm: "dried batwing"
code: c
blocker: FALSE
sprite: ["sprite_food_batwing", "sprite_food_batwing_2", "sprite_food_batwing_3"]
spriteDraw: FALSE
inven: {
weight: 0.1
value: 1
stack: 1
stackW: 0.1
stackV: 1
equip: FALSE
use: TRUE
destroy: TRUE
foodAmt: 5
}
effect: [eatFood]
dscr: getCreateItemDscr(c)
}
ELSEIF objct = "magic missile" ' 244
c = 244
objct = {
kind: "050 ammo"
name: "magic missile"
objNm: "magic missile"
code: c
blocker: FALSE
animSprite: ["anim_mmiss7", "anim_mmiss7", "anim_mmiss7"] ' No dimmer versions
spriteDraw: FALSE
inven: {
weight: 0.1
value: 1
stack: 1
stackW: 0.1
stackV: 1
equip: TRUE
slot: "ield"
eqp1: "equip other"
equipped: FALSE
eqSlot: ""
cd: 4 ' Cooldown, in cycles
}
frPlyr: FALSE
att: [ 3,0,2,2,0 ]
sndInfo: ["magicMis", 3, 350]
sticky: TRUE
deflect: TRUE
facing: 0
bright: 2
dM: 1
poof: TRUE
onLMap: FALSE
'LY: 0
'LX: 0
dscr: getCreateItemDscr(c) ' "MAGIC MISSILE: An impactful energy bolt, not to be taken lightly."
}

'============== MONSTERS ===============
ELSEIF objct = "slime" ' 1
objct = {
kind: "mon" ' BASE
name: "purple slime"
objNm: "slime"
code: 1
blocker: TRUE ' BASE
animSprite: ["anim_mon_slime", "anim_mon_slime_2", "anim_mon_slime_3"]
spriteDraw: FALSE ' BASE
id: 0 ' BASE ' Monster ID, generated in makeMon()
curY: 0 ' BASE
curX: 0 ' BASE
cy: 0 ' BASE
cx: 0 ' BASE
cR: 0 ' BASE
facing: 0 ' BASE
preDoor: [] ' BASE ' For door popping y/x
lit: -1 ' BASE
timr: 0 ' BASE
nudgeTimr: -1
stepping: FALSE ' BASE
stepN: 0 ' BASE
seePlayer: FALSE ' BASE
sleep: FALSE ' BASE
speed: 10
spBase: 10 '
visn: 4 '
hth: 25
'hth: 50 ' FOR TESTING
max: 25
dex: 10
str: 6
con: 10
att: [ 2,0,0,0,2 ]
def: [ 2,0,0,-2,100 ] '
'exp: 5 ' 5 '
exp: 1000 ' TESTING
pLev: 0 '
contents: [] ' BASE '
' dmg: [] ' BASE '
}
ELSEIF objct = "bat" ' 2
objct = objctInfo("slime")
objct.Append( {
name: "huge bat"
objNm: "bat"
code: 2
animSprite: ["anim_mon_bat", "anim_mon_bat_2", "anim_mon_bat_3"]
speed: 10
spBase: 10
visn: 5
hth: 20
max: 20
dex: 15
str: 8
con: 10
att: [ 4,0,0,0,1 ] ' A little psn dmg
def: [ 1,0,-1,0,1 ] '
exp: 10
pLev: 1
} )
ELSEIF objct = "bbat" ' 5
objct = objctInfo("bat")
objct.Append( {
name: "blind bat"
objNm: "bbat"
code: 5
visn: 1
} )
ELSEIF objct = "rat" ' 3
objct = objctInfo("slime")
objct.Delete("animSprite")
objct.Append( {
name: "huge rat"
objNm: "rat"
code: 3
animSpriteZ: [ ["anim_mon_rat0", "anim_mon_rat0_2", "anim_mon_rat0_3"]
["anim_mon_rat1", "anim_mon_rat1_2", "anim_mon_rat1_3"]
["anim_mon_rat2", "anim_mon_rat2_2", "anim_mon_rat2_3"]
["anim_mon_rat3", "anim_mon_rat3_2", "anim_mon_rat3_3"] ]
speed: 10
spBase: 10
visn: 5 ' Default 5
hth: 35
max: 35
dex: 12
str: 10
con: 10
att: [ 5,0,0,0,0 ]
def: [ 2,-1,0,0,0 ] ' Slight weakness to fire
exp: 10
pLev: 1 ' Matching player level for 1-to-1 exp
contents: [objctInfo("opal ring")] '
} )
ELSEIF objct = "ratsee" ' 6 ' A far seeing rat for pathfinding testing
objct = objctInfo("rat")
objct.Append( {
objNm: "ratsee"
code: 6
'speed: 3
speed: 15
'spBase: 3
spBase: 15
visn: 15 ' To see almost the whole room
'hth: 10
hth: 100
'max: 10
max: 100
exp: 3
contents: []
} )

ELSEIF objct = "flame" ' 4
objct = objctInfo("slime")
objct.Append( {
name: "flame sprite"
objNm: "flame"
code: 4
animSprite: ["anim_mon_elemfire", "anim_mon_elemfire", "anim_mon_elemfire"] ' Always bright
speed: 6
spBase: 6
visn: 4
hth: 30
max: 30
dex: 15
str: 20
con: 15
att: [ 6,4,0,0,0 ] ' Some fire dmg
def: [ 2,100,0,-8,0 ] '
exp: 20
pLev: 2
bright: 3 ' Read by updateLMapObjct()
dM: 1 ' Distance multiplier
onLMap: FALSE ' Flag to track if Item is on LMap or not
'LY: 0 '
'LX: 0
} )
END IF
RETURN objct
END FUNCTION
0 Kudos
9 REPLIES 9
squirreltown
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

Is there code after #3394?
what changed between now and the last time it worked?

Never seen this but it doesn't sound like a bug, it seems pretty definite.
I can't see how the content would matter but the size of something sure does. Biggest .brs file I could find of mine has 84,000 chrs.
Kinetics Screensavers
0 Kudos
NB_
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

I am most curious what that error means - and perhaps RokuKC will shed some light.

But in the mean time, @Komag... don't you notice how this massive if-elseif-elseif-...ad-nauseam resembles a dictionary (roAA)?

Say initially you create a catalog in main() or such:

m.WHOLE_EARTH_CATALOG = {
   blocker: {
       kind: "infoTh"
       'kind: "block" ' If we use this, then it would block flying Items, I think I don't want that
       name: "blocker"
       objNm: "blocker"
       blocker: TRUE
       'vis: FALSE
       swap: TRUE
   }
   handL: {
       sprite: ["sprite_handL", "sprite_handL_2", "sprite_handL_3"]
   }
   handR: {
       sprite: ["sprite_handR", "sprite_handR_2", "sprite_handR_3"]
   }
   "short sword": {
       kind: "005 sword"
       name: "short sword"
       objNm: "short sword"
       code: 5
       blocker: FALSE
       sprite: ["sprite_sword1", "sprite_sword1_2", "sprite_sword1_3"]
       spriteDraw: FALSE
       inven: {
           weight: 1
           value: 5
           equip: TRUE
           slot: "ield" ' Match last 4 of "right wield" OR "left wield"
           eqp1: "equip other"
           equipped: FALSE
           eqSlot: "" ' For exact slot name
           cd: 8 ' Cooldown, in cycles
       }
       statsArr: [ ["att", 2] ]
       dscr: getCreateItemDscr(5) ' "SHORT SWORD: A short sturdy blade of iron, simple and effective."
   }
   cutlass: {
       objct = {
       kind: "005 sword"
       name: "cutlass"
       objNm: "cutlass"
       code: 6
       blocker: FALSE
       sprite: ["sprite_sword2", "sprite_sword2_2", "sprite_sword2_3"]
       spriteDraw: FALSE
       inven: {
           weight: 1.2
           value: 8
           equip: TRUE
           slot: "ield" ' Match last 4 of "right wield" OR "left wield"
           eqp1: "equip other"
           equipped: FALSE
           eqSlot: "" ' For exact slot name
           cd: 10 ' Cooldown, in cycles
       }
       statsArr: [ ["att", 3] ]
       dscr: getCreateItemDscr(6) ' "CUTLASS: Nautical in design, with a slight curve like the bow of a ship, this blade will stab and slice as you see fit."
   }
   ...
}


Then later when you need to find an object in some method (so m is not global), it's as simple as asking for
glbl = getGlobalAA()
' then do something with '
glbl.WHOLE_EARTH_CATALOG.cutlass
glbl.WHOLE_EARTH_CATALOG["short sword"]
No chained if-s, works very fast.

Now there are caveats to that - say these objects are not constants and you don't want when you create two different ones - cutlass1 and cutlass2 - and don't want when changing properties of cutlass1 (say change slot-equipped or make visible or make it dull) - don't want the same to happen to cutlass2? Then that means you need to create a copy from the WHOLE_EARTH_CATALOG samples/models/templates. If models are "flat" (i.e. single-depth of roAA), that's as easy as
newCutlass = { }
newCutlass.append(glbl.WHOLE_EARTH_CATALOG.cutlass) ' shallow copy

And so you have it. If you want to kick it up a notch, for a multi-level "deep copy"? The look for a deepCopy function (there must have been a few here in the forum) - but absolutely the laziest way to make a deep copy - that will work in many cases - is to do
newCutlass = parseJSON(formatJSON(glbl.WHOLE_EARTH_CATALOG.cutlass))

Bam!
0 Kudos
Komag
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

"squirreltown" wrote:
Is there code after #3394?
what changed between now and the last time it worked?

The function ends right after returning the object. The last thing I did was add one more object, so I think I must have just gone over some limit with it.

I recounted - it's 233 things (the first IF and 232 ELSEIF's), and if I comment out one of them, even a small one, it all works again.

I'll try changing it to an Associative Array (probably something I should have done LONG ago, but the current approach is just what I was able to come up with in my early days learning to program this game).

How big can a dictionary be? How much memory would it take up if I keep it global like that?
0 Kudos
squirreltown
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

"Komag" wrote:

I recounted - it's 233 things (the first IF and 232 ELSEIF's), and if I comment out one of them, even a small one, it all works again.

That is really interesting. I remember the variables/functions were limited to 256 at one time, but i swear that got raised to 65000 or something. I agree with writing it differently though, i would have started looking over my shoulder long before 100 elseif's. 🙂
Kinetics Screensavers
0 Kudos
NB_
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

"Komag" wrote:
How big can a dictionary be?

Pretty big. Theoretically unlimited, current implementation will work decent with thousands and hit performance wall with tens of thousands and above - but that can be extended in another release. Now how big a dictionary literal (i.e. literally constructing it in one swoop within curly brackets as above) can be, i haven't tried - maybe there is a compiler limit and you'll come by to let us know

How much memory would it take up if I keep it global like that?

don't worry about it, insignificant in the big picture of things
0 Kudos
Komag
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

Okay, after a BUNCH of work, I've changed the system. It was harder than I thought because I had many instances of causing a stack overflow by an endless recursion due some aspect of an item definition depending on calling the Function itself to first set up a "base" item to alter. Then I had to change my whole approach of naming the keys (thank goodness you can now use strings directly). 

Anyway, now it's working great with no error's yet, we'll see how it goes.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

"Komag" wrote:
This is a new error I've never seen before:

*** ERROR compiling /pkg:/source/obj.brs:
Internal limit size exceeded. (compile error &hae) in pkg:/source/obj.brs(3394)

Line 3394 is the "END IF" of a very large IF statement with many many ELSEIF lines. This is my object list for all Things and Items in the game. I've never heard of a limit like this - what is the limit? I'll probably just have to restructure how I do it, but if there is any insight, that would be appreciated.

A quick count is about 240 ELSEIF lines


There is currently a limit of 255 jumps (either compiler generated or goto labels) within a function, which is being exceeded with all the elseifs in your function.
0 Kudos
Komag
Roku Guru

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

Hmm, okay, so some other things must be "jumps" too, such as other Function calls maybe, so added to the 232 ELSEIF's got up over the 255 limit.
0 Kudos
RokuKC
Roku Employee
Roku Employee

Re: "Internal limit size exceeded" compile error - function with lots of "elseif"s

"Komag" wrote:
Hmm, okay, so some other things must be "jumps" too, such as other Function calls maybe, so added to the 232 ELSEIF's got up over the 255 limit.


I wouldn't expect regular function calls to be an issue, but probably FOR / WHILE loops as well as IF.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.