PDA

View Full Version : Major Additions - Realm Conquest System


Pages : 1 2 [3]

dai-kun
11-18-2009, 05:44 AM
Where in the conquest.php script do you edit?
I followed the link but I am still not sure where to do the edit.
Thanks

after <?php or you can add it to your config.php file for the entire vbulletin. This method is only if you have your own dedicated server. If your host finds out that you are using more memory than they provide, they could contact you.

You can ask your host to increase the memory limit in the php.ini.

geocodes
11-19-2009, 09:35 PM
Can anyone help me with that? im trying to make an VIP nation (only a certain usergroup would use this), but, how to do this? (where to set permitions of a certain nation)

dai-kun
11-20-2009, 04:21 AM
Can anyone help me with that? im trying to make an VIP nation (only a certain usergroup would use this), but, how to do this? (where to set permitions of a certain nation)

It's pretty late and I'm tried so this is the best I can come up with.

Edit your conquest_enlist_bit template,

find
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>

and replace it with
<if condition="is_member_of($vbulletin->userinfo, 6,7)">
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>
<else />
<if condition="$nation[nationID] != 3">
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>
</if>
</if>

Change the red numbers to your special VIP groups and the green number to that special nation.

First half of code lets special users join any and all nations.
Second half prevents users not set in first part of code from joining specific nation.

RokuDaMerlin
11-20-2009, 05:15 AM
hello, i have the product complete edit .. my system have now the name Devils Vs Angels and is in german ;D

we can i add image fields for amor and weapons ?

you can see my project here :D

http://www.diespielhalle.de/conquest.php

http://www.kingofcolors.de/dva1.png

greez from germany Roku

geocodes
11-20-2009, 02:34 PM
It's pretty late and I'm tried so this is the best I can come up with.

Edit your conquest_enlist_bit template,

find
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>

and replace it with
<if condition="is_member_of($vbulletin->userinfo, 6,7)">
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>
<else />
<if condition="$nation[nationID] != 3">
<form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="joinrequest" value="$nation[nationID]" />
<input type="submit" value="<phrase 1="$nation[nName]">$vbphrase[conquest_enlist_join]</phrase>" />
</form>
</if>
</if>

Change the red numbers to your special VIP groups and the green number to that special nation.

First half of code lets special users join any and all nations.
Second half prevents users not set in first part of code from joining specific nation.

Im gonna test know... If works i will edit here.
EDIT: Worked great! thx.

RokuDaMerlin
12-08-2009, 11:20 AM
hmm can me a coder help ..

- i will add pictures for my weapons and amors ..

- i will add a upload system to the "homebase" (any user can upload a own picture "soldier or warrior") .. hmm

i am a code noob ..

when a coder here.. say "roku i help you or roku i coding this" i will pay the hard work !

(send me a email: info@mightycolors.com)

thx ;)

--- edit:

i have now edit the barracks ..
+ remove all training levels (we have 20+ list give to long)
+ add pictures (and center the buttons)

preview:

(i hope you like it)

http://img704.imageshack.us/img704/3015/vorschau.png

=) more Pictures more fun ;))

RokuDaMerlin
12-09-2009, 01:38 PM
sry for double post ..

my ideas for a new update:

- a user can only 1 attack become from the same user pro day
- auto refresh time
- weapons + amor + pictures
(pic <br> weapon titel <br> | power / money |)
- bite link ^^ for one click = 1 Gold or so ;)
- the attacker can louse gold when the other have more power ;)

i hope the owner can 1-2 or all from my wish-lish add

greez

Differentiation
12-11-2009, 07:59 AM
I am getting some errors.

Deprecated: Assigning the return value of new by reference is deprecated in URLHERE\vb\includes\init.php on line 55, 107, 111, 119, 130, 134, 142, 211, 289

and as well \includes\class_core.pph on line 2552.

What does this mean?

v12kid
12-11-2009, 03:44 PM
shame this is unsupported

anyone want to take it over and fix/update? Maybe we can get a few people to donate to a developer to do that? I would certainly make a "donation" to get this working as I would LOVE to have this

ragtek
12-11-2009, 06:02 PM
shame this is unsupported

anyone want to take it over and fix/update? Maybe we can get a few people to donate to a developer to do that? I would certainly make a "donation" to get this working as I would LOVE to have this
i asked the developer if i'm allowed to take the project over and to create a own on this base, but he didn't answer.

and if i would make it without his permission, it wouldn't be ok(stealing^^)
also it would be very hard to support it, because my english is not the best;)

Differentiation
12-11-2009, 06:14 PM
i asked the developer if i'm allowed to take the project over and to create a own on this base, but he didn't answer.

and if i would make it without his permission, it wouldn't be ok(stealing^^)
also it would be very hard to support it, because my english is not the best;)

he did say people can continue to develop it.
I wouldn't mind chipping in some money to get this mod fixed.

@Ragtek, your English is fine. I can help you with the language/translation issue if you are concerning that.

Differentiation
12-12-2009, 03:00 AM
Sorry for the double post, but I solved my problem previously.
Now I got another question.

I want to change all the "village" to another word.
How do I do that?

Solved my question via phrase and template editing.
Still trying to remove PM Notification.

Differentiation
12-12-2009, 09:54 AM
how can I remove the PM notification?

v12kid
12-12-2009, 02:58 PM
I agree with Diff Ragtek. Its been abandoned and he did state it was ok to continue so go for it!

Dutch_Boy
12-15-2009, 04:36 PM
Ragtek: I hope you can bring the mod to a new level and make it better. Asfare as i know you are allowd to change this mod becasue everone post there modivications in this topic.

Hornstar
12-22-2009, 12:37 AM
yeah it would be a shame to see this mod not go to VB4 and not become supported again, it could become quite the popular addition to VB.

upperwhitetrash
12-27-2009, 05:06 PM
does this mod work for 3.7 boards?

Dutch_Boy
12-29-2009, 07:54 PM
I have made a stupid mistake.... Deleted manual some databases:

http://i49.tinypic.com/24gm5cl.png

but i forgot to uninstall the conqust product. Evertime i try to play the game or try to uninstall the product i get a database error.

What i need to know is how do i make the databases my self with phpmyadmin?

Can someone plz tell how to do it.

Digital Jedi
01-01-2010, 09:17 PM
I have made a stupid mistake.... Deleted manual some databases:

http://i49.tinypic.com/24gm5cl.png

but i forgot to uninstall the conqust product. Evertime i try to play the game or try to uninstall the product i get a database error.

What i need to know is how do i make the databases my self with phpmyadmin?

Can someone plz tell how to do it.
Did you try just re-installing the game, like you would when you upgrade it?

Dutch_Boy
01-05-2010, 06:25 PM
Did you try just re-installing the game, like you would when you upgrade it?

Yea i did install the mod again. Deleted all the files en reinstalled them en reinstalled the product-conquest.

Digital Jedi
01-06-2010, 03:56 PM
Yea i did install the mod again. Deleted all the files en reinstalled them en reinstalled the product-conquest.
Did you check to see if all the databases were rebuilt?

Dutch_Boy
01-07-2010, 11:20 AM
There are no databases rebuild. And thats the problem. The product-conquest wont install the databases.

Database error in vBulletin 3.8.4:

Invalid SQL:
SELECT * FROM conquest_gameset;

MySQL Error : Table 'highflow-2.conquest_gameset' doesn't exist
Error Number : 1146
Request Date : Thursday, January 7th 2010 @ 02:17:43 PM
Error Date : Thursday, January 7th 2010 @ 02:17:43 PM
Script : ****
Referrer :
IP Address : *******
Username : ****
Classname : vB_Database
MySQL Version : 5.0.84-0.dotdeb.0-log

Dutch_Boy
01-10-2010, 09:44 AM
Digital any idea how to fix it?

tigrattack
01-18-2010, 07:45 PM
Hi all,

My membership really enjoys this...

If anyone takes over the build of this mod, I have a few suggestions:

The ability for a player to be totally destroyed and an option in the Admin controls that allows the 'On/Off' of a players ability to be totally destroyed. That can be turned 'On' when the Nations seem to have enough players in them or when a join time deadline is reached.

Then the ability for Nations to be destroyed (and not rejoined) after all members within that Nation have been wiped out. Leaving one Nation at total dominance to end the game.

Then you could reset and start over again.

Just an idea, not sure if it could even be implemented.

Thanks

blake247
01-20-2010, 02:33 AM
I would sell myself on the street corner for new vb4 compliant Conquest..../cry

BlackJacket
01-29-2010, 10:19 PM
I would sell myself on the street corner for new vb4 compliant Conquest..../cry

me too...

RokuDaMerlin
01-30-2010, 07:34 AM
more peoples have send a message to the CEO from this sys .. for self upgrates and more .. the CEO send not A message back .. i find this not ok .. this sys is so nice and i miss updates sooo !

Digital Jedi
01-30-2010, 07:41 PM
more peoples have send a message to the CEO from this sys .. for self upgrates and more .. the CEO send not A message back .. i find this not ok .. this sys is so nice and i miss updates sooo !
CEO? You mean the author of the modification? What do you think "Not Supported" means?

almmas2008
02-03-2010, 08:30 PM
How do I give the power to disable the private messaging feature for those who try to keep in accessing it?

RokuDaMerlin
02-06-2010, 04:09 PM
CEO? You mean the author of the modification? What do you think "Not Supported" means?

yes i mean the author .. i find this not ok .. other peoples send messages to the autor for self updates for the mod and the author send not a message back for a ok .. and this self prog. no new updates ..

no ok ... no updates from other peoples ..

you know what i mean ?

greez

Digital Jedi
02-06-2010, 05:06 PM
yes i mean the author .. i find this not ok .. other peoples send messages to the autor for self updates for the mod and the author send not a message back for a ok .. and this self prog. no new updates ..

no ok ... no updates from other peoples ..

you know what i mean ?

greez
I know you don't like it, but what I'm saying is, you shouldn't really be expecting support or replies from a modification that says Unsupported. That's what Unsupported means. Unsupported means don't expect updates, don't expect progress reports and certainly don't expect replies to PMs. He's not supporting it and marked it to so we'd know that.

DNG
02-14-2010, 04:39 PM
seems great, thanks

tommac3
02-14-2010, 06:38 PM
I am getting this error when I try to do anything on the conquest link:

tommac you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

do I need to configure the permissions somewhere?

tommac3
02-14-2010, 07:10 PM
I also dont get the admin part of the conquest menu. It looks like I didnt set up up 100% correctly .. but I followed all of the instructions.

Digital Jedi
02-17-2010, 04:30 PM
I am getting this error when I try to do anything on the conquest link:

tommac you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

do I need to configure the permissions somewhere?
That's the standard message for something you don't have access to in Usergroup Permissions. You need to allow the Usergroups you want in the Usergroup Manager.


I also dont get the admin part of the conquest menu. It looks like I didnt set up up 100% correctly .. but I followed all of the instructions.
The Conquest System Settings should be showing up in vBulletin Options.

tommac3
02-17-2010, 10:21 PM
That's the standard message for something you don't have access to in Usergroup Permissions. You need to allow the Usergroups you want in the Usergroup Manager.



The Conquest System Settings should be showing up in vBulletin Options.

I have the systems settings but I dont have the admin part of the menu ( on the conquest menu )

tommac3
02-17-2010, 10:26 PM
I got it all working ... thanks ... just needed to set up the user group perms.

greenspan
03-27-2010, 12:10 AM
Hi. Anyone making this for vb4.0? Thanks!

foxfirediego
03-30-2010, 11:46 PM
Hi. Anyone making this for vb4.0? Thanks!
wondering the same

AfterWorldForum
04-07-2010, 07:02 PM
For those of you wondering how to remove the ip from showing on the forum, find the conquest_comments_bit template, and remove this line:


<if condition="$isMod">($comment[cIPAdd])</if>

AfterWorldForum
04-15-2010, 06:29 AM
I implemented a solution to prevent people from getting spammed with messages when they get attacked. In short, I fire off a query checking whether the user that was attacked has any unread PMs from the conquest system, and only send the PM if the above is not true.

To accomplish this, open up functions_conquest_village.php and replace this:


$message .= "]Click here to view futher information on $player[username]'s village. ($baseurl/$filename?do=village&pid=$player[playerID)";

$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('iconid', 4);
$pmdm->set('fromuserid', $player[userid]);
$pmdm->set('fromusername', $player[username]);
$pmdm->set('title', $title);
$pmdm->set('message', $message);
$pmdm->overridequota = true;
$pmdm->set_recipients($village[username], $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();


with this:


// Start modification to prevent players from being spammed
$conquestpmread_sql = "SELECT MIN(pm.messageread) pmsRead FROM user JOIN pm ON user.userid = pm.userid JOIN pmtext ON pm.pmtextid = pmtext.pmtextid WHERE user.username = '" . $village[username] . "' AND pmtext.title LIKE 'You have been attacked%'";

$conquest = $vbulletin->db->query_first($conquestpmread_sql);

if (!$conquest['pmsRead'] == 0) // Apparently there's no unread Conquest messages for this user.
{
$message .= "]Click here to view futher information on $player[username]'s village. ($baseurl/$filename?do=village&pid=$player[playerID)";

$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('iconid', 4);
$pmdm->set('fromuserid', $player[userid]);
$pmdm->set('fromusername', $player[username]);
$pmdm->set('title', $title);
$pmdm->set('message', $message);
$pmdm->overridequota = true;
$pmdm->set_recipients($village[username], $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
// End modification


Feel free to alter this to your needs. I tested this on my own system, and it seems to be working as intended. Should you find something different, please let me know.

RollaJedi
04-15-2010, 02:20 PM
you will make this for vbulletin 4, yes?

Dutch_Boy
04-15-2010, 05:39 PM
I implemented a solution to prevent people from getting spammed with messages when they get attacked. In short, I fire off a query checking whether the user that was attacked has any unread PMs from the conquest system, and only send the PM if the above is not true.

To accomplish this, open up functions_conquest_village.php and replace this:


$message .= "]Click here to view futher information on $player[username]'s village. ($baseurl/$filename?do=village&pid=$player[playerID)";

$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('iconid', 4);
$pmdm->set('fromuserid', $player[userid]);
$pmdm->set('fromusername', $player[username]);
$pmdm->set('title', $title);
$pmdm->set('message', $message);
$pmdm->overridequota = true;
$pmdm->set_recipients($village[username], $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();


with this:


// Start modification to prevent players from being spammed
$conquestpmread_sql = "SELECT MIN(pm.messageread) pmsRead FROM user JOIN pm ON user.userid = pm.userid JOIN pmtext ON pm.pmtextid = pmtext.pmtextid WHERE user.username = '" . $village[username] . "' AND pmtext.title LIKE 'You have been attacked%'";

$conquest = $vbulletin->db->query_first($conquestpmread_sql);

if (!$conquest['pmsRead'] == 0) // Apparently there's no unread Conquest messages for this user.
{
$message .= "]Click here to view futher information on $player[username]'s village. ($baseurl/$filename?do=village&pid=$player[playerID)";

$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$pmdm->set('iconid', 4);
$pmdm->set('fromuserid', $player[userid]);
$pmdm->set('fromusername', $player[username]);
$pmdm->set('title', $title);
$pmdm->set('message', $message);
$pmdm->overridequota = true;
$pmdm->set_recipients($village[username], $botpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
}
// End modification


Feel free to alter this to your needs. I tested this on my own system, and it seems to be working as intended. Should you find something different, please let me know.

Thanks. Added to the game and will test it.

Feanor_87
04-16-2010, 01:17 AM
Is there an option that allows you to leave a nation?

MichaelDance
05-12-2010, 07:38 PM
carnt wait to set this up on my forum, thanks bud defo installing..

murekhalir
05-12-2010, 07:48 PM
can't wait to get a vb4 version.

anuanu
06-07-2010, 12:19 AM
Me to! It will be amazing.

BloodRavens
06-09-2010, 10:17 AM
The graphics seems good. Is this release is ready to be used in large forum or it still needs some tweaking? It will be good if it is compatible with vbExperience.....

Dutch_Boy
06-09-2010, 02:35 PM
Need some tweaking. We are waiting for a update. But i think there will never be one :(

session-one
06-13-2010, 07:51 AM
is a vb4 launch planned?

NakedCrook
06-13-2010, 07:46 PM
A trading system would be nice...and an option for admins to edit the race of other players (in case someone wants to change). A Player deletion tool would also be nice.

JasonReynolds
06-17-2010, 06:27 PM
Oh so this is not for 4? X.X found in 4 mods. it messes up my screen :(

weedheaven
06-18-2010, 12:01 PM
How can i delete somebody from this system? As i cant find it anywhere, and how can i disable the attacking messages if somebody doesnt want it.

Digital Jedi
06-19-2010, 10:31 PM
How can i delete somebody from this system? As i cant find it anywhere, and how can i disable the attacking messages if somebody doesnt want it.
I'm afraid it's not that finite. Not to mention, users are just created based on your members.

GoBoiano
06-21-2010, 07:14 PM
Hi. I seem to get this problem when one of my members try to post in the forum section, but I tested it on other members accounts and it seems to work for them. His account was the only account that it didn't work for. This error always came up:

Database error in vBulletin 3.8.5:

Invalid SQL:
INSERT IGNORE INTO vb_conquest_comments (nationID, playerID, userID, username, cDate, cState, cText, cIPAdd, cSmilies)
VALUES ('3', '5', '3', 'Poppin' Dragon', '1277150409', 'visible', 'test', '66.188.67.166', '1');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Dragon', '1277150409', 'visible', 'test', '66.188.67.166', '1')' at line 2
Error Number : 1064
Request Date : Monday, June 21st 2010 @ 01:00:09 PM
Error Date : Monday, June 21st 2010 @ 01:00:09 PM
Script : http://www.goboiano.com/conquest.php?do=comments
Referrer : http://www.goboiano.com/conquest.php?do=comments
IP Address : 66.188.67.166
Username : Poppin' Dragon
Classname : vB_Database
MySQL Version : 5.0.91-log

Digital Jedi
06-22-2010, 03:07 AM
Hi. I seem to get this problem when one of my members try to post in the forum section, but I tested it on other members accounts and it seems to work for them. His account was the only account that it didn't work for. This error always came up:

Database error in vBulletin 3.8.5:

Invalid SQL:
INSERT IGNORE INTO vb_conquest_comments (nationID, playerID, userID, username, cDate, cState, cText, cIPAdd, cSmilies)
VALUES ('3', '5', '3', 'Poppin' Dragon', '1277150409', 'visible', 'test', '66.188.67.166', '1');

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Dragon', '1277150409', 'visible', 'test', '66.188.67.166', '1')' at line 2
Error Number : 1064
Request Date : Monday, June 21st 2010 @ 01:00:09 PM
Error Date : Monday, June 21st 2010 @ 01:00:09 PM
Script : http://www.goboiano.com/conquest.php?do=comments
Referrer : http://www.goboiano.com/conquest.php?do=comments
IP Address : 66.188.67.166
Username : Poppin' Dragon
Classname : vB_Database
MySQL Version : 5.0.91-log
It's probably the single quote in his screen name. It's breaking the SQL syntax.

Dribbles
06-22-2010, 03:21 AM
The ' in Poppin' Dragon might be messing things up. Try it as Poppin Dragon without the '

GoBoiano
06-23-2010, 05:33 AM
It's probably the single quote in his screen name. It's breaking the SQL syntax.

The ' in Poppin' Dragon might be messing things up. Try it as Poppin Dragon without the '

Yes. That was the problem. Thanks guys :)

tigrattack
07-19-2010, 12:37 AM
How can i delete somebody from this system? As i cant find it anywhere, and how can i disable the attacking messages if somebody doesnt want it.

Run Query:

DELETE FROM conquest_players WHERE forumID = <userid on forums itsself>

sticky
08-01-2010, 11:26 AM
is a vb4 launch planned?
Same question.

AfterWorldForum
08-02-2010, 05:21 PM
Same question.

To the best of my knowledge, Jaxel abandoned this mod a long time ago. On my forum, the system is quite popular, and I have been busy porting it to vB4 during the last days. I run a bit of a customized version, though, some code of which was developed by someone other than me. I'm not sure I can just release the altered mod without his permission. I'll see what I can do about that bit.

One of the changes made is completely sidestepping the cron job to take care of the cycles. We also added a cycletimer to the relevant templates so people know when the next cycle hits. Also cool is ripping out the default comments section, and instead using a couple of custom-made private forums and having members of each faction automatically be put in the usergroup with permission for that forum.

The porting was quite cumbersome, though, and involves quite a bit of editing in templates and actual code, but it's not undo-able.

I'm having people test the new system as we speak, so with a little luck, I can let you know how things worked out for us.

One note is that I used a <div class="restore"> tag to fix any layout trouble.

Cheers,

Peter

neoacro
10-11-2010, 05:50 AM
oh.. let me know if you need testers, i won't mind testing on my forum. :) got 198 members.

AfterWorldForum
10-17-2010, 01:12 PM
In the light of the recent developments (IB suing XenForo), combined with knowing I will not be able to support this anyway, I'm not going to release the vB4 version of this.

Sorry.

therogueforums
12-30-2010, 12:38 PM
Would anyone be willing to do a custom edit for this mod- the ability to add images to weapons and upgrades?

http://www.forumoftheoldrepublic.com/members/ki-adi-mundi-albums-screens-n-shyt-picture378-ex1.png

What I envision are images that can be added, ideally through the Admin panel of the game, that can be assigned to a specific weapon, armor item, or barracks item.

Digital Jedi
01-15-2011, 05:16 AM
Has anyone else reached a ceiling on the number of troops you can get? I had a user loose 15 points, before he realized that the number wasn't being added on.

Developerz
02-24-2011, 11:28 PM
I had to make an imaginary ceiling so members would not constantly be on a troop race:).

I realize the coder has stopped supporting this mod, but I wonder if he would simply sell it so somebody else could continue working on it. This mod is one of the main reasons that my forum is not upgrading to VB 4.

C0D3D
03-29-2011, 08:00 PM
Any chance of making this work with v4 ?

Morrus
04-25-2011, 05:18 PM
Got this running OK, and applied a bunch of the fixes and extras from this thread (man, there were a LOT of them). I've applied:

- Equation fixes
- Trade option
- Restrict access to overpopulated nations
- Usergroup (subscriber) specific nation
- a few more

I've also slightly edited a lot of the templates to look - at least in my opinion - a bit better, plus a crapload of phrases and/or text.

Kinda working on fudging a couple of new simple options (by literally copying code - I can't write it myself):

- Hire mercenaries (troops for gold)
- Dismiss troops (to free up some gold)

I've managed those, as I just used the code already in place for recruiting troops and just changed the numbers:

USE AT OWN RISK -THIS IS WHAT I'VE DONE SO FAR AND I DOESN'T WORK YET! IN FACT, IT GIVES A BLANK WHITE PAGE WHEN NEW USERS ATTEMPT TO ACCESS THE SYSTEM. WORKING ON IT STILL, BUT DON'T USE THIS CODE.

With that dire disclaimer out of the way, here's how I did it. You'll need to change the red numbers to whatever you prefer. If you wanna see it in action first, I have it running on my forum (http://www.enworld.org/forum/conquest.php?do=index), but you'll obviously need to register and create a village before you can view the new options in Village Overview.

ADD TO FUNCTIONS_CONQUEST_HOMEBASE.PHP

function hire_mercenary($player)
{
global $vbulletin, $settings, $passcolor, $failcolor;

if ($player[pTurns] < 5)
{
return '<font color="'.$failcolor.'">You can not hire mercenaries as you do not have enough actions available</font>';
}

elseif ($player[pGold] < 10)
{
return '<font color="'.$failcolor.'">You can not hire mercenaries as you do not have enough resources available</font>';
}

$newTurnCount = $player[pTurns] - 5;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTurns = '".$newTurnCount."' WHERE playerID = ".$player[playerID]."");

$totalGain = ceil($player[pTroops] * ($settings[gRecruitRatio]/50));

$newTroopCount = $player[pTroops] + $totalGain;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTroops = '".$newTroopCount."' WHERE playerID = ".$player[playerID]."");

$newGoldCount = $player[pGold] -10;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pGold = '".$newGoldCount."' WHERE playerID = ".$player[playerID]."");


return '<font color="'.$passcolor.'">Your recruiters have returned and '.$totalGain.' mercenaries have joined your military ranks</font>';
}


function fire_troop($player)
{
global $vbulletin, $settings, $passcolor, $failcolor;

if ($player[pTroops] < 1)
{
return '<font color="'.$failcolor.'">You do not have any troops to dismiss</font>';
}

elseif ($player[pTurns] < 1)
{
return '<font color="'.$failcolor.'">You can not dismiss troops as you do not have enough actions available</font>';
}

$newTurnCount = $player[pTurns] - 1;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTurns = '".$newTurnCount."' WHERE playerID = ".$player[playerID]."");

$newTroopCount = $player[pTroops] -1;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pTroops = '".$newTroopCount."' WHERE playerID = ".$player[playerID]."");

$newGoldCount = $player[pGold] +1;

$vbulletin->db->query_write("UPDATE IGNORE ".TABLE_PREFIX."conquest_players SET pGold = '".$newGoldCount."' WHERE playerID = ".$player[playerID]."");


return '<font color="'.$passcolor.'">You have successfully dismissed a soldier and gained 1 resources</font>';
}


ADD TO CONQUEST.PHP:

// ################################################## ######################
// IS USER RECRUITING MERCENARIES?

if ($vbulletin->input->clean_gpc('p', 'hiremerc', TYPE_STR))
{
$noticeTEXT = hire_mercenary($player);
$player = fetch_player($vbulletin->userinfo[userid]);
}

// ################################################## ######################
// IS USER DISMISSING TROOPS?

if ($vbulletin->input->clean_gpc('p', 'firetroop', TYPE_STR))
{
$noticeTEXT = fire_troop($player);
$player = fetch_player($vbulletin->userinfo[userid]);
}


ADD TO TEMPLATE CONQUEST_HOMEBASE:

<tr>
<td class="thead" align="center">Hire Mercenaries<br><small>Mercenaries cost 10 resources and 5 actions each</small></td>
</tr>
<tr>
<td class="alt1" align="center"><form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="hiremerc" value="true" />
<input type="submit" value="Hire Mercenaries">
</form></td>
</tr>

<tr>
<td class="thead" align="center">Dismiss Troops<br><small>Dismissing troops costs 1 action, and frees up 1 resources</small></td>
</tr>
<tr>
<td class="alt1" align="center"><form action="$filename?do=homebase" method="post">
<input type="hidden" name="securitytoken" value="$bbuserinfo[securitytoken]" />
<input type="hidden" name="firetroop" value="true" />
<input type="submit" value="Dismiss Troops">
</form></td>
</tr>


Things I want to do, but can't because it requires actually writing something (as opposed to copying and pasting some code and changing some numbers):

- Village names
- Couple of extra mission types for spies (which I've renamed "adventurers")
- Marketplace which sells special items
- vBCredits II integration (to spend in that marketplace)
- Leave game option
- Change allegiance option

None of that can I even begin to do, unfortunately, but I think that's what would turn this into a decent but basic game into a really good one.

Morrus
04-26-2011, 09:21 PM
Well, I got the mercenaries and dismiss troops options working.

I also now have village names, village wealth categories, morale, and I'm working on more. Thing is it's been a few days of gradual incremental changes and trial-and-error (I've never written PHP before, so I'm learning as I go) and I can't remember everything I've done. It involved direct SQL queries to change the database and add columns, template changes, changes to various different files, and so on.

Morrus
04-28-2011, 11:18 AM
Here's what I've managed so far. Working on new stuff and learning PHP as I go. Everything seems to be working so far.

April 28: You can now delete your settlement from your village overview page. This is an irreversible action.
April 28: When you recruit or dismiss troops, they now add to or subtract from your population.
April 28: Mercenary hire cost is now multiplied by your army upgrade level.
April 28: Total settlements now displayed on game homepage.
April 28: Happiest Settlements page added under Largest and Richest Settlements. Based on morale.
April 27: New stats (morale, wealth, law & order, rank, etc.) now displayed on the Largest and Richest village pages.
April 27: Village descriptions now describe morale, law & order, wealth, and other new factors.
April 27: Trend information now indicated next to resources and morale; displays the cycle adjustment from last cycle.
April 27: Experience points added. Player rank increases at certain thresholds (freeman, sir, lord, viscount, count, duke, grand duke, prince). Gain 1XP for failing an attack raid and 2XP for succeeding.
April 27: Population now a separate stat from troops. Increases each cycle. Village size definitions (thorp, hamlet, village, small town, large town, city, metropolis) based on population and updated each cycle.).
April 27: Wealth and Law & Order now have text descriptors. Wealth: poverty stricken, poor, comfortable, wealthy, rich, decadent. Law: anarchic, disorganized, harmonious, strict, severe, draconian.
April 27: Law & Order attribute now measures ratio between troops and population. Affects morale.
April 27: Wealth attribute now measures ratio between resources and population. Affects morale.
April 27: Population now a separate stat from troops. Increases each cycle. Village size definitions (thorp, hamlet, village, small town, large town, city, metropolis) based on population and updated each cycle.
April 27: Morale attribute added. Affected by taxes and success/failure in attack raids.
April 27: Taxes added. Set high, low, or medium from settlement overview.
April 27: Village description added on overview page. Describes your village by pulling various stats out.
April 26: You may now change your settlement's name. Villages now have a default name of "New Village" until changed.
April 26: Hire mercenaries and dismiss troops functions added.
April 26: Trade options added - send gold or troops to another settlement. [this taken from this thread]
April 26: Game launched.

https://vborg.vbsupport.ru/external/2011/04/7.jpg

https://vborg.vbsupport.ru/external/2011/04/8.jpg

https://vborg.vbsupport.ru/external/2011/04/9.jpg

https://vborg.vbsupport.ru/external/2011/04/10.jpg

rob01
05-17-2011, 04:13 PM
someone got this working for vb4?

Morrus
05-19-2011, 12:36 PM
Dunno, but my 3.8 version is coming along well.

Buildings, navies, blockades, cavalry, artillery, ranks - too much stuff to list!

Eruantien
06-29-2011, 08:54 PM
Looking for a vB4 version as well.

kevin.kool
07-18-2011, 02:20 PM
I'm really love this game :)
Will you update and add more functions to this game, Jaxel ? :)

need2fart
08-14-2011, 03:51 AM
Dunno, but my 3.8 version is coming along well.

Buildings, navies, blockades, cavalry, artillery, ranks - too much stuff to list!

Are you going to release your version? :D

Developerz
04-18-2013, 03:15 AM
Unfortunately, this one is abandoned. Would have loved to buy it or at least communicate with the coder about it.

Digital Jedi
04-18-2013, 07:19 AM
Unfortunately, this one is abandoned. Would have loved to buy it or at least communicate with the coder about it.
Jaxel is developing for XenForo now. As far as can tell, he's not developing Conquest for that software, either.

Digital Jedi
12-26-2013, 04:50 AM
Dunno, but my 3.8 version is coming along well.

Buildings, navies, blockades, cavalry, artillery, ranks - too much stuff to list!
While you couldn't release a version of your own (at least, not unless Jaxel opened up approval for it), if your additions could be worked into an add-on for Conquest, you'd be able to release it that way. I know I would love to see expansion of this product.

Developerz
03-04-2015, 03:56 AM
Do you think this would work in VB4? Need to upgrade my forum soon and this one of the main plugins my members do not want to see go.

Also, is there anything even close to it on VB4?