• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Lua Monsters and RME

nugo

Australia OT Mapper
Joined
Apr 1, 2009
Messages
396
Solutions
4
Reaction score
194
Hello all,

I have been experimenting with lua monsters, one little issue i have run into and just wana double check im not missing somthing stupid.

so RME can only import monster files with extension .xml (im using 3.7 the latest release). To load my exisiting monsters i have been creating blank .xml files with the monsters name so i can import and then just leaving the lua monster inside its folder to load

eg:

if i want to load a demon

1. i create demon.xml (place holder, maybe set the looktype to demon so i can see it in RME better but everything else is blank template)
2. i import demon.xml
3. i dont register demon.xml in monster.xlm file because i dont want the server to load the xml version
4. i place demon.lua inside the monster directory
5. server loads demon.lua as it should.

This trick works but is a little teidious

im just wondering if their is some easy way to just import a lua monsters strait into RME?

Cheers
 
Solution
E
just add the monster manually to RME creatures.xml

C:\Users\USER\AppData\Roaming\Remere's Map Editor\data\1098
@Evil Puncker

should be a seperate thread but dont wana spam

Am i correct in saying that current TFS cant load lua monster loot if its in text form.

it appears to be able to load loot if its in item ID form


is their somthing im missing? has TFS master branch not had the requires sourced edit to read in text form.

The #example lua monster does have loot as text and ID


Lua:
monster.loot = {
    {id = "gold coin", chance = 60000, maxCount = 100},
    {id = 1987, chance = 60000, -- bag
        child = {
            {id = "platinum coin", chance = 60000, maxCount = 100},
            {id = "crystal coin", chance = 60000, maxCount = 100}
        }
    }
}

am i missing somthing?

i am using current tfs master branch
 
Last edited:
@Evil Puncker

should be a seperate thread but dont wana spam

Am i correct in saying that current TFS cant load lua monster loot if its in text form.

it appears to be able to load loot if its in item ID form


is their somthing im missing? has TFS master branch not had the requires sourced edit to read in text form.

The #example lua monster does have loot as text and ID


Lua:
monster.loot = {
    {id = "gold coin", chance = 60000, maxCount = 100},
    {id = 1987, chance = 60000, -- bag
        child = {
            {id = "platinum coin", chance = 60000, maxCount = 100},
            {id = "crystal coin", chance = 60000, maxCount = 100}
        }
    }
}

am i missing somthing?

i am using current tfs master branch
I don't know about the text option...
But for common items like coins you can use the variables, which are just id's with text assigned to them

Lua:
monster.loot = {
    {id = ITEM_GOLD_COIN, chance = 60000, maxCount = 100},
    {id = 1987, chance = 60000, -- bag
        child = {
            {id = ITEM_PLATINUM_COIN, chance = 60000, maxCount = 100},
            {id = ITEM_CRYSTAL_COIN, chance = 60000, maxCount = 100}
        }
    }
}
 
I don't know about the text option...
But for common items like coins you can use the variables, which are just id's with text assigned to them

Lua:
monster.loot = {
    {id = ITEM_GOLD_COIN, chance = 60000, maxCount = 100},
    {id = 1987, chance = 60000, -- bag
        child = {
            {id = ITEM_PLATINUM_COIN, chance = 60000, maxCount = 100},
            {id = ITEM_CRYSTAL_COIN, chance = 60000, maxCount = 100}
        }
    }
}
I was experimenting to see what i could get away with, take an insane_siren from OTserverbr for example, its loot is in text


Lua:
monster.loot = {
    {name = "Platinum Coin", chance = 100000, maxCount = 12},
    {name = "Ultimate Health Potion", chance = 14970},
    {name = "Miraculum", chance = 13090},
    {name = "Dream Essence Egg", chance = 11980},
    {name = "Wand of Draconia", chance = 7700},
    {name = "Holy Orchid", chance = 5650},
    {name = "Magma Amulet", chance = 5130},
    {name = "Wand of Inferno", chance = 4360},
    {name = "Fire Axe", chance = 3590},
    {name = "Magma Coat", chance = 3340},
    {name = "Wand of Dragonbreath", chance = 2650},
    {name = "Sun Fruit", chance = 2570},
    {name = "Magma Legs", chance = 1200},
    {name = "Magma Monocle", chance = 260}
}

gDahbFB.png


masterbranch TFS cant load it but in the example lua monster for master branch it has

Code:
{id = "gold coin", chance = 60000, maxCount = 100},

as text. I tried looking at sources for masterbranch vs otserverbr but im not the best at interperting C++. Ill have a proper look at sources soon and see if i can find it.

my question is has tfs masterbranch had the required source edit to load items as text or am i just retarded and missing somthing.
 
I was experimenting to see what i could get away with, take an insane_siren from OTserverbr for example, its loot is in text


Lua:
monster.loot = {
    {name = "Platinum Coin", chance = 100000, maxCount = 12},
    {name = "Ultimate Health Potion", chance = 14970},
    {name = "Miraculum", chance = 13090},
    {name = "Dream Essence Egg", chance = 11980},
    {name = "Wand of Draconia", chance = 7700},
    {name = "Holy Orchid", chance = 5650},
    {name = "Magma Amulet", chance = 5130},
    {name = "Wand of Inferno", chance = 4360},
    {name = "Fire Axe", chance = 3590},
    {name = "Magma Coat", chance = 3340},
    {name = "Wand of Dragonbreath", chance = 2650},
    {name = "Sun Fruit", chance = 2570},
    {name = "Magma Legs", chance = 1200},
    {name = "Magma Monocle", chance = 260}
}

gDahbFB.png


Yet masterbranch TFS cant load it but in the example lua monster for master branch it has

Code:
{id = "gold coin", chance = 60000, maxCount = 100},

as text. I tried looking at sources for masterbranch vs otserverbr but im not the best at interperting C++.

my question is has tfs masterbranch had the required source edit to load items as text or am i just retarded and missing somthing.
Untitled.png

I activated the example monster, and made it's health 5k, otherwise no changes.

Untitled.png

Looks like your major issue was using "name" instead of "id"
Lua:
monster.loot = {
    {id = "Platinum Coin", chance = 100000, maxCount = 12},
    {id = "Ultimate Health Potion", chance = 14970},
    {id = "Miraculum", chance = 13090},
    {id = "Dream Essence Egg", chance = 11980},
    {id = "Wand of Draconia", chance = 7700},
    {id = "Holy Orchid", chance = 5650},
    {id = "Magma Amulet", chance = 5130},
    {id = "Wand of Inferno", chance = 4360},
    {id = "Fire Axe", chance = 3590},
    {id = "Magma Coat", chance = 3340},
    {id = "Wand of Dragonbreath", chance = 2650},
    {id = "Sun Fruit", chance = 2570},
    {id = "Magma Legs", chance = 1200},
    {id = "Magma Monocle", chance = 260}
}
 
View attachment 55553

I activated the example monster, and made it's health 5k, otherwise no changes.

View attachment 55554

Looks like your major issue was using "name" instead of "id"
Lua:
monster.loot = {
    {id = "Platinum Coin", chance = 100000, maxCount = 12},
    {id = "Ultimate Health Potion", chance = 14970},
    {id = "Miraculum", chance = 13090},
    {id = "Dream Essence Egg", chance = 11980},
    {id = "Wand of Draconia", chance = 7700},
    {id = "Holy Orchid", chance = 5650},
    {id = "Magma Amulet", chance = 5130},
    {id = "Wand of Inferno", chance = 4360},
    {id = "Fire Axe", chance = 3590},
    {id = "Magma Coat", chance = 3340},
    {id = "Wand of Dragonbreath", chance = 2650},
    {id = "Sun Fruit", chance = 2570},
    {id = "Magma Legs", chance = 1200},
    {id = "Magma Monocle", chance = 260}
}
Yea i know they spawn as ID and not as name, otserverBR can load loot as name or ID, i was curious if TFS had the capability aswell


EDIT:
wait did you load the loot as text on the example monster or did you change them all to itemID for your test?
 
Yea i know they spawn as ID and not as name, otserverBR can load loot as name or ID, i was curious if TFS had the capability aswell
Yeah.. I just used the item names in that test. lol
just don't use "name" use "id" like I showed above.
 
Back
Top