Great Idea.. I think you should include some incentive to "remove headquarters", maybe make protection cost something or Protected bases need more upkeep.. something like that.. without this, what will happen is, you will have "big" protected bases with great loot, and possibly unprotected lootless bases no one will want to raid..
Once a player decides to raid another they should lose protection.. for at minimum some cooldown.. IMO.. Great Work thus far!!!
Needs an Incentive to Un-Protect
Thanks for the feedback! I will look into ways of adding a configurable cost of upkeep. If you can think of other incentives or costs let me know.
Right now the main benefit is that when you remove protection you gain the ability to raid other headquarters who have also removed their protection. So only unprotected headquarters can raid each other. However if we can add more reasons to encourage this it will definitely make the gameplay more interesting.
digital0iced0Right now the main benefit is that when you remove protection you gain the ability to raid other headquarters who have also removed their protection.
you can raid another HQ if they have removed protection without removing the protection on your own HQ
Ah that should not happen. It may be a bug Tom. Have you confirmed this with other people?
What the code does is when you attack a building it will check if you have building privilege there.. if you do.. then you can damage it. If not it checks if there is a HQ there. If there isn't, meaning it's a regular non hq base, then it lets you attack it. If there is a hq base, it checks if it's protected, if it is you can't attack it. If it is not protected it checks if the attacker is a member of a protected base. If he is, then he can't attack. That's the main flow of the combat section. So it shouldn't be possible but perhaps there is a bug in there somewhere.
i tested it with another account so me and another player tried it
I can raid his base while my HQ is protected.
This is what i was trying to tell you at the begining
Tom you mentioned you have two accounts. Can you please create a protected headquarter and an unprotected headquarter (with your other account) in my server? I can then try to damage both and debug this a little bit.
going to log in now and test it
will set up 2 bases at spawn on beach
Im going to retest back on mine as the other player built a base well away from mine yet it said he could nto build inside another HQ
I cannot reset it as im not admin and it wont let me re-add a new HQ on your server
Merged post
From my tests - we both built a protected base and an unprotected base
With Protection on the main bases we both could damage each others unprotected base
We could not damage the protected bases
I thought in order to do damage we had to remove the protection from our main base ??????
Ah yeah that is the expected behavior. The reason I made this the default behavior is that it allows players to still have fun raiding regular bases. There's no guarantee that a regular base won't have good loot inside, so it could still be quite fun trying to get in. It's also fair because other players can also raid your regular bases so it balances out. However I will make this option configurable in case some admins want to make it as an added incentive for players to remove their HQs protection before being able to raid at all.
I havent tested this myself yet but looking at your code, I think it could be possible for some one to drive up next to a headquarter, with a truck full of rocks, and unload them. This would decrease the protection and they could drive away and come back loaded and repeat until it was gone?
also what about furnaces out side if I load up each slot with 1 wood does it increase the protection?
Merged post
I really like this idea btw.. :-)
Merged post
tbh, you may not even need protection if players can see the Lack of loot. :-)
That could be a good plugin on its own, the "BaseFlex" plugin which shows the Strength/Amount of the loot in each base.. Players with the most become the largest targets. :-)
Hah, yeah thats true about that BaseFlex plugin idea. They may not attack a base at all! I will think more about this.
I took some of your feedback into account. Essentially I made it so if you're not a member of a HQ you can't use storage containers there so that eliminates the threat of them adding stuff to lower protection. As far as vehicles, they dont affect HQ's overall tallies. However, to prevent the HQ members from trying to be sneaky and shoving a bunch of vehicles in their base with loot in them, I made it so after the vehicles start to decay they start to discard random items in its storage. I can't really think of any other way to exploit this at the moment.