[carceri-dev] Re: Inventory and Equipment Issues

  • From: Fabian Lemke <fabian.lemke@xxxxxxxxx>
  • To: carceri-dev@xxxxxxxxxxxxx
  • Date: Mon, 6 Jun 2005 07:56:32 -0500

Greetings everyone!

On 6/6/05, Kornel Kisielewicz <charon@xxxxxxxxxxxx> wrote:
> [clip]
>         The lazy approach is (I'm being spoiled by Lua) to implement the
> inventory interface in Lua and that way allow the modder to customize it
> himself. That's lazy, because it goes against the "no programming skills
> needed" approach. And it's easy to implement :-).

Lua does that to someone, doesn't it? :-)
=20
>         A nicer approach would be to define a lot of options that decide =
on the
> look/feel of the inventory -- I don't know how to do that tough --
> adding a toggle between letter-chosing items and menu choosing is one
> idea, then there's the option wether the inventory is sorted by
> categories (like ADOM), more is the size of the inventory list, wether
> it's "scrolling" or multipage, and constants on it's colors (and
> optional "color-coding" shemes:
>         -- by class (valuables are yellow, weapons are blue, armors are b=
rown)
>         -- by item color (the color of the item is based on the color of =
the
> ASCII gylph)
>         -- by status color (lightgray - normal, red - cursed, blue - enha=
nced,
> light-blue - ego, yellow - artifat)
>=20
>         Are all of those needed?

I would say initially those would not be needed.  But, some mods will
probably be driven by different styles of item management, so having
the option may be nice...  The color part is probably a good idea
atleast.

>         There's also a hybrid approach -- actually a enhanced #1 approach=
, that
> allows you to include one of 3/4 predefined Lua functions of managing
> inventory -- like: "ADOM style", "Angband style", "Diablo style" and
> "GenRogue style". A possible expansion would be for these functions to
> use some defined variables...

This is probably the best route.  Using that $ or @ syntax to specify
function (with predefined ones), and then some optional variables to
override defaults (colors, positions, borders, whatever).

>         Still, scripting is the easy way out and it breaks by "data-drive=
n"
> approach...

I disagree here - If you have predefined functions in Lua, its the
same as having predefined Pascal ones that are specified via flags or
type-name.  Having it in script doesn't break the data-driven
approach, it just allows more knowledgable modders to go deeper into
modding.  When they level-up from data-driven mods, they can then
tackle 2nd level system-lua mods.

Plus, most of the screen displays will be mostly-generic (some mods
may colorize based on specific tags or something game-specific?), so
they will be mostly shareable.

>         The same is true for the equipment screen and equipment handling.=
..
> Although equipment adds the issue of slot handling -- how to implement
> them genericaly?
>=20
>         1) Which one of those options is the best?
>         2) Any other suggestions?
>         3) Which other inventory-interface related features you would lik=
e to see?
>         4) How to implement the equipment interface so it's easily moddab=
le?
>         5) Anything :-)

If it's easy to expose a lot of the screen interface API to Lua, I'd
suggest just doing equipment screen in Lua as well, just allow for
some predefined ones.  Although, if the interface code, between game
mechanics and lua-calls, complicates things too much, hardcode it in
Pascal.  First implementation, and time considerations should probably
come first.  You could always refactor some code later, or add support
for scripted equipment screens later.
-- 
Carceri Development Mailing List (carceri-dev@xxxxxxxxxxxxx)
Carceri Homepage (http://chaos.magma-net.pl/carceri)

Other related posts: