• 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!

TFS 1.X+ Nostalrius 7.7 - Editing monster spell chances

Mr Psaico

Banned User
Joined
May 13, 2020
Messages
22
Solutions
1
Reaction score
13
Hi all,

I'm currently working on a Nostalrius 7.7 remake, the monsters are not as they should be with shooting spells so id like to go through them all.

For example when fighting a Dragon lord, it hardly used any spells or shots atall. It does the occasional GFB or firebomb, but firewave is really rare.

Here is a copy of the dragon lord file:
XML:
<?xml version="1.0" encoding="UTF - 8"?>
<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="60" manacost="0">
    <health now="1900" max="1900" />
    <look type="39" head="0" body="0" legs="0" feet="0" corpse="4062" />
    <targetchange interval="1000" chance="5" />
    <targetstrategy nearest="70" weakest="10" mostdamage="10" random="10" />
    <flags>
        <flag summonable="0" />
        <flag attackable="1" />
        <flag hostile="1" />
        <flag illusionable="1" />
        <flag convinceable="0" />
        <flag pushable="0" />
        <flag canpushitems="1" />
        <flag canpushcreatures="1" />
        <flag targetdistance="1" />
        <flag runonhealth="300" />
    </flags>
    <attacks attack="55" skill="65">
        <attack name="fire" min="-120" max="-180" range="7" radius="4" target="1" chance="6">
            <attribute key="shootEffect" value="fire" />
            <attribute key="areaEffect" value="firearea" />
        </attack>
        <attack name="firefield" range="7" radius="4" target="1" chance="7">
            <attribute key="shootEffect" value="fire" />
        </attack>
        <attack name="fire" min="-150" max="-250" length="8" spread="3" chance="6">
            <attribute key="areaEffect" value="firearea" />
        </attack>
    </attacks>
    <defenses armor="32" defense="48">
        <defense name="healing" min="57" max="93" chance="4">
            <attribute key="areaEffect" value="blueshimmer" />
        </defense>
    </defenses>
    <immunities>
        <immunity fire="1" />
        <immunity lifedrain="1" />
        <immunity paralyze="1" />
        <immunity poison="1" />
        <immunity invisible="1" />
    </immunities>
    <voices>
        <voice sentence="ZCHHHHH" yell="1" />
        <voice sentence="YOU WILL BURN!" yell="1" />
    </voices>
    <loot>
        <item id="2842" countmax="1" chance="90" /> <!-- a book -->
        <item id="3583" countmax="5" chance="600" /> <!-- dragon ham -->
        <item id="3386" countmax="1" chance="1" /> <!-- a dragon scale mail -->
        <item id="3051" countmax="1" chance="50" /> <!-- an energy ring -->
        <item id="3280" countmax="1" chance="3" /> <!-- a fire sword -->
        <item id="3031" countmax="100" chance="800" /> <!-- a gold coin -->
        <item id="3031" countmax="100" chance="600" /> <!-- a gold coin -->
        <item id="3031" countmax="50" chance="400" /> <!-- a gold coin -->
        <item id="2903" countmax="1" chance="30" /> <!-- a golden mug -->
        <item id="3732" countmax="1" chance="120" /> <!-- a green mushroom -->
        <item id="3061" countmax="1" chance="6" /> <!-- a life crystal -->
        <item id="3450" countmax="1" chance="60" /> <!-- a power bolt -->
        <item id="3392" countmax="1" chance="2" /> <!-- a royal helmet -->
        <item id="3029" countmax="1" chance="50" /> <!-- a small sapphire -->
        <item id="3373" countmax="1" chance="4" /> <!-- a strange helmet -->
        <item id="3428" countmax="1" chance="3" /> <!-- a tower shield -->
    </loot>
</monster>

I already changed the chance on each of those attack's but it's as if they make no difference atall when changed, Is there anywhere else i can go to edit this as it may be a deeper setting thats affecting this.

Thanks
 
Hi all,

I'm currently working on a Nostalrius 7.7 remake, the monsters are not as they should be with shooting spells so id like to go through them all.

For example when fighting a Dragon lord, it hardly used any spells or shots atall. It does the occasional GFB or firebomb, but firewave is really rare.

Here is a copy of the dragon lord file:
XML:
<?xml version="1.0" encoding="UTF - 8"?>
<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="60" manacost="0">
    <health now="1900" max="1900" />
    <look type="39" head="0" body="0" legs="0" feet="0" corpse="4062" />
    <targetchange interval="1000" chance="5" />
    <targetstrategy nearest="70" weakest="10" mostdamage="10" random="10" />
    <flags>
        <flag summonable="0" />
        <flag attackable="1" />
        <flag hostile="1" />
        <flag illusionable="1" />
        <flag convinceable="0" />
        <flag pushable="0" />
        <flag canpushitems="1" />
        <flag canpushcreatures="1" />
        <flag targetdistance="1" />
        <flag runonhealth="300" />
    </flags>
    <attacks attack="55" skill="65">
        <attack name="fire" min="-120" max="-180" range="7" radius="4" target="1" chance="6">
            <attribute key="shootEffect" value="fire" />
            <attribute key="areaEffect" value="firearea" />
        </attack>
        <attack name="firefield" range="7" radius="4" target="1" chance="7">
            <attribute key="shootEffect" value="fire" />
        </attack>
        <attack name="fire" min="-150" max="-250" length="8" spread="3" chance="6">
            <attribute key="areaEffect" value="firearea" />
        </attack>
    </attacks>
    <defenses armor="32" defense="48">
        <defense name="healing" min="57" max="93" chance="4">
            <attribute key="areaEffect" value="blueshimmer" />
        </defense>
    </defenses>
    <immunities>
        <immunity fire="1" />
        <immunity lifedrain="1" />
        <immunity paralyze="1" />
        <immunity poison="1" />
        <immunity invisible="1" />
    </immunities>
    <voices>
        <voice sentence="ZCHHHHH" yell="1" />
        <voice sentence="YOU WILL BURN!" yell="1" />
    </voices>
    <loot>
        <item id="2842" countmax="1" chance="90" /> <!-- a book -->
        <item id="3583" countmax="5" chance="600" /> <!-- dragon ham -->
        <item id="3386" countmax="1" chance="1" /> <!-- a dragon scale mail -->
        <item id="3051" countmax="1" chance="50" /> <!-- an energy ring -->
        <item id="3280" countmax="1" chance="3" /> <!-- a fire sword -->
        <item id="3031" countmax="100" chance="800" /> <!-- a gold coin -->
        <item id="3031" countmax="100" chance="600" /> <!-- a gold coin -->
        <item id="3031" countmax="50" chance="400" /> <!-- a gold coin -->
        <item id="2903" countmax="1" chance="30" /> <!-- a golden mug -->
        <item id="3732" countmax="1" chance="120" /> <!-- a green mushroom -->
        <item id="3061" countmax="1" chance="6" /> <!-- a life crystal -->
        <item id="3450" countmax="1" chance="60" /> <!-- a power bolt -->
        <item id="3392" countmax="1" chance="2" /> <!-- a royal helmet -->
        <item id="3029" countmax="1" chance="50" /> <!-- a small sapphire -->
        <item id="3373" countmax="1" chance="4" /> <!-- a strange helmet -->
        <item id="3428" countmax="1" chance="3" /> <!-- a tower shield -->
    </loot>
</monster>

I already changed the chance on each of those attack's but it's as if they make no difference atall when changed, Is there anywhere else i can go to edit this as it may be a deeper setting thats affecting this.

Thanks
The chance is % per turn
<flag staticattack="80"/>


Here's my dl
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="200" manacost="0">
    <health now="1900" max="1900"/>
    <look type="39" corpse="2881"/>
    <targetchange interval="1000" chance="5"/>
    <targetstrategies nearest="70" health="10" damage="10" random="10"/>
    <flags>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag summonable="0"/>
        <flag convinceable="0"/>
        <flag illusionable="1"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="80"/>
        <flag runonhealth="300"/>
    </flags>
    <attacks>
        <attack name="melee" skill="65" attack="55"/>
        <attack name="fire" chance="17" range="7" radius="4" target="1" min="-120" max="-180">
            <attribute key="shootEffect" value="fire"/>
            <attribute key="areaEffect" value="firearea"/>
        </attack>
        <attack name="firefield" chance="15" range="7" radius="4" target="1">
            <attribute key="shootEffect" value="fire"/>
        </attack>
        <attack name="fire" chance="17" length="8" spread="3" min="-150" max="-250">
            <attribute key="areaEffect" value="firearea"/>
        </attack>
    </attacks>
    <defenses armor="32" defense="48">
        <defense name="healing" chance="25" min="57" max="93">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element firePercent="100"/>
        <element earthPercent="35"/>
    </elements>
    <immunities>
        <immunity lifedrain="1"/>
        <immunity paralyze="1"/>
        <immunity invisible="1"/>
        <immunity fire="1"/>
    </immunities>
    <voices interval="1000" chance="5">
        <voice sentence="ZCHHHHH" yell="1"/>
        <voice sentence="YOU WILL BURN!" yell="1"/>
    </voices>
    <loot>
        <item id="2672" chance="60000" countmax="5"/><!-- 5 60% dragon ham -->
        <item id="2796" chance="12000"/><!-- 12% green mushroom -->
        <item id="2148" chance="80000" countmax="100"/><!-- 100 80% gold coin -->
        <item id="2148" chance="40000" countmax="50"/><!-- 50 40% gold coin-->
        <item id="2148" chance="60000" countmax="100"/><!-- 100 60% gold coin-->
        <item id="2146" chance="5000"/><!-- 5% small sapphire -->
        <item id="2547" chance="6000"/><!-- 6% power bolt -->
        <item id="2177" chance="600"/><!-- 0.6% life crystal -->
        <item id="1976" chance="9000"/><!-- 9% gemmed book -->
        <item id="2033" chance="3000"/><!-- 3% golden mug -->
        <item id="2479" chance="400"/><!-- 0.4% strange helmet -->
        <item id="2492" chance="100"/><!-- 0.1% dragon scale mail -->
        <item id="2498" chance="200"/><!-- 0.2% royal helmet -->
        <item id="5948" chance="1040"/><!-- red dragon leather -->
        <item id="5882" chance="1920"/><!-- red dragon scale -->
        <item id="1987" chance="100000"><!-- bag -->
           
                <item id="2392" chance="300"/><!-- 0.3% fire sword -->
                <item id="2528" chance="300"/><!-- 0.3% tower shield -->
                <item id="2167" chance="5000"/><!-- 5% energy ring -->
                <item id="7402" chance="10"/><!-- dragon slayer -->
                <item id="7378" countmax="3" chance="80"/><!-- royal spear -->
                <item id="7399" chance="80"/><!-- dragon lord trophy -->
           
        </item>
    </loot>
</monster>
(if you want to use it, make sure you edit out newer items that do not exist in your version, and remove "elements".)
 
The chance is % per turn
<flag staticattack="80"/>


Here's my dl
Lua:
<?xml version="1.0" encoding="UTF-8"?>
<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="200" manacost="0">
    <health now="1900" max="1900"/>
    <look type="39" corpse="2881"/>
    <targetchange interval="1000" chance="5"/>
    <targetstrategies nearest="70" health="10" damage="10" random="10"/>
    <flags>
        <flag attackable="1"/>
        <flag hostile="1"/>
        <flag summonable="0"/>
        <flag convinceable="0"/>
        <flag illusionable="1"/>
        <flag pushable="0"/>
        <flag canpushitems="1"/>
        <flag canpushcreatures="1"/>
        <flag targetdistance="1"/>
        <flag staticattack="80"/>
        <flag runonhealth="300"/>
    </flags>
    <attacks>
        <attack name="melee" skill="65" attack="55"/>
        <attack name="fire" chance="17" range="7" radius="4" target="1" min="-120" max="-180">
            <attribute key="shootEffect" value="fire"/>
            <attribute key="areaEffect" value="firearea"/>
        </attack>
        <attack name="firefield" chance="15" range="7" radius="4" target="1">
            <attribute key="shootEffect" value="fire"/>
        </attack>
        <attack name="fire" chance="17" length="8" spread="3" min="-150" max="-250">
            <attribute key="areaEffect" value="firearea"/>
        </attack>
    </attacks>
    <defenses armor="32" defense="48">
        <defense name="healing" chance="25" min="57" max="93">
            <attribute key="areaEffect" value="blueshimmer"/>
        </defense>
    </defenses>
    <elements>
        <element firePercent="100"/>
        <element earthPercent="35"/>
    </elements>
    <immunities>
        <immunity lifedrain="1"/>
        <immunity paralyze="1"/>
        <immunity invisible="1"/>
        <immunity fire="1"/>
    </immunities>
    <voices interval="1000" chance="5">
        <voice sentence="ZCHHHHH" yell="1"/>
        <voice sentence="YOU WILL BURN!" yell="1"/>
    </voices>
    <loot>
        <item id="2672" chance="60000" countmax="5"/><!-- 5 60% dragon ham -->
        <item id="2796" chance="12000"/><!-- 12% green mushroom -->
        <item id="2148" chance="80000" countmax="100"/><!-- 100 80% gold coin -->
        <item id="2148" chance="40000" countmax="50"/><!-- 50 40% gold coin-->
        <item id="2148" chance="60000" countmax="100"/><!-- 100 60% gold coin-->
        <item id="2146" chance="5000"/><!-- 5% small sapphire -->
        <item id="2547" chance="6000"/><!-- 6% power bolt -->
        <item id="2177" chance="600"/><!-- 0.6% life crystal -->
        <item id="1976" chance="9000"/><!-- 9% gemmed book -->
        <item id="2033" chance="3000"/><!-- 3% golden mug -->
        <item id="2479" chance="400"/><!-- 0.4% strange helmet -->
        <item id="2492" chance="100"/><!-- 0.1% dragon scale mail -->
        <item id="2498" chance="200"/><!-- 0.2% royal helmet -->
        <item id="5948" chance="1040"/><!-- red dragon leather -->
        <item id="5882" chance="1920"/><!-- red dragon scale -->
        <item id="1987" chance="100000"><!-- bag -->
          
                <item id="2392" chance="300"/><!-- 0.3% fire sword -->
                <item id="2528" chance="300"/><!-- 0.3% tower shield -->
                <item id="2167" chance="5000"/><!-- 5% energy ring -->
                <item id="7402" chance="10"/><!-- dragon slayer -->
                <item id="7378" countmax="3" chance="80"/><!-- royal spear -->
                <item id="7399" chance="80"/><!-- dragon lord trophy -->
          
        </item>
    </loot>
</monster>
(if you want to use it, make sure you edit out newer items that do not exist in your version, and remove "elements".)

Just finished trying this code mate, I had to remove the 'staticattack' on line 17 since it didn't recognise it. I also had to edit the meele attack 21 as 'melee attack' is not recognised on here.

Finally i also had to edit line 6 to
XML:
    <targetstrategy nearest="70" weakest="10" mostdamage="10" health="10" damage="10" random="10"/>
Since it asks for weakest and mostdamage to be able to run.

However with all of these changes and then starting it back up, it still did not run properly, i dropped the attack skill so that all it could hit on me was fire and within 4 minutes I counted 2 firebomb shots and 1 fire wave.

I really have no idea what could be limiting this :/
 
Try adding
interval="1000"

<attack name="firefield" interval="1000" chance="15" range="7" radius="4" target="1">
<attribute key="shootEffect" value="fire"/>
</attack>
 
idk if you fixed this, but there was an update to the distro.

the source was using the wrong type of random generator, your need to use uniform_random instead of whatever it's using, which is a weighted random.

 
Hi all,

I'm currently working on a Nostalrius 7.7 remake, the monsters are not as they should be with shooting spells so id like to go through them all.

For example when fighting a Dragon lord, it hardly used any spells or shots atall. It does the occasional GFB or firebomb, but firewave is really rare.

Here is a copy of the dragon lord file:
XML:
<?xml version="1.0" encoding="UTF - 8"?>
<monster name="dragon lord" nameDescription="a dragon lord" race="blood" experience="2100" speed="60" manacost="0">
    <health now="1900" max="1900" />
    <look type="39" head="0" body="0" legs="0" feet="0" corpse="4062" />
    <targetchange interval="1000" chance="5" />
    <targetstrategy nearest="70" weakest="10" mostdamage="10" random="10" />
    <flags>
        <flag summonable="0" />
        <flag attackable="1" />
        <flag hostile="1" />
        <flag illusionable="1" />
        <flag convinceable="0" />
        <flag pushable="0" />
        <flag canpushitems="1" />
        <flag canpushcreatures="1" />
        <flag targetdistance="1" />
        <flag runonhealth="300" />
    </flags>
    <attacks attack="55" skill="65">
        <attack name="fire" min="-120" max="-180" range="7" radius="4" target="1" chance="6">
            <attribute key="shootEffect" value="fire" />
            <attribute key="areaEffect" value="firearea" />
        </attack>
        <attack name="firefield" range="7" radius="4" target="1" chance="7">
            <attribute key="shootEffect" value="fire" />
        </attack>
        <attack name="fire" min="-150" max="-250" length="8" spread="3" chance="6">
            <attribute key="areaEffect" value="firearea" />
        </attack>
    </attacks>
    <defenses armor="32" defense="48">
        <defense name="healing" min="57" max="93" chance="4">
            <attribute key="areaEffect" value="blueshimmer" />
        </defense>
    </defenses>
    <immunities>
        <immunity fire="1" />
        <immunity lifedrain="1" />
        <immunity paralyze="1" />
        <immunity poison="1" />
        <immunity invisible="1" />
    </immunities>
    <voices>
        <voice sentence="ZCHHHHH" yell="1" />
        <voice sentence="YOU WILL BURN!" yell="1" />
    </voices>
    <loot>
        <item id="2842" countmax="1" chance="90" /> <!-- a book -->
        <item id="3583" countmax="5" chance="600" /> <!-- dragon ham -->
        <item id="3386" countmax="1" chance="1" /> <!-- a dragon scale mail -->
        <item id="3051" countmax="1" chance="50" /> <!-- an energy ring -->
        <item id="3280" countmax="1" chance="3" /> <!-- a fire sword -->
        <item id="3031" countmax="100" chance="800" /> <!-- a gold coin -->
        <item id="3031" countmax="100" chance="600" /> <!-- a gold coin -->
        <item id="3031" countmax="50" chance="400" /> <!-- a gold coin -->
        <item id="2903" countmax="1" chance="30" /> <!-- a golden mug -->
        <item id="3732" countmax="1" chance="120" /> <!-- a green mushroom -->
        <item id="3061" countmax="1" chance="6" /> <!-- a life crystal -->
        <item id="3450" countmax="1" chance="60" /> <!-- a power bolt -->
        <item id="3392" countmax="1" chance="2" /> <!-- a royal helmet -->
        <item id="3029" countmax="1" chance="50" /> <!-- a small sapphire -->
        <item id="3373" countmax="1" chance="4" /> <!-- a strange helmet -->
        <item id="3428" countmax="1" chance="3" /> <!-- a tower shield -->
    </loot>
</monster>

I already changed the chance on each of those attack's but it's as if they make no difference atall when changed, Is there anywhere else i can go to edit this as it may be a deeper setting thats affecting this.

Thanks
In fact, the chance is reversed, the closer to 0 it is 100% that casts the magic of the monsters!
 
In fact, the chance is reversed, the closer to 0 it is 100% that casts the magic of the monsters!
It's not a % chance, it's a 1 in X change, where X is the number you specify. for 50% you'd put 2, and so on.

i did alot of fixes in this engine server

1618454153824.png

Unless you elaborate, this comment doesn't help.
 
Back
Top