Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CF: Prot/chaos, Efficiency, and Portals (was Re: ideas for next experiments)



David Andrew Michael Noelle wrote:

>     When the client guesses the object type, it uses an array constructed
> from the contents of the itemtypes file, right?  It seems to be matching
> against that array in the order of the type values assigned, and not in the
> order they're listed in the text file.  What if that array was ordered as
> listed in the text file, and the type value to assign was stored as an
> additional field with each list of equivalent names?
>     That would allow "key ring" to be sorted correctly, as long as it's
> listed before either "key" or "ring", and "grimoire of firebolt" to be
> sorted correctly as long as "grimoire" is listed before "bolt".  It would
> also allow more common items to be listed first, and therefore matched
> first, so less comparisons are needed.
>     How complicated would that be to change?

 Not terribly complicated, but a bit of work.  You would probably want to change
the syntax of the file to be something like:

1: sword
33: food
8: bolt

 And so on, so the client type is on the same line as the item itself.

 Then, use linked list or dynamically allocated array, which contains the name
and item type.  As you read in the file, put the new element at the end of the
array/list.

 When you parse an item, you traverse the array, and when you get a match, you
use the type value in the structure and assign it to the object.


>     The processor's an AMD K6-2 300, but expanding the memory at this point
> would require retiring all my 60ns SIMMs and replacing them with PC-100
> DIMMs, which I can't afford.  The reason I suddenly have so much time for
> Crossfire is that I'm currently "between projects." (Read: unemployed.)
> Anybody know any gaming companies that need a programmer?

 If anything, most of your suggestions would improve memory and save cpu.  For
your configuration, you probably have the cpu cycles to spare, but may lack the
memory.

 I run an a p2-266, and with server and client on the same system, only a
fraction of the cpu is consumed.  I have 128 mb however.


<description of portal operation removed)
>     Does anyone see any problems with that?

 It seems to me, looking at that description, that word of return and magic
portal are very much the same (later allowing more than just player), with the
only significant difference is one being priest, the other mage? (I guess how
quickly they operate is another)

 From some perspective, I am not sure if word of return is really appropriate. 
What thing that was on the idea list was better control of the word of recall.

 In traditional AD&D (which I am guessing where the spell more or less got
lifted from), word of recall takes the cleric back to their sanctuary.

 I think it would add a lot to the spell if there was more control on word of
recall.  If you are deep in a dungeon in navar city, word of recall takes you
back to scorn, which is pretty annoying.

 I would suggest a more modest approach for word of recall, and sort of do away
with word of return:

 1) If player has no return point, the first altar he prays over becomes his
return point (this is for starting players).
 1a) IF the player does have a return point, and is standing over an altar to a
god, add some minor spell which now makes this his return point.
 2) When player casts the spell, he returns to that altar.  Before actually
teleporting the player there, make sure it is to the same god.

 Part of #2 is likely to be removed in 0.96 (no such thing as random altars to
gods).  This makes word of recall more useful (if visiting a different town, go
to the altar and you can now return there after your expeditions).

 As for magic portal - I would suggest letting the spell take an option, so
instead of the requiring the order (suppose someone does a first location and
realize they don't want it, but instead want where the are now the first point? 
It would be sort of a pain to have to cast the spell 2 times to get that to
happen).  So it could be something like 'cast magic portal of start' or the
like.  I'd have to look at the spell options more carefully to see what they do.


>    One other factor I was wondering about is portals in allowing portals to
> towns, even if the town map has reset.  I don't think there's any way to
> cheat by teleporting to a town.  The only problem is, how do you tell from a
> map's path whether or not it's a town?  I suppose there could be a short,
> static list of the paths to towns.  That would also allow certain safe
> places, like taverns and inns, to be put on the "teleport safe" list.  Would
> that cause any problems or complications?

 Instead of using paths, which while easier, creates more problems if some other
area is created, having actual attributes in the maps that tell you something
would be useful.  For example, the map structure might have and outdoor/indoor
flag (for walls as well as weather and night/day), a region value (different
treasurelists in different regions), information on map reset times and the
like, as well as a teleport flag or something.
-
[you can put yourself on the announcement list only or unsubscribe altogether
by sending an email stating your wishes to crossfire-request@ifi.uio.no]