DragonPrime - LoGD Resource Community

Modules, Themes and other customizations for your game => Completed Modules for version 1.x.x => Topic started by: Sneakabout on December 19, 2004, 03:07:20 AM



Title: Taxation, City Hall and Elections
Post by: Sneakabout on December 19, 2004, 03:07:20 AM
Here they are, the three modules you've all been waiting for....

What, no waiting for? Curse you all to eternity!

In any case, these are 1.0 of the modules taxation.php, townfinance.php and election.php These three are meant to work together, should be installed together and will probably cry and sulk if you don't.

The functionality of the modules is as follows:

taxation.php - adds taxation of gold assets in the bank on newday, adds a forest special where you can encounter the Tax Offices.

election.php - adds functionality for elections to be held in the City Hall (see townfinance.php), registration of candidates, voting by all players and finally the finishing of an election through a link in the Grotto.

townfinance.php - adds functionality for the elected leader to change tax rates, make proclamations, give alms, claim expenses, resign his office (triggering candidate registration in election.php) and talk to citizens in the Audience Chamber. Citizens can protest or support the leadership in the City Hall, as well as ask about their tax status and the tax code. They may also petition the Leader.  Also provides for a central treasury which the money from taxation pays into, which is subtracted from the treasury when administrative functions are used.

http://dragonprime.net/users/Sneakabout/election.txt (http://dragonprime.net/users/Sneakabout/election.txt)

http://dragonprime.net/users/Sneakabout/taxation.txt (http://dragonprime.net/users/Sneakabout/taxation.txt)

http://dragonprime.net/users/Sneakabout/townfinance.txt (http://dragonprime.net/users/Sneakabout/townfinance.txt)

Feedback is necessary, or else I shall summon the dark spawn of Cthulu from R'lyeh to feast on your server. Really.


Title: Re:Taxation, City Hall and Elections
Post by: Rowne on December 19, 2004, 11:44:56 AM
These sound like a fantastic idea and I praise your hard work.  I do think they sound like a good idea but I have two small considerations before I install them.

I'm a left-winger (everyone who doesn't know this in regards to myself will in time) and something of a socialist/communist.  So I don't like taxing the living buggery out of poor people but I do like taxing the living buggery out of rich people and redistributing to the poor to create an equitous flow of resources.

Does this tax the heck out of the poor and does it alter the tax rates based on how much you have?  Will it make it too difficult for new players to get a financial footing in the game?

-=- Edit -=-

I... cannot BELIEVE I just said that with a straight face in regards to LoGD of all things.

*Collapse.*

Still, I think my questions stand, sort of.  I wouldn't want to be cruel to my players.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on December 19, 2004, 11:49:07 AM
Actually, there is a redistributive function, a tax-free setting, a low rate of tax, a high rate, you can enable rebates..... all of these are settable. You can tax poor people huge amounts while letting the rich off, or even favour one town above the others.

Its a full tax system to answer your question, with a communist-style setting which can be enabled if you want. You can look into the module for specifics on what you can do.


Title: Re:Taxation, City Hall and Elections
Post by: Rowne on December 19, 2004, 11:54:52 AM
I'm impressed.

I'll be more than happy to give it a whirl, then.


Title: Re:Taxation, City Hall and Elections
Post by: strider on December 19, 2004, 01:31:17 PM
::sighs and rolls his eyes::

Can anyone tell that Sneak has lived in the UK too long? Death is no longer assured there, but taxes are eternal.

::offers a roguish grin::

The system looks great Sneak. You did a great job with it all.


Title: Re:Taxation, City Hall and Elections
Post by: robert on December 19, 2004, 02:43:07 PM
Quite refreshing and rare these days to stumble onto a new mod that  strides to improve game play rather than boon the player a gazillion gems or even more uneeded buffs.

Looks rather well but I did notice some errors, a spellcheck should clear up the few I seen.

Bravo sneakabout ! - good work !!  8)


Title: Re:Taxation, City Hall and Elections
Post by: Excalibur on December 19, 2004, 02:49:40 PM
I join Strider & Robert to say: Bravo !!

To complete the work, won't you take time to zip them ?  ;)


Title: Re:Taxation, City Hall and Elections
Post by: XChrisX on December 19, 2004, 11:28:05 PM
Actually, there is a redistributive function, a tax-free setting, a low rate of tax, a high rate, you can enable rebates..... all of these are settable. You can tax poor people huge amounts while letting the rich off, or even favour one town above the others.

Just before I start telling my users nonsense ;) ...

Is there a seperate treasury for each city or will all cities share the same treasury?

Could you add a modulehook somewhere to let the leader buy new features?! (I think Excalibur already had something like this in 0.97...)

I think of letting the actual leader buy / activate new modules, if the amount of gold in the treasure is "sufficient" ...


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on December 20, 2004, 02:20:09 AM
Thanks for the support, muchly appreciated indeed. :D

Currently all cities share the same treasury, and the same leader. In the future I may well use the same code-base to write a module which does elections on a smaller scale, to have leaders for each city.... but that lies in the future some way off, and they would not have the same broad powers as the leader in this mod has. There is a modulehook in the leader's office called "waroffice", though I can't remember if modulehooks work inside modules....

You'd still be able to hook in though through runmodule then selecting the $op as "office", so it doesn't really matter if the modulehook works or not. You could do an interface of some sort by which you could buy new features by that method.


Title: Re:Taxation, City Hall and Elections
Post by: XChrisX on December 20, 2004, 02:53:40 AM
Great... :)

Yes, modulehooks work inside of modules... it's a bit less... complicated than using the runmodule-hook-version...

Okay, let's build this city... *g*


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 20, 2004, 02:42:58 PM
Couple suggestions for the elections.....

a confim of some sort for ending the election....
once a person has won the election, they cannot run again??? what no incumbents????
Also could use a current election standings list somewhere.....
Maybe some election tools..... hire someone to make you look better.... pay for campagn signs..... (text banners shown to users as they play, with cantidate platform)
A limit to the quantity of cantidates...
Parties..... (NOT democrat or republican... maybe something with a little more humor)..
Impeachment!.... for those who really crank up the taxes.....

ok... so more than a couple.... I got carried away......


Title: Re:Taxation, City Hall and Elections
Post by: strider on December 21, 2004, 12:15:12 AM
Another interesting twist that could go with the system is have a city "Satisfaction" poll. Allow users to post how they feel about their leader that day. If the satisfaction poll ever drops too far, the player who is the leader gets a "sleeze" factor. Make their charm begin to take a nose dive. If their charm ever goes to Zero. . . they lose their office.

Each player could add to the poll via their preferences and change their opinion there at any time. Entire guilds might vote one way or the other depending on who the official was.

You can also have a little menu that posts how satisfied the people are with their leader. If it ever gets too high, make the city throw a "We love our King" day, (sort of like the game Civilization II used to do) and let the leader gain charm.

With what you've already built, it'd be pretty fun and easy.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 21, 2004, 06:22:28 AM
Another suggestion.... only show the vote box and submit button if there are 2 or more catidates.... or even go so far as to not allow voting until it is turned on by and admin.  

Also since you are entering a number, a drop down list or even a set of check boxes would be nice for the vote screen.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 21, 2004, 06:24:39 AM
Oh yes... and I noticed that the treasury needs to be rounded.... getting totals for gold in treasury at things like 583726.7887 gold.......



Title: Re:Taxation, City Hall and Elections
Post by: XChrisX on December 21, 2004, 06:29:15 AM
You can also have a little menu that posts how satisfied the people are with their leader. If it ever gets too high, make the city throw a "We love our King" day, (sort of like the game Civilization II used to do) and let the leader gain charm.

With what you've already built, it'd be pretty fun and easy.

That might work together with the gardenparty module... ;)

Set the Partytype setting to any desired value and the starting date to "today" and let's celebrate our mayor... ;)

Maybe some kind of custom title for the player who has this office... "mayor of Degolbourg" or something like that... (of course admin configurable ;) )


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 21, 2004, 06:50:54 AM
Hmmmm... here I am with another Idea..... I don't really think we want a "Mayor"...... or should a player be "King"....  but maybe a "Lord" in charge of the territory that the game covers.....

-EDIT-
and then maybe we can do something with the elected official's title.

-EDIT2-
Starting an election from the grotto link does not activate registration......


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on December 21, 2004, 08:33:14 AM
Hmmm.... I can't see anything wrong with the hook for registering in the grotto A couple of things which shouldn't be there, aye, but it should trigger registration fine. Altering the title is a good idea, I'll probably add that for 1.1, the voting is meant to be a little crazy, and there are special messages if you pick a number which isn't there..


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 21, 2004, 08:43:38 AM
the link in the grotto only seems to start the election but not trigger accepting cantidates.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on December 21, 2004, 08:49:14 AM
The link changes with each stage, clicking it once should start the registration of candidates, second time to start voting, third time to end it. I think that you were maybe testing it and had already been through once, if you had not newdayed inbetween that then you would not see the registration link. Thats the only thing I can think of. Registration ends once voting begins.... its not continuous. You have to allow time for people to sign up.


Title: Re:Taxation, City Hall and Elections
Post by: Selekta on December 21, 2004, 09:14:30 AM
Wow. I must say, that is an absolutely fantastic idea! I am extremely interested in how that turns out. Perhaps this "election idea" should be incorporated into more things. This allows players to choose their own leaders, and be run by them. This could add a whole new level of strategy and fun to the game. Sneak, this is commendable.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on December 21, 2004, 11:16:48 AM
Ok... here I am again... ;D

Claiming expenses does not work (doesn't seem to get the user right, haven't looked at code)

And another suggestion... Tax exempt status... which should be given to the mayor/lord.... and kept after exiting office (should be able to be taken away somehow or after a certain amount of time)...


Title: Re:Taxation, City Hall and Elections
Post by: Rowne on December 21, 2004, 04:18:08 PM
One of my users noted the expenses thing.  *Nod.*

I must say however that I was impressed by the original description of this and seeing it in action ... I'm still impressed!  *Perky.*  It's really good, Sneakabout.  This is a keeper on my server as it allows me to control Power Munchkins (tm) and for that, I cannot thank you enough.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on December 22, 2004, 12:03:54 PM
Wow, this an embarressing bug.... I forgot to add the $session['user']['gold']+=$expenses; line in. I even remembered to deduct it from the totalcash, but not to give it to them....

Fixed in my version, I'm uploading over the previous one in me shared folder now :P


Title: Re:Taxation, City Hall and Elections
Post by: Alagos on January 09, 2005, 03:12:57 PM
Nice mod, but what to do with the money? There should be some things, maybe like an upkeep for some modules. They shutdown, when you cant affort them.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 11, 2005, 05:14:58 AM
It really needs a running tally of current election stats.... a list of the cantidates... I think I have gone over a few things before....

I'll have to try and find some time to dig into this one if Sneak hasn't started some of these things already.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 11, 2005, 05:37:46 AM
Well, you can c/p the code for displaying the candidates easily enough, and I suppose you could put in the current vote totals, though I don't think it would help the election to be fairer... and encourage too much spamming as elections went on :P There is a balance between allowing people to know how they're doing and not having all the boards taken over, though since I've never run it on a real server meself I don't know how bad campaigning gets.....


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 11, 2005, 06:13:56 AM
Without campagning.... what fun is running for election.... ;D  

Also getting complaints that the taxman is taxing people into negative amounts.... am planning at looking at that this afternoon.  And yes we need to have something to do with the taxes.... maybe building city hall up to be larger and fancier... cleaning up the streets (if not clean village texts reflect this and special events could be triggered dealing with stepping on garbage, paper blowing into their face etc....)...  Forest events could then reflect this.... more crime if the government is not paying constables (robbers in the forest and village)....  

On the same note the amount that has to be spent to maintain such things should be dependent on how many player accounts there are (so as to keep the same balance between large games and smaller ones)...

I think this is a wonderful addition, just needs to mature a bit more as I am sure it will over time.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 11, 2005, 07:37:50 AM
I have been sketching out a few broad ideas in dead tree form about what could be added, especially in terms of constant costs, but I'd been stuck on a way of balancing them - your idea of proportional to the number of players is *ideal*, and once I get a job I'll be back to coding in me free time  :P

Also ye be right about the module, it be mostly intended as a staging ground for more things branching out, 'tis merely a start in making a comprehensive governance system  8)


Title: Re:Taxation, City Hall and Elections
Post by: Alagos on January 11, 2005, 08:21:18 AM
Those ideas are great.

I am  thinking about taking money from the government by hand for maintaining some modules right now... but its stressing over the time :-).

Looking forward to updates(btw: I am working on a german translation for it)


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 11, 2005, 03:43:39 PM
in taxation.php..... replacement newday code to make rebates and exemptions work independently... and with round code so as to put gold into treasury as whole amounts.

Code:
case "newday":
      $taxon=get_module_setting("taxon");
      if ($taxon==1) {
         $taxfree=get_module_setting("taxfree");
         $highlow=get_module_setting("highlow");
         $redistribution=get_module_setting("redistribution");
         $highestgold=get_module_setting("highestgold");
         $taxpaid=get_module_pref("taxpaid");
         $rebate=get_module_setting("rebate");
         if (get_module_pref("homecity","cities")==get_module_setting("hightaxtown","townfinance")) {
            output("`n`^Because of your town's status, you have to pay extra tax!`n");
            $taxfree=0;
            $highlow=0;
         }
         if (get_module_pref("homecity","cities")==get_module_setting("notaxtown","townfinance")) {
            output("`n`^Because of your town's preferred status, you do not have to pay tax!`n");
            $notax==1;
         } elseif (($session['user']['goldinbank']<$taxfree)) {
            output("`n`7The taxman checks the bank and finds that you have no significant assets!");
            if ($rebate==1){
               $taxrebate=round(min(max($taxpaid * 0.01,10),500));
               $session['user']['goldinbank']+=$taxrebate;
               output("`n`7You have been granted a tax rebate of %s!",$taxrebate);
               debuglog("gained %s gold from a tax rebate",$taxrebate);
               $taxpaid-=$taxrebate;
            }
            set_module_pref("taxavoidance",0);
         } elseif ($session['user']['goldinbank']<$highlow) {
            $lowrate=get_module_setting("lowrate");
            $taxablebalance=($session['user']['goldinbank']-$taxfree);
            $taxloss=round(max(($taxablebalance * $lowrate * 0.01),2));
            output("`n`7The taxman checks the bank and finds that you have taxable assets! You are forced to pay %s gold into the treasury!`n`0",$taxloss);
            $session['user']['goldinbank']-=$taxloss;
         } elseif ($redistribution==0) {
            $lowrate=get_module_setting("lowrate");
            $lowtaxablebalance=($highlow-$taxfree);
            $lowtax=round(max(($lowtaxablebalance * $lowrate * 0.01),2));
            $highrate=get_module_setting("highrate");
            $hightaxablebalance=($session['user']['goldinbank']-$highlow);
            $hightax=round(max(($hightaxablebalance * $highrate * 0.01),2));
            $taxloss=($hightax+$lowtax);
            output("`n`7The taxman checks the bank and finds that you have extensive taxable assets! You are forced to pay %s gold into the treasury!`n`0",$taxloss);
            $session['user']['goldinbank']-=$taxloss;
         } elseif (($redistribution==1)&&($session['user']['goldinbank']>$highestgold)) {
            $taxloss=($session['user']['gold'] + $session['user']['goldinbank']);
            $session['user']['gold']=10;
            $session['user']['goldinbank']=1;
            output("`n`7The taxman checks the bank and gets buried in your money! He confiscates all your liquid assets! You are left with a pittance!`n`0");
            set_module_pref("taxavoidance",0);
         }
         if (($session['user']['gold']>$session['user']['goldinhand'])&&($session['user']['gold']>1000)&&($notax==0)) {
            output("`n`&The taxman doesn't notice the gold hidden in your pouches - you don't get taxed on that!`n`0");
            set_module_pref("taxavoidance",1);
         }
         $taxpaid+=$taxloss;
         $totalcash=get_module_setting("totalcash","townfinance");
         $totalcash-=$taxrebate;
         $taxloss *=0.9;
         $totalcash+=$taxloss;
         set_module_setting("totalcash",$totalcash,"townfinance");
         set_module_pref("taxpaid",$taxpaid);
      }
      break;


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 11, 2005, 04:43:56 PM
And now......

in town finance.php

change all instances of
Code:
set_module_setting("totalcash",$totalcash);

to
Code:
set_module_setting("totalcash",round($totalcash));

then also change
Code:
addnews("%s `^gained %s gold in expenses from the City Hall!",$leader,$expenses);

to
Code:
addnews("%s `^gained %s gold in expenses from the City Hall!",$session['user']['name'],$expenses);

this should patch up a couple of obvious things I noticed.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 11, 2005, 05:23:59 PM
And.... in election php

after
Code:
} elseif (($electionon==1)&&($havevoted==0)) {
            output("`n`n`@An election is on! Warriors are queueing up to vote to one side of the room!");
            addnav("Talk to the Registrar","runmodule.php?module=election&op=vote");
         }

add
Code:
elseif (($electionon==1)&&($havevoted==1)) {
            output("`n`n`@An election is on! Warriors are queueing up to vote to one side of the room!");
            output("`n`3So far %s votes have been cast.",get_module_setting('votescast'));
         }

this will at least tell those who have voted that the election is still on and how many votes have been cast.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 12, 2005, 01:18:14 AM
Aye, these look like good changes. If ye email them to me or something I'll put them up in me shared folder.


Title: Re:Taxation, City Hall and Elections
Post by: bumper on January 15, 2005, 11:59:58 AM
what version are we up to now on these mods? I am sorry, I have been on hiatus for about 3 months.


Title: Re:Taxation, City Hall and Elections
Post by: enderwiggin on January 15, 2005, 04:50:51 PM
Is there going to be a new version released with Lonny's suggested changes?


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 16, 2005, 04:24:15 AM
He hasn't sent me them, so I haven't put them up.... if he does, I'll reupload with those new versions.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 16, 2005, 05:53:48 AM
He hasn't sent me them, so I haven't put them up.... if he does, I'll reupload with those new versions.

snatch 'em here http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=19


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 17, 2005, 03:37:01 AM
Cool, I'm uploading them over the existing ones now. Uploaded.


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 24, 2005, 10:24:37 PM
I wanted to give somebody the task of processing job applications.  So, I went into their user info and set them for that.  Then, to make the grotto visible, I gave them access to the grotto using the 'allow grotto access in cases where not offered bydefault.'

When they access the grotto, they ALSO have the ability to start elections!

Whoa nelly.  What I listed above is literally all I did with this fella.

Thoughts?


Title: Re:Taxation, City Hall and Elections
Post by: Arune on January 24, 2005, 10:44:18 PM
Quickest fix..

If your the mega user with all flags.

Just change the case superuser in election.php to:
Code:
case "superuser":
$electionon=get_module_setting("electionon");
$electionregister=get_module_setting("electionregister");
if ($electionon==1 & $session['user']['superuser']=3932159) {
addnav("Finish the Election","runmodule.php?module=election&op=finish");
} elseif ($electionregister==1 & $session['user']['superuser']=3932159) {
addnav("Start Election Voting","runmodule.php?module=election&op=votestart");
} else {
if ($session['user']['superuser']=3932159) addnav("Start Election Registration","runmodule.php?module=election&op=registerstart");
}
break;

Should work as a quick fix, I'm sure at some point Sneakabout will be adding some flags for certain users to be able to edit permissions. This module is still very new.

**NOTE**
 Please don't let this setup stick in your head if your learning LoGD coding. This is not a good practice and done properly it would probably be done via module preferences on a per user basis. So please remember this is just a quick fix so that you can make use of this module until an update is released.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 25, 2005, 02:25:54 AM
Hmmm..... I hadn't really thought of that as being a problem..... I'll probably limit the election starting etc button to whichever superuser flag allows access to game settings if you're letting everyone stumble around the Grotto :P


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on January 25, 2005, 02:38:42 AM
Hmmm..... I hadn't really thought of that as being a problem..... I'll probably limit the election starting etc button to whichever superuser flag allows access to game settings if you're letting everyone stumble around the Grotto :P

although it would be more work, a switch for every setting of the module grantable in the user editor would be most effective and versatile.  that's just my opninion, rather than basing it on something else, there may be instances where someone doesn't want it based off anything else.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 25, 2005, 04:35:25 AM
Maybe, however in my mind 'tis easier to group things with the existing flag which fits it best, stops ye having to go through all the staff and give them the extra flag.... I do give other flags, for examplt in the battlearena mod, which replicate having the SU flag in that location, but for this 'tis probably above user editor and should probably go in the settings category, not a flag for any UEditor person.

*may be incoherent*


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 06:01:30 AM
I for one like the access to be set in the module.  I don't like all the moderators in all of the module utilities, however I like some of the moderators to have access to some of the module utils..... if that makes sense to you... I have to agree with sixfoot on that one.  


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 25, 2005, 06:19:21 AM
I also think that a way to parse out the setting is best.   I'm glad I didn't screw something up.  :)  

I had in mind that I was going to make the job processor a paid job through city hall.  I was going to perhaps code it so that on each new day who ever was the job processor would be paid out of the treasury.   Having the person that has that job be able to oust the elected leader is just a bit too much power/temptation then I want in the hands of the job processor.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 10:05:10 AM
Ok.... updated the election system with some major additions...
called it ver 1.1

Added per user grotto settings -  now works either way can do per user or all superusers.
Added confirm options when stepping through election phases.
Added village notice for election phase.
Added Election statuses (displays in city hall)
Added Campagn tools (not admin configurable at this time)

Campagn tools include news blips, and campagn posters.

the link
http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=19


Title: Re:Taxation, City Hall and Elections
Post by: Arune on January 25, 2005, 10:23:29 AM
Nice work.

BTW One mispelling I noticed in election.php

cantidate should be candidate


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 11:16:19 AM
Updated election to ver 1.11..... small poster display fix and fix for reset of registered candidate.  You may have to user edit your candidates if they have had a new day (ver 1.1).... same link....


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 25, 2005, 12:41:41 PM
I'll browse through these changes and upload to me shared once I've taken a looksee....


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 12:47:05 PM
Well.... I 'spose I should upload the next wave of changes (ver. 1.12).....

There done....


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 25, 2005, 01:01:16 PM
Bah, making me download constantly...... :P

Thanks fer the work ye're doing on this lonnyl, I've been occupied with other things recently so I haven't been working on improving me old mods as much as I'd like to be.

Aye, all looks good to me, uploaded over me file.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 02:42:39 PM
Still at it.....

Ver 1.13 of election.php

now with election banners!  Candidates may purchase 1000 banners for 5000 gold.....

http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=19


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on January 25, 2005, 03:32:13 PM
now with election banners!  Candidates may purchase 1000 banners for 5000 gold.....

Ok..... changed to 5000 banners for 5000 gold.... 2000 banners lasted 15minutes (between 2 candidates)......

No update to the file here yet.... I'll wait till I have a few more changes...... ;D


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 25, 2005, 07:17:44 PM
This is a general installation question probably- but when I want to install a new version of the file, do I just upload it over the existing file, or should I unactivate and then delete the old files, first, upload, and then reactivate?


Title: Re:Taxation, City Hall and Elections
Post by: Sichae on January 25, 2005, 07:20:48 PM
This is a general installation question probably- but when I want to install a new version of the file, do I just upload it over the existing file, or should I unactivate and then delete the old files, first, upload, and then reactivate?

Well, it all depends. If the names of the files themselves have been changed, then uninstall, and remove from server. Put up new files and install/activate.

If they are the same names, then just upload them into the modules folder, and the game should detect changes, if any, and reinstall it on it's own. If not, then you just need to reinstall it yourself.


Title: Re:Taxation, City Hall and Elections
Post by: Dannic on January 25, 2005, 07:29:40 PM
Just remember any information you have for your users will disappear when you uninstall.


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 26, 2005, 09:02:32 AM
Thanks guys.

I've been testing this out.  Am I correct in understanding that there isn't a way to admin cap the tax rates?  In the grotto, I can manually change the rates but it seems as though its the exact capability thats in city hall.

The reason why I'm asking is because it would be possible for the leader to tax the crap out the population, and as the game owner, I wouldn't want my population to decide they didn't want to play anymore.  There is already a minimal tax and they are whining.   ;)  Being able to cap what the leader is able to do based on my own judgment as the game moderator would be good.

Some other ways around this- I think some of which were alluded to by others- might be to:

1.  Have leaders of each towns in the multicity mod, and then a 'president' or prime minister.  You can configure how many votes from the leaders of the cities would override the prime minister's policies.

2.  You could have a council of more or less equal people, say, of 3 people.  1 could be the chair.  But it could require 2 of 3 votes to authorize the change.  So the leader could change the setting but at least one other member of the council would have to validate it for it to go into effect.

3.  Someone already mentioned taking the leader out via taking away their charm points.   Some mechanism for the players to remove unruly leaders- other then referring to me, the game owner- would be extremely helpful.

4.  Limit on the term.  Unless I've missed it, there isn't a way to limit the number of days a person is a leader.  At least if there was a configurable term, players could have hope waiting out the hoodlum taxing the tar out of them.

Just some thoughs.

I would like to see all of them, but #4 seems the easiest 'fix'.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on January 26, 2005, 09:18:33 AM
I do have plans for the Protest function in City Hall to have some kind of effect. probably sapping charm and triggering an election...  as to the nature of the taxing, aye, itr allows for a lot of freedom, which is indeed a two-edged sword. You can easily limit how much the leader can put the tax up to by altering the range which he can input, if you really want to limit it for your server.


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 26, 2005, 09:32:29 AM
Ah.  Ok, I think that range setting makes more sense to me now.  I thought the leader could control that, too, but come to think of it, no.


Title: Re:Taxation, City Hall and Elections
Post by: sntjohnny on January 26, 2005, 09:44:26 AM
Ok, I don't know if its just because I happen to be a megauser and also the town leader, but there was nothing keeping me as the leader from changing the maximum interest rate charged.  I could only- it seems- cap the amount taxable.


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 08, 2005, 05:11:44 AM
so i held the election, people ran, then people voted, and i entered a winner and turned off the election, but it says "the query was empty" when i go back to the village.  if i turn the election back on, the banners and such still show, but the navas show up as there is already a winner...I hope you understand that..


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 14, 2005, 07:25:28 AM
looks like ender is having the same problem, but didn't search first:)
http://dragonprime.net/index.php?board=14;action=display;threadid=1600;start=msg13990#msg13990

so can we get a working copy of this, or a status report?


Title: Re:Taxation, City Hall and Elections
Post by: enderwiggin on February 14, 2005, 03:50:13 PM
I eventually did a search, which prompted me to turn the election off.  However, I didn't reset the mod or do anything that should have triggered this to my knowledge.  There is another admin in my game, and he may have reset it, but I don't know why he would have.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 14, 2005, 04:45:03 PM
What navs are still there????   I am updating this at the moment and would like to make sure I get everything.... :o


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 14, 2005, 05:47:33 PM
none, it's just a white page.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 14, 2005, 08:54:53 PM
I really haven't experienced this at all...... I've been running this module for some time now.  I am at a loss as to what to do to remedy the problem.   Nor can I find a place where a query empty message could come up...  


Title: Re:Taxation, City Hall and Elections
Post by: enderwiggin on February 14, 2005, 09:05:21 PM
If I recall, I think the problem only occurs when the election resets or ends before anyone actually decides to run.


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 15, 2005, 01:20:59 AM
i have 3 people running, all with votes, with 1 with 3 more votes than anyone else, then i follow the link in the grotto to end the election. and once you get to the village, you see that.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 15, 2005, 06:40:15 AM
The only thing I can thing of (after looking at the hooks that are called from the village), is that the electionon setting is not getting reset to 0.   Thus causing the banner and or poster code to run from the village or everyhit hooks.  Although both the banner and poster code is quite capble of running with no banners or posters in the module prefs, so that should not cause an error.  

Now the error of empty query.... where did you see that??? in the grotto while finishing the election? or in the village at the white screen?


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 15, 2005, 07:35:44 AM
in the village.  grotto everything works fine.


Title: Re:Taxation, City Hall and Elections
Post by: enderwiggin on February 15, 2005, 04:14:27 PM
Same here, village.php was a white page with the text "the query was empty"


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 15, 2005, 04:15:51 PM
i believe the winner acctid and name are not filled...i editted those manually, and it seems to be stable...for now.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on February 16, 2005, 12:33:22 PM
Hmmm..... lonnyl, where do you think these errors are coming from? I can't see anything which should do this.  I'm no SQL head though, so I don't know whether your SQL for posters is going wrong or anything like that.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 16, 2005, 12:35:09 PM
Shouldn't be.... and there is also no reason the winners name and account ID should not have been filled in......


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on February 16, 2005, 12:37:40 PM
Has anyone made a module which interlinks with this which might cause this? I'm fresh out of ideas for what might cause this....


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 16, 2005, 12:45:50 PM
Ummmm.... I have to ask what version you both are running???? is it the latest version?


Title: Re:Taxation, City Hall and Elections
Post by: enderwiggin on February 16, 2005, 01:34:32 PM
As far as I know, the latest version.


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on February 21, 2005, 05:07:34 AM
certainly do have the latest version.  I can recreate this over and over if you would like to witness it.


Title: Re:Taxation, City Hall and Elections
Post by: lonnyl on February 22, 2005, 05:59:31 AM
Ok... added this to my todo list.... will continue to try and figure out....


Title: Re:Taxation, City Hall and Elections
Post by: Fred on February 25, 2005, 05:19:07 AM
Hey there,

I am a player on a server which is running this module.  We have elections going on right now, and I am a candidate.  I had a few ideas and suggestions.

  • Campaign Office: navigations should show up even when player has insufficient gold;
  • Campaign Office: guidelines for posters and banners;
  • Leafletting: in the style of Crazy Audrey

campaign office navigations
At  present, when a person enters the Campaign Office s/he sees the navigations for news blips, posters, and banners only if s/he is carrying sufficient gold at the time (by default, 500, 5000, and 5000).

What happened to me was, I registered as a candidate; at that time I got a message from Sneakabout which said, "Don't campaign too hard, the gods do not like frequent messages [paraphrase]."  I took this to mean that, since I did not have a poster in the village square, I should send mail to Admin with the text of my poster.

In this way I annoyed my sysadmin a little, oops.

If, in the campaign office, the navigations showed up at all times, I would have known to come back with more money to put up my poster.  The navigations could be active, but if a player in fact had insufficient gold, they wouldn't actually be able to buy.

guidelines for posters and banners

So, after having been corrected by my Admin, I came back to the campaign office with mucho gold.  I purchased a poster.

Being a foolish person I included quotation marks in my poster.  Of course I should have realized that quotation marks are a string delimiter and would do funny things.  My poster did show up but was rather strange-looking.

For the terminally foolish players like me, it might be helpful to have a little sentence which said, "You may use color in your poster, but your text should not include quotation marks ("like this").  Single quotes ('like this') are acceptable."

Leafletting

I am inspired by the Crazy Audrey module to suggest that candidates might periodically appear in the village square, handing out leaflets.

There is a random chance of someone appearing and then a random choice is made from among registered candidates as to which one appears.

A player who accepts a leaflet from the candidate may choose to stand and chat for a moment, which might have minor consequences (gain charm from being flattered, or lose a turn from losing track of time, that sort of thing).

Thanks for listening!
Fred a.k.a. david5
vote for Pirate Fred!


Title: Re:Taxation, City Hall and Elections
Post by: Fred on February 25, 2005, 11:11:42 AM
Ah,

Re-reading my post I notice that the tone makes it sound almost as if I mean these to be criticisms of the module: not so, not so!  I should say that I think this module is a very fun thing and has been adding to my enjoyment of the game!  The ideas I mentioned above are just that, ideas: things I think could make it more fun for the players.

Thanks for listening,
Fred a.k.a. david5
vote for Pirate Fred!

note to self: do not post on forums at 5 in the morning


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on February 25, 2005, 11:40:06 AM
Looking at your suggestions, they seem fairly straightforward.

It's probably easiest to leave the navs hidden but add to the outputs some info on the options, I've uploaded a version with an added line to me shared directory.

The second point is a good one, it probably shouldn't do that, and there's probably some function somewhere which fixes this. However, I don't know it. I'll hope for wiser heads than mine to point me in the right direction.

I'm not too sure about leafletting, especially about it giving possibility of game effects. However, if someone coded something like a link to "Talk to the Candidates" where you can display a longer message at the cost of a Forest Fight for each person, that could be balanced. However, I'm currently working on me shops, so finishing those up is taking me time ATM.


Title: Re:Taxation, City Hall and Elections
Post by: ChAoS on April 18, 2005, 08:39:40 PM
Download link displayed by lonny's checkmodversion is wonky. Points to localhost or something

Election System is now at version 1.13. Version 1.2 is available.
Taxation System is now at version 1.0. Version 1.2 is available.


http://www.emeraldforestseattle.org/forums/games/lotgd/lotgd-1.0.0/Ask%20Nicely!

??


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on April 20, 2005, 04:26:03 AM
Download link displayed by lonny's checkmodversion is wonky. Points to localhost or something

Election System is now at version 1.13. Version 1.2 is available.
Taxation System is now at version 1.0. Version 1.2 is available.


http://www.emeraldforestseattle.org/forums/games/lotgd/lotgd-1.0.0/Ask%20Nicely!

??

just get it directly from lonny's link .
http://www.pqcomp.com/modules/mydownloads/visit.php?cid=3&lid=19


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on May 26, 2005, 02:42:11 AM
was there any attempt in making this able to handle a mayor for each city?


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on May 26, 2005, 03:06:31 AM
There is a problem - this should be done using objprefs, but objprefs track by number, and giving villages numbers is difficult, with several large holes when people add/remove villages.


Title: Re:Taxation, City Hall and Elections
Post by: sixf00t4 on May 26, 2005, 03:42:49 AM
perhaps settings like:
what is city 1:
what is city 2:
blah blah blah.  it will only be able to support so many cities though.


Title: Re:Taxation, City Hall and Elections
Post by: Sneakabout on May 26, 2005, 08:02:11 AM
Hardcoding like that is rarely the answer - if I were to do it like that I'd build a separate editor.


Title: Re:Taxation, City Hall and Elections
Post by: BlackWolfe on June 16, 2005, 06:52:06 PM
Does this work well with 1.0.2?   On my site, I get a white page when I click on the City Hall link.  When people purchase a large poster, it screws up all of the coding (ie it stretches out the template).

Are these common errors?


Thanks!


Title: Re:Taxation, City Hall and Elections
Post by: Sichae on June 16, 2005, 07:11:15 PM
There is a problem - this should be done using objprefs, but objprefs track by number, and giving villages numbers is difficult, with several large holes when people add/remove villages.

Well, you could use the validlocation modulehook, pump them into an array (array_push();), take all of those, then apply an array_flip(); PRESTO, you have an array, then when print_r will give:

Example (http://sichae.uk.to/a.php)

Now, you should be able to cop the way to get all the things into the array from the scry (or gravespeak) script**, and then just put it into this type of format (to make sure it works):

Code:
$a = array(1=>"Degolburg","Glorfindal","Glukmoore","Blah","Romar");
// $a will eventually be something like... validlocation... blag!
$b = array_flip($a);
echo("<pre>");
print_r($b);
echo("</pre>");

I am sure you could take it from there. :)

**
Code:
$vloc = array();
$vname = getsetting("villagename", LOCATION_FIELDS);
$vloc[$vname] = "village";
$vloc = modulehook("validlocation", $vloc);
ksort($vloc);
reset($vloc);

$vloc would become the $a.

Unless, you have already thought of this. I am sure you could hook, low priority, into everyhit, and check to see if the any new validlocation hooks pop up (count($vloc)). If so, then have it push the new one in, and then push it into the DB, via SQL or game function.


Title: Re:Taxation, City Hall and Elections
Post by: ArchAssassinKenny on July 01, 2005, 10:45:52 PM
I've Installed and Activated all of these

http://dragonprime.net/users/Sneakabout/election.txt
http://dragonprime.net/users/Sneakabout/taxation.txt
http://dragonprime.net/users/Sneakabout/townfinance.txt

but when i go to the City Hall i get a white page....any ideas why and what i may need to fix?


Title: Re: Taxation, City Hall and Elections
Post by: jgjtpw on March 03, 2006, 01:21:55 PM
I have somelike the same problem... I used sneakabout's lib...

This is what I get when I finish voting sessions...

(ver 1.13) pqcomp library...

Quote
Voting will now end, and the winner should be announced through a MotD as well as the methods automatic in this module. TPHP Warning: "Variable passed to each() is not an array or object"
in /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php at 191.

Call Stack:
2: each(false) called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php on line 191
3: include("/home/pelkwijk/domains/pe...") called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/election.php on line 182
4: election_run() called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/runmodule.php on line 32

PHP Warning: "array_multisort(): Argument #1 is expected to be an array or a sort flag"
in /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php at 194.

Call Stack:
2: array_multisort(NULL, 3, 1) called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php on line 194
3: include("/home/pelkwijk/domains/pe...") called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/election.php on line 182
4: election_run() called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/runmodule.php on line 32

PHP Warning: "reset(): Passed variable is not an array or object"
in /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php at 195.

Call Stack:
2: reset(NULL) called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php on line 195
3: include("/home/pelkwijk/domains/pe...") called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/election.php on line 182
4: election_run() called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/runmodule.php on line 32

PHP Warning: "Variable passed to each() is not an array or object"
in /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php at 196.

Call Stack:
2: each(NULL) called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/lib/election.php on line 196
3: include("/home/pelkwijk/domains/pe...") called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/modules/election.php on line 182
4: election_run() called from /home/pelkwijk/domains/pelkwijk.be/public_html/lotgd/runmodule.php on line 32


Title: Re: Taxation, City Hall and Elections
Post by: ratbastid on March 12, 2006, 05:14:03 AM
This is an awesome collection of plugins, sneak. Thanks!

One issue--I want to add taxation to slow down some of my more powerful players. But I've also got the "Dwellings" module installed. So I want the dwellings' coffers to be taxable too. Any thoughts on adding that? Or, where should I look to hack it myself?


Title: Re: Taxation, City Hall and Elections
Post by: Sichae on March 12, 2006, 07:15:59 AM
You could really just add onto the newday-runonce or newday (if existant) hook of the taxation module, then call in the stats of the coffers, using an SQL line (could be gotten from dwellings scripts) and then taxing a certain amount, restoring that new amount and then sending a systemmail towards the owner of the dwelling.


Title: Re: Taxation, City Hall and Elections
Post by: ratbastid on March 15, 2006, 07:50:08 AM
Okay, maybe I'm being dense here, but there are some things described in this thread that I'm just not seeing in my installation.

First of all, I don't seem to have links that step you through the states of an election. I have two drop-downs in the "Election" module, one for registration and one for voting.

I started with registration, and two members (including myself) registered. I announced via MOTD a closing date for voting, and on election day, I had won. I'm also master superuser. I changed the "election on" drop-down to "no". I then had to manually fill in the name and acctid of the winner (me).

Then I went mundane, and didn't see any "leaderish" navs in the City Hall or anywhere else. I tried manually making a redshirt account I keep around for testing purposes the mayor briefly, and that account didn't see anything "leaderish" in its navs either.

What am I missing here?


Title: Re: Taxation, City Hall and Elections
Post by: DarQness on March 16, 2006, 08:53:30 AM
Hey- complete separate questions/add-on, would it be possible to have the elections so that every certain amount of days, a new election has to be called to allow other players (if they are elected) a chance to run for mayor?


Title: Re: Taxation, City Hall and Elections
Post by: trapeur on August 17, 2006, 05:18:03 AM
When a player make an annoncement for the election, in his message, there are th \ before every '

for exemple, look thie picture.

(http://img65.imageshack.us/img65/7379/votforlp7.jpg)

thanks

and bye


Title: Re: Taxation, City Hall and Elections
Post by: trapeur on August 17, 2006, 07:54:11 AM
i have an error.

look

(http://img114.imageshack.us/img114/6868/yocfm0.jpg)

and


(http://img239.imageshack.us/img239/381/yicpu5.jpg)




Thank for your help.

+


Title: Re: Taxation, City Hall and Elections
Post by: trapeur on August 20, 2006, 02:45:49 PM
up


Title: Re: Taxation, City Hall and Elections
Post by: trapeur on August 26, 2006, 06:50:35 AM
Plz hep me :(

Help me :(


Title: Re: Taxation, City Hall and Elections
Post by: Sichae on August 26, 2006, 09:09:47 AM
Sneakabout has been quite inactive in the community, and thus his modules have not been updated in a while. You will have to wait for someone to pick this project back up.


Title: Re: Taxation, City Hall and Elections
Post by: trapeur on August 27, 2006, 07:16:12 AM
ok, i wait this !!
+


Title: Re: Taxation, City Hall and Elections
Post by: Capelthwaite on September 03, 2006, 12:23:27 PM
*notes that this is just a case of $row being the wrong type because it isn't initialised*

Putting in the line $row = array(); just before the call $puzzle=showform($puzzleinfo,$row,true); should work to fix it.

No file alas, as I don't have your file! It should be around line 320..... you can alter it yourself and it should work.


Title: Re: Taxation, City Hall and Elections
Post by: SinisterDragon on September 18, 2006, 02:40:36 PM
This is the second person that i've had report this before...so I thoguht i'd make a post about it.....
here's the petition i got: (btw...this is about the building in the forest....i'm pretty sure it's for this module...if not, lemme know and i'll figure out which one it is for XD)
Quote
Something Special!
As you wander through the bracken you spy what seems to be large building through the trees. You cautiously walk closer, to find that it is a grand building, with clerks rushing past windows carrying huge amounts of parchment and sacks of gold. Though the building looks interesting, you notice guards patrolling the clearing.

Do you want to look further and investigate this strange building?

my options are to enter the building,
snoop around the outside,
return to the forest,

and it wont let me go back to the forest


Title: Re: Taxation, City Hall and Elections
Post by: Capelthwaite on September 19, 2006, 06:51:22 PM
*can't see anything which would cause that....*


Title: Re: Taxation, City Hall and Elections
Post by: SinisterDragon on September 19, 2006, 06:57:55 PM
hmm.....
somethin's gotta cause it tho eh? XD

i'd look...but i twouldn't do much good :(


Title: Re: Taxation, City Hall and Elections
Post by: Capelthwaite on September 19, 2006, 07:03:37 PM
Could just be user messing up the fixed nav system, and interpreting that wrong.

You can troubleshoot by triggering the special using the gamedev tools to enter the special manually, this'll tell you if it is always happening, or if it is the user's fault.


Title: Re: Taxation, City Hall and Elections
Post by: ombrophiliac on September 20, 2006, 05:59:54 AM
The elections campaign screen title says "CAMPAGN" I believe.


Title: Re: Taxation, City Hall and Elections
Post by: saltlover on October 16, 2006, 05:40:28 PM
Hiya!

I was wondering how to clear the past elections.  We want to start a new election yet it still has all the people who ran the last time.

thanks!


Title: Re: Taxation, City Hall and Elections
Post by: Talisman on October 16, 2006, 05:54:02 PM
If all else fails, uninstall the module - that will clear all settings for it - then reinstall it.


Title: Re: Taxation, City Hall and Elections
Post by: saltlover on October 16, 2006, 06:15:50 PM
*bangs head on desk*

Yeah that was obvious!

Thanks!


Title: Re: Taxation, City Hall and Elections
Post by: Wraith on February 19, 2009, 06:04:21 PM
I get this when I enter City Hall, My Office or Executive Suite, and Make A Proclamation, running v2.0 with 1.1.1:

Code:
PHP Warning: "array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object"
in C:\Program Files\EasyPHP 2.0b1\www\lotgd-1.1.1_Dragonprime_Edition\lib\showform.php at 358.

Call Stack:
2: array_key_exists("proclaim", NULL) called from C:\Program Files\EasyPHP 2.0b1\www\lotgd-1.1.1_Dragonprime_Edition\lib\showform.php on line 358
3: showform(Array(
"proclaim"=>"Your Proclamation"
), NULL, true) called from C:\Program Files\EasyPHP 2.0b1\www\lotgd-1.1.1_Dragonprime_Edition\modules\lib\townfinance.php on line 181
4: include("C:\Program Files\EasyPHP ...") called from C:\Program Files\EasyPHP 2.0b1\www\lotgd-1.1.1_Dragonprime_Edition\modules\townfinance.php on line 111
5: townfinance_run() called from C:\Program Files\EasyPHP 2.0b1\www\lotgd-1.1.1_Dragonprime_Edition\runmodule.php on line 33



Title: Re: Taxation, City Hall and Elections
Post by: MarcTheSlayer on February 19, 2009, 07:07:17 PM
This should find that. :)

Code:
#
#-----[ OPEN ]-----
#
root/lib/townfinance.php

#
#-----[ FIND ]-----
#
$puzzleinfo = array(
"proclaim"=>"Your Proclamation",
);

#
#-----[ BEFORE, ADD ]-----
#
$row = array(
"proclaim"=>$proclaimcost,
);

#
#-----[ SAVE/CLOSE FILE ]-----
#


Title: Re: Taxation, City Hall and Elections
Post by: Wraith on February 19, 2009, 07:31:00 PM
Starting at Line 175:

Code:
} else {
$row = array(
"proclaim"=>$proclaimcost,
);
$puzzleinfo = array(
        "proclaim"=>"Your Proclamation",
          );
require_once("lib/showform.php");

Though, I have such in modules\lib.

That fixed it.

Now I have "Your Proclamation" with a field to the right containing 500, the cost of such, and I see in your code why.

Thank you so much with this.


Title: Re: Taxation, City Hall and Elections
Post by: MarcTheSlayer on February 19, 2009, 08:22:51 PM
Part of the code is being displayed with the form?


Title: Re: Taxation, City Hall and Elections
Post by: Wraith on February 19, 2009, 10:19:55 PM
No, the cost (currently set to 500), which the above script tells it to; it works, I thought it odd and worth mentioning, albeit exactly what it is to do, with regard to initializing a variable [like certain programming languages require]--I wondered why we didn't just make the variable to contain the proclamation begin with a value of perhaps "Hear, Ye; Hear, Ye!  " or somesuch.  Then, it'd meet 2 purposes as well.  Would this work or be correct?

Code:
$row = array(
"proclaim"=>$proclaimcost,
);

Code:
$puzzleinfo = array(
"proclaim"=>"Your Proclamation",
);


Title: Re: Taxation, City Hall and Elections
Post by: Haleth on May 27, 2010, 04:25:48 AM
In lib/taxation_event, case 15, where you can get your personal tax records, there is a mistake. In game the variable $taxpaid is always empty.
Reason is in line 113 '$taxpaid=get_module_setting("taxpaid");'. Change to '$taxpaid=get_module_pref("taxpaid");' will solve the problem.

© 2019 DragonPrime - LoGD Resource Community
Email Talisman: talisman -at- gmail.com
&oeXs)2U7=V BmܲV.U e=;p\}eG )Jj} C5EH7ˤH=j } mo|*Ŋw{drV_@IV>/- TFQJ׀̀Ve}l1,V O iNYx͘$e$;
Forums: Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines