Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
auth_update crash
Dec 23, 2017, 10:15 pm
By Remcon
check_tumble
Dec 18, 2017, 7:21 pm
By Remcon
parse description bug
Dec 15, 2017, 10:08 pm
By Remcon
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!

Members: 0
Guests: 12
Stats
Files
Topics
Posts
Members
Newest Member
478
3,708
19,242
612
Jacki72H
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » AFKMud Support & Development » Deities
Forum Rules | Mark all | Recent Posts

Deities
< Newer Topic :: Older Topic > Deity worhippers

Pages:<< prev 1 next >>
Post is unread #1 Feb 27, 2005, 3:33 pm
Go to the top of the page
Go to the bottom of the page

Celestria

GroupMembers
Posts28
JoinedFeb 24, 2005

This is probably a really stupid question.
I raised devote to imm level because I would rather have people rp to get into a faith and then be mset.
With the deities and some test characters the deity worships themselves and the test chars worship me. The deities list before a recompile was all 1's. Now it's all 0's hotboot doesn't fix it. I can't really tell in the code why it's not loading the # of followers, it looks ok to me. Maybe I'm missing something? Also I want it to reflect the number of followers per deity even if they've been mset rather than devoting. Again from what I saw it should be doing it, but it's not. I must be missing something.
Another note, when a proto area loads the mobs don't load like they used to with loadarea on an older codebase of afkmud.
Thanks in Advance.
Celestria
P.S. Winbloze xp with cygwin running afkmud 1.64
       
Post is unread #2 Feb 28, 2005, 10:34 am
Go to the top of the page
Go to the bottom of the page

Celestria

GroupMembers
Posts28
JoinedFeb 24, 2005

In do_devote when a player devotes none it wasn't decrementing the worshippers, also it didn't check if it was less than 0 which can happen when you mset a players deity and they devote none. I looked in a deity file and found -1 as worshippers which to say the least messes things up.
I added error checking for this just below the affects for a character devoting none.
--ch->pcdata->deity->worshippers;
if(ch->pcdata->deity->worshippers pcdata->deity->worshippers = 0;
save_deity( ch->pcdata->deity );
       
Post is unread #3 Feb 28, 2005, 5:06 pm   Last edited Nov 24, 2007, 1:59 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

Might want to double check your changes in deity.c, because in the 1.64 code I see:

        --ch->pcdata->deity->worshippers;
        ch->pcdata->favor = -2500;
	ch->mental_state = -80;
        send_to_char( "A terrible curse afflicts you as you forsake a deity!\r\n", ch );


and that clearly brings the count of worshipers down by one. You are right in that it's not checking for zero, but it probably doesn't get noticed often since the pfile cleanup code will correct that count if it's enabled.

In any case, a fix for this issue, and one for clans as well, has been posted to the fix list.
       
Post is unread #4 Feb 28, 2005, 6:41 pm
Go to the top of the page
Go to the bottom of the page

Celestria

GroupMembers
Posts28
JoinedFeb 24, 2005

Thanks I missed that one.
Updated everything with the bugfixes, thank you for your help.
and for the credits .
       
Post is unread #5 Mar 2, 2005, 9:36 am
Go to the top of the page
Go to the bottom of the page

Celestria

GroupMembers
Posts28
JoinedFeb 24, 2005

I have a question, pfile clean up still isn't resetting the deity list properly and I'm wondering if this is why or not. Again I haven't learned this codebase well enough to know for certain but at the start of the count it resets all clans and deities to 0. But no where in that function does it increment them again.
if( !count )
{
for( clan = first_clan; clan; clan = clan->next )
save_clan( clan );
for( deity = first_deity; deity; deity = deity->next )
save_deity( deity );
verify_clans();
prune_sales();
}
return;
Then it saves to the file with 0 worshippers.
The only place I have seen where it actually increments is in do_devote and in do_mset. Now I know this is trivial to most people but I'm big on rp and accuracy. I like to know how many people are following me. I can't figure out why it's not working.
       
Post is unread #6 Mar 2, 2005, 3:53 pm   Last edited Nov 24, 2007, 1:59 pm by Samson
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,639
JoinedJan 1, 2002

You should have in pfile.c the following segment of code inside the fread_pfile function:

   if( clan != NULL )
   {
	CLAN_DATA *guild = get_clan( clan );

	if( guild )
         guild->members++;
   }

   if( deity != NULL )
   {
	DEITY_DATA *god = get_deity( deity );

	if( god )
         god->worshippers++;
   }


If your pfiles have deity and/or clan names in them, this will locate those within the game and add one to their counts. None of the updates to clan/deity counts will take place if all the code is doing is counting the number of pfiles. This data will only reset if you're actually cleaning defunct pfiles out.
       
Pages:<< prev 1 next >>