Re: [crossfire] New plugin: citylife - help needed

2008-02-03 Thread Juha Jäykkä
   If I'm running a private server and don't log in for a few days, it would
 be annoying for all the shops to be closed.

This should not be a problem: it should be easy to only count active ticks 
(i.e. ticks when someone is actually logged on to the server) when 
considering which shops thrive and which die.

   Related to that you are likely to get some towns that may not be used
 much even on active servers - if I have a private server, I'm likely only
 working in one town at a time.

This is more difficult. Perhaps the npcs themselves could help with this? 
Perhaps the npcs could be made to go to the shops as well? They might not 
need to buy anything, just enter and exit. Also, their influence in 
determining whether a shop lives or dies could be made orders of magnitude 
lower than players' influence.

What I have in mind, is that if no player visits a shop in Scorn, the npcs can 
keep the shops alive, but as soon as players start visiting the shops, 
their vote counts so much more that if players do not go to shop A at all, 
the npcs' influence can't keep that alive. Some kind of differential metric 
between the shops, not an absolute one. An npc entering the shop is worth 
one life point for the shop, while a player is worth a 100. Then, whenever 
the lowest scoring shop is, say, 1000 points below the next lowest scoring, 
it dies. Also, this means that whenever the highest scoring shop is that 1000 
above the next, it should expand its business...

 that driven more my player actions - eg, folks can by plots of lands
 outside of cities, etc or what not.

This sounds nice. But... how do we keep track of who owns what? And how do the 
players find out if the beautiful spot they fancy is already owned by 
someone?

   At some level, if we let a player do it, then we could also let NPC's do
 it (some number of NPC's buy farms or whatever)

Naturally, the npcs must basically be able to do whatever the players do. I'd 
like to see them enter dungeons themselves and join parties with players as 
well. Though the last type of npc probably would not be controlled by the sim 
code (if we choose to use that). (And I do not count the current hired hands 
in Scorn as npcs. They do nothing unless you hire them - not really very c 
in npc.)

-Juha

-- 
 ---
| Juha Jäykkä, [EMAIL PROTECTED]|
| home: http://www.utu.fi/~juolja/  |
 ---


signature.asc
Description: This is a digitally signed message part.
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] New plugin: citylife - help needed

2008-02-03 Thread Nicolas Weeger
 Out of curiosity, how hard would it be for city life to animate other
 things that are not NPCs?  Am thinking along the lines of tumbleweed,
 whirlwinds, leaves and such.  Not sure it is a suggestion yet.  Was also
 thinking of objects the player might be able to walk on rather than have
 them be blocking.

Well, you could expand the plugin to do that. Define eg trees as spawn points 
for leaves, maybe.
If one were to do that, I'd suggest to generalize, ie define 
multiple spawnable lists, each with spawn zones and points.

 I looked a bit. The zones and points in code seem odd, but I guess probably
 mostly out of simplicity until it seems it catches on?

It's a rough first implementation :)
I didn't try that hard to adapt precisely to eg the port shape, and zones can 
just try to put on walls (but server won't let, of course).
Feel free to change that, of course.

In the suggested changes, it would probably make sense to define the zones in 
the maps themselves, maybe, or something not closedly linked to the server...


Nicolas
-- 
http://nicolas.weeger.org [Petit site d'images, de textes, de code, bref de 
l'aléatoire !]


signature.asc
Description: This is a digitally signed message part.
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] New plugin: citylife - help needed

2008-02-03 Thread Lalo Martins
Also spracht Juha Jäykkä (Sun, 03 Feb 2008 10:29:38 +0200):
 This is more difficult. Perhaps the npcs themselves could help with
 this? Perhaps the npcs could be made to go to the shops as well? They
 might not need to buy anything, just enter and exit. Also, their
 influence in determining whether a shop lives or dies could be made
 orders of magnitude lower than players' influence.
 
 What I have in mind, is that if no player visits a shop in Scorn, the
 npcs can keep the shops alive, but as soon as players start visiting the
 shops, their vote counts so much more that if players do not go to
 shop A at all, the npcs' influence can't keep that alive. Some kind of
 differential metric between the shops, not an absolute one. An npc
 entering the shop is worth one life point for the shop, while a player
 is worth a 100. Then, whenever the lowest scoring shop is, say, 1000
 points below the next lowest scoring, it dies. Also, this means that
 whenever the highest scoring shop is that 1000 above the next, it should
 expand its business...

Alternatively.

Since the players are heroes, they could be opinion-makers and trend-
setters.  If they are seen favouring one shop, the NPCs will start 
preferring that one as well.  If they avoid one, its popularity with the 
general populace will drop very fast...

best,
   Lalo Martins
-- 
  So many of our dreams at first seem impossible,
   then they seem improbable, and then, when we
   summon the will, they soon become inevitable.
   -
  http://lalomartins.info/
GNU: never give up freedom  http://www.gnu.org/


___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] New plugin: citylife - help needed

2008-02-02 Thread Nicolas Weeger
 I don't know if you already know this, already use it, already plan to
 use it, whatever, but:

 Sim City (classic) has been just GPLed under the name Micropolis, and
 the automata that runs the sims in the game is available as a library
 within the source tree.

 http://www.donhopkins.com/home/micropolis/

 When that happened, one of the first things I thought was, how awesome it
 would be to use it to control NPCs in a game like Crossfire!

Well, I'm not totally sure it's nice to control NPCs, because as far as I know 
it manages more shops/buildings than individual characters :)

It could be used to control the general town development, though. But I'd 
rather see something based in part on player activity (players don't use at 
all a shop = it disappears)

Of course, we could use some algorithms and ideas from that!

Nicolas
-- 
http://nicolas.weeger.org [Petit site d'images, de textes, de code, bref de 
l'aléatoire !]


signature.asc
Description: This is a digitally signed message part.
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


Re: [crossfire] New plugin: citylife - help needed

2008-02-02 Thread Lalo Martins
Also spracht Nicolas Weeger (Sat, 02 Feb 2008 10:26:17 +0100):
 Sim City (classic) has been just GPLed under the name Micropolis, and
 the automata that runs the sims in the game is available as a library
 within the source tree.
 
 Well, I'm not totally sure it's nice to control NPCs, because as far as
 I know it manages more shops/buildings than individual characters :)

Really?  From the description, I thought it did control the sims too -- 
be born, grow up, go from home to work and back, and so on, I love 
watching them on SC (although it's much more interesting in the later 
games of the series).

 It could be used to control the general town development, though. But
 I'd rather see something based in part on player activity (players don't
 use at all a shop = it disappears)
 
 Of course, we could use some algorithms and ideas from that!


best,
   Lalo Martins
-- 
  So many of our dreams at first seem impossible,
   then they seem improbable, and then, when we
   summon the will, they soon become inevitable.
   -
  http://lalomartins.info/
GNU: never give up freedom  http://www.gnu.org/


___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire


[crossfire] New plugin: citylife - help needed

2008-01-27 Thread Nicolas Weeger
Hello.

I just committed (to trunk) the first version of a plugin named citylife 
that aims to add NPCs to towns.

Plugin is doxygen-documented for interested people.

Basic summary: when a map is loaded, adds NPCs to random zones. When the map 
is in memory, will randomly spawn NPCs from predefined points (houses / 
shops).

Behaviour is for now totally dumb, NPCs will just move around randomly.

Plugin relies on spawn zones and points, and archetype list (to vary NPCs for 
regions).

Help would be appreciated to define the spawn zones / points for various towns 
(only Scorn is done for now) :)
(or improve the plugin! see the todo list, or use your imagination).

Nicolas
-- 
http://nicolas.weeger.org [Petit site d'images, de textes, de code, bref de 
l'aléatoire !]


signature.asc
Description: This is a digitally signed message part.
___
crossfire mailing list
crossfire@metalforge.org
http://mailman.metalforge.org/mailman/listinfo/crossfire