[CF-Devel] new artifact & treasures idea
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Sat Dec 13 19:26:39 CST 2003
As per a different thread, I mentioned that I don't really like how the
current lib/artifacts works.
As I was thinking about this, I came up with what I thought was a clever solution.
Use template objects (same idea of template monsters in AD&Dv3).
That is to say, you make up objects of type 'template'. The values and what
not would work similar to how the artifacts file.
However, instead of hard coded chances of artifacts in the treasures.c,
instead use these templates in treasurelists.
Thus, you could have a treasurelist like:
treasureone template_helms
arch template_xebinon
chance ..
more
arch template_blindness
chance ..
more
...
Then the helms themselves would have a 'randomitems template_helms'
The advantages of this:
1) Basically all fields in the template (artifact) could now be set in the
object, were as right now some of the fields in the artifact file are used for
matching.
2) Better control of how often artifacts show up (now in treasurelist instead of
hard coded into treasure.c). Could also easily disable double artifact items
(eg, strange ring of wizardry) (not that those are really a problem, but just
the ability to disable that could be nice)
3) Ability to apply more than one template to an object.
Eg, you could have templates for the special abilities, like now, and
different template for materials. Then, you could have something like:
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 hels are cursed
end
end
4) Given that the templates would be archetypes, I could certainly see the 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 advantage 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:
1) Add min_nrof and min_magic fields (eg, if nrof is 20 right now, 1-20 objects
are created. IT would be better to do something like
min_nrof 10
max_nrof 20
To say to generate 10-20 of those objects.
Likewise, min_magic could be used to say 'make this object at least
min_magic'. Thus, treasurelists could be used to make the magic bonus of the
weapons and whatnot.
2) Add a min and max difficulty for each entry. Thus, instead of using list
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 min 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 maps.
Might be some other nice things to add. Those are just off the top of my head.
The treasurelist stuff would actually be relatively easy to do - at least
point #1 would not cause nay problems with existing treasure lists (just new
fields really). Point 2 would require a little more work, as currently 'magic'
is used for list transitions.
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list