Random god


Although the central place for design discussion is ##crawl-dev on freenode, some may find it helpful to discuss requests and suggestions here first.

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Thursday, 19th June 2014, 18:45

Random god

There was a discussion on here a while back about randomly-generated gods. I don't remember if anything ever really happened, but I really liked the idea. Anyway, I wrote a very crude patch implementing a (very basic) random god. Currently the name always starts with the letter W. Mantis issue: (has patch attached) https://crawl.develz.org/mantis/view.php?id=8710

W* the Ancient

W* is the forgotten god of a lost civilization. Any knowledge of what great powers and benefits they grant upon worshippers has long been lost.

* 50% chance of a random active ability
** 50% chance of a random active ability
*** 50% chance of random passive ability
**** 50% chance of a random active ability
***** 75% chance of a random passive ability

What they appreciate is randomly picked from a list (currently consisting of killing, or sacrificing {potions,corpses,wands}.

Anyway, the current ability list really sucks; any suggestions on abilities and general discussion would be greatly appreciated. :D

For this message the author godzilla has received thanks: 4
Psiweapon, Shard1697, Velikolepni, XuaXua

Dungeon Master

Posts: 3618

Joined: Thursday, 23rd December 2010, 12:43

Post Thursday, 19th June 2014, 19:27

Re: Random god

Naturally, I love this. Many thanks!

Are you aware of the ideas on the dev wiki? overview, abilities, piety rules.

Moreover, because the concept is so huge, I suggested a miniature design and some preliminary work already exists: status.

For this message the author dpeg has received thanks:
godzilla

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Thursday, 19th June 2014, 19:58

Re: Random god

dpeg wrote:Naturally, I love this. Many thanks!

Are you aware of the ideas on the dev wiki? overview, abilities, piety rules.

Moreover, because the concept is so huge, I suggested a miniature design and some preliminary work already exists: status.


Thanks for those links, they're great! I'll work on adding some of those to my patch. :)
User avatar

Ziggurat Zagger

Posts: 5832

Joined: Thursday, 10th February 2011, 18:30

Post Thursday, 19th June 2014, 20:14

Re: Random god

It looks like there was a pre-existing patch being worked on (extensively, apparently) on one of those links. You might want to check it out as well.
"Be aware that a lot of people on this forum, such as mageykun and XuaXua, have a habit of making things up." - minmay a.k.a. duvessa
Did I make a lame complaint? Check for Bingo!
Totally gracious CSDC Season 2 Division 4 Champeen!

Snake Sneak

Posts: 129

Joined: Wednesday, 8th May 2013, 19:30

Post Thursday, 19th June 2014, 20:45

Re: Random god

godzilla wrote:Anyway, the current ability list really sucks; any suggestions on abilities and general discussion would be greatly appreciated. :D

Could a concise list of the possible passive and active abilities be posted in this forum? I am not sure to fully get the code in all its details.

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Thursday, 19th June 2014, 21:10

Re: Random god

Velikolepni wrote:
godzilla wrote:Anyway, the current ability list really sucks; any suggestions on abilities and general discussion would be greatly appreciated. :D

Could a concise list of the possible passive and active abilities be posted in this forum? I am not sure to fully get the code in all its details.

Any (reasonably simple) ability suggestions are welcome. Currently I've not implemented any passives; suggestions are welcome.

The abilities in the patch on the mantis issue:
Heroism
Fly
Remove Curse
Make Arrow Trap
Reproduction
Torment

Implemented/Almost implemented on my local copy (in addition to above):
Fire Storm
Spawn Eyes

A complete list of currently existing abilities is in enum.h in the source code. Search for ABIL_ and it should be pretty clear. There's probably also one on the wiki.

Tomb Titivator

Posts: 799

Joined: Saturday, 23rd February 2013, 22:25

Post Thursday, 19th June 2014, 21:42

Re: Random god

Passive idea: your max HP or max MP goes up.
Other passive idea: your max AC or EV goes up.

For this message the author khalil has received thanks:
godzilla

Bim

Crypt Cleanser

Posts: 700

Joined: Wednesday, 5th January 2011, 15:51

Post Thursday, 19th June 2014, 22:19

Re: Random god

Great idea!! I think this would fill a niche for people that don't have a particular god in mind and just want to roll the dice.

A few ideas:
Active ability: create Poison smoke
Passive ability: Spawn Old Ones - randomly creates a few allies from a list of 'old ones' (Golems perhaps?)
2012 Winner of fewest proposed ideas implemented by devs.

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Friday, 20th June 2014, 04:29

Re: Random god

Well, I fixed a bunch of bugs and added a few abilities, (namely HP buff, MP buff, AC buff, and Fire Storm), and uploaded an updated patch to the mantis issue. It's playable at this point, feedback is appreciated :D
Known issues:
-Saves aren't working at this point. All god-related data is lost.
-Very little useful information is on the ^ screen.
User avatar

Dungeon Master

Posts: 762

Joined: Thursday, 25th April 2013, 02:43

Post Friday, 20th June 2014, 06:16

Re: Random god

Since your work on this seems to be rather serious, and I don't want you to do a lot of work based on false assumptions, allow me to say that this: the mantis patch is extremely unlikely to make it in the game.

One reason for this is code quality, special casing every possible ability would make this god completely unmaintainable very fast, particularly since the code seems to be duplicated from various other places in the codebase. In addition, such special casing doesn't work well for extension or generalization - for example, imagine trying to make it possible for the various abilities to have different costs, such as the remove curse ability being able to drain players or the firestorm ability costing just a massive amount of piety. Furthermore, I imagine there would be a lot of difficulty with serialization - what if a player has the ability "remove curse" and curses are later removed? How would that ability update to the new version?

If I was going to try to implement random gods, I would first massively refactor the code related to gods, active abilities, and passive abilities, so that they could be applied to players based on data rather than code. Only once a consistent interface for giving players abilities or passives such as Clarity or Bleed Smoke was available would I being implementing the bulk of the proposal.
On IRC my nick is reaverb. I play online under the name reaver, though.

For this message the author reaver has received thanks:
Patashu

Barkeep

Posts: 3890

Joined: Wednesday, 14th August 2013, 23:25

Location: USA

Post Friday, 20th June 2014, 13:32

Re: Random god

On the other hand, wouldn't it be feasible to have a random god that draws its powers randomly (within certain parameters) from a separate list of abilities, some of which could imitate other effects, including already extant god powers? And you could have somewhat randomized costs for the abilities, etc.? Of course this means that not every god ability would be obtainable this way, or whatever. But it is probably better for a lot of reasons that any new god abilities would not be automatically added to the list that random god draws from, anyway.

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Friday, 20th June 2014, 18:06

Re: Random god

reaver wrote:Since your work on this seems to be rather serious, and I don't want you to do a lot of work based on false assumptions, allow me to say that this: the mantis patch is extremely unlikely to make it in the game.

One reason for this is code quality, special casing every possible ability would make this god completely unmaintainable very fast, particularly since the code seems to be duplicated from various other places in the codebase. In addition, such special casing doesn't work well for extension or generalization - for example, imagine trying to make it possible for the various abilities to have different costs, such as the remove curse ability being able to drain players or the firestorm ability costing just a massive amount of piety. Furthermore, I imagine there would be a lot of difficulty with serialization - what if a player has the ability "remove curse" and curses are later removed? How would that ability update to the new version?

If I was going to try to implement random gods, I would first massively refactor the code related to gods, active abilities, and passive abilities, so that they could be applied to players based on data rather than code. Only once a consistent interface for giving players abilities or passives such as Clarity or Bleed Smoke was available would I being implementing the bulk of the proposal.

First off, thanks a lot for the reply.
A lot of the code is pretty bad-- I'll see if I can make it more elegant. A lot (all) of the abilities are copied from elsewhere in the code because I wanted to get the god up and running before putting too much work into the abilities.
Honestly, I don't see the serlialization issue you outlined as being much of a problem- look at the recent changes with Ds with Foul Stench and the Saprovore removal. That might not be the best example, but abilities can be easily removed/refactored as necessary.
I'll see if I could make the god code more constistent; i.e. an array of god active/passive abilities (something like with *_Sacrifice_Messages in religion.cc?) with passives being checked in a constant place rather than all over the code, possibly giving 'mutations' or something similar. I'll see if I could have something working in a little while.
EDIT: d'oh, there already is one for active abilities. :oops:

and into wrote:On the other hand, wouldn't it be feasible to have a random god that draws its powers randomly (within certain parameters) from a separate list of abilities, some of which could imitate other effects, including already extant god powers? And you could have somewhat randomized costs for the abilities, etc.? Of course this means that not every god ability would be obtainable this way, or whatever. But it is probably better for a lot of reasons that any new god abilities would not be automatically added to the list that random god draws from, anyway.

That's pretty much what it does now.

Crypt Cleanser

Posts: 720

Joined: Friday, 6th September 2013, 09:17

Post Friday, 20th June 2014, 19:00

Re: Random god

godzilla wrote:A lot of the code is pretty bad-- I'll see if I can make it more elegant. A lot (all) of the abilities are copied from elsewhere in the code because I wanted to get the god up and running before putting too much work into the abilities.

I believe he meant calling the particular functions from your code, not copying and pasting all of it. It' not that much more work.

Honestly, I don't see the serlialization issue you outlined as being much of a problem- look at the recent changes with Ds with Foul Stench and the Saprovore removal. That might not be the best example, but abilities can be easily removed/refactored as necessary.

Yeah, but what about games in progress? You may want to have a look at tags.cc

Halls Hopper

Posts: 87

Joined: Wednesday, 14th August 2013, 17:40

Post Friday, 20th June 2014, 19:30

Re: Random god

stickyfingers wrote:I believe he meant calling the particular functions from your code, not copying and pasting all of it. It' not that much more work.

I'm trying to refactor the god code in general to be less special-casey, so hopefully all of the function-calling shenanigans are avoided entirely.

stickyfingers wrote:Yeah, but what about games in progress? You may want to have a look at tags.cc

Games in progress are pretty much always messed up by trunk updates.

Return to Game Design Discussion

Who is online

Users browsing this forum: No registered users and 19 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.