[Crossfire-wiki] [Crossfire DokuWiki] page added: dev_todo:artifacts_treasurelists

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Mon Sep 18 02:27:02 CDT 2006


A page in your DokuWiki was added or changed. Here are the details:



Date        : 2006/09/18 02:27

User        : mwedel

Edit Summary: created



The basic idea of this is to make remove a lot of the hardcoding from the 
server:



Add template objects - objects that don't appear by themselves, but instea
d modify the object they are applied to.



That is to say, you make up objects of type 'template'.   The values and w
hat not would work similar to how the artifacts file.



However, instead of hard coded chances of artifacts in the treasures.c, in
stead use these templates in treasurelists.



Thus, you could have a treasurelist like:



<file>

treasureone template_helms

   arch template_xebinon

     chance ..

   more

   arch template_blindness

      chance ..

   more

...

</file>



Then the helms themselves would have a 'randomitems template_helms'



The advantages of this:

  * Basically all fields in the template (artifact) could now be set in th
e object, were as right now some of the fields in the artifact file are us
ed for matching.

  * Better control of how often artifacts show up (now in treasurelist ins
tead of hard coded into treasure.c).  Could also easily disable double art
ifact items (eg, strange ring of wizardry) (not that those are really a pr
oblem, but just the ability to disable that could be nice)

  * Ability to apply more than one template to an object. Eg, you could ha
ve templates for the special abilities, like now, and different template f
or materials. Then, you could have something like:



<file>

randomitems helm

  list helm_special_abilities

     chance 5    # 5% of helms are special

  more

  list armor_material_change

     chance 25    # 25% of helms are not made of the normal material

  more

  arch cursed

     chance 3    # 3% of helms are cursed

   end

end

</file>



  * Given that the templates would be archetypes, I could certainly see th
e java editor better able to handle this (eg, you select the template, and
 then an object, and hit the 'apply template to object' button or the like
)



The biggest disadvantage of this is a bunch of new treasurelists would be 
needed.  I have thought that the treasure list code could be extended also
.  



However, my thought on that are a bit more modest:



  * Add min_nrof and min_magic fields (eg, if nrof is 20 right now, 1-20 o
bjects are created.  It would be better to do something like

<file>

min_nrof 10

max_nrof 20

</file>



To say to generate 10-20 of those objects.



Likewise, min_magic could be used to say 'make this object at least min_ma
gic'.  Thus, treasurelists could be used to make the magic bonus of the we
apons and whatnot.



  * Add a min and max difficulty for each entry.  Thus, instead of using l
ist transitions to make sure too god objects aren't created, this could be
 done in just one list.  For an object to be created, in must be between m
in and max difficulty, based on the difficulty of the map (max difficulty 
is there so you could make it so junk items don't appear on high level map
s.  Also add a diff_factor to increase chances:



<file>



    randomitem helm

        ...

        arch damned

            min_diff 30

            chance 5

            diff_factor 2

</file>



So at level 37, chance is not 19 (37 - 30) * 2 + 5 = 19%





The treasurelist stuff would actually be relatively easy to do - at least 
point #1 would not cause nay problems with existing treasure lists (just n
ew fields really).  



It may be desirable to disallow combinations, but not sure if extra logic 
should be added to the treasurelists for that - I'd almost be inclined to 
have multiple treasurelists - the treasure code really dictates what is ge
nerated, not what is not generated.





IP-Address  : 209.204.178.229

Old Revision: none

New Revision: http://wiki.metalforge.net/doku.php/dev_todo:artifacts_treas
urelists



-- 

This mail was generated by DokuWiki at

http://wiki.metalforge.net/





More information about the crossfire-wiki mailing list