Daimonin
Members login
Sign Up!      problems?
N F
* Daimonin Forum
Home Help Search Calendar

Welcome Guest, you have to register to post here.
Search

News

Stats
73631 Posts in 6685 Topics by 8101 Members
Latest Member: construct_st
Daimonin Forum  |  Development  |  Arches  |  Topic: Tutorial: Randomitems Command - how to call Treasure Lists « previous next »
Pages: [1] Go Down Print
Topic: Tutorial: Randomitems Command - how to call Treasure Lists  (Read 556 times)
michtoen
Administrator
*
*
*


Karma: +29/-5
Posts: 1203



View Profile
« on: May 04, 2007, 01:47:20 am »

Hello

I start now to write some Tutorials.
I will post them to the forum as sticky thread, but there is no
reason we don't include them elsewhere too.

This Tutorials are written for map makers, collecting the technical
docs and dev notes, but they are interesting for everyone dealing
with daimonin and development.

Note to other devs and map makers: You are free to edit this
thread or to add information or remove them when they changed.

Lets start...

randomitems - how to call treasure lists
----------------------------------------

As described in the tutorial before, a treasure list is a drop list,
inserting objects in the inventory of another object. That drops
can be simple loot when killing a mob (money, torches, ...) or
special system objects like spell forces, traps or something.

In the map editor, the command "randomitems" is used, to insert the
from the TL defined items/objects inside the objects inventory.

(please note: Don't use ATM the treasurelist button inside the
attribute window - it will add an TL in crossfire format. Thats
still legal but you can't edit there the string to use the
advanced daimonin format. For editing the "randomitems" string,
use the text window. Don't forget to press apply after changing
something there).

The treasure list is defined in the file "treasures" which can
be found in /arch folder (for a server it is copied to /server/lib).
Read the file "treasurelists" in the /doc folder.

To use such a treasure, just add "randomitems <list>" the the settings of a object.
Random treasure will then be generated whenever such a monster is
generated by a generator/spawn point, or when a map containing that
object is loaded for the first time.

A randomitems command can have a list of treasurelists names.
The format is:

randomitems <list1>;<list2>;<list3>;...

The list "none" is a special maker list.
Command "randomitems none" will skip a possible default arch
randomitems setting and generate no items for that object.

A <list> entry is the name of a treasure list inside the "treasures" file.

"randomitems weapon_misc" will generate a weapon (or nothing)
"randomitems weapon_misc;armour_misc" will generate a weapon and a armour piece (or nothing)

A <list> entry can have parameters, which controls the treasure list called.
A <paramter> has a single char as command marker and a value.

The format is:
<ID><value> = "a100" or "s1"

Its called in this way:

<list_name>&<paramter1>,<parameter2>,...;<list_name>&<parameter1>,...

A <parameter> ends with a ',' (it follows another paramter), a ';' or a EOL.
There can be any number of lists attached to a "randomitems" command.

Example:

randomitems weapon_misc&s1,a100;armour_misc&s1

This will generate a weapon with s = t_style 1 and a artifact chance of 100. So, IF a weapon
is generated, it will be in 100% of all cases a fire related artifact weapon.
The armour will be also fire related, but the artifact chance is normal. But when a artifact
is generated, it will be always from style fire.

The commands are the same as descriped in the treasure lists docs if not described different.

NOTE: The "one char" identifier will allows fast parsing, as the whole structure of this system.
      This is a real-time issue - parsing of this list and creation of a linked list structure
      will happen everytime when a object/map is loaded and saved. So, performance is critical
      here because this is done in a bottleneck part (parsing objects, maps and loading/saving).

The paramter commands are:

m<value>: set "magic"
M<value>: set "magic_chance"
x<value>: set "difficulty"
a<value>: set "artifact_chance"
s<value>: set "t_style"
r<value>: set "item_race"
i<value>: set (items) "material_real"
c<value>: set "material_quality"
C<value>: set "material_range"
q<value>: set "quality"
Q<value>: set "quality_range"

d<value>: Drop chance 1/d. This will do a random check of (random % d) before calling the list.
          If it not 0, it skips the list. AFTER that, if the drop chance has not failed,
          the normal treasurelist chances of generating and dropping are called.
D<value>: Drop chance in %. Same as d<value> but this is a value between 0 and 100. 100 means
          drop always, 25 means only in 25% of all cases.
I:         sets the IDENTIFIED flag for the generated item(s)
B:        sets a breakpoint. If the tlist with that parameter successfully generates an item, tlist
          generation stops and skips all possible lists after it.
Logged

kk
michtoen
Administrator
*
*
*


Karma: +29/-5
Posts: 1203



View Profile
« Reply #1 on: May 04, 2007, 01:52:06 am »

SMARTER TL CALLS
-----------------------

Here is a task for the devs & map makers.

When you browse the randomitems command for our mobs, you
will see they are all the same.

The reason is, that they are still all use the standard randomitems string
i used as i expanded the old TL code to our new system.

So, we need more and better TL and randomitems calls!

Like orcs are dropping heavy armours and nasty weapons, mage skels
more caster related items (not only but with a higher chance) as fire
golems should drop fire weapons as fire demons but white dragons
cold related stuff...

And so on.

As dev you can direct change the strings but also as non dev/map wiz
you can help us here:

simply download the map maker package and add a monster with a
changed randomitems command you find fitting. Wear a ring of inv,
be in DM mode and use /resetmap to load the mob again and again
to see all is fine with your list.

Then post your changed list string for the mob in this thread.

It will help alot.
Logged

kk
Pages: [1] Go Up Print 
Daimonin Forum  |  Development  |  Arches  |  Topic: Tutorial: Randomitems Command - how to call Treasure Lists « previous next »
Jump to:  

Page created in 0.084 seconds with 17 queries.
Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Copyright 2008 Daimonin MMORPG  •  Terms of Service  •  XHTML  •  Daimonin sourceforge open source project