vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - Realm Conquest System (https://vborg.vbsupport.ru/showthread.php?t=211920)

Sugoi na 05-11-2009 08:49 PM

Quote:

Originally Posted by Tagert (Post 1808910)
Just installed the mod on my forum and the people love it :)
I love it too!
Not sure if this has been mentioned before, but are there any plans on adding like a bribe feature.

Like player xx bribes player yy with xx amount of gold in order for him to join his nation or something like that :P

I am sorry but that would be a terrible addition as #1 people will nation hope just for cash & #2 1 person in a nation doesn't make much of a difference so it would be a waste to "bribe" them to join.

BlueNinjaGo 05-11-2009 09:10 PM

How about the ability to bribe a larger nation not to attack for x amount of turns/hours/days....?

Megatr0n 05-11-2009 09:12 PM

Sugoi na,

You said to "Set your items much lower lol.." in a post earlier to avoid that error that Flowsion mentioned. How would we do this?

Megatr0n 05-11-2009 09:12 PM

Quote:

Originally Posted by Flowsion (Post 1807152)
Also, if you have over a million defence 'Village Overview' doesnt work.

Darkfire122333, know how to resolve this issue? Get a Fatal error and too much memory was being used.

tipoboy 05-11-2009 09:25 PM

Quote:

Originally Posted by Flowsion (Post 1807152)
Also, if you have over a million defence 'Village Overview' doesnt work.

i had over a million defense rating on village overview and had no problem.

Jaxel is there a way to use different image extensions, i'd like to use animated gif's or transparent png's as images, instead of jpegs

thanks mate

Darkfire122333 05-12-2009 12:06 AM

Quote:

Originally Posted by Megatr0n (Post 1808948)
Darkfire122333, know how to resolve this issue? Get a Fatal error and too much memory was being used.

Best advice I can offer is reset the game. Reduce all the values of everything so that it will not add up to a million defense rating...

maybe add a reset feature to the game, that the game resets say.. once per month... giving people a chance to have a fun time playing and not have to battle all the high players all the time. This is just my optinion, it is not a fix, but a work-around.

Quote:

Originally Posted by tipoboy (Post 1808953)
i had over a million defense rating on village overview and had no problem.

Jaxel is there a way to use different image extensions, i'd like to use animated gif's or transparent png's as images, instead of jpegs

thanks mate

I would say open Conquest.php and look for "jpg". I did that, came up with about 7 options, change them all to bmp, or gif or whatever, and should work

DO NOT QUOTE ME ON THAT! I do not have a personal board to do this on, only my public one, and I am personally not going to try this on a running board. Sorry.

Tagert 05-12-2009 06:02 PM

got a few suggestion/additions:

team balance, so people can't just join a team because everyone is joing just that one :P

random team join function

ability to delete/destroy your village and start all over. If you made an error in planning or something :p

BlueNinjaGo 05-12-2009 08:29 PM

Major error.... I went to attack a user who joined in and got a huge error
Quote:

Fatal error:

* The following users were not found:
1. &quot
2. THE&quot
3. TRICKY

Unable to proceed with save while $errors array is not empty in class vB_DataManager_PM in [path]/includes/class_dm.php on line 810
#0 vb_error_handler(256,

* The following users were not found:
1. &quot
2. THE&quot
3. TRICKY
That was followed by a huge block of code/arrays that I can't screen shot or copy and paste due to it's length.

I'm assuming it's due to the user having " in his name since I removed " from his username and it works again.


Also, Suggestion: a clock in the conquest system that tells the users how long until the next cycle hits.

rknight111 05-12-2009 09:50 PM

I decided to uninstall the game on my site untill the errors are all fixed. I'll keep an eye on the thread and play on jaxals site. Once its all good I'll reinstall.

Darkfire122333 05-12-2009 09:52 PM

Re-Quoting how to edit so that teams have to be balanced... since people cannot read back few pages ^.^

Quote:

Originally Posted by Collussus (Post 1804652)
I fixed it up the ugly way. No plugins since there's no hooks in his add-on whatsoever, so i'm afraid you're gonna have to dig up the php files....

open up conquest.php

replace the whole
PHP Code:

if ($_REQUEST['do'] == 'enlist')
{
    
$totals =  $vbulletin->db->query_first("SELECT COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_players AS conquest_players
    "
);

    if (!
$totals['playerID']) { $totals['playerID'] = 1; }
    if (!
$totals['pGold']) { $totals['pGold'] = 1; }
    if (!
$totals['pTroops']) { $totals['pTroops'] = 1; }

    
$nations $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);

    while (
$nation $vbulletin->db->fetch_array($nations))
    {
        if (
file_exists($thumbdir.'/nations/'.$nation['nationID'].'.jpg')) { $imageE true; } else { $imageE false; }
        
$nation['AVGplayerID'] = number_format($nation['playerID'] / $totals['playerID'] * 1002);
        
$nation['AVGpGold'] = number_format($nation['pGold'] / $totals['pGold'] * 1002);
        
$nation['AVGpTroops'] = number_format($nation['pTroops'] / $totals['pTroops'] * 1002);
        eval(
'$nationsHTML .= "' fetch_template('conquest_enlist_bit') . '";');
    }

    
$pageNAME $vbphrase['conquest_enlist'];
    eval(
'$conquestHTML .= "' fetch_template('conquest_enlist') . '";'); 

    
$navbits[] = $pageNAME
    
$navbits construct_navbits($navbits); 

    eval(
'$navbar = "' fetch_template('navbar') . '";'); 
    eval(
'print_output("' fetch_template('conquest_SHELL') . '");');


with

PHP Code:

if ($_REQUEST['do'] == 'enlist')
{
    
$totals =  $vbulletin->db->query_first("SELECT COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_players AS conquest_players
    "
);
    if (!
$totals['playerID']) { $totals['playerID'] = 1; }
    if (!
$totals['pGold']) { $totals['pGold'] = 1; }
    if (!
$totals['pTroops']) { $totals['pTroops'] = 1; }

    
$nations $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);
    
$nationsagain $vbulletin->db->query_read("SELECT conquest_nations.*, COUNT(playerID) AS playerID, SUM(pGold) AS pGold, SUM(pTroops) AS pTroops
        FROM "
.TABLE_PREFIX."conquest_nations AS conquest_nations
        LEFT JOIN "
.TABLE_PREFIX."conquest_players AS conquest_players ON conquest_nations.nationID = conquest_players.nationID
        GROUP BY conquest_nations.nationID
    "
);
    
$totaleverything = array();
    while(
$nation2 $vbulletin->db->fetch_array($nationsagain))
    {
        
$totaleverything[] = number_format((($nation2['playerID']) + ($nation2['pTroops'])) / ($totals['playerID'] + $totals['pTroops']) * 1002);
        
    }
    
$id 0;
    while (
$nation $vbulletin->db->fetch_array($nations))
    {    
        if(!(
$totaleverything[$id] >= 33))
        {
            if (
file_exists($thumbdir.'/nations/'.$nation['nationID'].'.jpg')) { $imageE true; } else { $imageE false; }
                
$nation['AVGplayerID'] = number_format($nation['playerID'] / $totals['playerID'] * 1002);
                
$nation['AVGpGold'] = number_format($nation['pGold'] / $totals['pGold'] * 1002);
                
$nation['AVGpTroops'] = number_format($nation['pTroops'] / $totals['pTroops'] * 1002);
                eval(
'$nationsHTML .= "' fetch_template('conquest_enlist_bit') . '";');
        }
        
$id ++;
    }
    
    
$pageNAME $vbphrase['conquest_enlist'];
    eval(
'$conquestHTML .= "' fetch_template('conquest_enlist') . '";'); 
    
    
$navbits[] = $pageNAME
    
$navbits construct_navbits($navbits); 

    eval(
'$navbar = "' fetch_template('navbar') . '";'); 
    eval(
'print_output("' fetch_template('conquest_SHELL') . '");');


In this whole code i set it for 3 nations. Which means that if a nation is bigger than 33.33 percent it will not show on the enlist screen anymore.

You can change this setting here:

PHP Code:

if(!($totaleverything[$id] >= 33)) 

I know i fixed this up the ugly way, i'm sure the original maker will know a way to do this the good way. This was just my fast fix.


BlueNinjaGo 05-12-2009 11:50 PM

In regards to faction's natural bonuses and garrison's bonus, when are they calculated in? They aren't shown in the "village overview"?

Jaxel 05-13-2009 12:49 AM

My mind is a little strained on programming right now... so I'm taking a short break from programming for now. In the meantime, I'll be starting a Soulcalibur podcast on thursday.

Megatr0n 05-13-2009 12:53 AM

Hi Jaxel,

No sweat. However, is it okay you can tell us when to expect the next maintenance release and will that bug I reported via PM be fixed in that next release?

Darkfire122333 05-13-2009 01:00 AM

Hey Jaxel,

No worries, there is a few of us here helping other members as we can.
Take a break, you are doing amazing work, and we all appreciate it very much!
Hope to see you in working shape again soon, and look forward to seeing what you do to this mod!

valendono 05-14-2009 05:50 AM

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 72 bytes) in /var/www/html/forum/conquest/functions_conquest.php on line 60

Happen if that user have 2 turn every 15 minutes .. No limit soldiers sud be the problem. can u limit ?

BlueNinjaGo 05-14-2009 12:29 PM

Ok, I have a bug...

I have it set to 30 minute cycles, 2 turns per cycle. I turned off the computer yesterday with 1 turn unused. I signed on 8-10 hours later and I only have 9. (The cap is at 50)

Something's not adding up here. I had another user report the same thing.

Collussus 05-14-2009 03:10 PM

Quote:

Originally Posted by BlueNinjaGo (Post 1810631)
Ok, I have a bug...

I have it set to 30 minute cycles, 2 turns per cycle. I turned off the computer yesterday with 1 turn unused. I signed on 8-10 hours later and I only have 9. (The cap is at 50)

Something's not adding up here. I had another user report the same thing.

My guess is it's a database problem. Try going to the settings page and click save again. Otherwise reset the whole game, see if that fixes it.

BlueNinjaGo 05-14-2009 03:33 PM

Well I started doing a little log this morning and the times aren't very consistent

But it's been over 3 hours and I only have 10 turns, when it's supposed to be 12. I'm getting 2 turns each time the cycle hits, so that's correct. It's obviously not the hour default, since I'm getting 10, not 3. Is there anyway to check when the cycles are supposed to hit?

Darkfire122333 05-15-2009 09:44 AM

i am having the same problem... i am gaining 1 turn every hour or so, not consistant, and i am supposed to get 1 turn every 15 minutes...

using Apache Version 2.2.11
using PHP version: 5.2.9-2
using MySQL version: 5.1.33
Running off of: Windows 7 Ultimate Release Candidate (Build 7100)

no problems with anything else... works perfect except for the turns...

OcR Envy 05-15-2009 10:00 AM

Quote:

Originally Posted by BlueNinjaGo (Post 1810714)
Well I started doing a little log this morning and the times aren't very consistent

But it's been over 3 hours and I only have 10 turns, when it's supposed to be 12. I'm getting 2 turns each time the cycle hits, so that's correct. It's obviously not the hour default, since I'm getting 10, not 3. Is there anyway to check when the cycles are supposed to hit?


It's based on a cron job. If your a user does not hit a page that includes the cron your cycle will not run at exactly top of the hour. You can resolve this if you have the ability to run server side crons.

lighthazard 05-15-2009 01:23 PM

Why am I getting permission errors?

BlueNinjaGo 05-15-2009 01:32 PM

Quote:

Originally Posted by lighthazard (Post 1811168)
Why am I getting permission errors?

A little more detail? Did you just install? Was it working before but now there's errors?

PGAmerica 05-15-2009 04:47 PM

I just got this working in 3.8.2. Beautiful work. Thank you.

I made some changes so it fits within a Lord of Rings genre tho. Instead of "Nations" it is "Races". See for yourself at http://www.traprunner.com/forums/conquest.php

Question: How do you remove a nation? I do not see any options to do this.

DobieGillis? 05-15-2009 05:31 PM

Quote:

Originally Posted by PGAmerica (Post 1811324)
I just got this working in 3.8.2. Beautiful work. Thank you.

I made some changes so it fits within a Lord of Rings genre tho. Instead of "Nations" it is "Races". See for yourself at http://www.traprunner.com/forums/conquest.php

Question: How do you remove a nation? I do not see any options to do this.

I did mine in Star Trek

www.cooluniverse.net

will go Tolkien after

DobieGillis? 05-15-2009 05:32 PM

Quote:

Originally Posted by PGAmerica (Post 1811324)
I just got this working in 3.8.2. Beautiful work. Thank you.

I made some changes so it fits within a Lord of Rings genre tho. Instead of "Nations" it is "Races". See for yourself at http://www.traprunner.com/forums/conquest.php

Question: How do you remove a nation? I do not see any options to do this.

excellent work, man!!!!! Those pics are from LOTRO! Awesome!

PGAmerica 05-15-2009 05:56 PM

Quote:

Originally Posted by DobieGillis? (Post 1811342)
I did mine in Star Trek

www.cooluniverse.net

will go Tolkien after

I would look at yours but you have registration disabled.

DobieGillis? 05-15-2009 05:57 PM

Quote:

Originally Posted by PGAmerica (Post 1811360)
I would look at yours but you have registration disabled.

had to today. Getting hit by something causing multiple guests to login, really sucks. I'll ope it for you. Give me a sec.

Collussus 05-15-2009 06:41 PM

Quote:

Originally Posted by OcR Envy (Post 1811110)
It's based on a cron job. If your a user does not hit a page that includes the cron your cycle will not run at exactly top of the hour. You can resolve this if you have the ability to run server side crons.

First lets reply to this one, You're wrong. The cron job runs a php file EVERY minute to check if there has to be new turns.

Quote:

Originally Posted by BlueNinjaGo (Post 1810714)
Well I started doing a little log this morning and the times aren't very consistent

But it's been over 3 hours and I only have 10 turns, when it's supposed to be 12. I'm getting 2 turns each time the cycle hits, so that's correct. It's obviously not the hour default, since I'm getting 10, not 3. Is there anyway to check when the cycles are supposed to hit?

I suggest doing it different. instead of doing 2 turns per so much time, do 1 turn per half of the time you wrote down. This way you're 100% sure it works. If it still doesn't then try reuploading the file inside the includes/cron folder of conquest

PGAmerica 05-15-2009 07:13 PM

Quote:

Originally Posted by DobieGillis? (Post 1811361)
had to today. Getting hit by something causing multiple guests to login, really sucks. I'll ope it for you. Give me a sec.

Sweet! I am in. Your conquest looks cool, but you need more nations. There are so many to choose from in the Star Trek universe.

Collussus 05-15-2009 07:21 PM

if anyone needs any more custom stuff in your conquest, ill be happy to make it if i see that it could be used for more than just your forum.

PGAmerica 05-15-2009 07:34 PM

Quote:

Originally Posted by Collussus (Post 1811419)
if anyone needs any more custom stuff in your conquest, ill be happy to make it if i see that it could be used for more than just your forum.

Such as what? It is pretty awesome as it is right now.

BlueNinjaGo 05-15-2009 07:43 PM

Quote:

Originally Posted by Collussus (Post 1811419)
if anyone needs any more custom stuff in your conquest, ill be happy to make it if i see that it could be used for more than just your forum.

Did you check out all the suggestions made so far? Perhaps a compiled list would be easier... But several of my users requested a countdown clock that shows the next cycle

PGAmerica 05-15-2009 09:48 PM

I have a few questions:

1) How do you remove a nation? I do not see any options to do this.
2) I saw vbArmy. Is this basically the same thing only better?
3) How do I remove the link on the navbar (without removing or commenting $template_hook[navbar_buttons_left])? I have an additional navbar and want this there.

BlueNinjaGo 05-15-2009 11:49 PM

There's an option in ACP to turn off the link in the navbar. If you want to add the link somewhere else, just add it manually.

lighthazard 05-16-2009 10:27 AM

Quote:

Originally Posted by BlueNinjaGo (Post 1811175)
A little more detail? Did you just install? Was it working before but now there's errors?

When I try to attack it says I don't have permission to do that.

Collussus 05-16-2009 08:12 PM

Quote:

Originally Posted by BlueNinjaGo (Post 1811441)
Did you check out all the suggestions made so far? Perhaps a compiled list would be easier... But several of my users requested a countdown clock that shows the next cycle

My solution for the countdown clock only works for if you're cycles are under an hour. It went wrong on my forum because for some reason it says you're getting it in an hour, and sometimes the whole clock isn't correct either.... Anyways, here's the simple solution:

add this somewhere in the conquest.php file. Search for :

PHP Code:

if ($_REQUEST['do'] == 'homebase'

under the { add:

PHP Code:

$time $vbulletin->db->query_first("SELECT * FROM ".TABLE_PREFIX."conquest_gameset");
    
$next = ($time[gLastCycle] + (60 $time[gCycleMinutes])) - time();
$player[nextTurn] = date('i:s'$next); 


Then anywhere in your homebase template add something like "Next turn: $player[nextTurn]"

PGAmerica 05-16-2009 08:28 PM

Quote:

Originally Posted by BlueNinjaGo (Post 1811556)
There's an option in ACP to turn off the link in the navbar. If you want to add the link somewhere else, just add it manually.

Thank you, I will check into that. What about my other 2 questions?

Collussus 05-16-2009 09:09 PM

Quote:

Originally Posted by PGAmerica (Post 1811500)
I have a few questions:

1) How do you remove a nation? I do not see any options to do this.
2) I saw vbArmy. Is this basically the same thing only better?
3) How do I remove the link on the navbar (without removing or commenting $template_hook[navbar_buttons_left])? I have an additional navbar and want this there.

1) I cant find the option either. I havent looked at the database but i guess the query for deleting a nation would be something like: DELETE FROM TABLE_PREFIXconquest_nations WHERE nID = <id> (not sure about this)

2) it's based on the idea, it's not the same.

3) Been answered already :p

EDIT:

If anyone is using kbank on their forum too, i made an item for the shop to give turns when you buy it ;)

legion! 05-17-2009 05:04 AM

this hack is a beautiful thing i have it up and running on my forums...there shuld be a way to leave an alliance...

BlueNinjaGo 05-17-2009 02:03 PM

Suggestions:
A way to delete factions from the frontend.
A way for users to leave the entire sytem all together. (Maybe with an option so admins can choose if users can rejoin again, and if so, after x days)
A way for users to opt out of PM's.(Some are getting annoyed by them)
Some sort of disadvantage for having an army too large... like an upkeep cost similar to the spy.


All times are GMT. The time now is 08:10 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02126 seconds
  • Memory Usage 1,914KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete