Weapons upkeep
Page 1 of 1 • Share •
Weapons upkeep
All weapons will suffer around 1% of their max power as damage every 4 turns. (Even tanks and guns need regular maintenance or they will deteriorate and become useless)
A special deposit bank will get introduced where you can deposit funds that will autorepair your weapons for the amount that they become damaged. Note however that although the repair process is automatic, the deposit of funds is NOT. No funds in the special bank means your weapons will suffer deterioration until they are completely useless.
Due to the fact that the first few weps will be too weak you will not notice this until a bit later
On hold until a suitable and effective method of calculation exists which doesn't consume too many resources.
In short, don't expect this unless I announce that i actually even begun coding it.
A special deposit bank will get introduced where you can deposit funds that will autorepair your weapons for the amount that they become damaged. Note however that although the repair process is automatic, the deposit of funds is NOT. No funds in the special bank means your weapons will suffer deterioration until they are completely useless.
Due to the fact that the first few weps will be too weak you will not notice this until a bit later
On hold until a suitable and effective method of calculation exists which doesn't consume too many resources.
In short, don't expect this unless I announce that i actually even begun coding it.
Last edited by Admin on Sat Dec 06, 2008 2:47 pm; edited 1 time in total

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Re: Weapons upkeep
liking this too similar to same game i mentioned before very nice
Mad King George- Aderan Worker

- Number of posts: 129
Registration date: 2008-08-30
Re: Weapons upkeep
again lol, never saw that any game have it, although probably only cos i played unbalanced games so far 

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Re: Weapons upkeep
in multiverse wars you can train so much in a self repair system for weapons so if you get massed and you have 1 bil trained repair thats how much dmg it would take before they get damaged i believe
Mad King George- Aderan Worker

- Number of posts: 129
Registration date: 2008-08-30
Re: Weapons upkeep
Additionally, each unit can train in its own recovery from injury, and repair of hardware. This is done each turn, to the total of the points you allocate to this ability. More individuals in a unit, means more points required. If your unit is totally destroyed, you lose all of this ability since you must start with brand new Jedi Warrior Unit, with no other Jedi Warrior Unit to pass on the knoweldge and technique.
Finally, ensure the power of your fighters is kept up, for less power means less damage dealt on the enemy, and if a collective unit falls to zero power, they (including the commander and thier regenerative abilities) die and disappear forever!
http://starwars.multiverseconquest.com/military.php
link
Finally, ensure the power of your fighters is kept up, for less power means less damage dealt on the enemy, and if a collective unit falls to zero power, they (including the commander and thier regenerative abilities) die and disappear forever!
http://starwars.multiverseconquest.com/military.php
link
Mad King George- Aderan Worker

- Number of posts: 129
Registration date: 2008-08-30
Re: Weapons upkeep
ah this is different
you'll only be able to autorepair the damage that is being done as weapons degenerate every turn.
If you get hit then the autorepair will never repair that damage you got from being hit.
you'll only be able to autorepair the damage that is being done as weapons degenerate every turn.
If you get hit then the autorepair will never repair that damage you got from being hit.

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Re: Weapons upkeep
k nice
Mad King George- Aderan Worker

- Number of posts: 129
Registration date: 2008-08-30
Re: Weapons upkeep
I think this would be a very nice addition to the game.
I know this will use some CPU power, but the 4 hours don't have to be respected 100% ..... run the script when are less people logged on .... if it was 5.5 hours since the last calculation for example, the weapons will be damaged accordingly (5.5/4=1.375% losses).
Right now it won't make too much of a difference ... as our weapons have low durability, but eventually when it will get over 1000 that 1% will start making a difference.
I know this will use some CPU power, but the 4 hours don't have to be respected 100% ..... run the script when are less people logged on .... if it was 5.5 hours since the last calculation for example, the weapons will be damaged accordingly (5.5/4=1.375% losses).
Right now it won't make too much of a difference ... as our weapons have low durability, but eventually when it will get over 1000 that 1% will start making a difference.
rflash- Aderan Worker

- Number of posts: 189
Registration date: 2009-01-20
Re: Weapons upkeep
right now it doesn't even run lol i'll add this in a month or two at the soonest
and most of these planned updates are just written out to give people a rough idea, in 90% of the cases i deviate from the original plan and make some moficiations so it doesn't impair the game too much or make it mroe realistic or user friendly
and most of these planned updates are just written out to give people a rough idea, in 90% of the cases i deviate from the original plan and make some moficiations so it doesn't impair the game too much or make it mroe realistic or user friendly

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Re: Weapons upkeep
Before and After every UPDATE, INSERT, DELETE action you can run a code which check the query and parameter (this is database code, not php code).
From example, since weapon value is modified only upon a database modification, you can do so after every UPDATE, INSERT, DELETE operation upon the WEAPON table the Weapon upkeep value is calculated. You dont have to calculate it every 4 hours, only have to calculate it when the weapon are modified (I.E. UPDATE, INSERT, DELETE is used upon the WEAPON table).
After that, you just have to check every 4 hour if bank money > weapon ukeep, remove that upkeep or damage/delete weapons. You saved much of load.
Since weapon can be damaged, thus power lost, and ranking lost, you cant save the load of calculating the damage every 4 hours.
But i am pretty sure you can query the server to do :
ps: i'm not taking you for a foold admin, i know you are good coder, but i seriously dont know if you have any school knowledge about database, the kind of knowledge that is hardly learned another way.
Database is much more than a thing that help you store number, it can be a very wonderfull and magic tool if you are pushing it to the limit of it.
From example, since weapon value is modified only upon a database modification, you can do so after every UPDATE, INSERT, DELETE operation upon the WEAPON table the Weapon upkeep value is calculated. You dont have to calculate it every 4 hours, only have to calculate it when the weapon are modified (I.E. UPDATE, INSERT, DELETE is used upon the WEAPON table).
After that, you just have to check every 4 hour if bank money > weapon ukeep, remove that upkeep or damage/delete weapons. You saved much of load.
Since weapon can be damaged, thus power lost, and ranking lost, you cant save the load of calculating the damage every 4 hours.
But i am pretty sure you can query the server to do :
- Code:
Update player_base
set bank = bank - upkeep
Where bank - upkeep >= 0
=> this first query should be extremely fast
Select id from player_base where bank - upkeep < 0
=> there should not be many player without money in bank
Then loop that's remain player and damage their weapon.
======> YOU CAN SEE THAT if upkeep if not ALREADY calculated you have to calculate it for everybody, it require to check every weapon, multiply by techs, check if enough soldiers, yada yada yada, very heavy code i think; while if already calculated, ....It's take a magic few milisecond to calculate the bank change.
ps: i'm not taking you for a foold admin, i know you are good coder, but i seriously dont know if you have any school knowledge about database, the kind of knowledge that is hardly learned another way.
Database is much more than a thing that help you store number, it can be a very wonderfull and magic tool if you are pushing it to the limit of it.
Halaryel- Aderan Farmer

- Number of posts: 82
Registration date: 2008-08-22
Re: Weapons upkeep
Halaryel wrote:From example, since weapon value is modified only upon a database modification, you can do so after every UPDATE, INSERT, DELETE operation upon the WEAPON table the Weapon upkeep value is calculated. You dont have to calculate it every 4 hours, only have to calculate it when the weapon are modified (I.E. UPDATE, INSERT, DELETE is used upon the WEAPON table).
yeh when i saw the old koc code where it always calculated the strike action when you opened your base page or armory page or whatever made me crack up really bad.
96% of the stuff that you can find on all pages gets stored as a value in the database and the rest doesn't get stored cos there are no functions associated with it and you can generally only see those values on one or two very specific pages
and yes how you suggested it was also pretty much 1:1 how i planned on doing it

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Re: Weapons upkeep
True but if someone is on PPT for some time and he/she only comes to refresh the PPT nothing is changed in the Weapon table .... no buying/selling and no attacks.
And if he/she misses the end of the PPT when the first attack is made the upkeep hasn't been calculated so defense is quite bigger then it should be ..... take 4 days PPT .... that's -48% if liniar or -38% if cummulative .... I would say it makes quite a difference.
And if he/she misses the end of the PPT when the first attack is made the upkeep hasn't been calculated so defense is quite bigger then it should be ..... take 4 days PPT .... that's -48% if liniar or -38% if cummulative .... I would say it makes quite a difference.
rflash- Aderan Worker

- Number of posts: 189
Registration date: 2009-01-20
Re: Weapons upkeep
i think halaryel meant that how much upkeep should get deducted only changes when you get sabbed or loose weapons or buy them, and that's also the only times where it will get recalculated

Admin- Admin
- Number of posts: 1521
Registration date: 2008-08-18

Permissions of this forum:
You cannot reply to topics in this forum



