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)

AfterWorldForum 08-02-2010 05:21 PM

Quote:

Originally Posted by sticky (Post 2077576)
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...ure378-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, 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

Quote:

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:

Quote:

// ################################################## ######################
// 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:

Quote:

<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

1 Attachment(s)
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

1 Attachment(s)
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

Quote:

Originally Posted by Morrus (Post 2197534)
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

Quote:

Originally Posted by Developerz (Post 2417053)
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

Quote:

Originally Posted by Morrus (Post 2197534)
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?


All times are GMT. The time now is 09:20 PM.

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.01680 seconds
  • Memory Usage 1,807KB
  • 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
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (19)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